diff options
Diffstat (limited to 'src/ir')
-rw-r--r-- | src/ir/ExpressionAnalyzer.cpp | 10 | ||||
-rw-r--r-- | src/ir/ReFinalize.cpp | 2 | ||||
-rw-r--r-- | src/ir/abstract.h | 4 | ||||
-rw-r--r-- | src/ir/hashed.h | 6 |
4 files changed, 11 insertions, 11 deletions
diff --git a/src/ir/ExpressionAnalyzer.cpp b/src/ir/ExpressionAnalyzer.cpp index a61af9ce5..fc9d74743 100644 --- a/src/ir/ExpressionAnalyzer.cpp +++ b/src/ir/ExpressionAnalyzer.cpp @@ -137,8 +137,8 @@ template<typename T> void visitImmediates(Expression* curr, T& visitor) { visitor.visitInt(curr->isReturn); } void visitCallIndirect(CallIndirect* curr) { - visitor.visitInt(curr->sig.params); - visitor.visitInt(curr->sig.results); + visitor.visitInt(curr->sig.params.getID()); + visitor.visitInt(curr->sig.results.getID()); visitor.visitInt(curr->isReturn); } void visitLocalGet(LocalGet* curr) { visitor.visitIndex(curr->index); } @@ -164,7 +164,7 @@ template<typename T> void visitImmediates(Expression* curr, T& visitor) { visitor.visitAddress(curr->offset); visitor.visitAddress(curr->align); visitor.visitInt(curr->isAtomic); - visitor.visitInt(curr->valueType); + visitor.visitInt(curr->valueType.getID()); } void visitAtomicRMW(AtomicRMW* curr) { visitor.visitInt(curr->op); @@ -438,7 +438,7 @@ HashType ExpressionAnalyzer::hash(Expression* curr) { // if we hash between modules, then we need to take int account // call_imports type, etc. The simplest thing is just to hash the // type for all of them. - hash(curr->type); + hash(curr->type.getID()); // Blocks and loops introduce scoping. if (auto* block = curr->dynCast<Block>()) { noteScopeName(block->name); @@ -477,7 +477,7 @@ HashType ExpressionAnalyzer::hash(Expression* curr) { void visitNonScopeName(Name curr) { return hash64(uint64_t(curr.str)); } void visitInt(int32_t curr) { hash(curr); } void visitLiteral(Literal curr) { hash(std::hash<Literal>()(curr)); } - void visitType(Type curr) { hash(int32_t(curr)); } + void visitType(Type curr) { hash(int32_t(curr.getSingle())); } void visitIndex(Index curr) { static_assert(sizeof(Index) == sizeof(int32_t), "wasm64 will need changes here"); diff --git a/src/ir/ReFinalize.cpp b/src/ir/ReFinalize.cpp index 5e72850e6..422f462c0 100644 --- a/src/ir/ReFinalize.cpp +++ b/src/ir/ReFinalize.cpp @@ -181,7 +181,7 @@ void ReFinalize::replaceUntaken(Expression* value, Expression* condition) { condition = builder.makeDrop(condition); } replacement = builder.makeSequence(value, condition); - assert(replacement->type); + assert(replacement->type.getSingle()); } replaceCurrent(replacement); } diff --git a/src/ir/abstract.h b/src/ir/abstract.h index 06a1cd41c..f7bc664dd 100644 --- a/src/ir/abstract.h +++ b/src/ir/abstract.h @@ -52,7 +52,7 @@ enum Op { // you can provide i32 and Add and receive the specific opcode for a 32-bit // addition, AddInt32. If the op does not exist, it returns Invalid. inline UnaryOp getUnary(Type type, Op op) { - switch (type) { + switch (type.getSingle()) { case Type::i32: { return InvalidUnary; } @@ -93,7 +93,7 @@ inline UnaryOp getUnary(Type type, Op op) { } inline BinaryOp getBinary(Type type, Op op) { - switch (type) { + switch (type.getSingle()) { case Type::i32: { switch (op) { case Add: diff --git a/src/ir/hashed.h b/src/ir/hashed.h index 9e9717cda..fe0a0b958 100644 --- a/src/ir/hashed.h +++ b/src/ir/hashed.h @@ -82,10 +82,10 @@ struct FunctionHasher : public WalkerPass<PostWalker<FunctionHasher>> { static HashType hashFunction(Function* func) { HashType ret = 0; - ret = rehash(ret, (HashType)func->sig.params); - ret = rehash(ret, (HashType)func->sig.results); + ret = rehash(ret, (HashType)func->sig.params.getID()); + ret = rehash(ret, (HashType)func->sig.results.getID()); for (auto type : func->vars) { - ret = rehash(ret, (HashType)type); + ret = rehash(ret, (HashType)type.getSingle()); } ret = rehash(ret, (HashType)ExpressionAnalyzer::hash(func->body)); return ret; |