summaryrefslogtreecommitdiff
path: root/src/passes/ConstHoisting.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/ConstHoisting.cpp')
-rw-r--r--src/passes/ConstHoisting.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/passes/ConstHoisting.cpp b/src/passes/ConstHoisting.cpp
index 4e8cd9910..6c79c4215 100644
--- a/src/passes/ConstHoisting.cpp
+++ b/src/passes/ConstHoisting.cpp
@@ -78,29 +78,29 @@ private:
// measure the size of the constant
Index size = 0;
switch (value.type) {
- case i32: {
+ case Type::i32: {
size = getWrittenSize(S32LEB(value.geti32()));
break;
}
- case i64: {
+ case Type::i64: {
size = getWrittenSize(S64LEB(value.geti64()));
break;
}
- case f32:
- case f64: {
+ case Type::f32:
+ case Type::f64: {
size = value.type.getByteSize();
break;
}
- // not implemented yet
- case v128:
- case funcref:
- case anyref:
- case nullref:
- case exnref: {
+ // not implemented yet
+ case Type::v128:
+ case Type::funcref:
+ case Type::anyref:
+ case Type::nullref:
+ case Type::exnref: {
return false;
}
- case none:
- case unreachable:
+ case Type::none:
+ case Type::unreachable:
WASM_UNREACHABLE("unexpected type");
}
// compute the benefit, of replacing the uses with