From e93fbc0c117bcfe645bab1b30d5802e619e68abc Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 5 Aug 2020 17:48:54 -0700 Subject: 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. --- src/passes/pass.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/passes/pass.cpp') 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); -- cgit v1.2.3