WebAssembly: We should only create wrappers for functions that can be exported
authorkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Jun 2017 19:13:53 +0000 (19:13 +0000)
committerkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Jun 2017 19:13:53 +0000 (19:13 +0000)
https://bugs.webkit.org/show_bug.cgi?id=173088

Reviewed by Saam Barati.

JSTests:

Remove a bunch of old tests that are actually duplicates of the spec-tests and rely
on the old testWasmModuleFunctions api, which has been removed.

* wasm/function-tests/copysign.js: Removed.
* wasm/function-tests/ctz.js: Removed.
* wasm/function-tests/drop.js: Removed.
* wasm/function-tests/dumb-eq-if-then-else.js: Removed.
* wasm/function-tests/dumb-less-than-fallthrough.js: Removed.
* wasm/function-tests/dumb-less-than-ite.js: Removed.
* wasm/function-tests/eqz.js: Removed.
* wasm/function-tests/i32-trunc-s-f32.js: Removed.
* wasm/function-tests/i32-trunc-s-f64.js: Removed.
* wasm/function-tests/i32-trunc-u-f32.js: Removed.
* wasm/function-tests/i32-trunc-u-f64.js: Removed.
* wasm/function-tests/i64-trunc-s-f32.js: Removed.
* wasm/function-tests/i64-trunc-s-f64.js: Removed.
* wasm/function-tests/i64-trunc-u-f32.js: Removed.
* wasm/function-tests/i64-trunc-u-f64.js: Removed.
* wasm/function-tests/if-then-else-fallthrough.js: Removed.
* wasm/function-tests/if-then-fallthrough.js: Removed.
* wasm/function-tests/int-to-floating-point.js: Removed.
* wasm/function-tests/loop-mult.js:
* wasm/function-tests/loop-sum.js:
* wasm/function-tests/max.js: Removed.
* wasm/function-tests/min.js: Removed.
* wasm/function-tests/nearest.js: Removed.
* wasm/function-tests/nop.js: Removed.
* wasm/function-tests/popcnt.js: Removed.
* wasm/function-tests/ret5.js:
* wasm/function-tests/select.js: Removed.
* wasm/function-tests/tee-local.js: Removed.
* wasm/function-tests/trunc.js: Removed.

Source/JavaScriptCore:

This patch makes it so we only create wrappers for WebAssembly functions that
can actually be exported. It appears to be a ~2.5% speedup on WasmBench compile times.

This patch also removes most of the old testWasmModuleFunctions api from the jsc CLI.
Most of the tests were duplicates of ones in the spec-tests directory. The others I
have converted to use the normal API.

* jsc.cpp:
(GlobalObject::finishCreation):
(valueWithTypeOfWasmValue): Deleted.
(box): Deleted.
(callWasmFunction): Deleted.
(functionTestWasmModuleFunctions): Deleted.
* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::createJSToWasmWrapper):
(JSC::Wasm::parseAndCompile):
* wasm/WasmB3IRGenerator.h:
* wasm/WasmBBQPlan.cpp:
(JSC::Wasm::BBQPlan::prepare):
(JSC::Wasm::BBQPlan::compileFunctions):
(JSC::Wasm::BBQPlan::complete):
* wasm/WasmBBQPlan.h:
* wasm/WasmBBQPlanInlines.h:
(JSC::Wasm::BBQPlan::initializeCallees):
* wasm/WasmCodeBlock.cpp:
(JSC::Wasm::CodeBlock::CodeBlock):
* wasm/WasmCodeBlock.h:
(JSC::Wasm::CodeBlock::jsEntrypointCalleeFromFunctionIndexSpace):
* wasm/WasmFormat.h:
* wasm/WasmOMGPlan.cpp:
(JSC::Wasm::OMGPlan::work):

Tools:

Add quick mode for wasm tests.

* Scripts/run-jsc-stress-tests:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217942 268f45cc-cd09-0410-ab3c-d52691b4dbfc

43 files changed:
JSTests/ChangeLog
JSTests/wasm/function-tests/copysign.js [deleted file]
JSTests/wasm/function-tests/ctz.js [deleted file]
JSTests/wasm/function-tests/drop.js [deleted file]
JSTests/wasm/function-tests/dumb-eq-if-then-else.js [deleted file]
JSTests/wasm/function-tests/dumb-less-than-fallthrough.js [deleted file]
JSTests/wasm/function-tests/dumb-less-than-ite.js [deleted file]
JSTests/wasm/function-tests/eqz.js [deleted file]
JSTests/wasm/function-tests/i32-trunc-s-f32.js [deleted file]
JSTests/wasm/function-tests/i32-trunc-s-f64.js [deleted file]
JSTests/wasm/function-tests/i32-trunc-u-f32.js [deleted file]
JSTests/wasm/function-tests/i32-trunc-u-f64.js [deleted file]
JSTests/wasm/function-tests/i64-trunc-s-f32.js [deleted file]
JSTests/wasm/function-tests/i64-trunc-s-f64.js [deleted file]
JSTests/wasm/function-tests/i64-trunc-u-f32.js [deleted file]
JSTests/wasm/function-tests/i64-trunc-u-f64.js [deleted file]
JSTests/wasm/function-tests/if-then-else-fallthrough.js [deleted file]
JSTests/wasm/function-tests/if-then-fallthrough.js [deleted file]
JSTests/wasm/function-tests/int-to-floating-point.js [deleted file]
JSTests/wasm/function-tests/loop-mult.js
JSTests/wasm/function-tests/loop-sum.js
JSTests/wasm/function-tests/max.js [deleted file]
JSTests/wasm/function-tests/min.js [deleted file]
JSTests/wasm/function-tests/nearest.js [deleted file]
JSTests/wasm/function-tests/nop.js [deleted file]
JSTests/wasm/function-tests/popcnt.js [deleted file]
JSTests/wasm/function-tests/ret5.js
JSTests/wasm/function-tests/select.js [deleted file]
JSTests/wasm/function-tests/tee-local.js [deleted file]
JSTests/wasm/function-tests/trunc.js [deleted file]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/jsc.cpp
Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp
Source/JavaScriptCore/wasm/WasmB3IRGenerator.h
Source/JavaScriptCore/wasm/WasmBBQPlan.cpp
Source/JavaScriptCore/wasm/WasmBBQPlan.h
Source/JavaScriptCore/wasm/WasmBBQPlanInlines.h
Source/JavaScriptCore/wasm/WasmCodeBlock.cpp
Source/JavaScriptCore/wasm/WasmCodeBlock.h
Source/JavaScriptCore/wasm/WasmFormat.h
Source/JavaScriptCore/wasm/WasmOMGPlan.cpp
Tools/ChangeLog
Tools/Scripts/run-jsc-stress-tests

index 0c9a93e..f6931c1 100644 (file)
@@ -1,3 +1,43 @@
+2017-06-08  Keith Miller  <keith_miller@apple.com>
+
+        WebAssembly: We should only create wrappers for functions that can be exported
+        https://bugs.webkit.org/show_bug.cgi?id=173088
+
+        Reviewed by Saam Barati.
+
+        Remove a bunch of old tests that are actually duplicates of the spec-tests and rely
+        on the old testWasmModuleFunctions api, which has been removed.
+
+        * wasm/function-tests/copysign.js: Removed.
+        * wasm/function-tests/ctz.js: Removed.
+        * wasm/function-tests/drop.js: Removed.
+        * wasm/function-tests/dumb-eq-if-then-else.js: Removed.
+        * wasm/function-tests/dumb-less-than-fallthrough.js: Removed.
+        * wasm/function-tests/dumb-less-than-ite.js: Removed.
+        * wasm/function-tests/eqz.js: Removed.
+        * wasm/function-tests/i32-trunc-s-f32.js: Removed.
+        * wasm/function-tests/i32-trunc-s-f64.js: Removed.
+        * wasm/function-tests/i32-trunc-u-f32.js: Removed.
+        * wasm/function-tests/i32-trunc-u-f64.js: Removed.
+        * wasm/function-tests/i64-trunc-s-f32.js: Removed.
+        * wasm/function-tests/i64-trunc-s-f64.js: Removed.
+        * wasm/function-tests/i64-trunc-u-f32.js: Removed.
+        * wasm/function-tests/i64-trunc-u-f64.js: Removed.
+        * wasm/function-tests/if-then-else-fallthrough.js: Removed.
+        * wasm/function-tests/if-then-fallthrough.js: Removed.
+        * wasm/function-tests/int-to-floating-point.js: Removed.
+        * wasm/function-tests/loop-mult.js:
+        * wasm/function-tests/loop-sum.js:
+        * wasm/function-tests/max.js: Removed.
+        * wasm/function-tests/min.js: Removed.
+        * wasm/function-tests/nearest.js: Removed.
+        * wasm/function-tests/nop.js: Removed.
+        * wasm/function-tests/popcnt.js: Removed.
+        * wasm/function-tests/ret5.js:
+        * wasm/function-tests/select.js: Removed.
+        * wasm/function-tests/tee-local.js: Removed.
+        * wasm/function-tests/trunc.js: Removed.
+
 2017-06-07  JF Bastien  <jfbastien@apple.com>
 
         WebAssembly: test imports and exports with 16-bit characters
diff --git a/JSTests/wasm/function-tests/copysign.js b/JSTests/wasm/function-tests/copysign.js
deleted file mode 100644 (file)
index 997b719..0000000
+++ /dev/null
@@ -1,674 +0,0 @@
-import Builder from '../Builder.js'
-
-const b = new Builder();
-b.Type().End()
-    .Function().End()
-    .Code()
-    .Function({ params: ["f32", "f32"], ret: "f32" }, [])
-    .GetLocal(0)
-    .GetLocal(1)
-    .F32Copysign()
-    .End()
-
-    .Function({ params: ["f64", "f64"], ret: "f64" }, [])
-    .GetLocal(0)
-    .GetLocal(1)
-    .F64Copysign()
-    .End()
-
-
-const bin = b.WebAssembly()
-bin.trim();
-testWasmModuleFunctions(bin.get(), 2,
-                        [[{ type: "f32", value: "-0x0p+0" }, [{ type: "f32", value: "-0x0p+0" }, { type: "f32", value: "-0x0p+0" }]],
-                         [{ type: "f32", value: "0x0p+0" }, [{ type: "f32", value: "-0x0p+0" }, { type: "f32", value: "0x0p+0" }]],
-                         [{ type: "f32", value: "-0x0p+0" }, [{ type: "f32", value: "0x0p+0" }, { type: "f32", value: "-0x0p+0" }]],
-                         [{ type: "f32", value: "0x0p+0" }, [{ type: "f32", value: "0x0p+0" }, { type: "f32", value: "0x0p+0" }]],
-                         [{ type: "f32", value: "-0x0p+0" }, [{ type: "f32", value: "-0x0p+0" }, { type: "f32", value: "-0x1p-149" }]],
-                         [{ type: "f32", value: "0x0p+0" }, [{ type: "f32", value: "-0x0p+0" }, { type: "f32", value: "0x1p-149" }]],
-                         [{ type: "f32", value: "-0x0p+0" }, [{ type: "f32", value: "0x0p+0" }, { type: "f32", value: "-0x1p-149" }]],
-                         [{ type: "f32", value: "0x0p+0" }, [{ type: "f32", value: "0x0p+0" }, { type: "f32", value: "0x1p-149" }]],
-                         [{ type: "f32", value: "-0x0p+0" }, [{ type: "f32", value: "-0x0p+0" }, { type: "f32", value: "-0x1p-126" }]],
-                         [{ type: "f32", value: "0x0p+0" }, [{ type: "f32", value: "-0x0p+0" }, { type: "f32", value: "0x1p-126" }]],
-                         [{ type: "f32", value: "-0x0p+0" }, [{ type: "f32", value: "0x0p+0" }, { type: "f32", value: "-0x1p-126" }]],
-                         [{ type: "f32", value: "0x0p+0" }, [{ type: "f32", value: "0x0p+0" }, { type: "f32", value: "0x1p-126" }]],
-                         [{ type: "f32", value: "-0x0p+0" }, [{ type: "f32", value: "-0x0p+0" }, { type: "f32", value: "-0x1p-1" }]],
-                         [{ type: "f32", value: "0x0p+0" }, [{ type: "f32", value: "-0x0p+0" }, { type: "f32", value: "0x1p-1" }]],
-                         [{ type: "f32", value: "-0x0p+0" }, [{ type: "f32", value: "0x0p+0" }, { type: "f32", value: "-0x1p-1" }]],
-                         [{ type: "f32", value: "0x0p+0" }, [{ type: "f32", value: "0x0p+0" }, { type: "f32", value: "0x1p-1" }]],
-                         [{ type: "f32", value: "-0x0p+0" }, [{ type: "f32", value: "-0x0p+0" }, { type: "f32", value: "-0x1p+0" }]],
-                         [{ type: "f32", value: "0x0p+0" }, [{ type: "f32", value: "-0x0p+0" }, { type: "f32", value: "0x1p+0" }]],
-                         [{ type: "f32", value: "-0x0p+0" }, [{ type: "f32", value: "0x0p+0" }, { type: "f32", value: "-0x1p+0" }]],
-                         [{ type: "f32", value: "0x0p+0" }, [{ type: "f32", value: "0x0p+0" }, { type: "f32", value: "0x1p+0" }]],
-                         [{ type: "f32", value: "-0x0p+0" }, [{ type: "f32", value: "-0x0p+0" }, { type: "f32", value: "-0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "0x0p+0" }, [{ type: "f32", value: "-0x0p+0" }, { type: "f32", value: "0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "-0x0p+0" }, [{ type: "f32", value: "0x0p+0" }, { type: "f32", value: "-0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "0x0p+0" }, [{ type: "f32", value: "0x0p+0" }, { type: "f32", value: "0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "-0x0p+0" }, [{ type: "f32", value: "-0x0p+0" }, { type: "f32", value: "-0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "0x0p+0" }, [{ type: "f32", value: "-0x0p+0" }, { type: "f32", value: "0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "-0x0p+0" }, [{ type: "f32", value: "0x0p+0" }, { type: "f32", value: "-0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "0x0p+0" }, [{ type: "f32", value: "0x0p+0" }, { type: "f32", value: "0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "-0x0p+0" }, [{ type: "f32", value: "-0x0p+0" }, { type: "f32", value: "-infinity" }]],
-                         [{ type: "f32", value: "0x0p+0" }, [{ type: "f32", value: "-0x0p+0" }, { type: "f32", value: "infinity" }]],
-                         [{ type: "f32", value: "-0x0p+0" }, [{ type: "f32", value: "0x0p+0" }, { type: "f32", value: "-infinity" }]],
-                         [{ type: "f32", value: "0x0p+0" }, [{ type: "f32", value: "0x0p+0" }, { type: "f32", value: "infinity" }]],
-                         [{ type: "f32", value: "-0x0p+0" }, [{ type: "f32", value: "-0x0p+0" }, { type: "f32", value: "-nan" }]],
-                         [{ type: "f32", value: "0x0p+0" }, [{ type: "f32", value: "-0x0p+0" }, { type: "f32", value: "nan" }]],
-                         [{ type: "f32", value: "-0x0p+0" }, [{ type: "f32", value: "0x0p+0" }, { type: "f32", value: "-nan" }]],
-                         [{ type: "f32", value: "0x0p+0" }, [{ type: "f32", value: "0x0p+0" }, { type: "f32", value: "nan" }]],
-                         [{ type: "f32", value: "-0x1p-149" }, [{ type: "f32", value: "-0x1p-149" }, { type: "f32", value: "-0x0p+0" }]],
-                         [{ type: "f32", value: "0x1p-149" }, [{ type: "f32", value: "-0x1p-149" }, { type: "f32", value: "0x0p+0" }]],
-                         [{ type: "f32", value: "-0x1p-149" }, [{ type: "f32", value: "0x1p-149" }, { type: "f32", value: "-0x0p+0" }]],
-                         [{ type: "f32", value: "0x1p-149" }, [{ type: "f32", value: "0x1p-149" }, { type: "f32", value: "0x0p+0" }]],
-                         [{ type: "f32", value: "-0x1p-149" }, [{ type: "f32", value: "-0x1p-149" }, { type: "f32", value: "-0x1p-149" }]],
-                         [{ type: "f32", value: "0x1p-149" }, [{ type: "f32", value: "-0x1p-149" }, { type: "f32", value: "0x1p-149" }]],
-                         [{ type: "f32", value: "-0x1p-149" }, [{ type: "f32", value: "0x1p-149" }, { type: "f32", value: "-0x1p-149" }]],
-                         [{ type: "f32", value: "0x1p-149" }, [{ type: "f32", value: "0x1p-149" }, { type: "f32", value: "0x1p-149" }]],
-                         [{ type: "f32", value: "-0x1p-149" }, [{ type: "f32", value: "-0x1p-149" }, { type: "f32", value: "-0x1p-126" }]],
-                         [{ type: "f32", value: "0x1p-149" }, [{ type: "f32", value: "-0x1p-149" }, { type: "f32", value: "0x1p-126" }]],
-                         [{ type: "f32", value: "-0x1p-149" }, [{ type: "f32", value: "0x1p-149" }, { type: "f32", value: "-0x1p-126" }]],
-                         [{ type: "f32", value: "0x1p-149" }, [{ type: "f32", value: "0x1p-149" }, { type: "f32", value: "0x1p-126" }]],
-                         [{ type: "f32", value: "-0x1p-149" }, [{ type: "f32", value: "-0x1p-149" }, { type: "f32", value: "-0x1p-1" }]],
-                         [{ type: "f32", value: "0x1p-149" }, [{ type: "f32", value: "-0x1p-149" }, { type: "f32", value: "0x1p-1" }]],
-                         [{ type: "f32", value: "-0x1p-149" }, [{ type: "f32", value: "0x1p-149" }, { type: "f32", value: "-0x1p-1" }]],
-                         [{ type: "f32", value: "0x1p-149" }, [{ type: "f32", value: "0x1p-149" }, { type: "f32", value: "0x1p-1" }]],
-                         [{ type: "f32", value: "-0x1p-149" }, [{ type: "f32", value: "-0x1p-149" }, { type: "f32", value: "-0x1p+0" }]],
-                         [{ type: "f32", value: "0x1p-149" }, [{ type: "f32", value: "-0x1p-149" }, { type: "f32", value: "0x1p+0" }]],
-                         [{ type: "f32", value: "-0x1p-149" }, [{ type: "f32", value: "0x1p-149" }, { type: "f32", value: "-0x1p+0" }]],
-                         [{ type: "f32", value: "0x1p-149" }, [{ type: "f32", value: "0x1p-149" }, { type: "f32", value: "0x1p+0" }]],
-                         [{ type: "f32", value: "-0x1p-149" }, [{ type: "f32", value: "-0x1p-149" }, { type: "f32", value: "-0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "0x1p-149" }, [{ type: "f32", value: "-0x1p-149" }, { type: "f32", value: "0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "-0x1p-149" }, [{ type: "f32", value: "0x1p-149" }, { type: "f32", value: "-0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "0x1p-149" }, [{ type: "f32", value: "0x1p-149" }, { type: "f32", value: "0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "-0x1p-149" }, [{ type: "f32", value: "-0x1p-149" }, { type: "f32", value: "-0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "0x1p-149" }, [{ type: "f32", value: "-0x1p-149" }, { type: "f32", value: "0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "-0x1p-149" }, [{ type: "f32", value: "0x1p-149" }, { type: "f32", value: "-0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "0x1p-149" }, [{ type: "f32", value: "0x1p-149" }, { type: "f32", value: "0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "-0x1p-149" }, [{ type: "f32", value: "-0x1p-149" }, { type: "f32", value: "-infinity" }]],
-                         [{ type: "f32", value: "0x1p-149" }, [{ type: "f32", value: "-0x1p-149" }, { type: "f32", value: "infinity" }]],
-                         [{ type: "f32", value: "-0x1p-149" }, [{ type: "f32", value: "0x1p-149" }, { type: "f32", value: "-infinity" }]],
-                         [{ type: "f32", value: "0x1p-149" }, [{ type: "f32", value: "0x1p-149" }, { type: "f32", value: "infinity" }]],
-                         [{ type: "f32", value: "-0x1p-149" }, [{ type: "f32", value: "-0x1p-149" }, { type: "f32", value: "-nan" }]],
-                         [{ type: "f32", value: "0x1p-149" }, [{ type: "f32", value: "-0x1p-149" }, { type: "f32", value: "nan" }]],
-                         [{ type: "f32", value: "-0x1p-149" }, [{ type: "f32", value: "0x1p-149" }, { type: "f32", value: "-nan" }]],
-                         [{ type: "f32", value: "0x1p-149" }, [{ type: "f32", value: "0x1p-149" }, { type: "f32", value: "nan" }]],
-                         [{ type: "f32", value: "-0x1p-126" }, [{ type: "f32", value: "-0x1p-126" }, { type: "f32", value: "-0x0p+0" }]],
-                         [{ type: "f32", value: "0x1p-126" }, [{ type: "f32", value: "-0x1p-126" }, { type: "f32", value: "0x0p+0" }]],
-                         [{ type: "f32", value: "-0x1p-126" }, [{ type: "f32", value: "0x1p-126" }, { type: "f32", value: "-0x0p+0" }]],
-                         [{ type: "f32", value: "0x1p-126" }, [{ type: "f32", value: "0x1p-126" }, { type: "f32", value: "0x0p+0" }]],
-                         [{ type: "f32", value: "-0x1p-126" }, [{ type: "f32", value: "-0x1p-126" }, { type: "f32", value: "-0x1p-149" }]],
-                         [{ type: "f32", value: "0x1p-126" }, [{ type: "f32", value: "-0x1p-126" }, { type: "f32", value: "0x1p-149" }]],
-                         [{ type: "f32", value: "-0x1p-126" }, [{ type: "f32", value: "0x1p-126" }, { type: "f32", value: "-0x1p-149" }]],
-                         [{ type: "f32", value: "0x1p-126" }, [{ type: "f32", value: "0x1p-126" }, { type: "f32", value: "0x1p-149" }]],
-                         [{ type: "f32", value: "-0x1p-126" }, [{ type: "f32", value: "-0x1p-126" }, { type: "f32", value: "-0x1p-126" }]],
-                         [{ type: "f32", value: "0x1p-126" }, [{ type: "f32", value: "-0x1p-126" }, { type: "f32", value: "0x1p-126" }]],
-                         [{ type: "f32", value: "-0x1p-126" }, [{ type: "f32", value: "0x1p-126" }, { type: "f32", value: "-0x1p-126" }]],
-                         [{ type: "f32", value: "0x1p-126" }, [{ type: "f32", value: "0x1p-126" }, { type: "f32", value: "0x1p-126" }]],
-                         [{ type: "f32", value: "-0x1p-126" }, [{ type: "f32", value: "-0x1p-126" }, { type: "f32", value: "-0x1p-1" }]],
-                         [{ type: "f32", value: "0x1p-126" }, [{ type: "f32", value: "-0x1p-126" }, { type: "f32", value: "0x1p-1" }]],
-                         [{ type: "f32", value: "-0x1p-126" }, [{ type: "f32", value: "0x1p-126" }, { type: "f32", value: "-0x1p-1" }]],
-                         [{ type: "f32", value: "0x1p-126" }, [{ type: "f32", value: "0x1p-126" }, { type: "f32", value: "0x1p-1" }]],
-                         [{ type: "f32", value: "-0x1p-126" }, [{ type: "f32", value: "-0x1p-126" }, { type: "f32", value: "-0x1p+0" }]],
-                         [{ type: "f32", value: "0x1p-126" }, [{ type: "f32", value: "-0x1p-126" }, { type: "f32", value: "0x1p+0" }]],
-                         [{ type: "f32", value: "-0x1p-126" }, [{ type: "f32", value: "0x1p-126" }, { type: "f32", value: "-0x1p+0" }]],
-                         [{ type: "f32", value: "0x1p-126" }, [{ type: "f32", value: "0x1p-126" }, { type: "f32", value: "0x1p+0" }]],
-                         [{ type: "f32", value: "-0x1p-126" }, [{ type: "f32", value: "-0x1p-126" }, { type: "f32", value: "-0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "0x1p-126" }, [{ type: "f32", value: "-0x1p-126" }, { type: "f32", value: "0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "-0x1p-126" }, [{ type: "f32", value: "0x1p-126" }, { type: "f32", value: "-0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "0x1p-126" }, [{ type: "f32", value: "0x1p-126" }, { type: "f32", value: "0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "-0x1p-126" }, [{ type: "f32", value: "-0x1p-126" }, { type: "f32", value: "-0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "0x1p-126" }, [{ type: "f32", value: "-0x1p-126" }, { type: "f32", value: "0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "-0x1p-126" }, [{ type: "f32", value: "0x1p-126" }, { type: "f32", value: "-0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "0x1p-126" }, [{ type: "f32", value: "0x1p-126" }, { type: "f32", value: "0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "-0x1p-126" }, [{ type: "f32", value: "-0x1p-126" }, { type: "f32", value: "-infinity" }]],
-                         [{ type: "f32", value: "0x1p-126" }, [{ type: "f32", value: "-0x1p-126" }, { type: "f32", value: "infinity" }]],
-                         [{ type: "f32", value: "-0x1p-126" }, [{ type: "f32", value: "0x1p-126" }, { type: "f32", value: "-infinity" }]],
-                         [{ type: "f32", value: "0x1p-126" }, [{ type: "f32", value: "0x1p-126" }, { type: "f32", value: "infinity" }]],
-                         [{ type: "f32", value: "-0x1p-126" }, [{ type: "f32", value: "-0x1p-126" }, { type: "f32", value: "-nan" }]],
-                         [{ type: "f32", value: "0x1p-126" }, [{ type: "f32", value: "-0x1p-126" }, { type: "f32", value: "nan" }]],
-                         [{ type: "f32", value: "-0x1p-126" }, [{ type: "f32", value: "0x1p-126" }, { type: "f32", value: "-nan" }]],
-                         [{ type: "f32", value: "0x1p-126" }, [{ type: "f32", value: "0x1p-126" }, { type: "f32", value: "nan" }]],
-                         [{ type: "f32", value: "-0x1p-1" }, [{ type: "f32", value: "-0x1p-1" }, { type: "f32", value: "-0x0p+0" }]],
-                         [{ type: "f32", value: "0x1p-1" }, [{ type: "f32", value: "-0x1p-1" }, { type: "f32", value: "0x0p+0" }]],
-                         [{ type: "f32", value: "-0x1p-1" }, [{ type: "f32", value: "0x1p-1" }, { type: "f32", value: "-0x0p+0" }]],
-                         [{ type: "f32", value: "0x1p-1" }, [{ type: "f32", value: "0x1p-1" }, { type: "f32", value: "0x0p+0" }]],
-                         [{ type: "f32", value: "-0x1p-1" }, [{ type: "f32", value: "-0x1p-1" }, { type: "f32", value: "-0x1p-149" }]],
-                         [{ type: "f32", value: "0x1p-1" }, [{ type: "f32", value: "-0x1p-1" }, { type: "f32", value: "0x1p-149" }]],
-                         [{ type: "f32", value: "-0x1p-1" }, [{ type: "f32", value: "0x1p-1" }, { type: "f32", value: "-0x1p-149" }]],
-                         [{ type: "f32", value: "0x1p-1" }, [{ type: "f32", value: "0x1p-1" }, { type: "f32", value: "0x1p-149" }]],
-                         [{ type: "f32", value: "-0x1p-1" }, [{ type: "f32", value: "-0x1p-1" }, { type: "f32", value: "-0x1p-126" }]],
-                         [{ type: "f32", value: "0x1p-1" }, [{ type: "f32", value: "-0x1p-1" }, { type: "f32", value: "0x1p-126" }]],
-                         [{ type: "f32", value: "-0x1p-1" }, [{ type: "f32", value: "0x1p-1" }, { type: "f32", value: "-0x1p-126" }]],
-                         [{ type: "f32", value: "0x1p-1" }, [{ type: "f32", value: "0x1p-1" }, { type: "f32", value: "0x1p-126" }]],
-                         [{ type: "f32", value: "-0x1p-1" }, [{ type: "f32", value: "-0x1p-1" }, { type: "f32", value: "-0x1p-1" }]],
-                         [{ type: "f32", value: "0x1p-1" }, [{ type: "f32", value: "-0x1p-1" }, { type: "f32", value: "0x1p-1" }]],
-                         [{ type: "f32", value: "-0x1p-1" }, [{ type: "f32", value: "0x1p-1" }, { type: "f32", value: "-0x1p-1" }]],
-                         [{ type: "f32", value: "0x1p-1" }, [{ type: "f32", value: "0x1p-1" }, { type: "f32", value: "0x1p-1" }]],
-                         [{ type: "f32", value: "-0x1p-1" }, [{ type: "f32", value: "-0x1p-1" }, { type: "f32", value: "-0x1p+0" }]],
-                         [{ type: "f32", value: "0x1p-1" }, [{ type: "f32", value: "-0x1p-1" }, { type: "f32", value: "0x1p+0" }]],
-                         [{ type: "f32", value: "-0x1p-1" }, [{ type: "f32", value: "0x1p-1" }, { type: "f32", value: "-0x1p+0" }]],
-                         [{ type: "f32", value: "0x1p-1" }, [{ type: "f32", value: "0x1p-1" }, { type: "f32", value: "0x1p+0" }]],
-                         [{ type: "f32", value: "-0x1p-1" }, [{ type: "f32", value: "-0x1p-1" }, { type: "f32", value: "-0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "0x1p-1" }, [{ type: "f32", value: "-0x1p-1" }, { type: "f32", value: "0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "-0x1p-1" }, [{ type: "f32", value: "0x1p-1" }, { type: "f32", value: "-0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "0x1p-1" }, [{ type: "f32", value: "0x1p-1" }, { type: "f32", value: "0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "-0x1p-1" }, [{ type: "f32", value: "-0x1p-1" }, { type: "f32", value: "-0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "0x1p-1" }, [{ type: "f32", value: "-0x1p-1" }, { type: "f32", value: "0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "-0x1p-1" }, [{ type: "f32", value: "0x1p-1" }, { type: "f32", value: "-0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "0x1p-1" }, [{ type: "f32", value: "0x1p-1" }, { type: "f32", value: "0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "-0x1p-1" }, [{ type: "f32", value: "-0x1p-1" }, { type: "f32", value: "-infinity" }]],
-                         [{ type: "f32", value: "0x1p-1" }, [{ type: "f32", value: "-0x1p-1" }, { type: "f32", value: "infinity" }]],
-                         [{ type: "f32", value: "-0x1p-1" }, [{ type: "f32", value: "0x1p-1" }, { type: "f32", value: "-infinity" }]],
-                         [{ type: "f32", value: "0x1p-1" }, [{ type: "f32", value: "0x1p-1" }, { type: "f32", value: "infinity" }]],
-                         [{ type: "f32", value: "-0x1p-1" }, [{ type: "f32", value: "-0x1p-1" }, { type: "f32", value: "-nan" }]],
-                         [{ type: "f32", value: "0x1p-1" }, [{ type: "f32", value: "-0x1p-1" }, { type: "f32", value: "nan" }]],
-                         [{ type: "f32", value: "-0x1p-1" }, [{ type: "f32", value: "0x1p-1" }, { type: "f32", value: "-nan" }]],
-                         [{ type: "f32", value: "0x1p-1" }, [{ type: "f32", value: "0x1p-1" }, { type: "f32", value: "nan" }]],
-                         [{ type: "f32", value: "-0x1p+0" }, [{ type: "f32", value: "-0x1p+0" }, { type: "f32", value: "-0x0p+0" }]],
-                         [{ type: "f32", value: "0x1p+0" }, [{ type: "f32", value: "-0x1p+0" }, { type: "f32", value: "0x0p+0" }]],
-                         [{ type: "f32", value: "-0x1p+0" }, [{ type: "f32", value: "0x1p+0" }, { type: "f32", value: "-0x0p+0" }]],
-                         [{ type: "f32", value: "0x1p+0" }, [{ type: "f32", value: "0x1p+0" }, { type: "f32", value: "0x0p+0" }]],
-                         [{ type: "f32", value: "-0x1p+0" }, [{ type: "f32", value: "-0x1p+0" }, { type: "f32", value: "-0x1p-149" }]],
-                         [{ type: "f32", value: "0x1p+0" }, [{ type: "f32", value: "-0x1p+0" }, { type: "f32", value: "0x1p-149" }]],
-                         [{ type: "f32", value: "-0x1p+0" }, [{ type: "f32", value: "0x1p+0" }, { type: "f32", value: "-0x1p-149" }]],
-                         [{ type: "f32", value: "0x1p+0" }, [{ type: "f32", value: "0x1p+0" }, { type: "f32", value: "0x1p-149" }]],
-                         [{ type: "f32", value: "-0x1p+0" }, [{ type: "f32", value: "-0x1p+0" }, { type: "f32", value: "-0x1p-126" }]],
-                         [{ type: "f32", value: "0x1p+0" }, [{ type: "f32", value: "-0x1p+0" }, { type: "f32", value: "0x1p-126" }]],
-                         [{ type: "f32", value: "-0x1p+0" }, [{ type: "f32", value: "0x1p+0" }, { type: "f32", value: "-0x1p-126" }]],
-                         [{ type: "f32", value: "0x1p+0" }, [{ type: "f32", value: "0x1p+0" }, { type: "f32", value: "0x1p-126" }]],
-                         [{ type: "f32", value: "-0x1p+0" }, [{ type: "f32", value: "-0x1p+0" }, { type: "f32", value: "-0x1p-1" }]],
-                         [{ type: "f32", value: "0x1p+0" }, [{ type: "f32", value: "-0x1p+0" }, { type: "f32", value: "0x1p-1" }]],
-                         [{ type: "f32", value: "-0x1p+0" }, [{ type: "f32", value: "0x1p+0" }, { type: "f32", value: "-0x1p-1" }]],
-                         [{ type: "f32", value: "0x1p+0" }, [{ type: "f32", value: "0x1p+0" }, { type: "f32", value: "0x1p-1" }]],
-                         [{ type: "f32", value: "-0x1p+0" }, [{ type: "f32", value: "-0x1p+0" }, { type: "f32", value: "-0x1p+0" }]],
-                         [{ type: "f32", value: "0x1p+0" }, [{ type: "f32", value: "-0x1p+0" }, { type: "f32", value: "0x1p+0" }]],
-                         [{ type: "f32", value: "-0x1p+0" }, [{ type: "f32", value: "0x1p+0" }, { type: "f32", value: "-0x1p+0" }]],
-                         [{ type: "f32", value: "0x1p+0" }, [{ type: "f32", value: "0x1p+0" }, { type: "f32", value: "0x1p+0" }]],
-                         [{ type: "f32", value: "-0x1p+0" }, [{ type: "f32", value: "-0x1p+0" }, { type: "f32", value: "-0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "0x1p+0" }, [{ type: "f32", value: "-0x1p+0" }, { type: "f32", value: "0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "-0x1p+0" }, [{ type: "f32", value: "0x1p+0" }, { type: "f32", value: "-0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "0x1p+0" }, [{ type: "f32", value: "0x1p+0" }, { type: "f32", value: "0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "-0x1p+0" }, [{ type: "f32", value: "-0x1p+0" }, { type: "f32", value: "-0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "0x1p+0" }, [{ type: "f32", value: "-0x1p+0" }, { type: "f32", value: "0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "-0x1p+0" }, [{ type: "f32", value: "0x1p+0" }, { type: "f32", value: "-0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "0x1p+0" }, [{ type: "f32", value: "0x1p+0" }, { type: "f32", value: "0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "-0x1p+0" }, [{ type: "f32", value: "-0x1p+0" }, { type: "f32", value: "-infinity" }]],
-                         [{ type: "f32", value: "0x1p+0" }, [{ type: "f32", value: "-0x1p+0" }, { type: "f32", value: "infinity" }]],
-                         [{ type: "f32", value: "-0x1p+0" }, [{ type: "f32", value: "0x1p+0" }, { type: "f32", value: "-infinity" }]],
-                         [{ type: "f32", value: "0x1p+0" }, [{ type: "f32", value: "0x1p+0" }, { type: "f32", value: "infinity" }]],
-                         [{ type: "f32", value: "-0x1p+0" }, [{ type: "f32", value: "-0x1p+0" }, { type: "f32", value: "-nan" }]],
-                         [{ type: "f32", value: "0x1p+0" }, [{ type: "f32", value: "-0x1p+0" }, { type: "f32", value: "nan" }]],
-                         [{ type: "f32", value: "-0x1p+0" }, [{ type: "f32", value: "0x1p+0" }, { type: "f32", value: "-nan" }]],
-                         [{ type: "f32", value: "0x1p+0" }, [{ type: "f32", value: "0x1p+0" }, { type: "f32", value: "nan" }]],
-                         [{ type: "f32", value: "-0x1.921fb6p+2" }, [{ type: "f32", value: "-0x1.921fb6p+2" }, { type: "f32", value: "-0x0p+0" }]],
-                         [{ type: "f32", value: "0x1.921fb6p+2" }, [{ type: "f32", value: "-0x1.921fb6p+2" }, { type: "f32", value: "0x0p+0" }]],
-                         [{ type: "f32", value: "-0x1.921fb6p+2" }, [{ type: "f32", value: "0x1.921fb6p+2" }, { type: "f32", value: "-0x0p+0" }]],
-                         [{ type: "f32", value: "0x1.921fb6p+2" }, [{ type: "f32", value: "0x1.921fb6p+2" }, { type: "f32", value: "0x0p+0" }]],
-                         [{ type: "f32", value: "-0x1.921fb6p+2" }, [{ type: "f32", value: "-0x1.921fb6p+2" }, { type: "f32", value: "-0x1p-149" }]],
-                         [{ type: "f32", value: "0x1.921fb6p+2" }, [{ type: "f32", value: "-0x1.921fb6p+2" }, { type: "f32", value: "0x1p-149" }]],
-                         [{ type: "f32", value: "-0x1.921fb6p+2" }, [{ type: "f32", value: "0x1.921fb6p+2" }, { type: "f32", value: "-0x1p-149" }]],
-                         [{ type: "f32", value: "0x1.921fb6p+2" }, [{ type: "f32", value: "0x1.921fb6p+2" }, { type: "f32", value: "0x1p-149" }]],
-                         [{ type: "f32", value: "-0x1.921fb6p+2" }, [{ type: "f32", value: "-0x1.921fb6p+2" }, { type: "f32", value: "-0x1p-126" }]],
-                         [{ type: "f32", value: "0x1.921fb6p+2" }, [{ type: "f32", value: "-0x1.921fb6p+2" }, { type: "f32", value: "0x1p-126" }]],
-                         [{ type: "f32", value: "-0x1.921fb6p+2" }, [{ type: "f32", value: "0x1.921fb6p+2" }, { type: "f32", value: "-0x1p-126" }]],
-                         [{ type: "f32", value: "0x1.921fb6p+2" }, [{ type: "f32", value: "0x1.921fb6p+2" }, { type: "f32", value: "0x1p-126" }]],
-                         [{ type: "f32", value: "-0x1.921fb6p+2" }, [{ type: "f32", value: "-0x1.921fb6p+2" }, { type: "f32", value: "-0x1p-1" }]],
-                         [{ type: "f32", value: "0x1.921fb6p+2" }, [{ type: "f32", value: "-0x1.921fb6p+2" }, { type: "f32", value: "0x1p-1" }]],
-                         [{ type: "f32", value: "-0x1.921fb6p+2" }, [{ type: "f32", value: "0x1.921fb6p+2" }, { type: "f32", value: "-0x1p-1" }]],
-                         [{ type: "f32", value: "0x1.921fb6p+2" }, [{ type: "f32", value: "0x1.921fb6p+2" }, { type: "f32", value: "0x1p-1" }]],
-                         [{ type: "f32", value: "-0x1.921fb6p+2" }, [{ type: "f32", value: "-0x1.921fb6p+2" }, { type: "f32", value: "-0x1p+0" }]],
-                         [{ type: "f32", value: "0x1.921fb6p+2" }, [{ type: "f32", value: "-0x1.921fb6p+2" }, { type: "f32", value: "0x1p+0" }]],
-                         [{ type: "f32", value: "-0x1.921fb6p+2" }, [{ type: "f32", value: "0x1.921fb6p+2" }, { type: "f32", value: "-0x1p+0" }]],
-                         [{ type: "f32", value: "0x1.921fb6p+2" }, [{ type: "f32", value: "0x1.921fb6p+2" }, { type: "f32", value: "0x1p+0" }]],
-                         [{ type: "f32", value: "-0x1.921fb6p+2" }, [{ type: "f32", value: "-0x1.921fb6p+2" }, { type: "f32", value: "-0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "0x1.921fb6p+2" }, [{ type: "f32", value: "-0x1.921fb6p+2" }, { type: "f32", value: "0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "-0x1.921fb6p+2" }, [{ type: "f32", value: "0x1.921fb6p+2" }, { type: "f32", value: "-0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "0x1.921fb6p+2" }, [{ type: "f32", value: "0x1.921fb6p+2" }, { type: "f32", value: "0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "-0x1.921fb6p+2" }, [{ type: "f32", value: "-0x1.921fb6p+2" }, { type: "f32", value: "-0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "0x1.921fb6p+2" }, [{ type: "f32", value: "-0x1.921fb6p+2" }, { type: "f32", value: "0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "-0x1.921fb6p+2" }, [{ type: "f32", value: "0x1.921fb6p+2" }, { type: "f32", value: "-0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "0x1.921fb6p+2" }, [{ type: "f32", value: "0x1.921fb6p+2" }, { type: "f32", value: "0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "-0x1.921fb6p+2" }, [{ type: "f32", value: "-0x1.921fb6p+2" }, { type: "f32", value: "-infinity" }]],
-                         [{ type: "f32", value: "0x1.921fb6p+2" }, [{ type: "f32", value: "-0x1.921fb6p+2" }, { type: "f32", value: "infinity" }]],
-                         [{ type: "f32", value: "-0x1.921fb6p+2" }, [{ type: "f32", value: "0x1.921fb6p+2" }, { type: "f32", value: "-infinity" }]],
-                         [{ type: "f32", value: "0x1.921fb6p+2" }, [{ type: "f32", value: "0x1.921fb6p+2" }, { type: "f32", value: "infinity" }]],
-                         [{ type: "f32", value: "-0x1.921fb6p+2" }, [{ type: "f32", value: "-0x1.921fb6p+2" }, { type: "f32", value: "-nan" }]],
-                         [{ type: "f32", value: "0x1.921fb6p+2" }, [{ type: "f32", value: "-0x1.921fb6p+2" }, { type: "f32", value: "nan" }]],
-                         [{ type: "f32", value: "-0x1.921fb6p+2" }, [{ type: "f32", value: "0x1.921fb6p+2" }, { type: "f32", value: "-nan" }]],
-                         [{ type: "f32", value: "0x1.921fb6p+2" }, [{ type: "f32", value: "0x1.921fb6p+2" }, { type: "f32", value: "nan" }]],
-                         [{ type: "f32", value: "-0x1.fffffep+127" }, [{ type: "f32", value: "-0x1.fffffep+127" }, { type: "f32", value: "-0x0p+0" }]],
-                         [{ type: "f32", value: "0x1.fffffep+127" }, [{ type: "f32", value: "-0x1.fffffep+127" }, { type: "f32", value: "0x0p+0" }]],
-                         [{ type: "f32", value: "-0x1.fffffep+127" }, [{ type: "f32", value: "0x1.fffffep+127" }, { type: "f32", value: "-0x0p+0" }]],
-                         [{ type: "f32", value: "0x1.fffffep+127" }, [{ type: "f32", value: "0x1.fffffep+127" }, { type: "f32", value: "0x0p+0" }]],
-                         [{ type: "f32", value: "-0x1.fffffep+127" }, [{ type: "f32", value: "-0x1.fffffep+127" }, { type: "f32", value: "-0x1p-149" }]],
-                         [{ type: "f32", value: "0x1.fffffep+127" }, [{ type: "f32", value: "-0x1.fffffep+127" }, { type: "f32", value: "0x1p-149" }]],
-                         [{ type: "f32", value: "-0x1.fffffep+127" }, [{ type: "f32", value: "0x1.fffffep+127" }, { type: "f32", value: "-0x1p-149" }]],
-                         [{ type: "f32", value: "0x1.fffffep+127" }, [{ type: "f32", value: "0x1.fffffep+127" }, { type: "f32", value: "0x1p-149" }]],
-                         [{ type: "f32", value: "-0x1.fffffep+127" }, [{ type: "f32", value: "-0x1.fffffep+127" }, { type: "f32", value: "-0x1p-126" }]],
-                         [{ type: "f32", value: "0x1.fffffep+127" }, [{ type: "f32", value: "-0x1.fffffep+127" }, { type: "f32", value: "0x1p-126" }]],
-                         [{ type: "f32", value: "-0x1.fffffep+127" }, [{ type: "f32", value: "0x1.fffffep+127" }, { type: "f32", value: "-0x1p-126" }]],
-                         [{ type: "f32", value: "0x1.fffffep+127" }, [{ type: "f32", value: "0x1.fffffep+127" }, { type: "f32", value: "0x1p-126" }]],
-                         [{ type: "f32", value: "-0x1.fffffep+127" }, [{ type: "f32", value: "-0x1.fffffep+127" }, { type: "f32", value: "-0x1p-1" }]],
-                         [{ type: "f32", value: "0x1.fffffep+127" }, [{ type: "f32", value: "-0x1.fffffep+127" }, { type: "f32", value: "0x1p-1" }]],
-                         [{ type: "f32", value: "-0x1.fffffep+127" }, [{ type: "f32", value: "0x1.fffffep+127" }, { type: "f32", value: "-0x1p-1" }]],
-                         [{ type: "f32", value: "0x1.fffffep+127" }, [{ type: "f32", value: "0x1.fffffep+127" }, { type: "f32", value: "0x1p-1" }]],
-                         [{ type: "f32", value: "-0x1.fffffep+127" }, [{ type: "f32", value: "-0x1.fffffep+127" }, { type: "f32", value: "-0x1p+0" }]],
-                         [{ type: "f32", value: "0x1.fffffep+127" }, [{ type: "f32", value: "-0x1.fffffep+127" }, { type: "f32", value: "0x1p+0" }]],
-                         [{ type: "f32", value: "-0x1.fffffep+127" }, [{ type: "f32", value: "0x1.fffffep+127" }, { type: "f32", value: "-0x1p+0" }]],
-                         [{ type: "f32", value: "0x1.fffffep+127" }, [{ type: "f32", value: "0x1.fffffep+127" }, { type: "f32", value: "0x1p+0" }]],
-                         [{ type: "f32", value: "-0x1.fffffep+127" }, [{ type: "f32", value: "-0x1.fffffep+127" }, { type: "f32", value: "-0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "0x1.fffffep+127" }, [{ type: "f32", value: "-0x1.fffffep+127" }, { type: "f32", value: "0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "-0x1.fffffep+127" }, [{ type: "f32", value: "0x1.fffffep+127" }, { type: "f32", value: "-0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "0x1.fffffep+127" }, [{ type: "f32", value: "0x1.fffffep+127" }, { type: "f32", value: "0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "-0x1.fffffep+127" }, [{ type: "f32", value: "-0x1.fffffep+127" }, { type: "f32", value: "-0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "0x1.fffffep+127" }, [{ type: "f32", value: "-0x1.fffffep+127" }, { type: "f32", value: "0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "-0x1.fffffep+127" }, [{ type: "f32", value: "0x1.fffffep+127" }, { type: "f32", value: "-0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "0x1.fffffep+127" }, [{ type: "f32", value: "0x1.fffffep+127" }, { type: "f32", value: "0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "-0x1.fffffep+127" }, [{ type: "f32", value: "-0x1.fffffep+127" }, { type: "f32", value: "-infinity" }]],
-                         [{ type: "f32", value: "0x1.fffffep+127" }, [{ type: "f32", value: "-0x1.fffffep+127" }, { type: "f32", value: "infinity" }]],
-                         [{ type: "f32", value: "-0x1.fffffep+127" }, [{ type: "f32", value: "0x1.fffffep+127" }, { type: "f32", value: "-infinity" }]],
-                         [{ type: "f32", value: "0x1.fffffep+127" }, [{ type: "f32", value: "0x1.fffffep+127" }, { type: "f32", value: "infinity" }]],
-                         [{ type: "f32", value: "-0x1.fffffep+127" }, [{ type: "f32", value: "-0x1.fffffep+127" }, { type: "f32", value: "-nan" }]],
-                         [{ type: "f32", value: "0x1.fffffep+127" }, [{ type: "f32", value: "-0x1.fffffep+127" }, { type: "f32", value: "nan" }]],
-                         [{ type: "f32", value: "-0x1.fffffep+127" }, [{ type: "f32", value: "0x1.fffffep+127" }, { type: "f32", value: "-nan" }]],
-                         [{ type: "f32", value: "0x1.fffffep+127" }, [{ type: "f32", value: "0x1.fffffep+127" }, { type: "f32", value: "nan" }]],
-                         [{ type: "f32", value: "-infinity" }, [{ type: "f32", value: "-infinity" }, { type: "f32", value: "-0x0p+0" }]],
-                         [{ type: "f32", value: "infinity" }, [{ type: "f32", value: "-infinity" }, { type: "f32", value: "0x0p+0" }]],
-                         [{ type: "f32", value: "-infinity" }, [{ type: "f32", value: "infinity" }, { type: "f32", value: "-0x0p+0" }]],
-                         [{ type: "f32", value: "infinity" }, [{ type: "f32", value: "infinity" }, { type: "f32", value: "0x0p+0" }]],
-                         [{ type: "f32", value: "-infinity" }, [{ type: "f32", value: "-infinity" }, { type: "f32", value: "-0x1p-149" }]],
-                         [{ type: "f32", value: "infinity" }, [{ type: "f32", value: "-infinity" }, { type: "f32", value: "0x1p-149" }]],
-                         [{ type: "f32", value: "-infinity" }, [{ type: "f32", value: "infinity" }, { type: "f32", value: "-0x1p-149" }]],
-                         [{ type: "f32", value: "infinity" }, [{ type: "f32", value: "infinity" }, { type: "f32", value: "0x1p-149" }]],
-                         [{ type: "f32", value: "-infinity" }, [{ type: "f32", value: "-infinity" }, { type: "f32", value: "-0x1p-126" }]],
-                         [{ type: "f32", value: "infinity" }, [{ type: "f32", value: "-infinity" }, { type: "f32", value: "0x1p-126" }]],
-                         [{ type: "f32", value: "-infinity" }, [{ type: "f32", value: "infinity" }, { type: "f32", value: "-0x1p-126" }]],
-                         [{ type: "f32", value: "infinity" }, [{ type: "f32", value: "infinity" }, { type: "f32", value: "0x1p-126" }]],
-                         [{ type: "f32", value: "-infinity" }, [{ type: "f32", value: "-infinity" }, { type: "f32", value: "-0x1p-1" }]],
-                         [{ type: "f32", value: "infinity" }, [{ type: "f32", value: "-infinity" }, { type: "f32", value: "0x1p-1" }]],
-                         [{ type: "f32", value: "-infinity" }, [{ type: "f32", value: "infinity" }, { type: "f32", value: "-0x1p-1" }]],
-                         [{ type: "f32", value: "infinity" }, [{ type: "f32", value: "infinity" }, { type: "f32", value: "0x1p-1" }]],
-                         [{ type: "f32", value: "-infinity" }, [{ type: "f32", value: "-infinity" }, { type: "f32", value: "-0x1p+0" }]],
-                         [{ type: "f32", value: "infinity" }, [{ type: "f32", value: "-infinity" }, { type: "f32", value: "0x1p+0" }]],
-                         [{ type: "f32", value: "-infinity" }, [{ type: "f32", value: "infinity" }, { type: "f32", value: "-0x1p+0" }]],
-                         [{ type: "f32", value: "infinity" }, [{ type: "f32", value: "infinity" }, { type: "f32", value: "0x1p+0" }]],
-                         [{ type: "f32", value: "-infinity" }, [{ type: "f32", value: "-infinity" }, { type: "f32", value: "-0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "infinity" }, [{ type: "f32", value: "-infinity" }, { type: "f32", value: "0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "-infinity" }, [{ type: "f32", value: "infinity" }, { type: "f32", value: "-0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "infinity" }, [{ type: "f32", value: "infinity" }, { type: "f32", value: "0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "-infinity" }, [{ type: "f32", value: "-infinity" }, { type: "f32", value: "-0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "infinity" }, [{ type: "f32", value: "-infinity" }, { type: "f32", value: "0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "-infinity" }, [{ type: "f32", value: "infinity" }, { type: "f32", value: "-0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "infinity" }, [{ type: "f32", value: "infinity" }, { type: "f32", value: "0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "-infinity" }, [{ type: "f32", value: "-infinity" }, { type: "f32", value: "-infinity" }]],
-                         [{ type: "f32", value: "infinity" }, [{ type: "f32", value: "-infinity" }, { type: "f32", value: "infinity" }]],
-                         [{ type: "f32", value: "-infinity" }, [{ type: "f32", value: "infinity" }, { type: "f32", value: "-infinity" }]],
-                         [{ type: "f32", value: "infinity" }, [{ type: "f32", value: "infinity" }, { type: "f32", value: "infinity" }]],
-                         [{ type: "f32", value: "-infinity" }, [{ type: "f32", value: "-infinity" }, { type: "f32", value: "-nan" }]],
-                         [{ type: "f32", value: "infinity" }, [{ type: "f32", value: "-infinity" }, { type: "f32", value: "nan" }]],
-                         [{ type: "f32", value: "-infinity" }, [{ type: "f32", value: "infinity" }, { type: "f32", value: "-nan" }]],
-                         [{ type: "f32", value: "infinity" }, [{ type: "f32", value: "infinity" }, { type: "f32", value: "nan" }]],
-                         [{ type: "f32", value: "-nan" }, [{ type: "f32", value: "-nan" }, { type: "f32", value: "-0x0p+0" }]],
-                         [{ type: "f32", value: "nan" }, [{ type: "f32", value: "-nan" }, { type: "f32", value: "0x0p+0" }]],
-                         [{ type: "f32", value: "-nan" }, [{ type: "f32", value: "nan" }, { type: "f32", value: "-0x0p+0" }]],
-                         [{ type: "f32", value: "nan" }, [{ type: "f32", value: "nan" }, { type: "f32", value: "0x0p+0" }]],
-                         [{ type: "f32", value: "-nan" }, [{ type: "f32", value: "-nan" }, { type: "f32", value: "-0x1p-149" }]],
-                         [{ type: "f32", value: "nan" }, [{ type: "f32", value: "-nan" }, { type: "f32", value: "0x1p-149" }]],
-                         [{ type: "f32", value: "-nan" }, [{ type: "f32", value: "nan" }, { type: "f32", value: "-0x1p-149" }]],
-                         [{ type: "f32", value: "nan" }, [{ type: "f32", value: "nan" }, { type: "f32", value: "0x1p-149" }]],
-                         [{ type: "f32", value: "-nan" }, [{ type: "f32", value: "-nan" }, { type: "f32", value: "-0x1p-126" }]],
-                         [{ type: "f32", value: "nan" }, [{ type: "f32", value: "-nan" }, { type: "f32", value: "0x1p-126" }]],
-                         [{ type: "f32", value: "-nan" }, [{ type: "f32", value: "nan" }, { type: "f32", value: "-0x1p-126" }]],
-                         [{ type: "f32", value: "nan" }, [{ type: "f32", value: "nan" }, { type: "f32", value: "0x1p-126" }]],
-                         [{ type: "f32", value: "-nan" }, [{ type: "f32", value: "-nan" }, { type: "f32", value: "-0x1p-1" }]],
-                         [{ type: "f32", value: "nan" }, [{ type: "f32", value: "-nan" }, { type: "f32", value: "0x1p-1" }]],
-                         [{ type: "f32", value: "-nan" }, [{ type: "f32", value: "nan" }, { type: "f32", value: "-0x1p-1" }]],
-                         [{ type: "f32", value: "nan" }, [{ type: "f32", value: "nan" }, { type: "f32", value: "0x1p-1" }]],
-                         [{ type: "f32", value: "-nan" }, [{ type: "f32", value: "-nan" }, { type: "f32", value: "-0x1p+0" }]],
-                         [{ type: "f32", value: "nan" }, [{ type: "f32", value: "-nan" }, { type: "f32", value: "0x1p+0" }]],
-                         [{ type: "f32", value: "-nan" }, [{ type: "f32", value: "nan" }, { type: "f32", value: "-0x1p+0" }]],
-                         [{ type: "f32", value: "nan" }, [{ type: "f32", value: "nan" }, { type: "f32", value: "0x1p+0" }]],
-                         [{ type: "f32", value: "-nan" }, [{ type: "f32", value: "-nan" }, { type: "f32", value: "-0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "nan" }, [{ type: "f32", value: "-nan" }, { type: "f32", value: "0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "-nan" }, [{ type: "f32", value: "nan" }, { type: "f32", value: "-0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "nan" }, [{ type: "f32", value: "nan" }, { type: "f32", value: "0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "-nan" }, [{ type: "f32", value: "-nan" }, { type: "f32", value: "-0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "nan" }, [{ type: "f32", value: "-nan" }, { type: "f32", value: "0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "-nan" }, [{ type: "f32", value: "nan" }, { type: "f32", value: "-0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "nan" }, [{ type: "f32", value: "nan" }, { type: "f32", value: "0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "-nan" }, [{ type: "f32", value: "-nan" }, { type: "f32", value: "-infinity" }]],
-                         [{ type: "f32", value: "nan" }, [{ type: "f32", value: "-nan" }, { type: "f32", value: "infinity" }]],
-                         [{ type: "f32", value: "-nan" }, [{ type: "f32", value: "nan" }, { type: "f32", value: "-infinity" }]],
-                         [{ type: "f32", value: "nan" }, [{ type: "f32", value: "nan" }, { type: "f32", value: "infinity" }]],
-                         [{ type: "f32", value: "-nan" }, [{ type: "f32", value: "-nan" }, { type: "f32", value: "-nan" }]],
-                         [{ type: "f32", value: "nan" }, [{ type: "f32", value: "-nan" }, { type: "f32", value: "nan" }]],
-                         [{ type: "f32", value: "-nan" }, [{ type: "f32", value: "nan" }, { type: "f32", value: "-nan" }]],
-                         [{ type: "f32", value: "nan" }, [{ type: "f32", value: "nan" }, { type: "f32", value: "nan" }]],
-                        ],
-
-                        [[{ type: "f64", value: "-0x0p+0" }, [{ type: "f64", value: "-0x0p+0" }, { type: "f64", value: "-0x0p+0" }]],
-                         [{ type: "f64", value: "0x0p+0" }, [{ type: "f64", value: "-0x0p+0" }, { type: "f64", value: "0x0p+0" }]],
-                         [{ type: "f64", value: "-0x0p+0" }, [{ type: "f64", value: "0x0p+0" }, { type: "f64", value: "-0x0p+0" }]],
-                         [{ type: "f64", value: "0x0p+0" }, [{ type: "f64", value: "0x0p+0" }, { type: "f64", value: "0x0p+0" }]],
-                         [{ type: "f64", value: "-0x0p+0" }, [{ type: "f64", value: "-0x0p+0" }, { type: "f64", value: "-0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "0x0p+0" }, [{ type: "f64", value: "-0x0p+0" }, { type: "f64", value: "0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "-0x0p+0" }, [{ type: "f64", value: "0x0p+0" }, { type: "f64", value: "-0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "0x0p+0" }, [{ type: "f64", value: "0x0p+0" }, { type: "f64", value: "0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "-0x0p+0" }, [{ type: "f64", value: "-0x0p+0" }, { type: "f64", value: "-0x1p-1022" }]],
-                         [{ type: "f64", value: "0x0p+0" }, [{ type: "f64", value: "-0x0p+0" }, { type: "f64", value: "0x1p-1022" }]],
-                         [{ type: "f64", value: "-0x0p+0" }, [{ type: "f64", value: "0x0p+0" }, { type: "f64", value: "-0x1p-1022" }]],
-                         [{ type: "f64", value: "0x0p+0" }, [{ type: "f64", value: "0x0p+0" }, { type: "f64", value: "0x1p-1022" }]],
-                         [{ type: "f64", value: "-0x0p+0" }, [{ type: "f64", value: "-0x0p+0" }, { type: "f64", value: "-0x1p-1" }]],
-                         [{ type: "f64", value: "0x0p+0" }, [{ type: "f64", value: "-0x0p+0" }, { type: "f64", value: "0x1p-1" }]],
-                         [{ type: "f64", value: "-0x0p+0" }, [{ type: "f64", value: "0x0p+0" }, { type: "f64", value: "-0x1p-1" }]],
-                         [{ type: "f64", value: "0x0p+0" }, [{ type: "f64", value: "0x0p+0" }, { type: "f64", value: "0x1p-1" }]],
-                         [{ type: "f64", value: "-0x0p+0" }, [{ type: "f64", value: "-0x0p+0" }, { type: "f64", value: "-0x1p+0" }]],
-                         [{ type: "f64", value: "0x0p+0" }, [{ type: "f64", value: "-0x0p+0" }, { type: "f64", value: "0x1p+0" }]],
-                         [{ type: "f64", value: "-0x0p+0" }, [{ type: "f64", value: "0x0p+0" }, { type: "f64", value: "-0x1p+0" }]],
-                         [{ type: "f64", value: "0x0p+0" }, [{ type: "f64", value: "0x0p+0" }, { type: "f64", value: "0x1p+0" }]],
-                         [{ type: "f64", value: "-0x0p+0" }, [{ type: "f64", value: "-0x0p+0" }, { type: "f64", value: "-0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "0x0p+0" }, [{ type: "f64", value: "-0x0p+0" }, { type: "f64", value: "0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "-0x0p+0" }, [{ type: "f64", value: "0x0p+0" }, { type: "f64", value: "-0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "0x0p+0" }, [{ type: "f64", value: "0x0p+0" }, { type: "f64", value: "0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "-0x0p+0" }, [{ type: "f64", value: "-0x0p+0" }, { type: "f64", value: "-0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "0x0p+0" }, [{ type: "f64", value: "-0x0p+0" }, { type: "f64", value: "0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "-0x0p+0" }, [{ type: "f64", value: "0x0p+0" }, { type: "f64", value: "-0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "0x0p+0" }, [{ type: "f64", value: "0x0p+0" }, { type: "f64", value: "0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "-0x0p+0" }, [{ type: "f64", value: "-0x0p+0" }, { type: "f64", value: "-infinity" }]],
-                         [{ type: "f64", value: "0x0p+0" }, [{ type: "f64", value: "-0x0p+0" }, { type: "f64", value: "infinity" }]],
-                         [{ type: "f64", value: "-0x0p+0" }, [{ type: "f64", value: "0x0p+0" }, { type: "f64", value: "-infinity" }]],
-                         [{ type: "f64", value: "0x0p+0" }, [{ type: "f64", value: "0x0p+0" }, { type: "f64", value: "infinity" }]],
-                         [{ type: "f64", value: "-0x0p+0" }, [{ type: "f64", value: "-0x0p+0" }, { type: "f64", value: "-nan" }]],
-                         [{ type: "f64", value: "0x0p+0" }, [{ type: "f64", value: "-0x0p+0" }, { type: "f64", value: "nan" }]],
-                         [{ type: "f64", value: "-0x0p+0" }, [{ type: "f64", value: "0x0p+0" }, { type: "f64", value: "-nan" }]],
-                         [{ type: "f64", value: "0x0p+0" }, [{ type: "f64", value: "0x0p+0" }, { type: "f64", value: "nan" }]],
-                         [{ type: "f64", value: "-0x0.0000000000001p-1022" }, [{ type: "f64", value: "-0x0.0000000000001p-1022" }, { type: "f64", value: "-0x0p+0" }]],
-                         [{ type: "f64", value: "0x0.0000000000001p-1022" }, [{ type: "f64", value: "-0x0.0000000000001p-1022" }, { type: "f64", value: "0x0p+0" }]],
-                         [{ type: "f64", value: "-0x0.0000000000001p-1022" }, [{ type: "f64", value: "0x0.0000000000001p-1022" }, { type: "f64", value: "-0x0p+0" }]],
-                         [{ type: "f64", value: "0x0.0000000000001p-1022" }, [{ type: "f64", value: "0x0.0000000000001p-1022" }, { type: "f64", value: "0x0p+0" }]],
-                         [{ type: "f64", value: "-0x0.0000000000001p-1022" }, [{ type: "f64", value: "-0x0.0000000000001p-1022" }, { type: "f64", value: "-0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "0x0.0000000000001p-1022" }, [{ type: "f64", value: "-0x0.0000000000001p-1022" }, { type: "f64", value: "0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "-0x0.0000000000001p-1022" }, [{ type: "f64", value: "0x0.0000000000001p-1022" }, { type: "f64", value: "-0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "0x0.0000000000001p-1022" }, [{ type: "f64", value: "0x0.0000000000001p-1022" }, { type: "f64", value: "0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "-0x0.0000000000001p-1022" }, [{ type: "f64", value: "-0x0.0000000000001p-1022" }, { type: "f64", value: "-0x1p-1022" }]],
-                         [{ type: "f64", value: "0x0.0000000000001p-1022" }, [{ type: "f64", value: "-0x0.0000000000001p-1022" }, { type: "f64", value: "0x1p-1022" }]],
-                         [{ type: "f64", value: "-0x0.0000000000001p-1022" }, [{ type: "f64", value: "0x0.0000000000001p-1022" }, { type: "f64", value: "-0x1p-1022" }]],
-                         [{ type: "f64", value: "0x0.0000000000001p-1022" }, [{ type: "f64", value: "0x0.0000000000001p-1022" }, { type: "f64", value: "0x1p-1022" }]],
-                         [{ type: "f64", value: "-0x0.0000000000001p-1022" }, [{ type: "f64", value: "-0x0.0000000000001p-1022" }, { type: "f64", value: "-0x1p-1" }]],
-                         [{ type: "f64", value: "0x0.0000000000001p-1022" }, [{ type: "f64", value: "-0x0.0000000000001p-1022" }, { type: "f64", value: "0x1p-1" }]],
-                         [{ type: "f64", value: "-0x0.0000000000001p-1022" }, [{ type: "f64", value: "0x0.0000000000001p-1022" }, { type: "f64", value: "-0x1p-1" }]],
-                         [{ type: "f64", value: "0x0.0000000000001p-1022" }, [{ type: "f64", value: "0x0.0000000000001p-1022" }, { type: "f64", value: "0x1p-1" }]],
-                         [{ type: "f64", value: "-0x0.0000000000001p-1022" }, [{ type: "f64", value: "-0x0.0000000000001p-1022" }, { type: "f64", value: "-0x1p+0" }]],
-                         [{ type: "f64", value: "0x0.0000000000001p-1022" }, [{ type: "f64", value: "-0x0.0000000000001p-1022" }, { type: "f64", value: "0x1p+0" }]],
-                         [{ type: "f64", value: "-0x0.0000000000001p-1022" }, [{ type: "f64", value: "0x0.0000000000001p-1022" }, { type: "f64", value: "-0x1p+0" }]],
-                         [{ type: "f64", value: "0x0.0000000000001p-1022" }, [{ type: "f64", value: "0x0.0000000000001p-1022" }, { type: "f64", value: "0x1p+0" }]],
-                         [{ type: "f64", value: "-0x0.0000000000001p-1022" }, [{ type: "f64", value: "-0x0.0000000000001p-1022" }, { type: "f64", value: "-0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "0x0.0000000000001p-1022" }, [{ type: "f64", value: "-0x0.0000000000001p-1022" }, { type: "f64", value: "0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "-0x0.0000000000001p-1022" }, [{ type: "f64", value: "0x0.0000000000001p-1022" }, { type: "f64", value: "-0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "0x0.0000000000001p-1022" }, [{ type: "f64", value: "0x0.0000000000001p-1022" }, { type: "f64", value: "0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "-0x0.0000000000001p-1022" }, [{ type: "f64", value: "-0x0.0000000000001p-1022" }, { type: "f64", value: "-0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "0x0.0000000000001p-1022" }, [{ type: "f64", value: "-0x0.0000000000001p-1022" }, { type: "f64", value: "0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "-0x0.0000000000001p-1022" }, [{ type: "f64", value: "0x0.0000000000001p-1022" }, { type: "f64", value: "-0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "0x0.0000000000001p-1022" }, [{ type: "f64", value: "0x0.0000000000001p-1022" }, { type: "f64", value: "0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "-0x0.0000000000001p-1022" }, [{ type: "f64", value: "-0x0.0000000000001p-1022" }, { type: "f64", value: "-infinity" }]],
-                         [{ type: "f64", value: "0x0.0000000000001p-1022" }, [{ type: "f64", value: "-0x0.0000000000001p-1022" }, { type: "f64", value: "infinity" }]],
-                         [{ type: "f64", value: "-0x0.0000000000001p-1022" }, [{ type: "f64", value: "0x0.0000000000001p-1022" }, { type: "f64", value: "-infinity" }]],
-                         [{ type: "f64", value: "0x0.0000000000001p-1022" }, [{ type: "f64", value: "0x0.0000000000001p-1022" }, { type: "f64", value: "infinity" }]],
-                         [{ type: "f64", value: "-0x0.0000000000001p-1022" }, [{ type: "f64", value: "-0x0.0000000000001p-1022" }, { type: "f64", value: "-nan" }]],
-                         [{ type: "f64", value: "0x0.0000000000001p-1022" }, [{ type: "f64", value: "-0x0.0000000000001p-1022" }, { type: "f64", value: "nan" }]],
-                         [{ type: "f64", value: "-0x0.0000000000001p-1022" }, [{ type: "f64", value: "0x0.0000000000001p-1022" }, { type: "f64", value: "-nan" }]],
-                         [{ type: "f64", value: "0x0.0000000000001p-1022" }, [{ type: "f64", value: "0x0.0000000000001p-1022" }, { type: "f64", value: "nan" }]],
-                         [{ type: "f64", value: "-0x1p-1022" }, [{ type: "f64", value: "-0x1p-1022" }, { type: "f64", value: "-0x0p+0" }]],
-                         [{ type: "f64", value: "0x1p-1022" }, [{ type: "f64", value: "-0x1p-1022" }, { type: "f64", value: "0x0p+0" }]],
-                         [{ type: "f64", value: "-0x1p-1022" }, [{ type: "f64", value: "0x1p-1022" }, { type: "f64", value: "-0x0p+0" }]],
-                         [{ type: "f64", value: "0x1p-1022" }, [{ type: "f64", value: "0x1p-1022" }, { type: "f64", value: "0x0p+0" }]],
-                         [{ type: "f64", value: "-0x1p-1022" }, [{ type: "f64", value: "-0x1p-1022" }, { type: "f64", value: "-0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "0x1p-1022" }, [{ type: "f64", value: "-0x1p-1022" }, { type: "f64", value: "0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "-0x1p-1022" }, [{ type: "f64", value: "0x1p-1022" }, { type: "f64", value: "-0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "0x1p-1022" }, [{ type: "f64", value: "0x1p-1022" }, { type: "f64", value: "0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "-0x1p-1022" }, [{ type: "f64", value: "-0x1p-1022" }, { type: "f64", value: "-0x1p-1022" }]],
-                         [{ type: "f64", value: "0x1p-1022" }, [{ type: "f64", value: "-0x1p-1022" }, { type: "f64", value: "0x1p-1022" }]],
-                         [{ type: "f64", value: "-0x1p-1022" }, [{ type: "f64", value: "0x1p-1022" }, { type: "f64", value: "-0x1p-1022" }]],
-                         [{ type: "f64", value: "0x1p-1022" }, [{ type: "f64", value: "0x1p-1022" }, { type: "f64", value: "0x1p-1022" }]],
-                         [{ type: "f64", value: "-0x1p-1022" }, [{ type: "f64", value: "-0x1p-1022" }, { type: "f64", value: "-0x1p-1" }]],
-                         [{ type: "f64", value: "0x1p-1022" }, [{ type: "f64", value: "-0x1p-1022" }, { type: "f64", value: "0x1p-1" }]],
-                         [{ type: "f64", value: "-0x1p-1022" }, [{ type: "f64", value: "0x1p-1022" }, { type: "f64", value: "-0x1p-1" }]],
-                         [{ type: "f64", value: "0x1p-1022" }, [{ type: "f64", value: "0x1p-1022" }, { type: "f64", value: "0x1p-1" }]],
-                         [{ type: "f64", value: "-0x1p-1022" }, [{ type: "f64", value: "-0x1p-1022" }, { type: "f64", value: "-0x1p+0" }]],
-                         [{ type: "f64", value: "0x1p-1022" }, [{ type: "f64", value: "-0x1p-1022" }, { type: "f64", value: "0x1p+0" }]],
-                         [{ type: "f64", value: "-0x1p-1022" }, [{ type: "f64", value: "0x1p-1022" }, { type: "f64", value: "-0x1p+0" }]],
-                         [{ type: "f64", value: "0x1p-1022" }, [{ type: "f64", value: "0x1p-1022" }, { type: "f64", value: "0x1p+0" }]],
-                         [{ type: "f64", value: "-0x1p-1022" }, [{ type: "f64", value: "-0x1p-1022" }, { type: "f64", value: "-0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "0x1p-1022" }, [{ type: "f64", value: "-0x1p-1022" }, { type: "f64", value: "0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "-0x1p-1022" }, [{ type: "f64", value: "0x1p-1022" }, { type: "f64", value: "-0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "0x1p-1022" }, [{ type: "f64", value: "0x1p-1022" }, { type: "f64", value: "0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "-0x1p-1022" }, [{ type: "f64", value: "-0x1p-1022" }, { type: "f64", value: "-0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "0x1p-1022" }, [{ type: "f64", value: "-0x1p-1022" }, { type: "f64", value: "0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "-0x1p-1022" }, [{ type: "f64", value: "0x1p-1022" }, { type: "f64", value: "-0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "0x1p-1022" }, [{ type: "f64", value: "0x1p-1022" }, { type: "f64", value: "0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "-0x1p-1022" }, [{ type: "f64", value: "-0x1p-1022" }, { type: "f64", value: "-infinity" }]],
-                         [{ type: "f64", value: "0x1p-1022" }, [{ type: "f64", value: "-0x1p-1022" }, { type: "f64", value: "infinity" }]],
-                         [{ type: "f64", value: "-0x1p-1022" }, [{ type: "f64", value: "0x1p-1022" }, { type: "f64", value: "-infinity" }]],
-                         [{ type: "f64", value: "0x1p-1022" }, [{ type: "f64", value: "0x1p-1022" }, { type: "f64", value: "infinity" }]],
-                         [{ type: "f64", value: "-0x1p-1022" }, [{ type: "f64", value: "-0x1p-1022" }, { type: "f64", value: "-nan" }]],
-                         [{ type: "f64", value: "0x1p-1022" }, [{ type: "f64", value: "-0x1p-1022" }, { type: "f64", value: "nan" }]],
-                         [{ type: "f64", value: "-0x1p-1022" }, [{ type: "f64", value: "0x1p-1022" }, { type: "f64", value: "-nan" }]],
-                         [{ type: "f64", value: "0x1p-1022" }, [{ type: "f64", value: "0x1p-1022" }, { type: "f64", value: "nan" }]],
-                         [{ type: "f64", value: "-0x1p-1" }, [{ type: "f64", value: "-0x1p-1" }, { type: "f64", value: "-0x0p+0" }]],
-                         [{ type: "f64", value: "0x1p-1" }, [{ type: "f64", value: "-0x1p-1" }, { type: "f64", value: "0x0p+0" }]],
-                         [{ type: "f64", value: "-0x1p-1" }, [{ type: "f64", value: "0x1p-1" }, { type: "f64", value: "-0x0p+0" }]],
-                         [{ type: "f64", value: "0x1p-1" }, [{ type: "f64", value: "0x1p-1" }, { type: "f64", value: "0x0p+0" }]],
-                         [{ type: "f64", value: "-0x1p-1" }, [{ type: "f64", value: "-0x1p-1" }, { type: "f64", value: "-0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "0x1p-1" }, [{ type: "f64", value: "-0x1p-1" }, { type: "f64", value: "0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "-0x1p-1" }, [{ type: "f64", value: "0x1p-1" }, { type: "f64", value: "-0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "0x1p-1" }, [{ type: "f64", value: "0x1p-1" }, { type: "f64", value: "0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "-0x1p-1" }, [{ type: "f64", value: "-0x1p-1" }, { type: "f64", value: "-0x1p-1022" }]],
-                         [{ type: "f64", value: "0x1p-1" }, [{ type: "f64", value: "-0x1p-1" }, { type: "f64", value: "0x1p-1022" }]],
-                         [{ type: "f64", value: "-0x1p-1" }, [{ type: "f64", value: "0x1p-1" }, { type: "f64", value: "-0x1p-1022" }]],
-                         [{ type: "f64", value: "0x1p-1" }, [{ type: "f64", value: "0x1p-1" }, { type: "f64", value: "0x1p-1022" }]],
-                         [{ type: "f64", value: "-0x1p-1" }, [{ type: "f64", value: "-0x1p-1" }, { type: "f64", value: "-0x1p-1" }]],
-                         [{ type: "f64", value: "0x1p-1" }, [{ type: "f64", value: "-0x1p-1" }, { type: "f64", value: "0x1p-1" }]],
-                         [{ type: "f64", value: "-0x1p-1" }, [{ type: "f64", value: "0x1p-1" }, { type: "f64", value: "-0x1p-1" }]],
-                         [{ type: "f64", value: "0x1p-1" }, [{ type: "f64", value: "0x1p-1" }, { type: "f64", value: "0x1p-1" }]],
-                         [{ type: "f64", value: "-0x1p-1" }, [{ type: "f64", value: "-0x1p-1" }, { type: "f64", value: "-0x1p+0" }]],
-                         [{ type: "f64", value: "0x1p-1" }, [{ type: "f64", value: "-0x1p-1" }, { type: "f64", value: "0x1p+0" }]],
-                         [{ type: "f64", value: "-0x1p-1" }, [{ type: "f64", value: "0x1p-1" }, { type: "f64", value: "-0x1p+0" }]],
-                         [{ type: "f64", value: "0x1p-1" }, [{ type: "f64", value: "0x1p-1" }, { type: "f64", value: "0x1p+0" }]],
-                         [{ type: "f64", value: "-0x1p-1" }, [{ type: "f64", value: "-0x1p-1" }, { type: "f64", value: "-0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "0x1p-1" }, [{ type: "f64", value: "-0x1p-1" }, { type: "f64", value: "0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "-0x1p-1" }, [{ type: "f64", value: "0x1p-1" }, { type: "f64", value: "-0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "0x1p-1" }, [{ type: "f64", value: "0x1p-1" }, { type: "f64", value: "0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "-0x1p-1" }, [{ type: "f64", value: "-0x1p-1" }, { type: "f64", value: "-0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "0x1p-1" }, [{ type: "f64", value: "-0x1p-1" }, { type: "f64", value: "0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "-0x1p-1" }, [{ type: "f64", value: "0x1p-1" }, { type: "f64", value: "-0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "0x1p-1" }, [{ type: "f64", value: "0x1p-1" }, { type: "f64", value: "0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "-0x1p-1" }, [{ type: "f64", value: "-0x1p-1" }, { type: "f64", value: "-infinity" }]],
-                         [{ type: "f64", value: "0x1p-1" }, [{ type: "f64", value: "-0x1p-1" }, { type: "f64", value: "infinity" }]],
-                         [{ type: "f64", value: "-0x1p-1" }, [{ type: "f64", value: "0x1p-1" }, { type: "f64", value: "-infinity" }]],
-                         [{ type: "f64", value: "0x1p-1" }, [{ type: "f64", value: "0x1p-1" }, { type: "f64", value: "infinity" }]],
-                         [{ type: "f64", value: "-0x1p-1" }, [{ type: "f64", value: "-0x1p-1" }, { type: "f64", value: "-nan" }]],
-                         [{ type: "f64", value: "0x1p-1" }, [{ type: "f64", value: "-0x1p-1" }, { type: "f64", value: "nan" }]],
-                         [{ type: "f64", value: "-0x1p-1" }, [{ type: "f64", value: "0x1p-1" }, { type: "f64", value: "-nan" }]],
-                         [{ type: "f64", value: "0x1p-1" }, [{ type: "f64", value: "0x1p-1" }, { type: "f64", value: "nan" }]],
-                         [{ type: "f64", value: "-0x1p+0" }, [{ type: "f64", value: "-0x1p+0" }, { type: "f64", value: "-0x0p+0" }]],
-                         [{ type: "f64", value: "0x1p+0" }, [{ type: "f64", value: "-0x1p+0" }, { type: "f64", value: "0x0p+0" }]],
-                         [{ type: "f64", value: "-0x1p+0" }, [{ type: "f64", value: "0x1p+0" }, { type: "f64", value: "-0x0p+0" }]],
-                         [{ type: "f64", value: "0x1p+0" }, [{ type: "f64", value: "0x1p+0" }, { type: "f64", value: "0x0p+0" }]],
-                         [{ type: "f64", value: "-0x1p+0" }, [{ type: "f64", value: "-0x1p+0" }, { type: "f64", value: "-0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "0x1p+0" }, [{ type: "f64", value: "-0x1p+0" }, { type: "f64", value: "0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "-0x1p+0" }, [{ type: "f64", value: "0x1p+0" }, { type: "f64", value: "-0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "0x1p+0" }, [{ type: "f64", value: "0x1p+0" }, { type: "f64", value: "0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "-0x1p+0" }, [{ type: "f64", value: "-0x1p+0" }, { type: "f64", value: "-0x1p-1022" }]],
-                         [{ type: "f64", value: "0x1p+0" }, [{ type: "f64", value: "-0x1p+0" }, { type: "f64", value: "0x1p-1022" }]],
-                         [{ type: "f64", value: "-0x1p+0" }, [{ type: "f64", value: "0x1p+0" }, { type: "f64", value: "-0x1p-1022" }]],
-                         [{ type: "f64", value: "0x1p+0" }, [{ type: "f64", value: "0x1p+0" }, { type: "f64", value: "0x1p-1022" }]],
-                         [{ type: "f64", value: "-0x1p+0" }, [{ type: "f64", value: "-0x1p+0" }, { type: "f64", value: "-0x1p-1" }]],
-                         [{ type: "f64", value: "0x1p+0" }, [{ type: "f64", value: "-0x1p+0" }, { type: "f64", value: "0x1p-1" }]],
-                         [{ type: "f64", value: "-0x1p+0" }, [{ type: "f64", value: "0x1p+0" }, { type: "f64", value: "-0x1p-1" }]],
-                         [{ type: "f64", value: "0x1p+0" }, [{ type: "f64", value: "0x1p+0" }, { type: "f64", value: "0x1p-1" }]],
-                         [{ type: "f64", value: "-0x1p+0" }, [{ type: "f64", value: "-0x1p+0" }, { type: "f64", value: "-0x1p+0" }]],
-                         [{ type: "f64", value: "0x1p+0" }, [{ type: "f64", value: "-0x1p+0" }, { type: "f64", value: "0x1p+0" }]],
-                         [{ type: "f64", value: "-0x1p+0" }, [{ type: "f64", value: "0x1p+0" }, { type: "f64", value: "-0x1p+0" }]],
-                         [{ type: "f64", value: "0x1p+0" }, [{ type: "f64", value: "0x1p+0" }, { type: "f64", value: "0x1p+0" }]],
-                         [{ type: "f64", value: "-0x1p+0" }, [{ type: "f64", value: "-0x1p+0" }, { type: "f64", value: "-0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "0x1p+0" }, [{ type: "f64", value: "-0x1p+0" }, { type: "f64", value: "0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "-0x1p+0" }, [{ type: "f64", value: "0x1p+0" }, { type: "f64", value: "-0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "0x1p+0" }, [{ type: "f64", value: "0x1p+0" }, { type: "f64", value: "0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "-0x1p+0" }, [{ type: "f64", value: "-0x1p+0" }, { type: "f64", value: "-0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "0x1p+0" }, [{ type: "f64", value: "-0x1p+0" }, { type: "f64", value: "0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "-0x1p+0" }, [{ type: "f64", value: "0x1p+0" }, { type: "f64", value: "-0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "0x1p+0" }, [{ type: "f64", value: "0x1p+0" }, { type: "f64", value: "0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "-0x1p+0" }, [{ type: "f64", value: "-0x1p+0" }, { type: "f64", value: "-infinity" }]],
-                         [{ type: "f64", value: "0x1p+0" }, [{ type: "f64", value: "-0x1p+0" }, { type: "f64", value: "infinity" }]],
-                         [{ type: "f64", value: "-0x1p+0" }, [{ type: "f64", value: "0x1p+0" }, { type: "f64", value: "-infinity" }]],
-                         [{ type: "f64", value: "0x1p+0" }, [{ type: "f64", value: "0x1p+0" }, { type: "f64", value: "infinity" }]],
-                         [{ type: "f64", value: "-0x1p+0" }, [{ type: "f64", value: "-0x1p+0" }, { type: "f64", value: "-nan" }]],
-                         [{ type: "f64", value: "0x1p+0" }, [{ type: "f64", value: "-0x1p+0" }, { type: "f64", value: "nan" }]],
-                         [{ type: "f64", value: "-0x1p+0" }, [{ type: "f64", value: "0x1p+0" }, { type: "f64", value: "-nan" }]],
-                         [{ type: "f64", value: "0x1p+0" }, [{ type: "f64", value: "0x1p+0" }, { type: "f64", value: "nan" }]],
-                         [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, { type: "f64", value: "-0x0p+0" }]],
-                         [{ type: "f64", value: "0x1.921fb54442d18p+2" }, [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, { type: "f64", value: "0x0p+0" }]],
-                         [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, [{ type: "f64", value: "0x1.921fb54442d18p+2" }, { type: "f64", value: "-0x0p+0" }]],
-                         [{ type: "f64", value: "0x1.921fb54442d18p+2" }, [{ type: "f64", value: "0x1.921fb54442d18p+2" }, { type: "f64", value: "0x0p+0" }]],
-                         [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, { type: "f64", value: "-0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "0x1.921fb54442d18p+2" }, [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, { type: "f64", value: "0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, [{ type: "f64", value: "0x1.921fb54442d18p+2" }, { type: "f64", value: "-0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "0x1.921fb54442d18p+2" }, [{ type: "f64", value: "0x1.921fb54442d18p+2" }, { type: "f64", value: "0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, { type: "f64", value: "-0x1p-1022" }]],
-                         [{ type: "f64", value: "0x1.921fb54442d18p+2" }, [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, { type: "f64", value: "0x1p-1022" }]],
-                         [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, [{ type: "f64", value: "0x1.921fb54442d18p+2" }, { type: "f64", value: "-0x1p-1022" }]],
-                         [{ type: "f64", value: "0x1.921fb54442d18p+2" }, [{ type: "f64", value: "0x1.921fb54442d18p+2" }, { type: "f64", value: "0x1p-1022" }]],
-                         [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, { type: "f64", value: "-0x1p-1" }]],
-                         [{ type: "f64", value: "0x1.921fb54442d18p+2" }, [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, { type: "f64", value: "0x1p-1" }]],
-                         [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, [{ type: "f64", value: "0x1.921fb54442d18p+2" }, { type: "f64", value: "-0x1p-1" }]],
-                         [{ type: "f64", value: "0x1.921fb54442d18p+2" }, [{ type: "f64", value: "0x1.921fb54442d18p+2" }, { type: "f64", value: "0x1p-1" }]],
-                         [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, { type: "f64", value: "-0x1p+0" }]],
-                         [{ type: "f64", value: "0x1.921fb54442d18p+2" }, [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, { type: "f64", value: "0x1p+0" }]],
-                         [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, [{ type: "f64", value: "0x1.921fb54442d18p+2" }, { type: "f64", value: "-0x1p+0" }]],
-                         [{ type: "f64", value: "0x1.921fb54442d18p+2" }, [{ type: "f64", value: "0x1.921fb54442d18p+2" }, { type: "f64", value: "0x1p+0" }]],
-                         [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, { type: "f64", value: "-0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "0x1.921fb54442d18p+2" }, [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, { type: "f64", value: "0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, [{ type: "f64", value: "0x1.921fb54442d18p+2" }, { type: "f64", value: "-0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "0x1.921fb54442d18p+2" }, [{ type: "f64", value: "0x1.921fb54442d18p+2" }, { type: "f64", value: "0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, { type: "f64", value: "-0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "0x1.921fb54442d18p+2" }, [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, { type: "f64", value: "0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, [{ type: "f64", value: "0x1.921fb54442d18p+2" }, { type: "f64", value: "-0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "0x1.921fb54442d18p+2" }, [{ type: "f64", value: "0x1.921fb54442d18p+2" }, { type: "f64", value: "0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, { type: "f64", value: "-infinity" }]],
-                         [{ type: "f64", value: "0x1.921fb54442d18p+2" }, [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, { type: "f64", value: "infinity" }]],
-                         [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, [{ type: "f64", value: "0x1.921fb54442d18p+2" }, { type: "f64", value: "-infinity" }]],
-                         [{ type: "f64", value: "0x1.921fb54442d18p+2" }, [{ type: "f64", value: "0x1.921fb54442d18p+2" }, { type: "f64", value: "infinity" }]],
-                         [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, { type: "f64", value: "-nan" }]],
-                         [{ type: "f64", value: "0x1.921fb54442d18p+2" }, [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, { type: "f64", value: "nan" }]],
-                         [{ type: "f64", value: "-0x1.921fb54442d18p+2" }, [{ type: "f64", value: "0x1.921fb54442d18p+2" }, { type: "f64", value: "-nan" }]],
-                         [{ type: "f64", value: "0x1.921fb54442d18p+2" }, [{ type: "f64", value: "0x1.921fb54442d18p+2" }, { type: "f64", value: "nan" }]],
-                         [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, { type: "f64", value: "-0x0p+0" }]],
-                         [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, { type: "f64", value: "0x0p+0" }]],
-                         [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, { type: "f64", value: "-0x0p+0" }]],
-                         [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, { type: "f64", value: "0x0p+0" }]],
-                         [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, { type: "f64", value: "-0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, { type: "f64", value: "0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, { type: "f64", value: "-0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, { type: "f64", value: "0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, { type: "f64", value: "-0x1p-1022" }]],
-                         [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, { type: "f64", value: "0x1p-1022" }]],
-                         [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, { type: "f64", value: "-0x1p-1022" }]],
-                         [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, { type: "f64", value: "0x1p-1022" }]],
-                         [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, { type: "f64", value: "-0x1p-1" }]],
-                         [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, { type: "f64", value: "0x1p-1" }]],
-                         [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, { type: "f64", value: "-0x1p-1" }]],
-                         [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, { type: "f64", value: "0x1p-1" }]],
-                         [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, { type: "f64", value: "-0x1p+0" }]],
-                         [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, { type: "f64", value: "0x1p+0" }]],
-                         [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, { type: "f64", value: "-0x1p+0" }]],
-                         [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, { type: "f64", value: "0x1p+0" }]],
-                         [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, { type: "f64", value: "-0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, { type: "f64", value: "0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, { type: "f64", value: "-0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, { type: "f64", value: "0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, { type: "f64", value: "-0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, { type: "f64", value: "0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, { type: "f64", value: "-0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, { type: "f64", value: "0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, { type: "f64", value: "-infinity" }]],
-                         [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, { type: "f64", value: "infinity" }]],
-                         [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, { type: "f64", value: "-infinity" }]],
-                         [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, { type: "f64", value: "infinity" }]],
-                         [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, { type: "f64", value: "-nan" }]],
-                         [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, { type: "f64", value: "nan" }]],
-                         [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, { type: "f64", value: "-nan" }]],
-                         [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, { type: "f64", value: "nan" }]],
-                         [{ type: "f64", value: "-infinity" }, [{ type: "f64", value: "-infinity" }, { type: "f64", value: "-0x0p+0" }]],
-                         [{ type: "f64", value: "infinity" }, [{ type: "f64", value: "-infinity" }, { type: "f64", value: "0x0p+0" }]],
-                         [{ type: "f64", value: "-infinity" }, [{ type: "f64", value: "infinity" }, { type: "f64", value: "-0x0p+0" }]],
-                         [{ type: "f64", value: "infinity" }, [{ type: "f64", value: "infinity" }, { type: "f64", value: "0x0p+0" }]],
-                         [{ type: "f64", value: "-infinity" }, [{ type: "f64", value: "-infinity" }, { type: "f64", value: "-0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "infinity" }, [{ type: "f64", value: "-infinity" }, { type: "f64", value: "0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "-infinity" }, [{ type: "f64", value: "infinity" }, { type: "f64", value: "-0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "infinity" }, [{ type: "f64", value: "infinity" }, { type: "f64", value: "0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "-infinity" }, [{ type: "f64", value: "-infinity" }, { type: "f64", value: "-0x1p-1022" }]],
-                         [{ type: "f64", value: "infinity" }, [{ type: "f64", value: "-infinity" }, { type: "f64", value: "0x1p-1022" }]],
-                         [{ type: "f64", value: "-infinity" }, [{ type: "f64", value: "infinity" }, { type: "f64", value: "-0x1p-1022" }]],
-                         [{ type: "f64", value: "infinity" }, [{ type: "f64", value: "infinity" }, { type: "f64", value: "0x1p-1022" }]],
-                         [{ type: "f64", value: "-infinity" }, [{ type: "f64", value: "-infinity" }, { type: "f64", value: "-0x1p-1" }]],
-                         [{ type: "f64", value: "infinity" }, [{ type: "f64", value: "-infinity" }, { type: "f64", value: "0x1p-1" }]],
-                         [{ type: "f64", value: "-infinity" }, [{ type: "f64", value: "infinity" }, { type: "f64", value: "-0x1p-1" }]],
-                         [{ type: "f64", value: "infinity" }, [{ type: "f64", value: "infinity" }, { type: "f64", value: "0x1p-1" }]],
-                         [{ type: "f64", value: "-infinity" }, [{ type: "f64", value: "-infinity" }, { type: "f64", value: "-0x1p+0" }]],
-                         [{ type: "f64", value: "infinity" }, [{ type: "f64", value: "-infinity" }, { type: "f64", value: "0x1p+0" }]],
-                         [{ type: "f64", value: "-infinity" }, [{ type: "f64", value: "infinity" }, { type: "f64", value: "-0x1p+0" }]],
-                         [{ type: "f64", value: "infinity" }, [{ type: "f64", value: "infinity" }, { type: "f64", value: "0x1p+0" }]],
-                         [{ type: "f64", value: "-infinity" }, [{ type: "f64", value: "-infinity" }, { type: "f64", value: "-0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "infinity" }, [{ type: "f64", value: "-infinity" }, { type: "f64", value: "0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "-infinity" }, [{ type: "f64", value: "infinity" }, { type: "f64", value: "-0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "infinity" }, [{ type: "f64", value: "infinity" }, { type: "f64", value: "0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "-infinity" }, [{ type: "f64", value: "-infinity" }, { type: "f64", value: "-0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "infinity" }, [{ type: "f64", value: "-infinity" }, { type: "f64", value: "0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "-infinity" }, [{ type: "f64", value: "infinity" }, { type: "f64", value: "-0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "infinity" }, [{ type: "f64", value: "infinity" }, { type: "f64", value: "0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "-infinity" }, [{ type: "f64", value: "-infinity" }, { type: "f64", value: "-infinity" }]],
-                         [{ type: "f64", value: "infinity" }, [{ type: "f64", value: "-infinity" }, { type: "f64", value: "infinity" }]],
-                         [{ type: "f64", value: "-infinity" }, [{ type: "f64", value: "infinity" }, { type: "f64", value: "-infinity" }]],
-                         [{ type: "f64", value: "infinity" }, [{ type: "f64", value: "infinity" }, { type: "f64", value: "infinity" }]],
-                         [{ type: "f64", value: "-infinity" }, [{ type: "f64", value: "-infinity" }, { type: "f64", value: "-nan" }]],
-                         [{ type: "f64", value: "infinity" }, [{ type: "f64", value: "-infinity" }, { type: "f64", value: "nan" }]],
-                         [{ type: "f64", value: "-infinity" }, [{ type: "f64", value: "infinity" }, { type: "f64", value: "-nan" }]],
-                         [{ type: "f64", value: "infinity" }, [{ type: "f64", value: "infinity" }, { type: "f64", value: "nan" }]],
-                         [{ type: "f64", value: "-nan" }, [{ type: "f64", value: "-nan" }, { type: "f64", value: "-0x0p+0" }]],
-                         [{ type: "f64", value: "nan" }, [{ type: "f64", value: "-nan" }, { type: "f64", value: "0x0p+0" }]],
-                         [{ type: "f64", value: "-nan" }, [{ type: "f64", value: "nan" }, { type: "f64", value: "-0x0p+0" }]],
-                         [{ type: "f64", value: "nan" }, [{ type: "f64", value: "nan" }, { type: "f64", value: "0x0p+0" }]],
-                         [{ type: "f64", value: "-nan" }, [{ type: "f64", value: "-nan" }, { type: "f64", value: "-0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "nan" }, [{ type: "f64", value: "-nan" }, { type: "f64", value: "0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "-nan" }, [{ type: "f64", value: "nan" }, { type: "f64", value: "-0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "nan" }, [{ type: "f64", value: "nan" }, { type: "f64", value: "0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "-nan" }, [{ type: "f64", value: "-nan" }, { type: "f64", value: "-0x1p-1022" }]],
-                         [{ type: "f64", value: "nan" }, [{ type: "f64", value: "-nan" }, { type: "f64", value: "0x1p-1022" }]],
-                         [{ type: "f64", value: "-nan" }, [{ type: "f64", value: "nan" }, { type: "f64", value: "-0x1p-1022" }]],
-                         [{ type: "f64", value: "nan" }, [{ type: "f64", value: "nan" }, { type: "f64", value: "0x1p-1022" }]],
-                         [{ type: "f64", value: "-nan" }, [{ type: "f64", value: "-nan" }, { type: "f64", value: "-0x1p-1" }]],
-                         [{ type: "f64", value: "nan" }, [{ type: "f64", value: "-nan" }, { type: "f64", value: "0x1p-1" }]],
-                         [{ type: "f64", value: "-nan" }, [{ type: "f64", value: "nan" }, { type: "f64", value: "-0x1p-1" }]],
-                         [{ type: "f64", value: "nan" }, [{ type: "f64", value: "nan" }, { type: "f64", value: "0x1p-1" }]],
-                         [{ type: "f64", value: "-nan" }, [{ type: "f64", value: "-nan" }, { type: "f64", value: "-0x1p+0" }]],
-                         [{ type: "f64", value: "nan" }, [{ type: "f64", value: "-nan" }, { type: "f64", value: "0x1p+0" }]],
-                         [{ type: "f64", value: "-nan" }, [{ type: "f64", value: "nan" }, { type: "f64", value: "-0x1p+0" }]],
-                         [{ type: "f64", value: "nan" }, [{ type: "f64", value: "nan" }, { type: "f64", value: "0x1p+0" }]],
-                         [{ type: "f64", value: "-nan" }, [{ type: "f64", value: "-nan" }, { type: "f64", value: "-0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "nan" }, [{ type: "f64", value: "-nan" }, { type: "f64", value: "0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "-nan" }, [{ type: "f64", value: "nan" }, { type: "f64", value: "-0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "nan" }, [{ type: "f64", value: "nan" }, { type: "f64", value: "0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "-nan" }, [{ type: "f64", value: "-nan" }, { type: "f64", value: "-0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "nan" }, [{ type: "f64", value: "-nan" }, { type: "f64", value: "0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "-nan" }, [{ type: "f64", value: "nan" }, { type: "f64", value: "-0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "nan" }, [{ type: "f64", value: "nan" }, { type: "f64", value: "0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "-nan" }, [{ type: "f64", value: "-nan" }, { type: "f64", value: "-infinity" }]],
-                         [{ type: "f64", value: "nan" }, [{ type: "f64", value: "-nan" }, { type: "f64", value: "infinity" }]],
-                         [{ type: "f64", value: "-nan" }, [{ type: "f64", value: "nan" }, { type: "f64", value: "-infinity" }]],
-                         [{ type: "f64", value: "nan" }, [{ type: "f64", value: "nan" }, { type: "f64", value: "infinity" }]],
-                         [{ type: "f64", value: "-nan" }, [{ type: "f64", value: "-nan" }, { type: "f64", value: "-nan" }]],
-                         [{ type: "f64", value: "nan" }, [{ type: "f64", value: "-nan" }, { type: "f64", value: "nan" }]],
-                         [{ type: "f64", value: "-nan" }, [{ type: "f64", value: "nan" }, { type: "f64", value: "-nan" }]],
-                         [{ type: "f64", value: "nan" }, [{ type: "f64", value: "nan" }, { type: "f64", value: "nan" }]],
-                        ],
-                       );
diff --git a/JSTests/wasm/function-tests/ctz.js b/JSTests/wasm/function-tests/ctz.js
deleted file mode 100644 (file)
index 496b340..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-import Builder from '../Builder.js'
-
-const b = new Builder();
-b.Type().End()
-    .Function().End()
-    .Code()
-    .Function({ params: ["i32"], ret: "i32" }, [])
-    .GetLocal(0)
-    .I32Ctz()
-    .End()
-
-    .Function({ params: ["i64"], ret: "i64" }, [])
-    .GetLocal(0)
-    .I64Ctz()
-    .End()
-
-const bin = b.WebAssembly()
-bin.trim();
-testWasmModuleFunctions(bin.get(), 2,
-                        [[{type: "i32", value: "0" }, [{ type: "i32", value: "-1" }]],
-                         [{type: "i32", value: "32" }, [{ type: "i32", value: "0" }]],
-                         [{type: "i32", value: "15" }, [{ type: "i32", value: "0x00008000" }]],
-                         [{type: "i32", value: "16" }, [{ type: "i32", value: "0x00010000" }]],
-                         [{type: "i32", value: "31" }, [{ type: "i32", value: "0x80000000" }]],
-                         [{type: "i32", value: "0" }, [{ type: "i32", value: "0x7fffffff" }]],
-                        ],
-
-                        [[{type: "i64", value: "0" }, [{ type: "i64", value: "-1" }]],
-                         [{type: "i64", value: "64" }, [{ type: "i64", value: "0" }]],
-                         [{type: "i64", value: "15" }, [{ type: "i64", value: "0x00008000" }]],
-                         [{type: "i64", value: "16" }, [{ type: "i64", value: "0x00010000" }]],
-                         [{type: "i64", value: "63" }, [{ type: "i64", value: "0x8000000000000000" }]],
-                         [{type: "i64", value: "0" }, [{ type: "i64", value: "0x7fffffffffffffff" }]],
-                         ]
-                       );
diff --git a/JSTests/wasm/function-tests/drop.js b/JSTests/wasm/function-tests/drop.js
deleted file mode 100644 (file)
index 298ef2d..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-import Builder from '../Builder.js'
-
-const b = new Builder();
-b.Type().End()
-    .Function().End()
-    .Code()
-
-    // This function adds one to the argument.
-    .Function({ params: ["i32"], ret: "i32" }, [])
-    .GetLocal(0)
-    .I32Const(1)
-    .TeeLocal(0)
-    .GetLocal(0)
-    .Drop()
-    .I32Add()
-    .End()
-
-    // This is the id function.
-    .Function({ params: ["i32"], ret: "i32" }, [])
-    .GetLocal(0)
-    .I32Const(1)
-    .Drop()
-    .End()
-
-const bin = b.WebAssembly()
-bin.trim();
-testWasmModuleFunctions(bin.get(), 2,
-                        [[{ type: "i32", value: 1 }, [{ type: "i32", value: 0 }]],
-                         [{ type: "i32", value: 2 }, [{ type: "i32", value: 1 }]],
-                         [{ type: "i32", value: 101 }, [{ type: "i32", value: 100 }]],
-                         [{ type: "i32", value: -99 }, [{ type: "i32", value: -100 }]],
-                        ],
-
-                        [[{ type: "i32", value: 0 }, [{ type: "i32", value: 0 }]],
-                         [{ type: "i32", value: 1 }, [{ type: "i32", value: 1 }]],
-                         [{ type: "i32", value: 100 }, [{ type: "i32", value: 100 }]],
-                         [{ type: "i32", value: -100 }, [{ type: "i32", value: -100 }]],
-                        ],
-                       );
diff --git a/JSTests/wasm/function-tests/dumb-eq-if-then-else.js b/JSTests/wasm/function-tests/dumb-eq-if-then-else.js
deleted file mode 100644 (file)
index aaa44f2..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-import Builder from '../Builder.js'
-
-const b = new Builder();
-b.Type().End()
-    .Function().End()
-    .Code()
-    .Function({ params: ["i32", "i32"], ret: "i32" }, [])
-    .GetLocal(0)
-    .GetLocal(1)
-    .I32Eq()
-    .If("void", b =>
-        b.Br(0)
-        .Else()
-            .I32Const(1)
-        .Return()
-       )
-        .I32Const(0)
-    .Return()
-    .End()
-
-const bin = b.WebAssembly()
-bin.trim();
-testWasmModuleFunctions(bin.get(), 1, [[{type: "i32", value: 1 }, [{ type: "i32", value: 0 }, { type: "i32", value: 1 }]],
-                                       [{type: "i32", value: 1 }, [{ type: "i32", value: 1 }, { type: "i32", value: 0 }]],
-                                       [{type: "i32", value: 1 }, [{ type: "i32", value: 2 }, { type: "i32", value: 1 }]],
-                                       [{type: "i32", value: 1 }, [{ type: "i32", value: 1 }, { type: "i32", value: 2 }]],
-                                       [{type: "i32", value: 0 }, [{ type: "i32", value: 2 }, { type: "i32", value: 2 }]],
-                                       [{type: "i32", value: 0 }, [{ type: "i32", value: 1 }, { type: "i32", value: 1 }]],
-                                       [{type: "i32", value: 0 }, [{ type: "i32", value: 0 }, { type: "i32", value: 0 }]],
-                                       [{type: "i32", value: 1 }, [{ type: "i32", value: 2 }, { type: "i32", value: 6 }]],
-                                       [{type: "i32", value: 1 }, [{ type: "i32", value: 100 }, { type: "i32", value: 6 }]]
-                                      ]);
diff --git a/JSTests/wasm/function-tests/dumb-less-than-fallthrough.js b/JSTests/wasm/function-tests/dumb-less-than-fallthrough.js
deleted file mode 100644 (file)
index 1f7b771..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-import Builder from '../Builder.js'
-
-const b = new Builder();
-b.Type().End()
-    .Function().End()
-    .Code()
-    .Function({ params: ["i32", "i32"], ret: "i32" }, [])
-    .Loop("i32", b =>
-          b.GetLocal(0)
-          .GetLocal(1)
-          .I32Eq()
-          .If("i32", b =>
-              b.I32Const(0)
-              .Return()
-              .Else()
-                  .GetLocal(0)
-              .GetLocal(0)
-              .I32Const(1)
-              .I32Sub()
-              .SetLocal(0)
-              .I32Const(0)
-              .I32Ne()
-              .BrIf(1)
-              .I32Const(1)
-          )
-    ).End()
-
-const bin = b.WebAssembly()
-bin.trim();
-testWasmModuleFunctions(bin.get(), 1, [[{type: "i32", value: 1 }, [{ type: "i32", value: 0 }, { type: "i32", value: 1 }]],
-                                       [{type: "i32", value: 0 }, [{ type: "i32", value: 1 }, { type: "i32", value: 0 }]],
-                                       [{type: "i32", value: 0 }, [{ type: "i32", value: 2 }, { type: "i32", value: 1 }]],
-                                       [{type: "i32", value: 1 }, [{ type: "i32", value: 1 }, { type: "i32", value: 2 }]],
-                                       [{type: "i32", value: 0 }, [{ type: "i32", value: 2 }, { type: "i32", value: 2 }]],
-                                       [{type: "i32", value: 0 }, [{ type: "i32", value: 1 }, { type: "i32", value: 1 }]],
-                                       [{type: "i32", value: 1 }, [{ type: "i32", value: 2 }, { type: "i32", value: 6 }]],
-                                       [{type: "i32", value: 0 }, [{ type: "i32", value: 100 }, { type: "i32", value: 6 }]]
-                                      ]);
diff --git a/JSTests/wasm/function-tests/dumb-less-than-ite.js b/JSTests/wasm/function-tests/dumb-less-than-ite.js
deleted file mode 100644 (file)
index 90d306a..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-import Builder from '../Builder.js'
-
-const b = new Builder();
-b.Type().End()
-    .Function().End()
-    .Code()
-    .Function({ params: ["i32", "i32"], ret: "i32" }, [])
-    .Loop("void")
-    .GetLocal(0)
-    .GetLocal(1)
-    .I32Eq()
-    .If("void", b =>
-        b.I32Const(0)
-        .Return()
-        .Else()
-            .GetLocal(0)
-        .I32Const(0)
-        .I32Eq()
-        .If("void", b =>
-            b.I32Const(1)
-            .Return()
-           )
-            )
-        .GetLocal(0)
-    .I32Const(1)
-    .I32Sub()
-    .SetLocal(0)
-    .Br(0)
-    .End()
-    .Unreachable()
-    .End()
-
-const bin = b.WebAssembly()
-bin.trim();
-testWasmModuleFunctions(bin.get(), 1, [[{type: "i32", value: 1 }, [{ type: "i32", value: 0 }, { type: "i32", value: 1 }]],
-                                       [{type: "i32", value: 0 }, [{ type: "i32", value: 1 }, { type: "i32", value: 0 }]],
-                                       [{type: "i32", value: 0 }, [{ type: "i32", value: 2 }, { type: "i32", value: 1 }]],
-                                       [{type: "i32", value: 1 }, [{ type: "i32", value: 1 }, { type: "i32", value: 2 }]],
-                                       [{type: "i32", value: 0 }, [{ type: "i32", value: 2 }, { type: "i32", value: 2 }]],
-                                       [{type: "i32", value: 0 }, [{ type: "i32", value: 1 }, { type: "i32", value: 1 }]],
-                                       [{type: "i32", value: 0 }, [{ type: "i32", value: 0 }, { type: "i32", value: 0 }]],
-                                       [{type: "i32", value: 1 }, [{ type: "i32", value: 2 }, { type: "i32", value: 6 }]],
-                                       [{type: "i32", value: 0 }, [{ type: "i32", value: 100 }, { type: "i32", value: 6 }]]
-                                      ]);
diff --git a/JSTests/wasm/function-tests/eqz.js b/JSTests/wasm/function-tests/eqz.js
deleted file mode 100644 (file)
index 377fb8c..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-import Builder from '../Builder.js'
-
-const b = new Builder();
-b.Type().End()
-    .Function().End()
-    .Code()
-    .Function({ params: ["i32"], ret: "i32" }, [])
-    .GetLocal(0)
-    .I32Eqz()
-    .End()
-
-
-const bin = b.WebAssembly()
-bin.trim();
-testWasmModuleFunctions(bin.get(), 1,
-                        [[{type: "i32", value: 0 }, [{ type: "i32", value: 1 }]],
-                         [{type: "i32", value: 1 }, [{ type: "i32", value: 0 }]]
-                        ]
-                       );
diff --git a/JSTests/wasm/function-tests/i32-trunc-s-f32.js b/JSTests/wasm/function-tests/i32-trunc-s-f32.js
deleted file mode 100644 (file)
index 85e8c51..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-import Builder from '../Builder.js'
-
-const b = new Builder();
-b.Type().End()
-    .Function().End()
-    .Code()
-    .Function({ params: ["f32"], ret: "i32" }, [])
-    .GetLocal(0)
-    .I32TruncSF32()
-    .End()
-
-const bin = b.WebAssembly()
-bin.trim();
-testWasmModuleFunctions(bin.get(), 1,
-                        [[{ type: "i32", value: "0" }, [{ type: "f32", value: "0.0" }]],
-                         [{ type: "i32", value: "0" }, [{ type: "f32", value: "-0.0" }]],
-                         [{ type: "i32", value: "0" }, [{ type: "f32", value: "0x1p-149" }]],
-                         [{ type: "i32", value: "0" }, [{ type: "f32", value: "-0x1p-149" }]],
-                         [{ type: "i32", value: "1" }, [{ type: "f32", value: "1.0" }]],
-                         [{ type: "i32", value: "1" }, [{ type: "f32", value: "0x1.19999ap+0" }]],
-                         [{ type: "i32", value: "1" }, [{ type: "f32", value: "1.5" }]],
-                         [{ type: "i32", value: "-1" }, [{ type: "f32", value: "-1.0" }]],
-                         [{ type: "i32", value: "-1" }, [{ type: "f32", value: "-0x1.19999ap+0" }]],
-                         [{ type: "i32", value: "-1" }, [{ type: "f32", value: "-1.5" }]],
-                         [{ type: "i32", value: "-1" }, [{ type: "f32", value: "-1.9" }]],
-                         [{ type: "i32", value: "-2" }, [{ type: "f32", value: "-2.0" }]],
-                         [{ type: "i32", value: "2147483520" }, [{ type: "f32", value: "2147483520.0" }]],
-                         [{ type: "i32", value: "-2147483648" }, [{ type: "f32", value: "-2147483648.0" }]],
-                        ],
-
-                       );
diff --git a/JSTests/wasm/function-tests/i32-trunc-s-f64.js b/JSTests/wasm/function-tests/i32-trunc-s-f64.js
deleted file mode 100644 (file)
index 1bb1dd6..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-import Builder from '../Builder.js'
-
-const b = new Builder();
-b.Type().End()
-    .Function().End()
-    .Code()
-    .Function({ params: ["f64"], ret: "i32" }, [])
-    .GetLocal(0)
-    .I32TruncSF64()
-    .End()
-
-const bin = b.WebAssembly()
-bin.trim();
-testWasmModuleFunctions(bin.get(), 1,
-                        [[{ type: "i32", value: "0" }, [{ type: "f64", value: "0.0" }]],
-                         [{ type: "i32", value: "0" }, [{ type: "f64", value: "-0.0" }]],
-                         [{ type: "i32", value: "0" }, [{ type: "f64", value: "0x0.0000000000001p-1022" }]],
-                         [{ type: "i32", value: "0" }, [{ type: "f64", value: "-0x0.0000000000001p-1022" }]],
-                         [{ type: "i32", value: "1" }, [{ type: "f64", value: "1.0" }]],
-                         [{ type: "i32", value: "1" }, [{ type: "f64", value: "0x1.199999999999ap+0" }]],
-                         [{ type: "i32", value: "1" }, [{ type: "f64", value: "1.5" }]],
-                         [{ type: "i32", value: "-1" }, [{ type: "f64", value: "-1.0" }]],
-                         [{ type: "i32", value: "-1" }, [{ type: "f64", value: "-0x1.199999999999ap+0" }]],
-                         [{ type: "i32", value: "-1" }, [{ type: "f64", value: "-1.5" }]],
-                         [{ type: "i32", value: "-1" }, [{ type: "f64", value: "-1.9" }]],
-                         [{ type: "i32", value: "-2" }, [{ type: "f64", value: "-2.0" }]],
-                         [{ type: "i32", value: "2147483647" }, [{ type: "f64", value: "2147483647.0" }]],
-                         [{ type: "i32", value: "-2147483648" }, [{ type: "f64", value: "-2147483648.0" }]],
-                        ],
-
-                       );
diff --git a/JSTests/wasm/function-tests/i32-trunc-u-f32.js b/JSTests/wasm/function-tests/i32-trunc-u-f32.js
deleted file mode 100644 (file)
index 1dbbed6..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-import Builder from '../Builder.js'
-
-const b = new Builder();
-b.Type().End()
-    .Function().End()
-    .Code()
-    .Function({ params: ["f32"], ret: "i32" }, [])
-    .GetLocal(0)
-    .I32TruncUF32()
-    .End()
-
-const bin = b.WebAssembly()
-bin.trim();
-testWasmModuleFunctions(bin.get(), 1,
-                        [[{ type: "i32", value: "0" }, [{ type: "f32", value: "0.0" }]],
-                         [{ type: "i32", value: "0" }, [{ type: "f32", value: "-0.0" }]],
-                         [{ type: "i32", value: "0" }, [{ type: "f32", value: "0x1p-149" }]],
-                         [{ type: "i32", value: "0" }, [{ type: "f32", value: "-0x1p-149" }]],
-                         [{ type: "i32", value: "1" }, [{ type: "f32", value: "1.0" }]],
-                         [{ type: "i32", value: "1" }, [{ type: "f32", value: "0x1.19999ap+0" }]],
-                         [{ type: "i32", value: "1" }, [{ type: "f32", value: "1.5" }]],
-                         [{ type: "i32", value: "1" }, [{ type: "f32", value: "1.9" }]],
-                         [{ type: "i32", value: "2" }, [{ type: "f32", value: "2.0" }]],
-                         [{ type: "i32", value: "-2147483648" }, [{ type: "f32", value: "2147483648" }]],
-                         [{ type: "i32", value: "-256" }, [{ type: "f32", value: "4294967040.0" }]],
-                         [{ type: "i32", value: "0" }, [{ type: "f32", value: "-0x1.ccccccp-1" }]],
-                         [{ type: "i32", value: "0" }, [{ type: "f32", value: "-0x1.fffffep-1" }]],
-                        ],
-                       );
diff --git a/JSTests/wasm/function-tests/i32-trunc-u-f64.js b/JSTests/wasm/function-tests/i32-trunc-u-f64.js
deleted file mode 100644 (file)
index f494918..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-import Builder from '../Builder.js'
-
-const b = new Builder();
-b.Type().End()
-    .Function().End()
-    .Code()
-    .Function({ params: ["f64"], ret: "i32" }, [])
-    .GetLocal(0)
-    .I32TruncUF64()
-    .End()
-
-const bin = b.WebAssembly()
-bin.trim();
-testWasmModuleFunctions(bin.get(), 1,
-                        [[{ type: "i32", value: "0" }, [{ type: "f64", value: "0.0" }]],
-                         [{ type: "i32", value: "0" }, [{ type: "f64", value: "-0.0" }]],
-                         [{ type: "i32", value: "0" }, [{ type: "f64", value: "0x0.0000000000001p-1022" }]],
-                         [{ type: "i32", value: "0" }, [{ type: "f64", value: "-0x0.0000000000001p-1022" }]],
-                         [{ type: "i32", value: "1" }, [{ type: "f64", value: "1.0" }]],
-                         [{ type: "i32", value: "1" }, [{ type: "f64", value: "0x1.199999999999ap+0" }]],
-                         [{ type: "i32", value: "1" }, [{ type: "f64", value: "1.5" }]],
-                         [{ type: "i32", value: "1" }, [{ type: "f64", value: "1.9" }]],
-                         [{ type: "i32", value: "2" }, [{ type: "f64", value: "2.0" }]],
-                         [{ type: "i32", value: "-2147483648" }, [{ type: "f64", value: "2147483648" }]],
-                         [{ type: "i32", value: "-1" }, [{ type: "f64", value: "4294967295.0" }]],
-                         [{ type: "i32", value: "0" }, [{ type: "f64", value: "-0x1.ccccccccccccdp-1" }]],
-                         [{ type: "i32", value: "0" }, [{ type: "f64", value: "-0x1.fffffffffffffp-1" }]],
-                         [{ type: "i32", value: "100000000" }, [{ type: "f64", value: "1e8" }]],
-                        ],
-                       );
diff --git a/JSTests/wasm/function-tests/i64-trunc-s-f32.js b/JSTests/wasm/function-tests/i64-trunc-s-f32.js
deleted file mode 100644 (file)
index feedc48..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-import Builder from '../Builder.js'
-
-const b = new Builder();
-b.Type().End()
-    .Function().End()
-    .Code()
-    .Function({ params: ["f32"], ret: "i64" }, [])
-    .GetLocal(0)
-    .I64TruncSF32()
-    .End()
-
-const bin = b.WebAssembly()
-bin.trim();
-testWasmModuleFunctions(bin.get(), 1,
-                        [[{ type: "i64", value: "0" }, [{ type: "f32", value: "0.0" }]],
-                         [{ type: "i64", value: "0" }, [{ type: "f32", value: "-0.0" }]],
-                         [{ type: "i64", value: "0" }, [{ type: "f32", value: "0x1p-149" }]],
-                         [{ type: "i64", value: "0" }, [{ type: "f32", value: "-0x1p-149" }]],
-                         [{ type: "i64", value: "1" }, [{ type: "f32", value: "1.0" }]],
-                         [{ type: "i64", value: "1" }, [{ type: "f32", value: "0x1.19999ap+0" }]],
-                         [{ type: "i64", value: "1" }, [{ type: "f32", value: "1.5" }]],
-                         [{ type: "i64", value: "-1" }, [{ type: "f32", value: "-1.0" }]],
-                         [{ type: "i64", value: "-1" }, [{ type: "f32", value: "-0x1.19999ap+0" }]],
-                         [{ type: "i64", value: "-1" }, [{ type: "f32", value: "-1.5" }]],
-                         [{ type: "i64", value: "-1" }, [{ type: "f32", value: "-1.9" }]],
-                         [{ type: "i64", value: "-2" }, [{ type: "f32", value: "-2.0" }]],
-                         [{ type: "i64", value: "4294967296" }, [{ type: "f32", value: "4294967296" }]],
-                         [{ type: "i64", value: "-4294967296" }, [{ type: "f32", value: "-4294967296" }]],
-                         [{ type: "i64", value: "9223371487098961920" }, [{ type: "f32", value: "9223371487098961920.0" }]],
-                         [{ type: "i64", value: "-9223372036854775808" }, [{ type: "f32", value: "-9223372036854775808.0" }]],
-                        ],
-
-                       );
diff --git a/JSTests/wasm/function-tests/i64-trunc-s-f64.js b/JSTests/wasm/function-tests/i64-trunc-s-f64.js
deleted file mode 100644 (file)
index cf8a88c..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-import Builder from '../Builder.js'
-
-const b = new Builder();
-b.Type().End()
-    .Function().End()
-    .Code()
-    .Function({ params: ["f64"], ret: "i64" }, [])
-    .GetLocal(0)
-    .I64TruncSF64()
-    .End()
-
-const bin = b.WebAssembly()
-bin.trim();
-testWasmModuleFunctions(bin.get(), 1,
-                        [[{ type: "i64", value: "0" }, [{ type: "f64", value: "0.0" }]],
-                         [{ type: "i64", value: "0" }, [{ type: "f64", value: "-0.0" }]],
-                         [{ type: "i64", value: "0" }, [{ type: "f64", value: "0x0.0000000000001p-1022" }]],
-                         [{ type: "i64", value: "0" }, [{ type: "f64", value: "-0x0.0000000000001p-1022" }]],
-                         [{ type: "i64", value: "1" }, [{ type: "f64", value: "1.0" }]],
-                         [{ type: "i64", value: "1" }, [{ type: "f64", value: "0x1.199999999999ap+0" }]],
-                         [{ type: "i64", value: "1" }, [{ type: "f64", value: "1.5" }]],
-                         [{ type: "i64", value: "-1" }, [{ type: "f64", value: "-1.0" }]],
-                         [{ type: "i64", value: "-1" }, [{ type: "f64", value: "-0x1.199999999999ap+0" }]],
-                         [{ type: "i64", value: "-1" }, [{ type: "f64", value: "-1.5" }]],
-                         [{ type: "i64", value: "-1" }, [{ type: "f64", value: "-1.9" }]],
-                         [{ type: "i64", value: "-2" }, [{ type: "f64", value: "-2.0" }]],
-                         [{ type: "i64", value: "4294967296" }, [{ type: "f64", value: "4294967296" }]],
-                         [{ type: "i64", value: "-4294967296" }, [{ type: "f64", value: "-4294967296" }]],
-                         [{ type: "i64", value: "9223372036854774784" }, [{ type: "f64", value: "9223372036854774784.0" }]],
-                         [{ type: "i64", value: "-9223372036854775808" }, [{ type: "f64", value: "-9223372036854775808.0" }]],
-                        ],
-
-                       );
diff --git a/JSTests/wasm/function-tests/i64-trunc-u-f32.js b/JSTests/wasm/function-tests/i64-trunc-u-f32.js
deleted file mode 100644 (file)
index 6cd9e24..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-import Builder from '../Builder.js'
-
-const b = new Builder();
-b.Type().End()
-    .Function().End()
-    .Code()
-    .Function({ params: ["f32"], ret: "i64" }, [])
-    .GetLocal(0)
-    .I64TruncUF32()
-    .End()
-
-const bin = b.WebAssembly()
-bin.trim();
-testWasmModuleFunctions(bin.get(), 1,
-                        [[{ type: "i64", value: "0" }, [{ type: "f32", value: "0.0" }]],
-                         [{ type: "i64", value: "0" }, [{ type: "f32", value: "-0.0" }]],
-                         [{ type: "i64", value: "0" }, [{ type: "f32", value: "0x1p-149" }]],
-                         [{ type: "i64", value: "0" }, [{ type: "f32", value: "-0x1p-149" }]],
-                         [{ type: "i64", value: "1" }, [{ type: "f32", value: "1.0" }]],
-                         [{ type: "i64", value: "1" }, [{ type: "f32", value: "0x1.19999ap+0" }]],
-                         [{ type: "i64", value: "1" }, [{ type: "f32", value: "1.5" }]],
-                         [{ type: "i64", value: "4294967296" }, [{ type: "f32", value: "4294967296" }]],
-                         [{ type: "i64", value: "-1099511627776" }, [{ type: "f32", value: "18446742974197923840.0" }]],
-                         [{ type: "i64", value: "0" }, [{ type: "f32", value: "-0x1.ccccccp-1" }]],
-                         [{ type: "i64", value: "0" }, [{ type: "f32", value: "-0x1.fffffep-1" }]],[{ type: "i64", value: "0" }, [{ type: "f32", value: "0.0" }]],
-                        ],
-                       );
diff --git a/JSTests/wasm/function-tests/i64-trunc-u-f64.js b/JSTests/wasm/function-tests/i64-trunc-u-f64.js
deleted file mode 100644 (file)
index ee55148..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-import Builder from '../Builder.js'
-
-const b = new Builder();
-b.Type().End()
-    .Function().End()
-    .Code()
-    .Function({ params: ["f64"], ret: "i64" }, [])
-    .GetLocal(0)
-    .I64TruncUF64()
-    .End()
-
-const bin = b.WebAssembly()
-bin.trim();
-testWasmModuleFunctions(bin.get(), 1,
-                        [[{ type: "i64", value: "0" }, [{ type: "f64", value: "0.0" }]],
-                         [{ type: "i64", value: "0" }, [{ type: "f64", value: "-0.0" }]],
-                         [{ type: "i64", value: "0" }, [{ type: "f64", value: "0x0.0000000000001p-1022" }]],
-                         [{ type: "i64", value: "0" }, [{ type: "f64", value: "-0x0.0000000000001p-1022" }]],
-                         [{ type: "i64", value: "1" }, [{ type: "f64", value: "1.0" }]],
-                         [{ type: "i64", value: "1" }, [{ type: "f64", value: "0x1.199999999999ap+0" }]],
-                         [{ type: "i64", value: "1" }, [{ type: "f64", value: "1.5" }]],
-                         [{ type: "i64", value: "0xffffffff" }, [{ type: "f64", value: "4294967295" }]],
-                         [{ type: "i64", value: "0x100000000" }, [{ type: "f64", value: "4294967296" }]],
-                         [{ type: "i64", value: "-2048" }, [{ type: "f64", value: "18446744073709549568.0" }]],
-                         [{ type: "i64", value: "0" }, [{ type: "f64", value: "-0x1.ccccccccccccdp-1" }]],
-                         [{ type: "i64", value: "0" }, [{ type: "f64", value: "-0x1.fffffffffffffp-1" }]],
-                         [{ type: "i64", value: "100000000" }, [{ type: "f64", value: "1e8" }]],
-                         [{ type: "i64", value: "10000000000000000" }, [{ type: "f64", value: "1e16" }]],
-                         [{ type: "i64", value: "-9223372036854775808" }, [{ type: "f64", value: "9223372036854775808" }]],
-                        ],
-
-                       );
diff --git a/JSTests/wasm/function-tests/if-then-else-fallthrough.js b/JSTests/wasm/function-tests/if-then-else-fallthrough.js
deleted file mode 100644 (file)
index 6f184d7..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-import Builder from '../Builder.js'
-
-const b = new Builder();
-b.Type().End()
-    .Function().End()
-    .Code()
-    .Function({ params: ["i32"], ret: "i32" }, [])
-    .Block("i32", (b) =>
-           b.GetLocal(0)
-           .I32Const(0)
-           .I32Eq()
-           .If("i32")
-               .I32Const(1)
-           .Else()
-               .I32Const(2)
-           .Br(1)
-           .End()
-          ).End()
-
-const bin = b.WebAssembly()
-bin.trim();
-testWasmModuleFunctions(bin.get(), 1, [[{type: "i32", value: 1 }, [{ type: "i32", value: 0 }]],
-                                       [{type: "i32", value: 2 }, [{ type: "i32", value: 1 }]]
-                                      ]);
diff --git a/JSTests/wasm/function-tests/if-then-fallthrough.js b/JSTests/wasm/function-tests/if-then-fallthrough.js
deleted file mode 100644 (file)
index 6f184d7..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-import Builder from '../Builder.js'
-
-const b = new Builder();
-b.Type().End()
-    .Function().End()
-    .Code()
-    .Function({ params: ["i32"], ret: "i32" }, [])
-    .Block("i32", (b) =>
-           b.GetLocal(0)
-           .I32Const(0)
-           .I32Eq()
-           .If("i32")
-               .I32Const(1)
-           .Else()
-               .I32Const(2)
-           .Br(1)
-           .End()
-          ).End()
-
-const bin = b.WebAssembly()
-bin.trim();
-testWasmModuleFunctions(bin.get(), 1, [[{type: "i32", value: 1 }, [{ type: "i32", value: 0 }]],
-                                       [{type: "i32", value: 2 }, [{ type: "i32", value: 1 }]]
-                                      ]);
diff --git a/JSTests/wasm/function-tests/int-to-floating-point.js b/JSTests/wasm/function-tests/int-to-floating-point.js
deleted file mode 100644 (file)
index c1633b8..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-import Builder from '../Builder.js'
-
-const b = new Builder();
-b.setChecked(false);
-b.Type().End()
-    .Function().End()
-    .Code()
-
-    .Function({ params: ["i64"], ret: "f32" }, [])
-    .GetLocal(0)
-    .F32ConvertUI64()
-    .End()
-
-    .Function({ params: ["i64"], ret: "f32" }, [])
-    .GetLocal(0)
-    .F32ConvertSI64()
-    .End()
-
-    .Function({ params: ["i32"], ret: "f32" }, [])
-    .GetLocal(0)
-    .F32ConvertUI32()
-    .End()
-
-    .Function({ params: ["i32"], ret: "f32" }, [])
-    .GetLocal(0)
-    .F32ConvertSI32()
-    .End()
-
-    .Function({ params: ["i64"], ret: "f64" }, [])
-    .GetLocal(0)
-    .F64ConvertUI64()
-    .End()
-
-    .Function({ params: ["i64"], ret: "f64" }, [])
-    .GetLocal(0)
-    .F64ConvertSI64()
-    .End()
-
-    .Function({ params: ["i32"], ret: "f64" }, [])
-    .GetLocal(0)
-    .F64ConvertUI32()
-    .End()
-
-    .Function({ params: ["i32"], ret: "f64" }, [])
-    .GetLocal(0)
-    .F64ConvertSI32()
-    .End()
-
-const bin = b.WebAssembly()
-bin.trim();
-testWasmModuleFunctions(bin.get(), 8,
-                        [[{ type: "f32", value: 1.0 }, [{ type: "i64", value: "1" }]],
-                         [{ type: "f32", value: 0.0 }, [{ type: "i64", value: "0" }]],
-                         [{ type: "f32", value: 9223372036854775807 }, [{type: "i64", value: "9223372036854775807" }]],
-                         [{ type: "f32", value: 9223372036854775808 }, [{type: "i64", value: "-9223372036854775808" }]],
-                         [{ type: "f32", value: 18446744073709551616.0 }, [{ type: "i64", value: "0xffffffffffffffff" }]],
-                         // Test rounding directions.
-                         [{ type: "f32", value: 16777216.0 }, [{ type: "i64", value: "16777217" }]],
-                         [{ type: "f32", value: 16777220.0 }, [{ type: "i64", value: "16777219" }]]
-                        ],
-
-                        [[{ type: "f32", value: 1.0 }, [{ type: "i64", value: "1" }]],
-                         [{ type: "f32", value: -1.0}, [{ type: "i64", value: "-1" }]],
-                         [{ type: "f32", value: 0.0}, [{ type: "i64", value: "0" }]],
-                         [{ type: "f32", value: 9223372036854775807}, [{ type: "i64", value: "9223372036854775807" }]],
-                         [{ type: "f32", value: -9223372036854775808}, [{ type: "i64", value: "-9223372036854775808" }]],
-                         [{ type: "f32", value: 314159275180032.0}, [{ type: "i64", value: "314159265358979" }]],
-                         // Test rounding directions.
-                         [{ type: "f32", value: 16777216.0}, [{ type: "i64", value: "16777217" }]],
-                         [{ type: "f32", value: -16777216.0}, [{ type: "i64", value: "-16777217" }]],
-                         [{ type: "f32", value: 16777220.0}, [{ type: "i64", value: "16777219" }]],
-                         [{ type: "f32", value: -16777220.0}, [{ type: "i64", value: "-16777219" }]]
-                        ],
-
-                        [[{ type: "f32", value: 1.0 }, [{ type: "i32", value: 1 }]],
-                         [{ type: "f32", value: 0.0 }, [{ type: "i32", value: 0 }]],
-                         [{ type: "f32", value: 2147483648 }, [{ type: "i32", value: 2147483647 }]],
-                         [{ type: "f32", value: 2147483648 }, [{ type: "i32", value: -2147483648 }]],
-                         [{ type: "f32", value: 305419904.0 }, [{ type: "i32", value: 0x12345678 }]],
-                         [{ type: "f32", value: 4294967296.0 }, [{ type: "i32", value: -1 }]],
-                         // Test rounding directions.
-                         [{ type: "f32", value: 16777220.0 }, [{ type: "i32", value: 16777219 }]]
-                        ],
-
-                        [[{ type: "f32", value: 1.0 }, [{ type: "i32", value: 1 }]],
-                         [{ type: "f32", value: -1.0 }, [{ type: "i32", value: -1 }]],
-                         [{ type: "f32", value: 0.0 }, [{ type: "i32", value: 0 }]],
-                         [{ type: "f32", value: 2147483648 }, [{ type: "i32", value: 2147483647 }]],
-                         [{ type: "f32", value: -2147483648 }, [{ type: "i32", value: -2147483648 }]],
-                         [{ type: "f32", value: 1234567936.0 }, [{ type: "i32", value: 1234567890 }]],
-                         // Test rounding directions.
-                         [{ type: "f32", value: 16777216.0 }, [{ type: "i32", value: 16777217 }]],
-                         [{ type: "f32", value: -16777216.0 }, [{ type: "i32", value: -16777217 }]],
-                         [{ type: "f32", value: 16777220.0 }, [{ type: "i32", value: 16777219 }]],
-                         [{ type: "f32", value: -16777220.0 }, [{ type: "i32", value: -16777219 }]]
-                        ],
-
-                        [[{ type: "f64", value: 1.0 }, [{ type: "i64", value: "1" }]],
-                         [{ type: "f64", value: 0.0 }, [{ type: "i64", value: "0" }]],
-                         [{ type: "f64", value: 9223372036854775807 }, [{ type: "i64", value: "9223372036854775807" }]],
-                         [{ type: "f64", value: 9223372036854775808 }, [{ type: "i64", value: "-9223372036854775808" }]],
-                         [{ type: "f64", value: 18446744073709551616.0 }, [{ type: "i64", value: "0xffffffffffffffff" }]],
-                         // Test rounding directions.
-                         [{ type: "f64", value: 9007199254740992 }, [{ type: "i64", value: "9007199254740993" }]],
-                         [{ type: "f64", value: 9007199254740996 }, [{ type: "i64", value: "9007199254740995" }]]
-                        ],
-
-                        [[{ type: "f64", value: 1.0 }, [{ type: "i64", value: "1" }]],
-                         [{ type: "f64", value: -1.0 }, [{ type: "i64", value: "-1" }]],
-                         [{ type: "f64", value: 0.0 }, [{ type: "i64", value: "0" }]],
-                         [{ type: "f64", value: 9223372036854775807 }, [{ type: "i64", value: "9223372036854775807" }]],
-                         [{ type: "f64", value: -9223372036854775808 }, [{ type: "i64", value: "-9223372036854775808" }]],
-                         [{ type: "f64", value: 4669201609102990 }, [{ type: "i64", value: "4669201609102990" }]],
-                         // Test rounding directions.
-                         [{ type: "f64", value: 9007199254740992 }, [{ type: "i64", value: "9007199254740993" }]],
-                         [{ type: "f64", value: -9007199254740992 }, [{ type: "i64", value: "-9007199254740993" }]],
-                         [{ type: "f64", value: 9007199254740996 }, [{ type: "i64", value: "9007199254740995" }]],
-                         [{ type: "f64", value: -9007199254740996 }, [{ type: "i64", value: "-9007199254740995" }]]
-                        ],
-
-                        [[{ type: "f64", value: 1.0 }, [{ type: "i32", value: 1 }]],
-                         [{ type: "f64", value: 0.0 }, [{ type: "i32", value: 0 }]],
-                         [{ type: "f64", value: 2147483647 }, [{ type: "i32", value: 2147483647 }]],
-                         [{ type: "f64", value: 2147483648 }, [{ type: "i32", value: -2147483648 }]],
-                         [{ type: "f64", value: 4294967295.0 }, [{ type: "i32", value: -1 }]]
-                        ],
-
-                        [[{ type: "f64", value: 1.0 }, [{ type: "i32", value: 1 }]],
-                         [{ type: "f64", value: -1.0 }, [{ type: "i32", value: -1 }]],
-                         [{ type: "f64", value: 0.0 }, [{ type: "i32", value: 0 }]],
-                         [{ type: "f64", value: 2147483647 }, [{ type: "i32", value: 2147483647 }]],
-                         [{ type: "f64", value: -2147483648 }, [{ type: "i32", value: -2147483648 }]],
-                         [{ type: "f64", value: 987654321 }, [{ type: "i32", value: 987654321 }]]
-                        ]
-                       );
index be32eac..ce39696 100644 (file)
@@ -1,10 +1,14 @@
 import Builder from '../Builder.js'
+import * as assert from '../assert.js'
 
 const b = new Builder();
 b.Type().End()
     .Function().End()
+    .Export()
+        .Function("loop")
+    .End()
     .Code()
-    .Function({ params: ["i32"], ret: "i32" }, ["i32"])
+    .Function("loop", { params: ["i32"], ret: "i32" }, ["i32"])
     .I32Const(0)
     .SetLocal(1)
     .Loop("void")
@@ -27,11 +31,13 @@ b.Type().End()
     .GetLocal(1)
     .Return()
     .End()
+    .End()
+
+const bin = b.WebAssembly().get();
+const module = new WebAssembly.Module(bin);
+const instance = new WebAssembly.Instance(module);
 
-const bin = b.WebAssembly()
-bin.trim();
-testWasmModuleFunctions(bin.get(), 1, [[{type: "i32", value: 0 }, [{ type: "i32", value: 0 }]],
-                                       [{type: "i32", value: 1 }, [{ type: "i32", value: 1 }]],
-                                       [{type: "i32", value: 3 }, [{ type: "i32", value: 2 }]],
-                                       [{type: "i32", value: 5050 }, [{ type: "i32", value: 100 }]]
-                                      ]);
+assert.eq(0, instance.exports.loop(0));
+assert.eq(1, instance.exports.loop(1));
+assert.eq(3, instance.exports.loop(2));
+assert.eq(5050, instance.exports.loop(100));
index be32eac..ce39696 100644 (file)
@@ -1,10 +1,14 @@
 import Builder from '../Builder.js'
+import * as assert from '../assert.js'
 
 const b = new Builder();
 b.Type().End()
     .Function().End()
+    .Export()
+        .Function("loop")
+    .End()
     .Code()
-    .Function({ params: ["i32"], ret: "i32" }, ["i32"])
+    .Function("loop", { params: ["i32"], ret: "i32" }, ["i32"])
     .I32Const(0)
     .SetLocal(1)
     .Loop("void")
@@ -27,11 +31,13 @@ b.Type().End()
     .GetLocal(1)
     .Return()
     .End()
+    .End()
+
+const bin = b.WebAssembly().get();
+const module = new WebAssembly.Module(bin);
+const instance = new WebAssembly.Instance(module);
 
-const bin = b.WebAssembly()
-bin.trim();
-testWasmModuleFunctions(bin.get(), 1, [[{type: "i32", value: 0 }, [{ type: "i32", value: 0 }]],
-                                       [{type: "i32", value: 1 }, [{ type: "i32", value: 1 }]],
-                                       [{type: "i32", value: 3 }, [{ type: "i32", value: 2 }]],
-                                       [{type: "i32", value: 5050 }, [{ type: "i32", value: 100 }]]
-                                      ]);
+assert.eq(0, instance.exports.loop(0));
+assert.eq(1, instance.exports.loop(1));
+assert.eq(3, instance.exports.loop(2));
+assert.eq(5050, instance.exports.loop(100));
diff --git a/JSTests/wasm/function-tests/max.js b/JSTests/wasm/function-tests/max.js
deleted file mode 100644 (file)
index be4cf1c..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-import Builder from '../Builder.js'
-
-const b = new Builder();
-b.Type().End()
-    .Function().End()
-    .Code()
-    .Function({ params: ["f32", "f32"], ret: "f32" }, [])
-    .GetLocal(0)
-    .GetLocal(1)
-    .F32Max()
-    .End()
-
-    .Function({ params: ["f64", "f64"], ret: "f64" }, [])
-    .GetLocal(0)
-    .GetLocal(1)
-    .F64Max()
-    .End()
-
-
-
-const bin = b.WebAssembly()
-bin.trim();
-testWasmModuleFunctions(bin.get(), 2,
-                        [[{type: "f32", value: 100 }, [{ type: "f32", value: 100 }, { type: "f32", value: 1.5 }]],
-                         [{type: "f32", value: 100 }, [{ type: "f32", value: 100 }, { type: "f32", value: -1.5 }]],
-                         [{type: "f32", value: -1.5 }, [{ type: "f32", value: -100 }, { type: "f32", value: -1.5 }]]
-                        ],
-                        [[{type: "f64", value: 100 }, [{ type: "f64", value: 100 }, { type: "f64", value: 1.5 }]],
-                         [{type: "f64", value: 100 }, [{ type: "f64", value: 100 }, { type: "f64", value: -1.5 }]],
-                         [{type: "f64", value: -1.5 }, [{ type: "f64", value: -100 }, { type: "f64", value: -1.5 }]]
-                        ]
-                       );
diff --git a/JSTests/wasm/function-tests/min.js b/JSTests/wasm/function-tests/min.js
deleted file mode 100644 (file)
index df89d95..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-import Builder from '../Builder.js'
-
-const b = new Builder();
-b.Type().End()
-    .Function().End()
-    .Code()
-    .Function({ params: ["f32", "f32"], ret: "f32" }, [])
-    .GetLocal(0)
-    .GetLocal(1)
-    .F32Min()
-    .End()
-
-    .Function({ params: ["f64", "f64"], ret: "f64" }, [])
-    .GetLocal(0)
-    .GetLocal(1)
-    .F64Min()
-    .End()
-
-
-
-const bin = b.WebAssembly()
-bin.trim();
-testWasmModuleFunctions(bin.get(), 2,
-                        [[{type: "f32", value: 1.5 }, [{ type: "f32", value: 100 }, { type: "f32", value: 1.5 }]],
-                         [{type: "f32", value: -1.5 }, [{ type: "f32", value: 100 }, { type: "f32", value: -1.5 }]],
-                         [{type: "f32", value: -100 }, [{ type: "f32", value: -100 }, { type: "f32", value: 1.5 }]]
-                        ],
-                        [[{type: "f64", value: 1.5 }, [{ type: "f64", value: 100 }, { type: "f64", value: 1.5 }]],
-                         [{type: "f64", value: -1.5 }, [{ type: "f64", value: 100 }, { type: "f64", value: -1.5 }]],
-                         [{type: "f64", value: -100 }, [{ type: "f64", value: -100 }, { type: "f64", value: 1.5 }]]
-                        ]
-                       );
diff --git a/JSTests/wasm/function-tests/nearest.js b/JSTests/wasm/function-tests/nearest.js
deleted file mode 100644 (file)
index 67a6419..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-import Builder from '../Builder.js'
-
-const b = new Builder();
-b.Type().End()
-    .Function().End()
-    .Code()
-    .Function({ params: ["f32"], ret: "f32" }, [])
-    .GetLocal(0)
-    .F32Nearest()
-    .End()
-
-    .Function({ params: ["f64"], ret: "f64" }, [])
-    .GetLocal(0)
-    .F64Nearest()
-    .End()
-
-const bin = b.WebAssembly()
-bin.trim();
-testWasmModuleFunctions(bin.get(), 2,
-                        [[{ type: "f32", value: "-0x0p+0" }, [{ type: "f32", value: "-0x0p+0" }]],
-                         [{ type: "f32", value: "0x0p+0" }, [{ type: "f32", value: "0x0p+0" }]],
-                         [{ type: "f32", value: "-0x0p+0" }, [{ type: "f32", value: "-0x1p-149" }]],
-                         [{ type: "f32", value: "0x0p+0" }, [{ type: "f32", value: "0x1p-149" }]],
-                         [{ type: "f32", value: "-0x0p+0" }, [{ type: "f32", value: "-0x1p-126" }]],
-                         [{ type: "f32", value: "0x0p+0" }, [{ type: "f32", value: "0x1p-126" }]],
-                         [{ type: "f32", value: "-0x0p+0" }, [{ type: "f32", value: "-0x1p-1" }]],
-                         [{ type: "f32", value: "0x0p+0" }, [{ type: "f32", value: "0x1p-1" }]],
-                         [{ type: "f32", value: "-0x1p+0" }, [{ type: "f32", value: "-0x1p+0" }]],
-                         [{ type: "f32", value: "0x1p+0" }, [{ type: "f32", value: "0x1p+0" }]],
-                         [{ type: "f32", value: "-0x1.8p+2" }, [{ type: "f32", value: "-0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "0x1.8p+2" }, [{ type: "f32", value: "0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "-0x1.fffffep+127" }, [{ type: "f32", value: "-0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "0x1.fffffep+127" }, [{ type: "f32", value: "0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "-infinity" }, [{ type: "f32", value: "-infinity" }]],
-                         [{ type: "f32", value: "infinity" }, [{ type: "f32", value: "infinity" }]],
-                        ],
-
-                        [[{ type: "f64", value: "-0x0p+0" }, [{ type: "f64", value: "-0x0p+0" }]],
-                         [{ type: "f64", value: "0x0p+0" }, [{ type: "f64", value: "0x0p+0" }]],
-                         [{ type: "f64", value: "-0x0p+0" }, [{ type: "f64", value: "-0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "0x0p+0" }, [{ type: "f64", value: "0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "-0x0p+0" }, [{ type: "f64", value: "-0x1p-1022" }]],
-                         [{ type: "f64", value: "0x0p+0" }, [{ type: "f64", value: "0x1p-1022" }]],
-                         [{ type: "f64", value: "-0x0p+0" }, [{ type: "f64", value: "-0x1p-1" }]],
-                         [{ type: "f64", value: "0x0p+0" }, [{ type: "f64", value: "0x1p-1" }]],
-                         [{ type: "f64", value: "-0x1p+0" }, [{ type: "f64", value: "-0x1p+0" }]],
-                         [{ type: "f64", value: "0x1p+0" }, [{ type: "f64", value: "0x1p+0" }]],
-                         [{ type: "f64", value: "-0x1.8p+2" }, [{ type: "f64", value: "-0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "0x1.8p+2" }, [{ type: "f64", value: "0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "-infinity" }, [{ type: "f64", value: "-infinity" }]],
-                         [{ type: "f64", value: "infinity" }, [{ type: "f64", value: "infinity" }]],
-                        ],
-                       );
diff --git a/JSTests/wasm/function-tests/nop.js b/JSTests/wasm/function-tests/nop.js
deleted file mode 100644 (file)
index 8cba43d..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-import Builder from '../Builder.js'
-
-const b = new Builder();
-b.Type().End()
-    .Function().End()
-    .Code()
-
-    // This function adds one to the argument.
-    .Function({ params: ["i32"], ret: "i32" }, [])
-    .GetLocal(0)
-    .Nop()
-    .End()
-
-    // This is the id function.
-    .Function({ params: ["i32"], ret: "i32" }, [])
-    .Nop()
-    .GetLocal(0)
-    .End()
-
-const bin = b.WebAssembly()
-bin.trim();
-testWasmModuleFunctions(bin.get(), 2,
-                        [[{ type: "i32", value: 0 }, [{ type: "i32", value: 0 }]],
-                         [{ type: "i32", value: 1 }, [{ type: "i32", value: 1 }]],
-                         [{ type: "i32", value: 100 }, [{ type: "i32", value: 100 }]],
-                         [{ type: "i32", value: -100 }, [{ type: "i32", value: -100 }]],
-                        ],
-
-                        [[{ type: "i32", value: 0 }, [{ type: "i32", value: 0 }]],
-                         [{ type: "i32", value: 1 }, [{ type: "i32", value: 1 }]],
-                         [{ type: "i32", value: 100 }, [{ type: "i32", value: 100 }]],
-                         [{ type: "i32", value: -100 }, [{ type: "i32", value: -100 }]],
-                        ],
-                       );
diff --git a/JSTests/wasm/function-tests/popcnt.js b/JSTests/wasm/function-tests/popcnt.js
deleted file mode 100644 (file)
index 7972bee..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-import Builder from '../Builder.js'
-
-const b = new Builder();
-b.Type().End()
-    .Function().End()
-    .Code()
-    .Function({ params: ["i32"], ret: "i32" }, [])
-    .GetLocal(0)
-    .I32Popcnt()
-    .End()
-
-    .Function({ params: ["i64"], ret: "i64" }, [])
-    .GetLocal(0)
-    .I64Popcnt()
-    .End()
-
-const bin = b.WebAssembly()
-bin.trim();
-testWasmModuleFunctions(bin.get(), 2,
-                        [[{type: "i32", value: "32" }, [{ type: "i32", value: "-1" }]],
-                         [{type: "i32", value: "0" }, [{ type: "i32", value: "0" }]],
-                         [{type: "i32", value: "1" }, [{ type: "i32", value: "0x00008000" }]],
-                         [{type: "i32", value: "2" }, [{ type: "i32", value: "0x80008000" }]],
-                         [{type: "i32", value: "31" }, [{ type: "i32", value: "0x7fffffff" }]],
-                         [{type: "i32", value: "16" }, [{ type: "i32", value: "0xaaaaaaaa" }]],
-                         [{type: "i32", value: "16" }, [{ type: "i32", value: "0x55555555" }]],
-                         [{type: "i32", value: "24" }, [{ type: "i32", value: "0xdeadbeef" }]],
-                        ],
-
-
-                        [[{type: "i64", value: "64" }, [{ type: "i64", value: "-1" }]],
-                         [{type: "i64", value: "0" }, [{ type: "i64", value: "0" }]],
-                         [{type: "i64", value: "1" }, [{ type: "i64", value: "0x00008000" }]],
-                         [{type: "i64", value: "4" }, [{ type: "i64", value: "0x8000800080008000" }]],
-                         [{type: "i64", value: "63" }, [{ type: "i64", value: "0x7fffffffffffffff" }]],
-                         [{type: "i64", value: "32" }, [{ type: "i64", value: "0xaaaaaaaa55555555" }]],
-                         [{type: "i64", value: "32" }, [{ type: "i64", value: "0x99999999aaaaaaaa" }]],
-                         [{type: "i64", value: "48" }, [{ type: "i64", value: "0xdeadbeefdeadbeef" }]],
-                        ]
-                       );
index 742f6ae..bc08e87 100644 (file)
@@ -1,15 +1,21 @@
 import Builder from '../Builder.js'
+import * as assert from '../assert.js'
 
 const b = new Builder();
-let code = b.Type().End()
+b.Type().End()
     .Function().End()
-    .Code();
-
-code.Function({ params: [], ret: "i32" })
+    .Export()
+        .Function("ret5")
+    .End()
+    .Code()
+    .Function("ret5", { params: [], ret: "i32" })
     .I32Const(5)
     .Return()
     .End()
     .End();
-const bin = b.WebAssembly();
-bin.trim();
-testWasmModuleFunctions(bin.get(), 1, [[{type: "i32", value: 5 }, []]]);
+
+const bin = b.WebAssembly().get();
+const module = new WebAssembly.Module(bin);
+const instance = new WebAssembly.Instance(module);
+
+assert.eq(instance.exports.ret5(), 5);
diff --git a/JSTests/wasm/function-tests/select.js b/JSTests/wasm/function-tests/select.js
deleted file mode 100644 (file)
index 5ef2c4c..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-import Builder from '../Builder.js'
-
-const b = new Builder();
-b.Type().End()
-    .Function().End()
-    .Code()
-    .Function({ params: ["i32"], ret: "i32" }, [])
-    .I32Const(1)
-    .I32Const(2)
-    .GetLocal(0)
-    .Select()
-    .End()
-
-// This function should be foo(x, y) { return x ? x : y; }
-    .Function({ params: ["i32", "i32"], ret: "i32" }, [])
-    .GetLocal(0)
-    .GetLocal(1)
-    .GetLocal(0)
-    .Select()
-    .End()
-
-const bin = b.WebAssembly()
-bin.trim()
-testWasmModuleFunctions(bin.get(), 2, [
-    [{ type: "i32", value: 2 }, [{ type: "i32", value: 0 }]],
-    [{ type: "i32", value: 1 }, [{ type: "i32", value: 1 }]],
-    [{ type: "i32", value: 1 }, [{ type: "i32", value: -1 }]]
-], [
-    [{ type: "i32", value: 1 }, [{ type: "i32", value: 0 }, { type: "i32", value: 1 }]],
-    [{ type: "i32", value: -1 }, [{ type: "i32", value: 0 }, { type: "i32", value: -1 }]],
-    [{ type: "i32", value: 1 }, [{ type: "i32", value: 1 }, { type: "i32", value: 10 }]],
-    [{ type: "i32", value: 30 }, [{ type: "i32", value: 30 }, { type: "i32", value: 10 }]]
-]);
diff --git a/JSTests/wasm/function-tests/tee-local.js b/JSTests/wasm/function-tests/tee-local.js
deleted file mode 100644 (file)
index 860f6c4..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-import Builder from '../Builder.js'
-
-const b = new Builder();
-b.Type().End()
-    .Function().End()
-    .Code()
-
-    // This function multiplies the argument by 2
-    .Function({ params: ["i32"], ret: "i32" }, [])
-    .GetLocal(0)
-    .I32Const(1)
-    .TeeLocal(0)
-    .GetLocal(0)
-    .I32Add()
-    .I32Mul()
-    .End()
-
-const bin = b.WebAssembly()
-bin.trim();
-testWasmModuleFunctions(bin.get(), 1,
-                        [[{ type: "i32", value: 0 }, [{ type: "i32", value: 0 }]],
-                         [{ type: "i32", value: 2 }, [{ type: "i32", value: 1 }]],
-                         [{ type: "i32", value: 200 }, [{ type: "i32", value: 100 }]],
-                         [{ type: "i32", value: -200 }, [{ type: "i32", value: -100 }]],
-                        ],
-                       );
diff --git a/JSTests/wasm/function-tests/trunc.js b/JSTests/wasm/function-tests/trunc.js
deleted file mode 100644 (file)
index 26587d6..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-import Builder from '../Builder.js'
-
-const b = new Builder();
-b.Type().End()
-    .Function().End()
-    .Code()
-    .Function({ params: ["f32"], ret: "f32" }, [])
-    .GetLocal(0)
-    .F32Trunc()
-    .End()
-
-    .Function({ params: ["f64"], ret: "f64" }, [])
-    .GetLocal(0)
-    .F64Trunc()
-    .End()
-
-const bin = b.WebAssembly()
-bin.trim();
-testWasmModuleFunctions(bin.get(), 2,
-                        [[{ type: "f32", value: "-0x0p+0" }, [{ type: "f32", value: "-0x0p+0" }]],
-                         [{ type: "f32", value: "0x0p+0" }, [{ type: "f32", value: "0x0p+0" }]],
-                         [{ type: "f32", value: "-0x0p+0" }, [{ type: "f32", value: "-0x1p-149" }]],
-                         [{ type: "f32", value: "0x0p+0" }, [{ type: "f32", value: "0x1p-149" }]],
-                         [{ type: "f32", value: "-0x0p+0" }, [{ type: "f32", value: "-0x1p-126" }]],
-                         [{ type: "f32", value: "0x0p+0" }, [{ type: "f32", value: "0x1p-126" }]],
-                         [{ type: "f32", value: "-0x0p+0" }, [{ type: "f32", value: "-0x1p-1" }]],
-                         [{ type: "f32", value: "0x0p+0" }, [{ type: "f32", value: "0x1p-1" }]],
-                         [{ type: "f32", value: "-0x1p+0" }, [{ type: "f32", value: "-0x1p+0" }]],
-                         [{ type: "f32", value: "0x1p+0" }, [{ type: "f32", value: "0x1p+0" }]],
-                         [{ type: "f32", value: "-0x1.8p+2" }, [{ type: "f32", value: "-0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "0x1.8p+2" }, [{ type: "f32", value: "0x1.921fb6p+2" }]],
-                         [{ type: "f32", value: "-0x1.fffffep+127" }, [{ type: "f32", value: "-0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "0x1.fffffep+127" }, [{ type: "f32", value: "0x1.fffffep+127" }]],
-                         [{ type: "f32", value: "-infinity" }, [{ type: "f32", value: "-infinity" }]],
-                         [{ type: "f32", value: "infinity" }, [{ type: "f32", value: "infinity" }]],
-                        ],
-
-                        [[{ type: "f64", value: "-0x0p+0" }, [{ type: "f64", value: "-0x0p+0" }]],
-                         [{ type: "f64", value: "0x0p+0" }, [{ type: "f64", value: "0x0p+0" }]],
-                         [{ type: "f64", value: "-0x0p+0" }, [{ type: "f64", value: "-0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "0x0p+0" }, [{ type: "f64", value: "0x0.0000000000001p-1022" }]],
-                         [{ type: "f64", value: "-0x0p+0" }, [{ type: "f64", value: "-0x1p-1022" }]],
-                         [{ type: "f64", value: "0x0p+0" }, [{ type: "f64", value: "0x1p-1022" }]],
-                         [{ type: "f64", value: "-0x0p+0" }, [{ type: "f64", value: "-0x1p-1" }]],
-                         [{ type: "f64", value: "0x0p+0" }, [{ type: "f64", value: "0x1p-1" }]],
-                         [{ type: "f64", value: "-0x1p+0" }, [{ type: "f64", value: "-0x1p+0" }]],
-                         [{ type: "f64", value: "0x1p+0" }, [{ type: "f64", value: "0x1p+0" }]],
-                         [{ type: "f64", value: "-0x1.8p+2" }, [{ type: "f64", value: "-0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "0x1.8p+2" }, [{ type: "f64", value: "0x1.921fb54442d18p+2" }]],
-                         [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "-0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "0x1.fffffffffffffp+1023" }, [{ type: "f64", value: "0x1.fffffffffffffp+1023" }]],
-                         [{ type: "f64", value: "-infinity" }, [{ type: "f64", value: "-infinity" }]],
-                         [{ type: "f64", value: "infinity" }, [{ type: "f64", value: "infinity" }]],
-                        ],
-                       );
index 2065da6..0f7b0b0 100644 (file)
@@ -1,3 +1,43 @@
+2017-06-08  Keith Miller  <keith_miller@apple.com>
+
+        WebAssembly: We should only create wrappers for functions that can be exported
+        https://bugs.webkit.org/show_bug.cgi?id=173088
+
+        Reviewed by Saam Barati.
+
+        This patch makes it so we only create wrappers for WebAssembly functions that
+        can actually be exported. It appears to be a ~2.5% speedup on WasmBench compile times.
+
+        This patch also removes most of the old testWasmModuleFunctions api from the jsc CLI.
+        Most of the tests were duplicates of ones in the spec-tests directory. The others I
+        have converted to use the normal API.
+
+        * jsc.cpp:
+        (GlobalObject::finishCreation):
+        (valueWithTypeOfWasmValue): Deleted.
+        (box): Deleted.
+        (callWasmFunction): Deleted.
+        (functionTestWasmModuleFunctions): Deleted.
+        * wasm/WasmB3IRGenerator.cpp:
+        (JSC::Wasm::B3IRGenerator::B3IRGenerator):
+        (JSC::Wasm::createJSToWasmWrapper):
+        (JSC::Wasm::parseAndCompile):
+        * wasm/WasmB3IRGenerator.h:
+        * wasm/WasmBBQPlan.cpp:
+        (JSC::Wasm::BBQPlan::prepare):
+        (JSC::Wasm::BBQPlan::compileFunctions):
+        (JSC::Wasm::BBQPlan::complete):
+        * wasm/WasmBBQPlan.h:
+        * wasm/WasmBBQPlanInlines.h:
+        (JSC::Wasm::BBQPlan::initializeCallees):
+        * wasm/WasmCodeBlock.cpp:
+        (JSC::Wasm::CodeBlock::CodeBlock):
+        * wasm/WasmCodeBlock.h:
+        (JSC::Wasm::CodeBlock::jsEntrypointCalleeFromFunctionIndexSpace):
+        * wasm/WasmFormat.h:
+        * wasm/WasmOMGPlan.cpp:
+        (JSC::Wasm::OMGPlan::work):
+
 2017-06-07  JF Bastien  <jfbastien@apple.com>
 
         WebAssembly: test imports and exports with 16-bit characters
index 16a7942..d38bcba 100644 (file)
 #include "SuperSampler.h"
 #include "TestRunnerUtils.h"
 #include "TypeProfilerLog.h"
-#include "WasmBBQPlanInlines.h"
-#include "WasmCallee.h"
 #include "WasmContext.h"
 #include "WasmFaultSignalHandler.h"
 #include "WasmMemory.h"
-#include "WasmWorklist.h"
 #include <locale.h>
 #include <math.h>
 #include <stdio.h>
@@ -1133,7 +1130,6 @@ static EncodedJSValue JSC_HOST_CALL functionAsyncTestStart(ExecState*);
 static EncodedJSValue JSC_HOST_CALL functionAsyncTestPassed(ExecState*);
 
 #if ENABLE(WEBASSEMBLY)
-static EncodedJSValue JSC_HOST_CALL functionTestWasmModuleFunctions(ExecState*);
 static EncodedJSValue JSC_HOST_CALL functionWebAssemblyMemoryMode(ExecState*);
 #endif
 
@@ -1409,7 +1405,6 @@ protected:
         addFunction(vm, "asyncTestPassed", functionAsyncTestPassed, 1);
 
 #if ENABLE(WEBASSEMBLY)
-        addFunction(vm, "testWasmModuleFunctions", functionTestWasmModuleFunctions, 0);
         addFunction(vm, "WebAssemblyMemoryMode", functionWebAssemblyMemoryMode, 1);
 #endif
 
@@ -3137,181 +3132,6 @@ EncodedJSValue JSC_HOST_CALL functionAsyncTestPassed(ExecState*)
 
 #if ENABLE(WEBASSEMBLY)
 
-static CString valueWithTypeOfWasmValue(ExecState* exec, VM& vm, JSValue value, JSValue wasmValue)
-{
-    JSString* type = asString(wasmValue.get(exec, makeIdentifier(vm, "type")));
-
-    const String& typeString = type->value(exec);
-    if (typeString == "i64" || typeString == "i32")
-        return toCString(typeString, " ", RawPointer(bitwise_cast<void*>(value)));
-    if (typeString == "f32")
-        return toCString(typeString, " hex: ", RawPointer(bitwise_cast<void*>(value)), ", float: ", bitwise_cast<float>(static_cast<uint32_t>(JSValue::encode(value))));
-    return toCString(typeString, " hex: ", RawPointer(bitwise_cast<void*>(value)), ", double: ", bitwise_cast<double>(value));
-}
-
-static JSValue box(ExecState* exec, VM& vm, JSValue wasmValue)
-{
-    auto scope = DECLARE_CATCH_SCOPE(vm);
-
-    JSString* type = asString(wasmValue.get(exec, makeIdentifier(vm, "type")));
-    scope.assertNoException();
-    JSValue value = wasmValue.get(exec, makeIdentifier(vm, "value"));
-    scope.assertNoException();
-
-    auto unboxString = [&] (const char* hexFormat, const char* decFormat, auto& result) {
-        if (!value.isString())
-            return false;
-
-        const char* str = toCString(asString(value)->value(exec)).data();
-        int scanResult;
-        int length = std::strlen(str);
-        if ((length > 2 && (str[0] == '0' && str[1] == 'x'))
-            || (length > 3 && (str[0] == '-' && str[1] == '0' && str[2] == 'x')))
-#if COMPILER(CLANG)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wformat-nonliteral"
-#endif
-            scanResult = sscanf(str, hexFormat, &result);
-        else
-            scanResult = sscanf(str, decFormat, &result);
-#if COMPILER(CLANG)
-#pragma clang diagnostic pop
-#endif
-        RELEASE_ASSERT(scanResult != EOF);
-        return true;
-    };
-
-    const String& typeString = type->value(exec);
-    if (typeString == "i64") {
-        int64_t result;
-        if (!unboxString("%llx", "%lld", result))
-            CRASH();
-        return JSValue::decode(result);
-    }
-
-    if (typeString == "i32") {
-        int32_t result;
-        if (!unboxString("%x", "%d", result))
-            result = value.asInt32();
-        return JSValue::decode(static_cast<uint32_t>(result));
-    }
-
-    if (typeString == "f32") {
-        float result;
-        if (!unboxString("%a", "%f", result))
-            result = value.toFloat(exec);
-        return JSValue::decode(bitwise_cast<uint32_t>(result));
-    }
-
-    RELEASE_ASSERT(typeString == "f64");
-    double result;
-    if (!unboxString("%la", "%lf", result))
-        result = value.asNumber();
-    return JSValue::decode(bitwise_cast<uint64_t>(result));
-}
-
-// FIXME: https://bugs.webkit.org/show_bug.cgi?id=168582.
-static JSValue callWasmFunction(VM* vm, JSGlobalObject* globalObject, Wasm::Callee* wasmCallee, const ArgList& boxedArgs)
-{
-    JSValue firstArgument;
-    int argCount = 1;
-    JSValue* remainingArgs = nullptr;
-    if (boxedArgs.size()) {
-        remainingArgs = boxedArgs.data();
-        firstArgument = *remainingArgs;
-        remainingArgs++;
-        argCount = boxedArgs.size();
-    }
-
-    ProtoCallFrame protoCallFrame;
-    protoCallFrame.init(nullptr, globalObject->globalExec()->jsCallee(), firstArgument, argCount, remainingArgs);
-
-    return JSValue::decode(vmEntryToWasm(wasmCallee->entrypoint(), vm, &protoCallFrame));
-}
-
-// testWasmModule(JSArrayBufferView source, number functionCount, ...[[WasmValue, [WasmValue]]]) where the ith copy of [[result, [args]]] is a list
-// of arguments to be passed to the ith wasm function as well as the expected result. WasmValue is an object with "type" and "value" properties.
-static EncodedJSValue JSC_HOST_CALL functionTestWasmModuleFunctions(ExecState* exec)
-{
-    VM& vm = exec->vm();
-    auto scope = DECLARE_THROW_SCOPE(vm);
-
-    if (!Options::useWebAssembly())
-        return throwVMTypeError(exec, scope, ASCIILiteral("testWasmModule should only be called if the useWebAssembly option is set"));
-
-    JSArrayBufferView* source = jsCast<JSArrayBufferView*>(exec->argument(0));
-    uint32_t functionCount = exec->argument(1).toUInt32(exec);
-
-    if (exec->argumentCount() != functionCount + 2)
-        CRASH();
-
-    Ref<Wasm::BBQPlan> plan = adoptRef(*new Wasm::BBQPlan(nullptr, static_cast<uint8_t*>(source->vector()), source->length(), Wasm::BBQPlan::FullCompile, Wasm::Plan::dontFinalize()));
-    Wasm::ensureWorklist().enqueue(plan.copyRef());
-    Wasm::ensureWorklist().completePlanSynchronously(plan.get());
-    if (plan->failed()) {
-        dataLogLn("failed to parse module: ", plan->errorMessage());
-        CRASH();
-    }
-
-    if (plan->internalFunctionCount() != functionCount)
-        CRASH();
-
-    Vector<Ref<Wasm::Callee>> jsEntrypointCallees;
-    Vector<Ref<Wasm::Callee>> wasmEntrypointCallees;
-    {
-        unsigned lastIndex = UINT_MAX;
-        plan->initializeCallees(
-            [&] (unsigned calleeIndex, Ref<Wasm::Callee>&& jsEntrypointCallee, Ref<Wasm::Callee>&& wasmEntrypointCallee) {
-                RELEASE_ASSERT(!calleeIndex || (calleeIndex - 1 == lastIndex));
-                jsEntrypointCallees.append(WTFMove(jsEntrypointCallee));
-                wasmEntrypointCallees.append(WTFMove(wasmEntrypointCallee));
-                lastIndex = calleeIndex;
-            });
-    }
-    Ref<Wasm::ModuleInformation> moduleInformation = plan->takeModuleInformation();
-    RELEASE_ASSERT(!moduleInformation->memory);
-
-    for (uint32_t i = 0; i < functionCount; ++i) {
-        JSArray* testCases = jsCast<JSArray*>(exec->argument(i + 2));
-        for (unsigned testIndex = 0; testIndex < testCases->length(); ++testIndex) {
-            JSArray* test = jsCast<JSArray*>(testCases->getIndexQuickly(testIndex));
-            JSObject* result = jsCast<JSObject*>(test->getIndexQuickly(0));
-            JSArray* arguments = jsCast<JSArray*>(test->getIndexQuickly(1));
-
-            MarkedArgumentBuffer boxedArgs;
-            if (!Wasm::useFastTLSForContext()) {
-                // When not using fast TLS, the code we emit expects Wasm::Context*
-                // as the first argument. These tests that this API supports don't ever
-                // use a Context. So this is just a hack to get it to not barf.
-                // We really need to remove this API.
-                boxedArgs.append(jsNumber(0xbadbeef));
-            }
-            for (unsigned argIndex = 0; argIndex < arguments->length(); ++argIndex)
-                boxedArgs.append(box(exec, vm, arguments->getIndexQuickly(argIndex)));
-
-            JSValue callResult;
-            {
-                auto scope = DECLARE_THROW_SCOPE(vm);
-                callResult = callWasmFunction(&vm, exec->lexicalGlobalObject(), jsEntrypointCallees[i].ptr(), boxedArgs);
-                RETURN_IF_EXCEPTION(scope, { });
-            }
-            JSValue expected = box(exec, vm, result);
-            if (callResult != expected) {
-                dataLog("Arguments: ");
-                CommaPrinter comma(", ");
-                for (unsigned argIndex = 0; argIndex < arguments->length(); ++argIndex)
-                    dataLog(comma, valueWithTypeOfWasmValue(exec, vm, boxedArgs.at(argIndex), arguments->getIndexQuickly(argIndex)));
-                dataLogLn();
-
-                WTFReportAssertionFailure(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, toCString(" (callResult == ", valueWithTypeOfWasmValue(exec, vm, callResult, result), ", expected == ", valueWithTypeOfWasmValue(exec, vm, expected, result), ")").data());
-                CRASH();
-            }
-        }
-    }
-
-    return encodedJSUndefined();
-}
-
 static EncodedJSValue JSC_HOST_CALL functionWebAssemblyMemoryMode(ExecState* exec)
 {
     VM& vm = exec->vm();
index 01537c4..d140d81 100644 (file)
@@ -163,7 +163,7 @@ public:
 
     typedef String ErrorType;
     typedef UnexpectedType<ErrorType> UnexpectedResult;
-    typedef Expected<std::unique_ptr<WasmInternalFunction>, ErrorType> Result;
+    typedef Expected<std::unique_ptr<InternalFunction>, ErrorType> Result;
     typedef Expected<void, ErrorType> PartialResult;
     template <typename ...Args>
     NEVER_INLINE UnexpectedResult WARN_UNUSED_RETURN fail(Args... args) const
@@ -176,7 +176,7 @@ public:
             return fail(__VA_ARGS__);             \
     } while (0)
 
-    B3IRGenerator(const ModuleInformation&, Procedure&, WasmInternalFunction*, Vector<UnlinkedWasmToWasmCall>&, MemoryMode, CompilationMode, unsigned functionIndex, TierUpCount*);
+    B3IRGenerator(const ModuleInformation&, Procedure&, InternalFunction*, Vector<UnlinkedWasmToWasmCall>&, MemoryMode, CompilationMode, unsigned functionIndex, TierUpCount*);
 
     PartialResult WARN_UNUSED_RETURN addArguments(const Signature&);
     PartialResult WARN_UNUSED_RETURN addLocal(Type, uint32_t);
@@ -336,7 +336,7 @@ void B3IRGenerator::restoreWasmContext(Procedure& proc, BasicBlock* block, Value
     });
 }
 
-B3IRGenerator::B3IRGenerator(const ModuleInformation& info, Procedure& procedure, WasmInternalFunction* compilation, Vector<UnlinkedWasmToWasmCall>& unlinkedWasmToWasmCalls, MemoryMode mode, CompilationMode compilationMode, unsigned functionIndex, TierUpCount* tierUp)
+B3IRGenerator::B3IRGenerator(const ModuleInformation& info, Procedure& procedure, InternalFunction* compilation, Vector<UnlinkedWasmToWasmCall>& unlinkedWasmToWasmCalls, MemoryMode mode, CompilationMode compilationMode, unsigned functionIndex, TierUpCount* tierUp)
     : m_info(info)
     , m_mode(mode)
     , m_compilationMode(compilationMode)
@@ -382,7 +382,7 @@ B3IRGenerator::B3IRGenerator(const ModuleInformation& info, Procedure& procedure
         });
     }
 
-    wasmCallingConvention().setupFrameInPrologue(&compilation->wasmCalleeMoveLocation, m_proc, Origin(), m_currentBlock);
+    wasmCallingConvention().setupFrameInPrologue(&compilation->calleeMoveLocation, m_proc, Origin(), m_currentBlock);
 
     m_instanceValue = materializeWasmContext(m_currentBlock);
 
@@ -1338,17 +1338,18 @@ void B3IRGenerator::dump(const Vector<ControlEntry>& controlStack, const Express
     dataLogLn();
 }
 
-static void createJSToWasmWrapper(CompilationContext& compilationContext, WasmInternalFunction& function, const Signature& signature, const ModuleInformation& info, MemoryMode mode, unsigned functionIndex, Vector<UnlinkedWasmToWasmCall>* unlinkedWasmToWasmCalls)
+std::unique_ptr<InternalFunction> createJSToWasmWrapper(CompilationContext& compilationContext, const Signature& signature, Vector<UnlinkedWasmToWasmCall>* unlinkedWasmToWasmCalls, const ModuleInformation& info, MemoryMode mode, unsigned functionIndex)
 {
     CCallHelpers& jit = *compilationContext.jsEntrypointJIT;
 
+    auto result = std::make_unique<InternalFunction>();
     jit.emitFunctionPrologue();
 
     // FIXME Stop using 0 as codeBlocks. https://bugs.webkit.org/show_bug.cgi?id=165321
     jit.store64(CCallHelpers::TrustedImm64(0), CCallHelpers::Address(GPRInfo::callFrameRegister, CallFrameSlot::codeBlock * static_cast<int>(sizeof(Register))));
     MacroAssembler::DataLabelPtr calleeMoveLocation = jit.moveWithPatch(MacroAssembler::TrustedImmPtr(nullptr), GPRInfo::nonPreservedNonReturnGPR);
     jit.storePtr(GPRInfo::nonPreservedNonReturnGPR, CCallHelpers::Address(GPRInfo::callFrameRegister, CallFrameSlot::callee * static_cast<int>(sizeof(Register))));
-    CodeLocationDataLabelPtr* linkedCalleeMove = &function.jsToWasmCalleeMoveLocation;
+    CodeLocationDataLabelPtr* linkedCalleeMove = &result->calleeMoveLocation;
     jit.addLinkTask([=] (LinkBuffer& linkBuffer) {
         *linkedCalleeMove = linkBuffer.locationOf(calleeMoveLocation);
     });
@@ -1364,7 +1365,7 @@ static void createJSToWasmWrapper(CompilationContext& compilationContext, WasmIn
 #endif
 
     RegisterAtOffsetList registersToSpill(toSave, RegisterAtOffsetList::OffsetBaseType::FramePointerBased);
-    function.jsToWasmEntrypoint.calleeSaveRegisters = registersToSpill;
+    result->entrypoint.calleeSaveRegisters = registersToSpill;
 
     unsigned totalFrameSize = registersToSpill.size() * sizeof(void*);
     totalFrameSize += WasmCallingConvention::headerSizeInBytes();
@@ -1521,6 +1522,8 @@ static void createJSToWasmWrapper(CompilationContext& compilationContext, WasmIn
 
     jit.emitFunctionEpilogue();
     jit.ret();
+
+    return result;
 }
 
 auto B3IRGenerator::origin() -> Origin
@@ -1530,9 +1533,9 @@ auto B3IRGenerator::origin() -> Origin
     return bitwise_cast<Origin>(origin);
 }
 
-Expected<std::unique_ptr<WasmInternalFunction>, String> parseAndCompile(CompilationContext& compilationContext, const uint8_t* functionStart, size_t functionLength, const Signature& signature, Vector<UnlinkedWasmToWasmCall>& unlinkedWasmToWasmCalls, const ModuleInformation& info, MemoryMode mode, CompilationMode compilationMode, uint32_t functionIndex, TierUpCount* tierUp)
+Expected<std::unique_ptr<InternalFunction>, String> parseAndCompile(CompilationContext& compilationContext, const uint8_t* functionStart, size_t functionLength, const Signature& signature, Vector<UnlinkedWasmToWasmCall>& unlinkedWasmToWasmCalls, const ModuleInformation& info, MemoryMode mode, CompilationMode compilationMode, uint32_t functionIndex, TierUpCount* tierUp)
 {
-    auto result = std::make_unique<WasmInternalFunction>();
+    auto result = std::make_unique<InternalFunction>();
 
     compilationContext.jsEntrypointJIT = std::make_unique<CCallHelpers>();
     compilationContext.wasmEntrypointJIT = std::make_unique<CCallHelpers>();
@@ -1572,11 +1575,9 @@ Expected<std::unique_ptr<WasmInternalFunction>, String> parseAndCompile(Compilat
         B3::prepareForGeneration(procedure);
         B3::generate(procedure, *compilationContext.wasmEntrypointJIT);
         compilationContext.wasmEntrypointByproducts = procedure.releaseByproducts();
-        result->wasmEntrypoint.calleeSaveRegisters = procedure.calleeSaveRegisterAtOffsetList();
+        result->entrypoint.calleeSaveRegisters = procedure.calleeSaveRegisterAtOffsetList();
     }
 
-    if (compilationMode == CompilationMode::BBQMode)
-        createJSToWasmWrapper(compilationContext, *result, signature, info, mode, functionIndex, &unlinkedWasmToWasmCalls);
     return WTFMove(result);
 }
 
index 7622dbe..e2c6adb 100644 (file)
@@ -54,7 +54,9 @@ struct CompilationContext {
     std::unique_ptr<B3::OpaqueByproducts> wasmEntrypointByproducts;
 };
 
-Expected<std::unique_ptr<WasmInternalFunction>, String> parseAndCompile(CompilationContext&, const uint8_t*, size_t, const Signature&, Vector<UnlinkedWasmToWasmCall>&, const ModuleInformation&, MemoryMode, CompilationMode, uint32_t functionIndex, TierUpCount* = nullptr);
+Expected<std::unique_ptr<InternalFunction>, String> parseAndCompile(CompilationContext&, const uint8_t*, size_t, const Signature&, Vector<UnlinkedWasmToWasmCall>&, const ModuleInformation&, MemoryMode, CompilationMode, uint32_t functionIndex, TierUpCount* = nullptr);
+
+std::unique_ptr<InternalFunction> createJSToWasmWrapper(CompilationContext&, const Signature&, Vector<UnlinkedWasmToWasmCall>*, const ModuleInformation&, MemoryMode, uint32_t functionIndex);
 
 } } // namespace JSC::Wasm
 
index b1b598d..c13b766 100644 (file)
@@ -178,6 +178,22 @@ void BBQPlan::prepare()
         m_wasmToWasmExitStubs.uncheckedAppend(wasmToWasm(importFunctionIndex));
     }
 
+    const uint32_t importFunctionCount = m_moduleInformation->importFunctionCount();
+    for (const auto& exp : m_moduleInformation->exports) {
+        if (exp.kindIndex >= importFunctionCount)
+            m_exportedFunctionIndices.add(exp.kindIndex - importFunctionCount);
+    }
+
+    for (const auto& element : m_moduleInformation->elements) {
+        for (const uint32_t elementIndex : element.functionIndices) {
+            if (elementIndex >= importFunctionCount)
+                m_exportedFunctionIndices.add(elementIndex - importFunctionCount);
+        }
+    }
+
+    if (m_moduleInformation->startFunctionIndexSpace && m_moduleInformation->startFunctionIndexSpace >= importFunctionCount)
+        m_exportedFunctionIndices.add(*m_moduleInformation->startFunctionIndexSpace - importFunctionCount);
+
     moveToState(State::Prepared);
 }
 
@@ -256,6 +272,13 @@ void BBQPlan::compileFunctions(CompilationEffort effort)
         }
 
         m_wasmInternalFunctions[functionIndex] = WTFMove(*parseAndCompileResult);
+
+        if (m_exportedFunctionIndices.contains(functionIndex)) {
+            auto locker = holdLock(m_lock);
+            auto result = m_jsToWasmInternalFunctions.add(functionIndex, createJSToWasmWrapper(m_compilationContexts[functionIndex], signature, &m_unlinkedWasmToWasmCalls[functionIndex], m_moduleInformation.get(), m_mode, functionIndex));
+            ASSERT_UNUSED(result, result.isNewEntry);
+        }
+
         bytesCompiled += functionLength;
     }
 }
@@ -271,14 +294,14 @@ void BBQPlan::complete(const AbstractLocker& locker)
             SignatureIndex signatureIndex = m_moduleInformation->internalFunctionSignatureIndices[functionIndex];
             {
                 LinkBuffer linkBuffer(*context.wasmEntrypointJIT, nullptr);
-                m_wasmInternalFunctions[functionIndex]->wasmEntrypoint.compilation = std::make_unique<B3::Compilation>(
+                m_wasmInternalFunctions[functionIndex]->entrypoint.compilation = std::make_unique<B3::Compilation>(
                     FINALIZE_CODE(linkBuffer, ("WebAssembly function[%i] %s", functionIndex, SignatureInformation::get(signatureIndex).toString().ascii().data())),
                     WTFMove(context.wasmEntrypointByproducts));
             }
 
-            {
+            if (auto jsToWasmInternalFunction = m_jsToWasmInternalFunctions.get(functionIndex)) {
                 LinkBuffer linkBuffer(*context.jsEntrypointJIT, nullptr);
-                m_wasmInternalFunctions[functionIndex]->jsToWasmEntrypoint.compilation = std::make_unique<B3::Compilation>(
+                jsToWasmInternalFunction->entrypoint.compilation = std::make_unique<B3::Compilation>(
                     FINALIZE_CODE(linkBuffer, ("JavaScript->WebAssembly entrypoint[%i] %s", functionIndex, SignatureInformation::get(signatureIndex).toString().ascii().data())),
                     WTFMove(context.jsEntrypointByproducts));
             }
@@ -291,7 +314,7 @@ void BBQPlan::complete(const AbstractLocker& locker)
                     // FIXME imports could have been linked in B3, instead of generating a patchpoint. This condition should be replaced by a RELEASE_ASSERT. https://bugs.webkit.org/show_bug.cgi?id=166462
                     executableAddress = m_wasmToWasmExitStubs.at(call.functionIndexSpace).code().executableAddress();
                 } else
-                    executableAddress = m_wasmInternalFunctions.at(call.functionIndexSpace - m_moduleInformation->importFunctionCount())->wasmEntrypoint.compilation->code().executableAddress();
+                    executableAddress = m_wasmInternalFunctions.at(call.functionIndexSpace - m_moduleInformation->importFunctionCount())->entrypoint.compilation->code().executableAddress();
                 MacroAssembler::repatchNearCall(call.callLocation, CodeLocationLabel(executableAddress));
             }
         }
index d14184f..359f13b 100644 (file)
@@ -139,7 +139,9 @@ private:
     
     Bag<CallLinkInfo> m_callLinkInfos;
     Vector<MacroAssemblerCodeRef> m_wasmToWasmExitStubs;
-    Vector<std::unique_ptr<WasmInternalFunction>> m_wasmInternalFunctions;
+    Vector<std::unique_ptr<InternalFunction>> m_wasmInternalFunctions;
+    HashSet<uint32_t, typename DefaultHash<uint32_t>::Hash, WTF::UnsignedWithZeroKeyHashTraits<uint32_t>> m_exportedFunctionIndices;
+    HashMap<uint32_t, std::unique_ptr<InternalFunction>, typename DefaultHash<uint32_t>::Hash, WTF::UnsignedWithZeroKeyHashTraits<uint32_t>> m_jsToWasmInternalFunctions;
     Vector<CompilationContext> m_compilationContexts;
     Vector<TierUpCount> m_tierUpCounts;
 
index af18143..1b8b56f 100644 (file)
@@ -38,14 +38,17 @@ void BBQPlan::initializeCallees(const Functor& callback)
 {
     ASSERT(!failed());
     for (unsigned internalFunctionIndex = 0; internalFunctionIndex < m_wasmInternalFunctions.size(); ++internalFunctionIndex) {
-        WasmInternalFunction* function = m_wasmInternalFunctions[internalFunctionIndex].get();
 
-        Ref<Wasm::Callee> jsEntrypointCallee = Wasm::Callee::create(WTFMove(function->jsToWasmEntrypoint));
-        MacroAssembler::repatchPointer(function->jsToWasmCalleeMoveLocation, CalleeBits::boxWasm(jsEntrypointCallee.ptr()));
+        RefPtr<Wasm::Callee> jsEntrypointCallee;
+        if (auto jsToWasmFunction = m_jsToWasmInternalFunctions.get(internalFunctionIndex)) {
+            jsEntrypointCallee = Wasm::Callee::create(WTFMove(jsToWasmFunction->entrypoint));
+            MacroAssembler::repatchPointer(jsToWasmFunction->calleeMoveLocation, CalleeBits::boxWasm(jsEntrypointCallee.get()));
+        }
 
+        InternalFunction* function = m_wasmInternalFunctions[internalFunctionIndex].get();
         size_t functionIndexSpace = internalFunctionIndex + m_moduleInformation->importFunctionCount();
-        Ref<Wasm::Callee> wasmEntrypointCallee = Wasm::Callee::create(WTFMove(function->wasmEntrypoint), functionIndexSpace, m_moduleInformation->nameSection.get(functionIndexSpace));
-        MacroAssembler::repatchPointer(function->wasmCalleeMoveLocation, CalleeBits::boxWasm(wasmEntrypointCallee.ptr()));
+        Ref<Wasm::Callee> wasmEntrypointCallee = Wasm::Callee::create(WTFMove(function->entrypoint), functionIndexSpace, m_moduleInformation->nameSection.get(functionIndexSpace));
+        MacroAssembler::repatchPointer(function->calleeMoveLocation, CalleeBits::boxWasm(wasmEntrypointCallee.ptr()));
 
         callback(internalFunctionIndex, WTFMove(jsEntrypointCallee), WTFMove(wasmEntrypointCallee));
     }
index d33b7ef..323b868 100644 (file)
@@ -50,12 +50,14 @@ CodeBlock::CodeBlock(MemoryMode mode, ModuleInformation& moduleInformation)
 
         // FIXME: we should eventually collect the BBQ code.
         m_callees.resize(m_calleeCount);
-        m_jsCallees.resize(m_calleeCount);
         m_optimizedCallees.resize(m_calleeCount);
         m_wasmIndirectCallEntryPoints.resize(m_calleeCount);
 
-        m_plan->initializeCallees([&] (unsigned calleeIndex, Ref<Wasm::Callee>&& jsEntrypointCallee, Ref<Wasm::Callee>&& wasmEntrypointCallee) {
-            m_jsCallees[calleeIndex] = WTFMove(jsEntrypointCallee);
+        m_plan->initializeCallees([&] (unsigned calleeIndex, RefPtr<Wasm::Callee>&& jsEntrypointCallee, Ref<Wasm::Callee>&& wasmEntrypointCallee) {
+            if (jsEntrypointCallee) {
+                auto result = m_jsCallees.set(calleeIndex, WTFMove(jsEntrypointCallee));
+                ASSERT_UNUSED(result, result.isNewEntry);
+            }
             m_callees[calleeIndex] = WTFMove(wasmEntrypointCallee);
             m_wasmIndirectCallEntryPoints[calleeIndex] = m_callees[calleeIndex]->entrypoint();
         });
index 872b453..2dbf7e4 100644 (file)
@@ -83,7 +83,10 @@ public:
     {
         RELEASE_ASSERT(functionIndexSpace >= functionImportCount());
         unsigned calleeIndex = functionIndexSpace - functionImportCount();
-        return *m_jsCallees[calleeIndex].get();
+
+        auto callee = m_jsCallees.get(calleeIndex);
+        RELEASE_ASSERT(callee);
+        return *callee;
     }
     Callee& wasmEntrypointCalleeFromFunctionIndexSpace(unsigned functionIndexSpace)
     {
@@ -119,7 +122,7 @@ private:
     MemoryMode m_mode;
     Vector<RefPtr<Callee>> m_callees;
     Vector<RefPtr<Callee>> m_optimizedCallees;
-    Vector<RefPtr<Callee>> m_jsCallees;
+    HashMap<uint32_t, RefPtr<Callee>, typename DefaultHash<uint32_t>::Hash, WTF::UnsignedWithZeroKeyHashTraits<uint32_t>> m_jsCallees;
     Vector<void*> m_wasmIndirectCallEntryPoints;
     Vector<TierUpCount> m_tierUpCounts;
     Vector<Vector<UnlinkedWasmToWasmCall>> m_wasmToWasmCallsites;
index 29dd287..618a378 100644 (file)
@@ -269,12 +269,9 @@ struct Entrypoint {
     RegisterAtOffsetList calleeSaveRegisters;
 };
 
-struct WasmInternalFunction {
-    CodeLocationDataLabelPtr wasmCalleeMoveLocation;
-    CodeLocationDataLabelPtr jsToWasmCalleeMoveLocation;
-
-    Entrypoint wasmEntrypoint;
-    Entrypoint jsToWasmEntrypoint;
+struct InternalFunction {
+    CodeLocationDataLabelPtr calleeMoveLocation;
+    Entrypoint entrypoint;
 };
 
 struct WasmExitStubs {
index 0164877..6fd9f07 100644 (file)
@@ -93,13 +93,13 @@ void OMGPlan::work(CompilationEffort)
         FINALIZE_CODE(linkBuffer, ("WebAssembly OMG function[%i] %s", m_functionIndex, SignatureInformation::get(signatureIndex).toString().ascii().data())),
         WTFMove(context.wasmEntrypointByproducts));
 
-    omgEntrypoint.calleeSaveRegisters = WTFMove(parseAndCompileResult.value()->wasmEntrypoint.calleeSaveRegisters);
+    omgEntrypoint.calleeSaveRegisters = WTFMove(parseAndCompileResult.value()->entrypoint.calleeSaveRegisters);
 
     void* entrypoint;
     {
         ASSERT(m_codeBlock.ptr() == m_module->codeBlockFor(mode()));
         Ref<Callee> callee = Callee::create(WTFMove(omgEntrypoint), functionIndexSpace, m_moduleInformation->nameSection.get(functionIndexSpace));
-        MacroAssembler::repatchPointer(parseAndCompileResult.value()->wasmCalleeMoveLocation, CalleeBits::boxWasm(callee.ptr()));
+        MacroAssembler::repatchPointer(parseAndCompileResult.value()->calleeMoveLocation, CalleeBits::boxWasm(callee.ptr()));
         ASSERT(!m_codeBlock->m_optimizedCallees[m_functionIndex]);
         entrypoint = callee->entrypoint();
 
index eed4da6..8f25b8f 100644 (file)
@@ -1,3 +1,14 @@
+2017-06-08  Keith Miller  <keith_miller@apple.com>
+
+        WebAssembly: We should only create wrappers for functions that can be exported
+        https://bugs.webkit.org/show_bug.cgi?id=173088
+
+        Reviewed by Saam Barati.
+
+        Add quick mode for wasm tests.
+
+        * Scripts/run-jsc-stress-tests:
+
 2017-06-08  Darin Adler  <darin@apple.com>
 
         WTF tests have incorrect RefLogger lifetimes making it impossible to test with Address Sanitizer
index a468ed3..d832838 100755 (executable)
@@ -1201,10 +1201,12 @@ def runWebAssembly
     prepareExtraAbsoluteFiles(WASMTESTS_PATH, ["wasm.json"])
     prepareExtraRelativeFiles(modules.map { |f| "../" + f }, $collection)
     run("default-wasm", "-m", *FTL_OPTIONS)
-    run("wasm-no-cjit-yes-tls-context", "-m", "--useFastTLSForWasmContext=true", *(FTL_OPTIONS + NO_CJIT_OPTIONS))
-    run("wasm-eager-jettison", "-m", "--forceCodeBlockToJettisonDueToOldAge=true", *FTL_OPTIONS)
-    run("wasm-no-call-ic", "-m", "--useCallICsForWebAssemblyToJSCalls=false", *FTL_OPTIONS)
-    run("wasm-no-tls-context", "-m", "--useFastTLSForWasmContext=false", *FTL_OPTIONS)
+    if !$quickMode
+        run("wasm-no-cjit-yes-tls-context", "-m", "--useFastTLSForWasmContext=true", *(FTL_OPTIONS + NO_CJIT_OPTIONS))
+        run("wasm-eager-jettison", "-m", "--forceCodeBlockToJettisonDueToOldAge=true", *FTL_OPTIONS)
+        run("wasm-no-call-ic", "-m", "--useCallICsForWebAssemblyToJSCalls=false", *FTL_OPTIONS)
+        run("wasm-no-tls-context", "-m", "--useFastTLSForWasmContext=false", *FTL_OPTIONS)
+    end
 end
 
 def runWebAssemblyEmscripten(mode)
@@ -1217,10 +1219,12 @@ def runWebAssemblyEmscripten(mode)
     wasm = $benchmark.to_s.sub! '.js', '.wasm'
     prepareExtraRelativeFiles([Pathname('..') + wasm], $collection)
     run("default-wasm", *FTL_OPTIONS)
-    run("wasm-no-cjit-yes-tls-context", "--useFastTLSForWasmContext=true", *(FTL_OPTIONS + NO_CJIT_OPTIONS))
-    run("wasm-eager-jettison", "--forceCodeBlockToJettisonDueToOldAge=true", *FTL_OPTIONS)
-    run("wasm-no-call-ic", "--useCallICsForWebAssemblyToJSCalls=false", *FTL_OPTIONS)
-    run("wasm-no-tls-context", "--useFastTLSForWasmContext=false", *FTL_OPTIONS)
+    if !$quickMode
+        run("wasm-no-cjit-yes-tls-context", "--useFastTLSForWasmContext=true", *(FTL_OPTIONS + NO_CJIT_OPTIONS))
+        run("wasm-eager-jettison", "--forceCodeBlockToJettisonDueToOldAge=true", *FTL_OPTIONS)
+        run("wasm-no-call-ic", "--useCallICsForWebAssemblyToJSCalls=false", *FTL_OPTIONS)
+        run("wasm-no-tls-context", "--useFastTLSForWasmContext=false", *FTL_OPTIONS)
+    end
 end
 
 def runWebAssemblySpecTest(mode)