summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/wasm-only.asm.js2
-rw-r--r--test/wasm-only.fromasm3
-rw-r--r--test/wasm-only.fromasm.imprecise3
-rw-r--r--test/wasm-only.fromasm.imprecise.no-opts3
-rw-r--r--test/wasm-only.fromasm.no-opts3
5 files changed, 10 insertions, 4 deletions
diff --git a/test/wasm-only.asm.js b/test/wasm-only.asm.js
index eab63ba2b..e4ec8b5f7 100644
--- a/test/wasm-only.asm.js
+++ b/test/wasm-only.asm.js
@@ -237,6 +237,8 @@ function asm(global, env, buffer) {
switch64(i64(0)) | 0;
}
+ var FUNCTION_TABLE_X = [illegalImport]; // must stay ok in the table, not legalized, as it will be called internally by the true type
+
return { test64: test64, illegalParam : illegalParam, illegalResult: illegalResult, keepAlive: keepAlive };
}
diff --git a/test/wasm-only.fromasm b/test/wasm-only.fromasm
index 1c5030527..b36cc536c 100644
--- a/test/wasm-only.fromasm
+++ b/test/wasm-only.fromasm
@@ -8,9 +8,10 @@
(import "env" "illegalImport" (func $legalimport$illegalImport (param f64 i32 i32 i32)))
(import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32)))
(import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
+ (import "env" "table" (table 1 1 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $tableBase) $illegalImport)
(data (get_global $memoryBase) "wasm-only.asm.js")
(global $tempRet0 (mut i32) (i32.const 0))
(export "test64" (func $test64))
diff --git a/test/wasm-only.fromasm.imprecise b/test/wasm-only.fromasm.imprecise
index 4b129cdbe..b7cc3a482 100644
--- a/test/wasm-only.fromasm.imprecise
+++ b/test/wasm-only.fromasm.imprecise
@@ -8,9 +8,10 @@
(import "env" "illegalImport" (func $legalimport$illegalImport (param f64 i32 i32 i32)))
(import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32)))
(import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
+ (import "env" "table" (table 1 1 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $tableBase) $illegalImport)
(global $tempRet0 (mut i32) (i32.const 0))
(export "test64" (func $test64))
(export "illegalParam" (func $legalstub$illegalParam))
diff --git a/test/wasm-only.fromasm.imprecise.no-opts b/test/wasm-only.fromasm.imprecise.no-opts
index 9830e9b2c..542b0cad2 100644
--- a/test/wasm-only.fromasm.imprecise.no-opts
+++ b/test/wasm-only.fromasm.imprecise.no-opts
@@ -8,9 +8,10 @@
(import "env" "illegalImport" (func $legalimport$illegalImport (param f64 i32 i32 i32)))
(import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32)))
(import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
+ (import "env" "table" (table 1 1 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $tableBase) $illegalImport)
(global $tempRet0 (mut i32) (i32.const 0))
(export "test64" (func $test64))
(export "illegalParam" (func $legalstub$illegalParam))
diff --git a/test/wasm-only.fromasm.no-opts b/test/wasm-only.fromasm.no-opts
index 9ecc9a1df..1f0760e6b 100644
--- a/test/wasm-only.fromasm.no-opts
+++ b/test/wasm-only.fromasm.no-opts
@@ -8,9 +8,10 @@
(import "env" "illegalImport" (func $legalimport$illegalImport (param f64 i32 i32 i32)))
(import "env" "illegalImportResult" (func $legalimport$illegalImportResult (result i32)))
(import "env" "memory" (memory $0 256 256))
- (import "env" "table" (table 0 0 anyfunc))
+ (import "env" "table" (table 1 1 anyfunc))
(import "env" "memoryBase" (global $memoryBase i32))
(import "env" "tableBase" (global $tableBase i32))
+ (elem (get_global $tableBase) $illegalImport)
(global $tempRet0 (mut i32) (i32.const 0))
(export "test64" (func $test64))
(export "illegalParam" (func $legalstub$illegalParam))