mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 10:49:14 +00:00
tint: Split tables for unary and binary operators
Do the partitioning of unary and binary operators in the intrinsic table generators, instead of searching all operators at runtime. Will allow code to be simplified. Bug: tint:1504 Change-Id: I67246b954e530e0542b1b67c99fb34a756cf532a Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90240 Commit-Queue: Ben Clayton <bclayton@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
62bfd318ae
commit
77473b4699
@@ -22,12 +22,13 @@ import (
|
||||
|
||||
// Sem is the root of the semantic tree
|
||||
type Sem struct {
|
||||
Enums []*Enum
|
||||
Types []*Type
|
||||
TypeMatchers []*TypeMatcher
|
||||
EnumMatchers []*EnumMatcher
|
||||
Builtins []*Intrinsic
|
||||
Operators []*Intrinsic
|
||||
Enums []*Enum
|
||||
Types []*Type
|
||||
TypeMatchers []*TypeMatcher
|
||||
EnumMatchers []*EnumMatcher
|
||||
Builtins []*Intrinsic
|
||||
UnaryOperators []*Intrinsic
|
||||
BinaryOperators []*Intrinsic
|
||||
// Maximum number of open-types used across all builtins
|
||||
MaxOpenTypes int
|
||||
// Maximum number of open-numbers used across all builtins
|
||||
@@ -39,12 +40,13 @@ type Sem struct {
|
||||
// New returns a new Sem
|
||||
func New() *Sem {
|
||||
return &Sem{
|
||||
Enums: []*Enum{},
|
||||
Types: []*Type{},
|
||||
TypeMatchers: []*TypeMatcher{},
|
||||
EnumMatchers: []*EnumMatcher{},
|
||||
Builtins: []*Intrinsic{},
|
||||
Operators: []*Intrinsic{},
|
||||
Enums: []*Enum{},
|
||||
Types: []*Type{},
|
||||
TypeMatchers: []*TypeMatcher{},
|
||||
EnumMatchers: []*EnumMatcher{},
|
||||
Builtins: []*Intrinsic{},
|
||||
UnaryOperators: []*Intrinsic{},
|
||||
BinaryOperators: []*Intrinsic{},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user