From 71a48f2dbd7de3ba8042556e0e3d4d301aeedc69 Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Sat, 17 Oct 2015 17:06:26 +0200 Subject: [PATCH 1/6] Transformed the test into a normal wasm program. --- ml-proto/test/imports.wast | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ml-proto/test/imports.wast b/ml-proto/test/imports.wast index 6e11899461..647f513b30 100644 --- a/ml-proto/test/imports.wast +++ b/ml-proto/test/imports.wast @@ -17,9 +17,9 @@ (f64.const 53) ) ) - (export "print32" $print32) - (export "print64" $print64) + (func main + (invoke "print32" (i32.const 13)) + (invoke "print64" (i64.const 24)) + ) ) -(invoke "print32" (i32.const 13)) -(invoke "print64" (i64.const 24)) From 5131a8b5064b70e1dbd519a9bf53872bc997b774 Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Mon, 19 Oct 2015 20:13:08 +0200 Subject: [PATCH 2/6] Rename $main to $init in imports.wast --- ml-proto/test/imports.wast | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ml-proto/test/imports.wast b/ml-proto/test/imports.wast index 647f513b30..398711159f 100644 --- a/ml-proto/test/imports.wast +++ b/ml-proto/test/imports.wast @@ -17,7 +17,7 @@ (f64.const 53) ) ) - (func main + (func $init (invoke "print32" (i32.const 13)) (invoke "print64" (i64.const 24)) ) From 36949146d0419636be24d949e23cb5a28d112695 Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Tue, 20 Oct 2015 13:41:52 +0200 Subject: [PATCH 3/6] Invoke -> call, fixed false function identifies --- ml-proto/test/imports.wast | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ml-proto/test/imports.wast b/ml-proto/test/imports.wast index 398711159f..1d8aa8be84 100644 --- a/ml-proto/test/imports.wast +++ b/ml-proto/test/imports.wast @@ -18,8 +18,8 @@ ) ) (func $init - (invoke "print32" (i32.const 13)) - (invoke "print64" (i64.const 24)) + (call $print32 (i32.const 13)) + (call $print64 (i64.const 24)) ) ) From 93a55d84d697984c849b819325928d3965a09cc9 Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Sun, 25 Oct 2015 22:14:01 +0100 Subject: [PATCH 4/6] Update has_feature.wast --- ml-proto/test/has_feature.wast | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/ml-proto/test/has_feature.wast b/ml-proto/test/has_feature.wast index e69be15f7c..df3c8cd7e0 100644 --- a/ml-proto/test/has_feature.wast +++ b/ml-proto/test/has_feature.wast @@ -1,12 +1,9 @@ (module - (func $has_wasm (result i32) - (has_feature "wasm")) - (export "has_wasm" $has_wasm) - - (func $has_simd128 (result i32) - (has_feature "simd128")) - (export "has_simd128" $has_simd128) + (import $assert_eq "assert" "eq_i32" (param i32) (param i32)) + (fund $init + (call_import $assert_eq (has_feature "simd128") (i32.const 1)) + (call_import $assert_eq (has_feature "wasm") (i32.const 0)) + ) ) -(assert_return (invoke "has_wasm") (i32.const 1)) -(assert_return (invoke "has_simd128") (i32.const 0)) + From b153eb227ab1620138692fbcde55f1a75c1c884e Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Mon, 26 Oct 2015 11:31:28 +0100 Subject: [PATCH 5/6] Update has_feature.wast --- ml-proto/test/has_feature.wast | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ml-proto/test/has_feature.wast b/ml-proto/test/has_feature.wast index df3c8cd7e0..529c34143b 100644 --- a/ml-proto/test/has_feature.wast +++ b/ml-proto/test/has_feature.wast @@ -1,6 +1,6 @@ (module (import $assert_eq "assert" "eq_i32" (param i32) (param i32)) - (fund $init + (fund $main (call_import $assert_eq (has_feature "simd128") (i32.const 1)) (call_import $assert_eq (has_feature "wasm") (i32.const 0)) ) From 3449cd00159979805ce2ea6b81a922dbaead2e88 Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Mon, 26 Oct 2015 11:31:37 +0100 Subject: [PATCH 6/6] Update imports.wast --- ml-proto/test/imports.wast | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ml-proto/test/imports.wast b/ml-proto/test/imports.wast index 1d8aa8be84..35e4f01787 100644 --- a/ml-proto/test/imports.wast +++ b/ml-proto/test/imports.wast @@ -17,7 +17,7 @@ (f64.const 53) ) ) - (func $init + (func $main (call $print32 (i32.const 13)) (call $print64 (i64.const 24)) )