summaryrefslogtreecommitdiff
path: root/src/ir/abstract.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir/abstract.h')
-rw-r--r--src/ir/abstract.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/ir/abstract.h b/src/ir/abstract.h
index 76215d07f..06a1cd41c 100644
--- a/src/ir/abstract.h
+++ b/src/ir/abstract.h
@@ -53,13 +53,13 @@ enum Op {
// addition, AddInt32. If the op does not exist, it returns Invalid.
inline UnaryOp getUnary(Type type, Op op) {
switch (type) {
- case i32: {
+ case Type::i32: {
return InvalidUnary;
}
- case i64: {
+ case Type::i64: {
return InvalidUnary;
}
- case f32: {
+ case Type::f32: {
switch (op) {
case Neg:
return NegFloat32;
@@ -68,7 +68,7 @@ inline UnaryOp getUnary(Type type, Op op) {
}
break;
}
- case f64: {
+ case Type::f64: {
switch (op) {
case Neg:
return NegFloat64;
@@ -77,15 +77,15 @@ inline UnaryOp getUnary(Type type, Op op) {
}
break;
}
- case v128: {
+ case Type::v128: {
WASM_UNREACHABLE("v128 not implemented yet");
}
- case funcref:
- case anyref:
- case nullref:
- case exnref:
- case none:
- case unreachable: {
+ case Type::funcref:
+ case Type::anyref:
+ case Type::nullref:
+ case Type::exnref:
+ case Type::none:
+ case Type::unreachable: {
return InvalidUnary;
}
}
@@ -94,7 +94,7 @@ inline UnaryOp getUnary(Type type, Op op) {
inline BinaryOp getBinary(Type type, Op op) {
switch (type) {
- case i32: {
+ case Type::i32: {
switch (op) {
case Add:
return AddInt32;
@@ -131,7 +131,7 @@ inline BinaryOp getBinary(Type type, Op op) {
}
break;
}
- case i64: {
+ case Type::i64: {
switch (op) {
case Add:
return AddInt64;
@@ -168,7 +168,7 @@ inline BinaryOp getBinary(Type type, Op op) {
}
break;
}
- case f32: {
+ case Type::f32: {
switch (op) {
case Add:
return AddFloat32;
@@ -189,7 +189,7 @@ inline BinaryOp getBinary(Type type, Op op) {
}
break;
}
- case f64: {
+ case Type::f64: {
switch (op) {
case Add:
return AddFloat64;
@@ -210,15 +210,15 @@ inline BinaryOp getBinary(Type type, Op op) {
}
break;
}
- case v128: {
+ case Type::v128: {
WASM_UNREACHABLE("v128 not implemented yet");
}
- case funcref:
- case anyref:
- case nullref:
- case exnref:
- case none:
- case unreachable: {
+ case Type::funcref:
+ case Type::anyref:
+ case Type::nullref:
+ case Type::exnref:
+ case Type::none:
+ case Type::unreachable: {
return InvalidBinary;
}
}