diff options
Diffstat (limited to 'src/passes/LocalSubtyping.cpp')
-rw-r--r-- | src/passes/LocalSubtyping.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/passes/LocalSubtyping.cpp b/src/passes/LocalSubtyping.cpp index cf8570986..0d41434fc 100644 --- a/src/passes/LocalSubtyping.cpp +++ b/src/passes/LocalSubtyping.cpp @@ -134,8 +134,8 @@ struct LocalSubtyping : public WalkerPass<PostWalker<LocalSubtyping>> { // Find all the types assigned to the var, and compute the optimal LUB. LUBFinder lub; for (auto* set : setsForLocal[i]) { - lub.noteUpdatableExpression(set->value); - if (lub.getBestPossible() == oldType) { + lub.note(set->value->type); + if (lub.getLUB() == oldType) { break; } } @@ -144,7 +144,7 @@ struct LocalSubtyping : public WalkerPass<PostWalker<LocalSubtyping>> { continue; } - auto newType = lub.getBestPossible(); + auto newType = lub.getLUB(); assert(newType != Type::none); // in valid wasm there must be a LUB // Remove non-nullability if we disallow that in locals. @@ -165,7 +165,6 @@ struct LocalSubtyping : public WalkerPass<PostWalker<LocalSubtyping>> { func->vars[i - varBase] = newType; more = true; optimized = true; - lub.updateNulls(); // Update gets and tees. for (auto* get : getsForLocal[i]) { |