UNPKG

walt-compiler

Version:

Alternative syntax for WebAssembly text format

58 lines (52 loc) 2.29 kB
# Snapshot report for `src/utils/__tests__/debug-spec.js` The actual snapshot is saved in `debug-spec.js.snap`. Generated by [AVA](https://ava.li). ## debug prints web-assembly opcodes > Snapshot 1 ` 0 0x0: 6d736100 ; \\0asm␊ 4 0x4: 1 ; version 1 8 0x8: 1 ; Types section␊ 9 0x9: 5 ; size␊ 10 0xa: 1 ; count␊ 11 0xb: 60 ; func type (0)␊ 12 0xc: 0 ; parameter count␊ 13 0xd: 1 ; result count␊ 14 0xe: 7f ; result type i32␊ 15 0xf: 3 ; Functions section␊ 16 0x10: 2 ; size␊ 17 0x11: 1 ; count␊ 18 0x12: 0 ; type index␊ 19 0x13: 6 ; Globals section␊ 20 0x14: 6 ; size␊ 21 0x15: 1 ; count␊ 22 0x16: 7f ; i32␊ 23 0x17: 0 ; mutable␊ 24 0x18: 41 ; i32.const␊ 25 0x19: 2 ; value (2)␊ 26 0x1a: b ; end␊ 27 0x1b: 7 ; Exports section␊ 28 0x1c: 8 ; size␊ 29 0x1d: 1 ; count␊ 30 0x1e: 4 ; field␊ 31 0x1f: 65 ; e␊ 32 0x20: 63 ; c␊ 33 0x21: 68 ; h␊ 34 0x22: 6f ; o␊ 35 0x23: 0 ; Global␊ 36 0x24: 0 ; index␊ 37 0x25: a ; Code section␊ 38 0x26: d ; size␊ 39 0x27: 1 ; function count␊ 40 0x28: b ; Function echo␊ 41 0x29: 1 ; locals count␊ 42 0x2a: 1 ; number of locals of following type␊ 43 0x2b: 7f ; i32␊ 44 0x2c: 41 ; i32.const 45 0x2d: 2a ; i32.literal␊ 46 0x2e: 21 ; set_local x<i32>␊ 47 0x2f: 0 ; i32.literal␊ 48 0x30: 20 ; get_local x<i32>␊ 49 0x31: 0 ; i32.literal␊ 50 0x32: f ; return 51 0x33: b ; end␊ ============ fin =============`