diff options
Diffstat (limited to 'src/passes')
-rw-r--r-- | src/passes/Directize.cpp | 1 | ||||
-rw-r--r-- | src/passes/DuplicateImportElimination.cpp | 1 | ||||
-rw-r--r-- | src/passes/FuncCastEmulation.cpp | 1 | ||||
-rw-r--r-- | src/passes/I64ToI32Lowering.cpp | 1 | ||||
-rw-r--r-- | src/passes/InstrumentLocals.cpp | 1 | ||||
-rw-r--r-- | src/passes/InstrumentMemory.cpp | 1 | ||||
-rw-r--r-- | src/passes/LegalizeJSInterface.cpp | 1 | ||||
-rw-r--r-- | src/passes/LogExecution.cpp | 1 | ||||
-rw-r--r-- | src/passes/RemoveUnusedModuleElements.cpp | 1 | ||||
-rw-r--r-- | src/passes/SafeHeap.cpp | 1 | ||||
-rw-r--r-- | src/passes/TrapMode.cpp | 13 |
11 files changed, 12 insertions, 11 deletions
diff --git a/src/passes/Directize.cpp b/src/passes/Directize.cpp index 037eca0da..0c1132b04 100644 --- a/src/passes/Directize.cpp +++ b/src/passes/Directize.cpp @@ -22,7 +22,6 @@ #include <unordered_map> -#include "asm_v_wasm.h" #include "ir/table-utils.h" #include "ir/utils.h" #include "pass.h" diff --git a/src/passes/DuplicateImportElimination.cpp b/src/passes/DuplicateImportElimination.cpp index 87126b139..b917c5fe8 100644 --- a/src/passes/DuplicateImportElimination.cpp +++ b/src/passes/DuplicateImportElimination.cpp @@ -20,7 +20,6 @@ // TODO: non-function imports too // -#include "asm_v_wasm.h" #include "ir/import-utils.h" #include "opt-utils.h" #include "pass.h" diff --git a/src/passes/FuncCastEmulation.cpp b/src/passes/FuncCastEmulation.cpp index 6f5e9d611..a164b4264 100644 --- a/src/passes/FuncCastEmulation.cpp +++ b/src/passes/FuncCastEmulation.cpp @@ -28,7 +28,6 @@ // params must be identical, i.e., the "ABI" must match. // -#include <asm_v_wasm.h> #include <ir/literal-utils.h> #include <pass.h> #include <wasm-builder.h> diff --git a/src/passes/I64ToI32Lowering.cpp b/src/passes/I64ToI32Lowering.cpp index c06176e53..a24d78213 100644 --- a/src/passes/I64ToI32Lowering.cpp +++ b/src/passes/I64ToI32Lowering.cpp @@ -22,7 +22,6 @@ // #include "abi/js.h" -#include "asmjs/shared-constants.h" #include "emscripten-optimizer/istring.h" #include "ir/flat.h" #include "ir/iteration.h" diff --git a/src/passes/InstrumentLocals.cpp b/src/passes/InstrumentLocals.cpp index 8803a7811..4b0db87ed 100644 --- a/src/passes/InstrumentLocals.cpp +++ b/src/passes/InstrumentLocals.cpp @@ -43,7 +43,6 @@ // ) // ) -#include "asm_v_wasm.h" #include "asmjs/shared-constants.h" #include "shared-constants.h" #include <pass.h> diff --git a/src/passes/InstrumentMemory.cpp b/src/passes/InstrumentMemory.cpp index 9e4788456..6c81f8588 100644 --- a/src/passes/InstrumentMemory.cpp +++ b/src/passes/InstrumentMemory.cpp @@ -52,7 +52,6 @@ // ) // ) -#include "asm_v_wasm.h" #include "asmjs/shared-constants.h" #include "shared-constants.h" #include <pass.h> diff --git a/src/passes/LegalizeJSInterface.cpp b/src/passes/LegalizeJSInterface.cpp index 2f3e484ad..b000b0c38 100644 --- a/src/passes/LegalizeJSInterface.cpp +++ b/src/passes/LegalizeJSInterface.cpp @@ -30,7 +30,6 @@ // table even to a signature that is not legal. // -#include "asm_v_wasm.h" #include "asmjs/shared-constants.h" #include "ir/import-utils.h" #include "ir/literal-utils.h" diff --git a/src/passes/LogExecution.cpp b/src/passes/LogExecution.cpp index ebc1c5636..b9b203d0b 100644 --- a/src/passes/LogExecution.cpp +++ b/src/passes/LogExecution.cpp @@ -28,7 +28,6 @@ // value. // -#include "asm_v_wasm.h" #include "asmjs/shared-constants.h" #include "shared-constants.h" #include <pass.h> diff --git a/src/passes/RemoveUnusedModuleElements.cpp b/src/passes/RemoveUnusedModuleElements.cpp index 3795022c2..8c4523724 100644 --- a/src/passes/RemoveUnusedModuleElements.cpp +++ b/src/passes/RemoveUnusedModuleElements.cpp @@ -22,7 +22,6 @@ #include <memory> -#include "asm_v_wasm.h" #include "ir/module-utils.h" #include "ir/utils.h" #include "pass.h" diff --git a/src/passes/SafeHeap.cpp b/src/passes/SafeHeap.cpp index 0335c174e..ccfbfbf14 100644 --- a/src/passes/SafeHeap.cpp +++ b/src/passes/SafeHeap.cpp @@ -20,7 +20,6 @@ // top of sbrk()-addressible memory, and incorrect alignment notation. // -#include "asm_v_wasm.h" #include "asmjs/shared-constants.h" #include "ir/bits.h" #include "ir/import-utils.h" diff --git a/src/passes/TrapMode.cpp b/src/passes/TrapMode.cpp index f3cf3c63c..528357d4a 100644 --- a/src/passes/TrapMode.cpp +++ b/src/passes/TrapMode.cpp @@ -20,7 +20,6 @@ // generates a check and replaces the result with zero in that case. // -#include "asm_v_wasm.h" #include "asmjs/shared-constants.h" #include "ir/trapping.h" #include "mixed_arena.h" @@ -38,6 +37,18 @@ Name I64U_REM("i64u-rem"); Name I64S_DIV("i64s-div"); Name I64U_DIV("i64u-div"); +static Expression* ensureDouble(Expression* expr, MixedArena& allocator) { + if (expr->type == Type::f32) { + auto conv = allocator.alloc<Unary>(); + conv->op = PromoteFloat32; + conv->value = expr; + conv->type = Type::f64; + return conv; + } + assert(expr->type == Type::f64); + return expr; +} + Name getBinaryFuncName(Binary* curr) { switch (curr->op) { case RemSInt32: |