tint: IntrinsicTable: Rename open/closed -> template

The concept of 'closing' an open type or number made sense when these
were immutable once the first type/number had been matched during
overload resolution.
In order to support abstract numerics, these template parameters need to
be constrained as the arguments are evaluated, so there's no longer a
binary open / closed state.

Give up on this concept, and rename everything to 'template type' and
'template number'. This is likely easier for people to understand
anyway.

Also fix a small typo in the ICE message printed when there's an
ambiguous overload resolution (should never happen with the current
entries in the table).

Bug: tint:1504
Change-Id: I2bf043c71e5afa757259968eae4af830c50f38e0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90662
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
Ben Clayton
2022-05-17 22:42:32 +00:00
committed by Dawn LUCI CQ
parent d968e28a9a
commit 4c9ed74b5e
8 changed files with 2139 additions and 2141 deletions

View File

@@ -30,10 +30,10 @@ type Sem struct {
UnaryOperators []*Intrinsic
BinaryOperators []*Intrinsic
ConstructorsAndConverters []*Intrinsic
// Maximum number of open-types used across all builtins
MaxOpenTypes int
// Maximum number of open-numbers used across all builtins
MaxOpenNumbers int
// Maximum number of template types used across all builtins
MaxTemplateTypes int
// Maximum number of template numbers used across all builtins
MaxTemplateNumbers int
// The alphabetically sorted list of unique parameter names
UniqueParameterNames []string
}
@@ -137,8 +137,8 @@ type Overload struct {
Decl ast.IntrinsicDecl
Intrinsic *Intrinsic
TemplateParams []TemplateParam
OpenTypes []*TemplateTypeParam
OpenNumbers []TemplateParam
TemplateTypes []*TemplateTypeParam
TemplateNumbers []TemplateParam
ReturnType *FullyQualifiedName
Parameters []Parameter
CanBeUsedInStage StageUses