mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 10:49:14 +00:00
tint: Add unary-ops to the intrinsic table
• Declare all the unary ops in the intrinsics.def file. • Reimplement the bulk of Resolver::UnaryOp() with the IntrinsicTable. This will simplify maintenance of the operators, and will greatly simplify the [AbstractInt -> i32|u32] [AbstractFloat -> f32|f16] logic. Bug: tint:1504 Change-Id: Ifc646d086fc93cfbe3f3f861b8c447178664c1f7 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89028 Reviewed-by: James Price <jrprice@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@chromium.org>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
7378612ca5
commit
b61e0452f8
@@ -72,6 +72,8 @@ func (l *lexer) lex() error {
|
||||
l.tok(1, tok.Modulo)
|
||||
case '^':
|
||||
l.tok(1, tok.Xor)
|
||||
case '~':
|
||||
l.tok(1, tok.Complement)
|
||||
case '"':
|
||||
start := l.loc
|
||||
l.next() // Skip opening quote
|
||||
@@ -105,6 +107,7 @@ func (l *lexer) lex() error {
|
||||
case l.match("||", tok.OrOr):
|
||||
case l.match("|", tok.Or):
|
||||
case l.match("!=", tok.NotEqual):
|
||||
case l.match("!", tok.Not):
|
||||
case l.match("==", tok.Equal):
|
||||
case l.match("=", tok.Assign):
|
||||
case l.match("<<", tok.Shl):
|
||||
|
||||
Reference in New Issue
Block a user