Commit 1911acb3f97dde2484d79904419eb7e656a3a336
added miising test files
Signed-off-by: wanderer <mjbecze@gmail.com>wanderer committed on 3/1/2018, 10:36:10 PM
Parent: e5f317ee074967d082a366e35035d77ef081fa84
Files changed
tests/wasm/globals.wasm | ||
---|---|---|
@@ -1,0 +1,4 @@ | ||
1 | + asm globals `` ` +memoryexternalize memoryinternalize A~A~memory load store | |
2 | + | |
3 | + A A $ # A AA | |
4 | + A test |
tests/wasm/private_caller.wasm | ||
---|---|---|
@@ -1,0 +1,2 @@ | ||
1 | + asm types`` typeMap ` `` 4funcinternalize funcexternalize testcheck p memory table call A | |
2 | + A A A A |
tests/wast/globals.wast | ||
---|---|---|
@@ -1,0 +1,23 @@ | ||
1 | +(module | |
2 | + (import "memory" "externalize" (func $externalize (param i32 i32) (result i32))) | |
3 | + (import "memory" "internalize" (func $internalize (param i32 i32 i32 i32))) | |
4 | + (global (mut i32) (i32.const -2)) | |
5 | + (global (mut i32) (i32.const -2)) | |
6 | + (memory (export "memory") 1) | |
7 | + (data (i32.const 0) "test") | |
8 | + (func $store | |
9 | + i32.const 0 | |
10 | + i32.const 4 | |
11 | + call $externalize | |
12 | + set_global 0 | |
13 | + ) | |
14 | + | |
15 | + (func $load | |
16 | + get_global 0 | |
17 | + i32.const 0 | |
18 | + i32.const 5 | |
19 | + i32.const 4 | |
20 | + call $internalize | |
21 | + ) | |
22 | + (export "load" (func $load)) | |
23 | + (export "store" (func $store))) |
tests/wast/private_caller.json | ||
---|---|---|
@@ -1,0 +1,12 @@ | ||
1 | +{ | |
2 | + "types": [{ | |
3 | + "form": "func", | |
4 | + "params": [ | |
5 | + "func" | |
6 | + ] | |
7 | + }], | |
8 | + "typeMap": [{ | |
9 | + "func": 0, | |
10 | + "type": 0 | |
11 | + }] | |
12 | +} |
tests/wast/private_caller.wasm | ||
---|---|---|
@@ -1,0 +1,2 @@ | ||
1 | + asm ` `` 4funcinternalize funcexternalize testcheck p memory table call A | |
2 | + A A A A |
tests/wast/private_caller.wast | ||
---|---|---|
@@ -1,0 +1,22 @@ | ||
1 | +(module | |
2 | + (import "func" "internalize" (func $internalize (param i32 i32))) | |
3 | + (import "func" "externalize" (func $externalize (param i32) (result i32))) | |
4 | + (import "test" "check" (func $check (param i32 i32))) | |
5 | + (memory (export "memory") 1) | |
6 | + (table (export "table") 1 anyfunc) | |
7 | + (elem (i32.const 0) $callback) | |
8 | + (func $call (param i32) | |
9 | + i32.const 0 | |
10 | + call $externalize | |
11 | + i32.const 0 | |
12 | + get_local 0 | |
13 | + call $internalize | |
14 | + i32.const 0 | |
15 | + call_indirect (param i32) | |
16 | + ) | |
17 | + (func $callback (param i32) | |
18 | + get_local 0 | |
19 | + i32.const 5 | |
20 | + call $check | |
21 | + ) | |
22 | + (export "call" (func $call))) |
Built with git-ssb-web