diff options
author | Nathan Froyd <froydnj@gmail.com> | 2018-03-16 12:25:47 -0400 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2018-03-16 09:25:47 -0700 |
commit | 8fd854d6f60c6c711c3c04e1d30c74a6b2f1821b (patch) | |
tree | 85f62151664890b4c29f5109c956bb08241e983f /test/br_table_temp.2asm.js | |
parent | 8faa79c0dafe2c358a7949910bb1a225a3b32ede (diff) | |
download | binaryen-8fd854d6f60c6c711c3c04e1d30c74a6b2f1821b.tar.gz binaryen-8fd854d6f60c6c711c3c04e1d30c74a6b2f1821b.tar.bz2 binaryen-8fd854d6f60c6c711c3c04e1d30c74a6b2f1821b.zip |
create Math_{min,max} variables for wasm2asm-generated JS (#1476)
We were using Math_{min,max} in wasm2asm-generated files without
declaring said functions. This decision created problems for tests,
because Math_min (resp. max) would first be used on f32s, thus returning
f32, and then validation would fail when it was used on f64s.
The resulting changes make wasm2asm tests pass with MOZJS asm.js
validation, which moves #1443 forward.
Diffstat (limited to 'test/br_table_temp.2asm.js')
-rw-r--r-- | test/br_table_temp.2asm.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/br_table_temp.2asm.js b/test/br_table_temp.2asm.js index a462818ec..fcb9c9e00 100644 --- a/test/br_table_temp.2asm.js +++ b/test/br_table_temp.2asm.js @@ -12,6 +12,8 @@ function asmFunc(global, env, buffer) { var Math_fround = global.Math.fround; var Math_abs = global.Math.abs; var Math_clz32 = global.Math.clz32; + var Math_min = global.Math.min; + var Math_max = global.Math.max; function dummy() { } |