Commit 33be329
Add WasmSyntax IR and WAT text format writer
Add WasmGC backend infrastructure:
- src/wasm/syntax.sml: WasmSyntax module defining the Wasm binary AST
including value types, heap types, GC instructions (struct/array/i31),
reference instructions, exception handling (try_table), and module
structure (types, funcs, imports, exports, data, elem, etc.)
- src/wasm/wat-writer.sml: WAT text format writer for debugging,
outputting S-expression format with proper indentation and escaping
- Update Makefile and lunarml-common.mlb to include new sources
- Update .gitignore for test/wasm build artifacts
- Add test/wasm/ with factorial/fibonacci test (fact-fib.sml, Makefile,
test-fact-fib.mjs) for future Wasm backend validation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent c369b71 commit 33be329
File tree
9 files changed
+1496
-0
lines changed- src
- wasm
- test/wasm
9 files changed
+1496
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
| |||
0 commit comments