diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2020-03-10 13:43:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-10 13:43:06 -0700 |
commit | 8f16059d3c29e285d4effed7f0c1f84c1f2f4d9d (patch) | |
tree | faaee424f0b2b77d199c385abe103ea6044cae4e /src/passes/SimplifyGlobals.cpp | |
parent | 49e31f2034d9532f29704be3039829aa201556a0 (diff) | |
download | binaryen-8f16059d3c29e285d4effed7f0c1f84c1f2f4d9d.tar.gz binaryen-8f16059d3c29e285d4effed7f0c1f84c1f2f4d9d.tar.bz2 binaryen-8f16059d3c29e285d4effed7f0c1f84c1f2f4d9d.zip |
Handle multivalue returns in the interpreter (#2684)
Updates the interpreter to properly flow vectors of values, including
at function boundaries. Adds a small spec test for multivalue return.
Diffstat (limited to 'src/passes/SimplifyGlobals.cpp')
-rw-r--r-- | src/passes/SimplifyGlobals.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/passes/SimplifyGlobals.cpp b/src/passes/SimplifyGlobals.cpp index aa211b86b..44e3338e6 100644 --- a/src/passes/SimplifyGlobals.cpp +++ b/src/passes/SimplifyGlobals.cpp @@ -109,7 +109,7 @@ struct ConstantGlobalApplier if (auto* set = curr->dynCast<GlobalSet>()) { if (Properties::isConstantExpression(set->value)) { currConstantGlobals[set->name] = - getLiteralFromConstExpression(set->value); + getSingleLiteralFromConstExpression(set->value); } else { currConstantGlobals.erase(set->name); } @@ -253,7 +253,7 @@ struct SimplifyGlobals : public Pass { if (!global->imported()) { if (Properties::isConstantExpression(global->init)) { constantGlobals[global->name] = - getLiteralFromConstExpression(global->init); + getSingleLiteralFromConstExpression(global->init); } else if (auto* get = global->init->dynCast<GlobalGet>()) { auto iter = constantGlobals.find(get->name); if (iter != constantGlobals.end()) { |