diff options
author | Alon Zakai <azakai@google.com> | 2020-08-05 17:48:54 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-05 17:48:54 -0700 |
commit | e93fbc0c117bcfe645bab1b30d5802e619e68abc (patch) | |
tree | 3f11b6a9e189296988d9954b483f73a9aff5f2a1 /src/passes/pass.cpp | |
parent | 9c84d90712c1183f1d9ab3e5068d902eb7d627ea (diff) | |
download | binaryen-e93fbc0c117bcfe645bab1b30d5802e619e68abc.tar.gz binaryen-e93fbc0c117bcfe645bab1b30d5802e619e68abc.tar.bz2 binaryen-e93fbc0c117bcfe645bab1b30d5802e619e68abc.zip |
Add StubUnsupportedJSOps to remove operations that JS does not support (#3024)
This doesn't lower them - it just replaces the unsupported operation
with a drop. This will be useful for fuzzing, where to compare JS to the
correct semantics we must avoid operations where JS is not always
accurate.
Also fully document the i64 -> f32 conversion issue in JS.
Diffstat (limited to 'src/passes/pass.cpp')
-rw-r--r-- | src/passes/pass.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/passes/pass.cpp b/src/passes/pass.cpp index d94e454c3..5a0dedf37 100644 --- a/src/passes/pass.cpp +++ b/src/passes/pass.cpp @@ -340,6 +340,9 @@ void PassRegistry::registerPasses() { registerPass("spill-pointers", "spill pointers to the C stack (useful for Boehm-style GC)", createSpillPointersPass); + registerPass("stub-unsupported-js", + "stub out unsupported JS operations", + createStubUnsupportedJSOpsPass); registerPass("ssa", "ssa-ify variables so that they have a single assignment", createSSAifyPass); |