wat4wasm 1.0.8 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/examples/01-text/module-output.wat +3 -35
- package/examples/02-include/module-output.wat +2 -2
- package/examples/03-ref.extern/module-output.wat +31 -549
- package/examples/04-ref.func/module-output.wat +3 -4
- package/examples/05-global.get/module-output.wat +19 -269
- package/examples/06-async/module-output.wat +5 -215
- package/examples/07-data/module-output.wasm +0 -0
- package/examples/08-reflectors/module-output.wat +50 -264
- package/examples/09-replaceAll/module-output.wat +3 -1
- package/examples/99-complex/apply_1.js +5 -0
- package/examples/99-complex/output.html +1 -1
- package/examples/shell-usages.sh +10 -23
- package/lib/clean.js +27 -30
- package/lib/cli.js +29 -2
- package/lib/index.js +5 -5
- package/package.json +1 -1
- package/wat4wasm +57 -15
|
@@ -9,47 +9,13 @@
|
|
|
9
9
|
(import "Reflect" "apply" (func $self.Reflect.apply<ext.ext.ext>ext (param externref externref externref) (result externref)))
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
(func $main
|
|
13
|
-
(table.get $wat4wasm (i32.const 1));; hello world
|
|
14
|
-
|
|
15
|
-
(drop)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
(block (; "hello world" ;)
|
|
19
|
-
(result externref)
|
|
20
|
-
(global.set $wat4wasm (call $self.Array<>ext))
|
|
21
|
-
|
|
22
|
-
(call $self.Reflect.set<ext.i32.i32> (global.get $wat4wasm) (i32.const 0) (i32.const 104))
|
|
23
|
-
(call $self.Reflect.set<ext.i32.i32> (global.get $wat4wasm) (i32.const 1) (i32.const 101))
|
|
24
|
-
(call $self.Reflect.set<ext.i32.i32> (global.get $wat4wasm) (i32.const 2) (i32.const 108))
|
|
25
|
-
(call $self.Reflect.set<ext.i32.i32> (global.get $wat4wasm) (i32.const 3) (i32.const 108))
|
|
26
|
-
(call $self.Reflect.set<ext.i32.i32> (global.get $wat4wasm) (i32.const 4) (i32.const 111))
|
|
27
|
-
(call $self.Reflect.set<ext.i32.i32> (global.get $wat4wasm) (i32.const 5) (i32.const 32))
|
|
28
|
-
(call $self.Reflect.set<ext.i32.i32> (global.get $wat4wasm) (i32.const 6) (i32.const 119))
|
|
29
|
-
(call $self.Reflect.set<ext.i32.i32> (global.get $wat4wasm) (i32.const 7) (i32.const 111))
|
|
30
|
-
(call $self.Reflect.set<ext.i32.i32> (global.get $wat4wasm) (i32.const 8) (i32.const 114))
|
|
31
|
-
(call $self.Reflect.set<ext.i32.i32> (global.get $wat4wasm) (i32.const 9) (i32.const 108))
|
|
32
|
-
(call $self.Reflect.set<ext.i32.i32> (global.get $wat4wasm) (i32.const 10) (i32.const 100))
|
|
33
|
-
|
|
34
|
-
(call $self.Reflect.apply<ext.ext.ext>ext
|
|
35
|
-
(global.get $self.String.fromCharCode)
|
|
36
|
-
(ref.null extern)
|
|
37
|
-
(global.get $wat4wasm)
|
|
38
|
-
)
|
|
39
|
-
;; stacked
|
|
40
|
-
|
|
41
|
-
(global.set $wat4wasm (ref.null extern))
|
|
42
|
-
;; cleared
|
|
43
|
-
)
|
|
44
12
|
|
|
45
|
-
(drop)
|
|
46
|
-
)
|
|
47
13
|
|
|
48
14
|
(global $wat4wasm (mut externref) (ref.null extern))
|
|
49
15
|
|
|
50
16
|
(table $wat4wasm 2 externref)
|
|
51
17
|
|
|
52
|
-
|
|
18
|
+
(elem $wat4wasm declare func)
|
|
53
19
|
|
|
54
20
|
|
|
55
21
|
(func $wat4wasm
|
|
@@ -225,4 +191,6 @@
|
|
|
225
191
|
(data $wat4wasm "\0f\00\00\00\68\65\6c\6c\6f\20\77\6f\72\6c\64")
|
|
226
192
|
|
|
227
193
|
(memory $wat4wasm 1)
|
|
194
|
+
|
|
195
|
+
(start $wat4wasm)
|
|
228
196
|
)
|