diff options
Diffstat (limited to 'src/ir')
-rw-r--r-- | src/ir/ReFinalize.cpp | 2 | ||||
-rw-r--r-- | src/ir/boolean.h | 4 | ||||
-rw-r--r-- | src/ir/cost.h | 2 | ||||
-rw-r--r-- | src/ir/effects.h | 2 | ||||
-rw-r--r-- | src/ir/gc-type-utils.h | 18 | ||||
-rw-r--r-- | src/ir/possible-contents.cpp | 2 |
6 files changed, 6 insertions, 24 deletions
diff --git a/src/ir/ReFinalize.cpp b/src/ir/ReFinalize.cpp index 5ae6a67ce..a5651c6b6 100644 --- a/src/ir/ReFinalize.cpp +++ b/src/ir/ReFinalize.cpp @@ -128,7 +128,7 @@ void ReFinalize::visitReturn(Return* curr) { curr->finalize(); } void ReFinalize::visitMemorySize(MemorySize* curr) { curr->finalize(); } void ReFinalize::visitMemoryGrow(MemoryGrow* curr) { curr->finalize(); } void ReFinalize::visitRefNull(RefNull* curr) { curr->finalize(); } -void ReFinalize::visitRefIs(RefIs* curr) { curr->finalize(); } +void ReFinalize::visitRefIsNull(RefIsNull* curr) { curr->finalize(); } void ReFinalize::visitRefFunc(RefFunc* curr) { // TODO: should we look up the function and update the type from there? This // could handle a change to the function's type, but is also not really what diff --git a/src/ir/boolean.h b/src/ir/boolean.h index 58601c2ce..68dfb8b32 100644 --- a/src/ir/boolean.h +++ b/src/ir/boolean.h @@ -26,8 +26,8 @@ inline bool emitsBoolean(Expression* curr) { return unary->isRelational(); } else if (auto* binary = curr->dynCast<Binary>()) { return binary->isRelational(); - } else if (curr->is<RefIs>() || curr->is<RefEq>() || curr->is<RefTest>() || - curr->is<StringEq>()) { + } else if (curr->is<RefIsNull>() || curr->is<RefEq>() || + curr->is<RefTest>() || curr->is<StringEq>()) { return true; } return false; diff --git a/src/ir/cost.h b/src/ir/cost.h index 59b738b1b..11c179d40 100644 --- a/src/ir/cost.h +++ b/src/ir/cost.h @@ -561,7 +561,7 @@ struct CostAnalyzer : public OverriddenVisitor<CostAnalyzer, CostType> { return 1 + visit(curr->left) + visit(curr->right); } CostType visitRefNull(RefNull* curr) { return 1; } - CostType visitRefIs(RefIs* curr) { return 1 + visit(curr->value); } + CostType visitRefIsNull(RefIsNull* curr) { return 1 + visit(curr->value); } CostType visitRefFunc(RefFunc* curr) { return 1; } CostType visitRefEq(RefEq* curr) { return 1 + visit(curr->left) + visit(curr->right); diff --git a/src/ir/effects.h b/src/ir/effects.h index 70e9192c0..4ea577f7a 100644 --- a/src/ir/effects.h +++ b/src/ir/effects.h @@ -648,7 +648,7 @@ private: parent.isAtomic = true; } void visitRefNull(RefNull* curr) {} - void visitRefIs(RefIs* curr) {} + void visitRefIsNull(RefIsNull* curr) {} void visitRefFunc(RefFunc* curr) {} void visitRefEq(RefEq* curr) {} void visitTableGet(TableGet* curr) { diff --git a/src/ir/gc-type-utils.h b/src/ir/gc-type-utils.h index 1646e47c3..5f1b4807c 100644 --- a/src/ir/gc-type-utils.h +++ b/src/ir/gc-type-utils.h @@ -75,24 +75,6 @@ inline EvaluationResult evaluateKindCheck(Expression* curr) { WASM_UNREACHABLE("unhandled BrOn"); } child = br->ref; - } else if (auto* is = curr->dynCast<RefIs>()) { - switch (is->op) { - // We don't check nullability here. - case RefIsNull: - return Unknown; - case RefIsFunc: - expected = Func; - break; - case RefIsData: - expected = Data; - break; - case RefIsI31: - expected = I31; - break; - default: - WASM_UNREACHABLE("unhandled RefIs"); - } - child = is->value; } else if (auto* as = curr->dynCast<RefAs>()) { switch (as->op) { // We don't check nullability here. diff --git a/src/ir/possible-contents.cpp b/src/ir/possible-contents.cpp index 52b05057f..cf30cd917 100644 --- a/src/ir/possible-contents.cpp +++ b/src/ir/possible-contents.cpp @@ -587,7 +587,7 @@ struct InfoCollector curr, PossibleContents::literal(Literal::makeNull(curr->type.getHeapType()))); } - void visitRefIs(RefIs* curr) { + void visitRefIsNull(RefIsNull* curr) { // TODO: Optimize when possible. For example, if we can infer an exact type // here which allows us to know the result then we should do so. This // is unlike the case in visitUnary, above: the information that lets |