Browse Source

Remove tracing test, baseline is too highly tied to the bytecode

Michael Ferris 9 năm trước cách đây
mục cha
commit
2f0a26a3b5

+ 0 - 145
test/wasm/baselines/tracing.baseline

@@ -1,145 +0,0 @@
- Function const-i32[0] ( (#2.0), #3)() {
-} = 306
- Function const-i32[0] ( (#2.0), #3)() {
-} = 306
- Function const-i64[1] ( (#2.1), #4)() {
-} = 356
- Function const-i64[1] ( (#2.1), #4)() {
-} = 356
- Function const-f32[2] ( (#2.2), #5)() {
-} = 3890.0000
- Function const-f32[2] ( (#2.2), #5)() {
-} = 3890.0000
- Function const-f64[3] ( (#2.3), #6)() {
-} = 3940.0000
- Function const-f64[3] ( (#2.3), #6)() {
-} = 3940.0000
- Function id-i32[4] ( (#2.4), #7)(32) {
-} = 32
- Function id-i32[4] ( (#2.4), #7)(3) {
-} = 3
- Function id-i64[5] ( (#2.5), #8)(32) {
-} = 32
- Function id-i64[5] ( (#2.5), #8)(3) {
-} = 3
- Function id-f32[6] ( (#2.6), #9)(32.1230) {
-} = 32.1230
- Function id-f32[6] ( (#2.6), #9)(3.0000) {
-} = 3.0000
- Function id-f64[7] ( (#2.7), #10)(32.1230) {
-} = 32.1230
- Function id-f64[7] ( (#2.7), #10)(3.0000) {
-} = 3.0000
- Function f32-i32[8] ( (#2.8), #11)(32.1230, -5) {
-} = -5
- Function f32-i32[8] ( (#2.8), #11)(3.0000, -45) {
-} = -45
- Function i32-i64[9] ( (#2.9), #12)(32, -5) {
-} = -5
- Function i32-i64[9] ( (#2.9), #12)(3, -45) {
-} = -45
- Function f64-f32[10] ( (#2.10), #13)(32.1230, -5.0000) {
-} = -5.0000
- Function f64-f32[10] ( (#2.10), #13)(3.0000, -45.1470) {
-} = -45.1470
- Function i64-f64[11] ( (#2.11), #14)(32, -5.0000) {
-} = -5.0000
- Function i64-f64[11] ( (#2.11), #14)(3, -45.1470) {
-} = -45.1470
- Function type-i32[12] ( (#2.12), #15)() {
- Function const-i32[0] ( (#2.0), #3)() {
- } = 306
-} = 306
- Function type-i32[12] ( (#2.12), #15)() {
- Function const-i32[0] ( (#2.0), #3)() {
- } = 306
-} = 306
- Function type-i64[13] ( (#2.13), #16)() {
- Function const-i64[1] ( (#2.1), #4)() {
- } = 356
-} = 356
- Function type-i64[13] ( (#2.13), #16)() {
- Function const-i64[1] ( (#2.1), #4)() {
- } = 356
-} = 356
- Function type-f32[14] ( (#2.14), #17)() {
- Function const-f32[2] ( (#2.2), #5)() {
- } = 3890.0000
-} = 3890.0000
- Function type-f32[14] ( (#2.14), #17)() {
- Function const-f32[2] ( (#2.2), #5)() {
- } = 3890.0000
-} = 3890.0000
- Function type-f64[15] ( (#2.15), #18)() {
- Function const-f64[3] ( (#2.3), #6)() {
- } = 3940.0000
-} = 3940.0000
- Function type-f64[15] ( (#2.15), #18)() {
- Function const-f64[3] ( (#2.3), #6)() {
- } = 3940.0000
-} = 3940.0000
- Function type-first-i32[16] ( (#2.16), #19)(32) {
- Function id-i32[4] ( (#2.4), #7)(32) {
- } = 32
-} = 32
- Function type-first-i32[16] ( (#2.16), #19)(3) {
- Function id-i32[4] ( (#2.4), #7)(3) {
- } = 3
-} = 3
- Function type-first-i64[17] ( (#2.17), #20)(32) {
- Function id-i64[5] ( (#2.5), #8)(32) {
- } = 32
-} = 32
- Function type-first-i64[17] ( (#2.17), #20)(3) {
- Function id-i64[5] ( (#2.5), #8)(3) {
- } = 3
-} = 3
- Function type-first-f32[18] ( (#2.18), #21)(32.1230) {
- Function id-f32[6] ( (#2.6), #9)(32.1230) {
- } = 32.1230
-} = 32.1230
- Function type-first-f32[18] ( (#2.18), #21)(3.0000) {
- Function id-f32[6] ( (#2.6), #9)(3.0000) {
- } = 3.0000
-} = 3.0000
- Function type-first-f64[19] ( (#2.19), #22)(32.1230) {
- Function id-f64[7] ( (#2.7), #10)(32.1230) {
- } = 32.1230
-} = 32.1230
- Function type-first-f64[19] ( (#2.19), #22)(3.0000) {
- Function id-f64[7] ( (#2.7), #10)(3.0000) {
- } = 3.0000
-} = 3.0000
- Function type-second-i32[20] ( (#2.20), #23)(32.1230, -5) {
- Function f32-i32[8] ( (#2.8), #11)(32.1230, -5) {
- } = -5
-} = -5
- Function type-second-i32[20] ( (#2.20), #23)(3.0000, -45) {
- Function f32-i32[8] ( (#2.8), #11)(3.0000, -45) {
- } = -45
-} = -45
- Function type-second-i64[21] ( (#2.21), #24)(32, -5) {
- Function i32-i64[9] ( (#2.9), #12)(32, -5) {
- } = -5
-} = -5
- Function type-second-i64[21] ( (#2.21), #24)(3, -45) {
- Function i32-i64[9] ( (#2.9), #12)(3, -45) {
- } = -45
-} = -45
- Function type-second-f32[22] ( (#2.22), #25)(32.1230, -5.0000) {
- Function f64-f32[10] ( (#2.10), #13)(32.1230, -5.0000) {
- } = -5.0000
-} = -5.0000
- Function type-second-f32[22] ( (#2.22), #25)(3.0000, -45.1470) {
- Function f64-f32[10] ( (#2.10), #13)(3.0000, -45.1470) {
- } = -45.1470
-} = -45.1470
- Function type-second-f64[23] ( (#2.23), #26)(32, -5.0000) {
- Function i64-f64[11] ( (#2.11), #14)(32, -5.0000) {
- } = -5.0000
-} = -5.0000
- Function type-second-f64[23] ( (#2.23), #26)(3, -45.1470) {
- Function i64-f64[11] ( (#2.11), #14)(3, -45.1470) {
- } = -45.1470
-} = -45.1470
-Done

+ 0 - 8
test/wasm/rlexe.xml

@@ -143,14 +143,6 @@
     <tags>exclude_jshost,exclude_win7</tags>
     <tags>exclude_jshost,exclude_win7</tags>
   </default>
   </default>
 </test>
 </test>
-<test>
-  <default>
-    <files>tracing.js</files>
-    <baseline>baselines/tracing.baseline</baseline>
-    <compile-flags>-wasm</compile-flags>
-    <tags>exclude_jshost,exclude_win7</tags>
-  </default>
-</test>
 <test>
 <test>
   <default>
   <default>
     <files>debugger.js</files>
     <files>debugger.js</files>

+ 11 - 3
test/wasm/tracing.js

@@ -4,6 +4,7 @@
 //-------------------------------------------------------------------------------------------------------
 //-------------------------------------------------------------------------------------------------------
 WScript.Flag("-wasmI64");
 WScript.Flag("-wasmI64");
 WScript.Flag("-trace:wasminout");
 WScript.Flag("-trace:wasminout");
+var {i64ToString} = WScript.LoadScriptFile("./wasmutils.js");
 
 
 const buf = WebAssembly.wabt.convertWast2Wasm(`
 const buf = WebAssembly.wabt.convertWast2Wasm(`
 (module
 (module
@@ -39,13 +40,20 @@ const buf = WebAssembly.wabt.convertWast2Wasm(`
   (func (export "type-second-i64") (param i32 i64) (result i64) (call $i32-i64 (get_local 0) (get_local 1)))
   (func (export "type-second-i64") (param i32 i64) (result i64) (call $i32-i64 (get_local 0) (get_local 1)))
   (func (export "type-second-f32") (param f64 f32) (result f32) (call $f64-f32 (get_local 0) (get_local 1)))
   (func (export "type-second-f32") (param f64 f32) (result f32) (call $f64-f32 (get_local 0) (get_local 1)))
   (func (export "type-second-f64") (param i64 f64) (result f64) (call $i64-f64 (get_local 0) (get_local 1)))
   (func (export "type-second-f64") (param i64 f64) (result f64) (call $i64-f64 (get_local 0) (get_local 1)))
-)`)
+)`);
 
 
 WebAssembly.instantiate(buf)
 WebAssembly.instantiate(buf)
   .then(({instance: {exports}}) => {
   .then(({instance: {exports}}) => {
     for (const key in exports) {
     for (const key in exports) {
-      exports[key](32.123, -5);
-      exports[key](3, -45.147);
+      const res1 = exports[key](32.123, -5);
+      const res2 = exports[key](3, -45.147);
+      if (key.endsWith("i64")) {
+        console.log(i64ToString(res1));
+        console.log(i64ToString(res2));
+      } else {
+        console.log(res1);
+        console.log(res2);
+      }
     }
     }
     return "Done";
     return "Done";
   })
   })