walt-compiler
Version:
Alternative syntax for WebAssembly text format
487 lines (481 loc) • 23.1 kB
Markdown
# Snapshot report for `src/__tests__/object-literal-spec.js`
The actual snapshot is saved in `object-literal-spec.js.snap`.
Generated by [AVA](https://ava.li).
## objects
> Snapshot 1
`00000000: 6d736100 ; \\0asm␊
00000004: 1 ; version 1␊
00000008: 1 ; Types section␊
00000009: 14 ; size␊
0000000a: 4 ; count␊
0000000b: 60 ; func type (0)␊
0000000c: 1 ; parameter count␊
0000000d: 7f ; param␊
0000000e: 1 ; result count␊
0000000f: 7f ; result type i32␊
00000010: 60 ; func type (1)␊
00000011: 0 ; parameter count␊
00000012: 1 ; result count␊
00000013: 7f ; result type i32␊
00000014: 60 ; func type (2)␊
00000015: 0 ; parameter count␊
00000016: 1 ; result count␊
00000017: 7d ; result type f32␊
00000018: 60 ; func type (3)␊
00000019: 2 ; parameter count␊
0000001a: 7f ; param␊
0000001b: 7f ; param␊
0000001c: 1 ; result count␊
0000001d: 7f ; result type i32␊
0000001e: 3 ; Functions section␊
0000001f: 6 ; size␊
00000020: 5 ; count␊
00000021: 0 ; type index␊
00000022: 1 ; type index␊
00000023: 1 ; type index␊
00000024: 2 ; type index␊
00000025: 3 ; type index␊
00000026: 5 ; Memory section␊
00000027: 3 ; size␊
00000028: 1 ; count␊
00000029: 0 ; has no max␊
0000002a: 1 ; initial memory size(PAGES)␊
0000002b: 6 ; Globals section␊
0000002c: 6 ; size␊
0000002d: 1 ; count␊
0000002e: 7f ; i32␊
0000002f: 1 ; mutable␊
00000030: 41 ; i32.const␊
00000031: 0 ; value (0)␊
00000032: b ; end␊
00000033: 7 ; Exports section␊
00000034: 53 ; size␊
00000035: 4 ; count␊
00000036: d ; field␊
00000037: 74 ; t␊
00000038: 65 ; e␊
00000039: 73 ; s␊
0000003a: 74 ; t␊
0000003b: 53 ; S␊
0000003c: 75 ; u␊
0000003d: 62 ; b␊
0000003e: 73 ; s␊
0000003f: 63 ; c␊
00000040: 72 ; r␊
00000041: 69 ; i␊
00000042: 70 ; p␊
00000043: 74 ; t␊
00000044: 0 ; Global␊
00000045: 1 ; index␊
00000046: d ; field␊
00000047: 74 ; t␊
00000048: 65 ; e␊
00000049: 73 ; s␊
0000004a: 74 ; t␊
0000004b: 41 ; A␊
0000004c: 6c ; l␊
0000004d: 69 ; i␊
0000004e: 67 ; g␊
0000004f: 6e ; n␊
00000050: 6d ; m␊
00000051: 65 ; e␊
00000052: 6e ; n␊
00000053: 74 ; t␊
00000054: 0 ; Global␊
00000055: 2 ; index␊
00000056: 17 ; field␊
00000057: 74 ; t␊
00000058: 65 ; e␊
00000059: 73 ; s␊
0000005a: 74 ; t␊
0000005b: 4d ; M␊
0000005c: 69 ; i␊
0000005d: 78 ; x␊
0000005e: 65 ; e␊
0000005f: 64 ; d␊
00000060: 54 ; T␊
00000061: 79 ; y␊
00000062: 70 ; p␊
00000063: 65 ; e␊
00000064: 50 ; P␊
00000065: 72 ; r␊
00000066: 6f ; o␊
00000067: 70 ; p␊
00000068: 65 ; e␊
00000069: 72 ; r␊
0000006a: 74 ; t␊
0000006b: 69 ; i␊
0000006c: 65 ; e␊
0000006d: 73 ; s␊
0000006e: 0 ; Global␊
0000006f: 3 ; index␊
00000070: 15 ; field␊
00000071: 74 ; t␊
00000072: 65 ; e␊
00000073: 73 ; s␊
00000074: 74 ; t␊
00000075: 4f ; O␊
00000076: 62 ; b␊
00000077: 6a ; j␊
00000078: 65 ; e␊
00000079: 63 ; c␊
0000007a: 74 ; t␊
0000007b: 53 ; S␊
0000007c: 79 ; y␊
0000007d: 6e ; n␊
0000007e: 74 ; t␊
0000007f: 61 ; a␊
00000080: 78 ; x␊
00000081: 53 ; S␊
00000082: 75 ; u␊
00000083: 67 ; g␊
00000084: 61 ; a␊
00000085: 72 ; r␊
00000086: 0 ; Global␊
00000087: 4 ; index␊
00000088: a ; Code section␊
00000089: d7,2 ; size␊
0000008b: 5 ; function count␊
0000008c: 12 ; Function malloc␊
0000008d: 1 ; locals count␊
0000008e: 1 ; number of locals of following type␊
0000008f: 7f ; i32␊
00000090: 23 ; get_global MEMORY_OFFSET<i32>␊
00000091: 0 ; i32.literal␊
00000092: 21 ; set_local addr<i32>␊
00000093: 1 ; i32.literal␊
00000094: 23 ; get_global MEMORY_OFFSET<i32>␊
00000095: 0 ; i32.literal␊
00000096: 20 ; get_local size_t<i32>␊
00000097: 0 ; i32.literal␊
00000098: 6a ; i32.add ␊
00000099: 24 ; set_global MEMORY_OFFSET<i32>␊
0000009a: 0 ; i32.literal␊
0000009b: 20 ; get_local addr<i32>␊
0000009c: 1 ; i32.literal␊
0000009d: f ; return ␊
0000009e: b ; end␊
0000009f: 30 ; Function testSubscript␊
000000a0: 1 ; locals count␊
000000a1: 1 ; number of locals of following type␊
000000a2: 7f ; i32␊
000000a3: 41 ; i32.const ␊
000000a4: c ; i32.literal␊
000000a5: 10 ; call malloc<i32>␊
000000a6: 0 ; i32.literal␊
000000a7: 21 ; set_local obj<TestType>␊
000000a8: 0 ; i32.literal␊
000000a9: 20 ; get_local obj<TestType>␊
000000aa: 0 ; i32.literal␊
000000ab: 41 ; i32.const ␊
000000ac: 0 ; i32.literal␊
000000ad: 6a ; i32.add ␊
000000ae: 41 ; i32.const ␊
000000af: 2 ; i32.literal␊
000000b0: 36 ; i32.store ␊
000000b1: 2 ; memory_immediate␊
000000b2: 0 ; memory_immediate␊
000000b3: 20 ; get_local obj<TestType>␊
000000b4: 0 ; i32.literal␊
000000b5: 41 ; i32.const ␊
000000b6: 4 ; i32.literal␊
000000b7: 6a ; i32.add ␊
000000b8: 41 ; i32.const ␊
000000b9: 2 ; i32.literal␊
000000ba: 36 ; i32.store ␊
000000bb: 2 ; memory_immediate␊
000000bc: 0 ; memory_immediate␊
000000bd: 20 ; get_local obj<TestType>␊
000000be: 0 ; i32.literal␊
000000bf: 41 ; i32.const ␊
000000c0: 0 ; i32.literal␊
000000c1: 6a ; i32.add ␊
000000c2: 28 ; i32.load ␊
000000c3: 2 ; memory_immediate␊
000000c4: 0 ; memory_immediate␊
000000c5: 20 ; get_local obj<TestType>␊
000000c6: 0 ; i32.literal␊
000000c7: 41 ; i32.const ␊
000000c8: 4 ; i32.literal␊
000000c9: 6a ; i32.add ␊
000000ca: 28 ; i32.load ␊
000000cb: 2 ; memory_immediate␊
000000cc: 0 ; memory_immediate␊
000000cd: 6a ; i32.add ␊
000000ce: f ; return ␊
000000cf: b ; end␊
000000d0: 70 ; Function testAlignment␊
000000d1: 2 ; locals count␊
000000d2: 1 ; number of locals of following type␊
000000d3: 7f ; i32␊
000000d4: 1 ; number of locals of following type␊
000000d5: 7f ; i32␊
000000d6: 41 ; i32.const ␊
000000d7: c ; i32.literal␊
000000d8: 10 ; call malloc<i32>␊
000000d9: 0 ; i32.literal␊
000000da: 21 ; set_local obj<TestType>␊
000000db: 0 ; i32.literal␊
000000dc: 20 ; get_local obj<TestType>␊
000000dd: 0 ; i32.literal␊
000000de: 21 ; set_local lens<i32>␊
000000df: 1 ; i32.literal␊
000000e0: 20 ; get_local obj<TestType>␊
000000e1: 0 ; i32.literal␊
000000e2: 41 ; i32.const ␊
000000e3: 0 ; i32.literal␊
000000e4: 6a ; i32.add ␊
000000e5: 41 ; i32.const ␊
000000e6: 1 ; i32.literal␊
000000e7: 36 ; i32.store ␊
000000e8: 2 ; memory_immediate␊
000000e9: 0 ; memory_immediate␊
000000ea: 20 ; get_local obj<TestType>␊
000000eb: 0 ; i32.literal␊
000000ec: 41 ; i32.const ␊
000000ed: 4 ; i32.literal␊
000000ee: 6a ; i32.add ␊
000000ef: 41 ; i32.const ␊
000000f0: 1 ; i32.literal␊
000000f1: 36 ; i32.store ␊
000000f2: 2 ; memory_immediate␊
000000f3: 0 ; memory_immediate␊
000000f4: 20 ; get_local obj<TestType>␊
000000f5: 0 ; i32.literal␊
000000f6: 41 ; i32.const ␊
000000f7: 8 ; i32.literal␊
000000f8: 6a ; i32.add ␊
000000f9: 41 ; i32.const ␊
000000fa: 1 ; i32.literal␊
000000fb: 36 ; i32.store ␊
000000fc: 2 ; memory_immediate␊
000000fd: 0 ; memory_immediate␊
000000fe: 20 ; get_local lens<i32>␊
000000ff: 1 ; i32.literal␊
00000100: 41 ; i32.const ␊
00000101: 0 ; i32.literal␊
00000102: 41 ; i32.const ␊
00000103: 2 ; i32.literal␊
00000104: 74 ; i32.shl ␊
00000105: 6a ; i32.add ␊
00000106: 41 ; i32.const ␊
00000107: 2 ; i32.literal␊
00000108: 36 ; i32.store ␊
00000109: 2 ; memory_immediate␊
0000010a: 0 ; memory_immediate␊
0000010b: 20 ; get_local lens<i32>␊
0000010c: 1 ; i32.literal␊
0000010d: 41 ; i32.const ␊
0000010e: 1 ; i32.literal␊
0000010f: 41 ; i32.const ␊
00000110: 2 ; i32.literal␊
00000111: 74 ; i32.shl ␊
00000112: 6a ; i32.add ␊
00000113: 41 ; i32.const ␊
00000114: 2 ; i32.literal␊
00000115: 36 ; i32.store ␊
00000116: 2 ; memory_immediate␊
00000117: 0 ; memory_immediate␊
00000118: 20 ; get_local lens<i32>␊
00000119: 1 ; i32.literal␊
0000011a: 41 ; i32.const ␊
0000011b: 2 ; i32.literal␊
0000011c: 41 ; i32.const ␊
0000011d: 2 ; i32.literal␊
0000011e: 74 ; i32.shl ␊
0000011f: 6a ; i32.add ␊
00000120: 41 ; i32.const ␊
00000121: 2 ; i32.literal␊
00000122: 36 ; i32.store ␊
00000123: 2 ; memory_immediate␊
00000124: 0 ; memory_immediate␊
00000125: 20 ; get_local obj<TestType>␊
00000126: 0 ; i32.literal␊
00000127: 41 ; i32.const ␊
00000128: 0 ; i32.literal␊
00000129: 6a ; i32.add ␊
0000012a: 28 ; i32.load ␊
0000012b: 2 ; memory_immediate␊
0000012c: 0 ; memory_immediate␊
0000012d: 20 ; get_local obj<TestType>␊
0000012e: 0 ; i32.literal␊
0000012f: 41 ; i32.const ␊
00000130: 4 ; i32.literal␊
00000131: 6a ; i32.add ␊
00000132: 28 ; i32.load ␊
00000133: 2 ; memory_immediate␊
00000134: 0 ; memory_immediate␊
00000135: 6a ; i32.add ␊
00000136: 20 ; get_local obj<TestType>␊
00000137: 0 ; i32.literal␊
00000138: 41 ; i32.const ␊
00000139: 8 ; i32.literal␊
0000013a: 6a ; i32.add ␊
0000013b: 28 ; i32.load ␊
0000013c: 2 ; memory_immediate␊
0000013d: 0 ; memory_immediate␊
0000013e: 6a ; i32.add ␊
0000013f: f ; return ␊
00000140: b ; end␊
00000141: 34 ; Function testMixedTypeProperties␊
00000142: 1 ; locals count␊
00000143: 1 ; number of locals of following type␊
00000144: 7f ; i32␊
00000145: 41 ; i32.const ␊
00000146: 18 ; i32.literal␊
00000147: 10 ; call malloc<i32>␊
00000148: 0 ; i32.literal␊
00000149: 21 ; set_local obj<MixedType>␊
0000014a: 0 ; i32.literal␊
0000014b: 20 ; get_local obj<MixedType>␊
0000014c: 0 ; i32.literal␊
0000014d: 41 ; i32.const ␊
0000014e: 8 ; i32.literal␊
0000014f: 6a ; i32.add ␊
00000150: 41 ; i32.const ␊
00000151: 4 ; i32.literal␊
00000152: ac ; i64.extend_s/i32 ␊
00000153: 37 ; i64.store ␊
00000154: 2 ; memory_immediate␊
00000155: 0 ; memory_immediate␊
00000156: 20 ; get_local obj<MixedType>␊
00000157: 0 ; i32.literal␊
00000158: 41 ; i32.const ␊
00000159: 10 ; i32.literal␊
0000015a: 6a ; i32.add ␊
0000015b: 41 ; i32.const ␊
0000015c: 4 ; i32.literal␊
0000015d: b7 ; f64.convert_s/i32 ␊
0000015e: 39 ; f64.store ␊
0000015f: 2 ; memory_immediate␊
00000160: 0 ; memory_immediate␊
00000161: 20 ; get_local obj<MixedType>␊
00000162: 0 ; i32.literal␊
00000163: 41 ; i32.const ␊
00000164: 8 ; i32.literal␊
00000165: 6a ; i32.add ␊
00000166: 29 ; i64.load ␊
00000167: 2 ; memory_immediate␊
00000168: 0 ; memory_immediate␊
00000169: b9 ; f64.convert_s/i64 ␊
0000016a: 20 ; get_local obj<MixedType>␊
0000016b: 0 ; i32.literal␊
0000016c: 41 ; i32.const ␊
0000016d: 10 ; i32.literal␊
0000016e: 6a ; i32.add ␊
0000016f: 2b ; f64.load ␊
00000170: 2 ; memory_immediate␊
00000171: 0 ; memory_immediate␊
00000172: a0 ; f64.add ␊
00000173: b6 ; f32.demote/f64 ␊
00000174: f ; return ␊
00000175: b ; end␊
00000176: 6b ; Function testObjectSyntaxSugar␊
00000177: 2 ; locals count␊
00000178: 1 ; number of locals of following type␊
00000179: 7f ; i32␊
0000017a: 1 ; number of locals of following type␊
0000017b: 7f ; i32␊
0000017c: 41 ; i32.const ␊
0000017d: c ; i32.literal␊
0000017e: 10 ; call malloc<i32>␊
0000017f: 0 ; i32.literal␊
00000180: 21 ; set_local obj<TestType>␊
00000181: 2 ; i32.literal␊
00000182: 41 ; i32.const ␊
00000183: c ; i32.literal␊
00000184: 10 ; call malloc<i32>␊
00000185: 0 ; i32.literal␊
00000186: 21 ; set_local obj2<TestType>␊
00000187: 3 ; i32.literal␊
00000188: 20 ; get_local obj2<TestType>␊
00000189: 3 ; i32.literal␊
0000018a: 41 ; i32.const ␊
0000018b: 4 ; i32.literal␊
0000018c: 6a ; i32.add ␊
0000018d: 41 ; i32.const ␊
0000018e: 2 ; i32.literal␊
0000018f: 36 ; i32.store ␊
00000190: 2 ; memory_immediate␊
00000191: 0 ; memory_immediate␊
00000192: 20 ; get_local obj2<TestType>␊
00000193: 3 ; i32.literal␊
00000194: 41 ; i32.const ␊
00000195: 0 ; i32.literal␊
00000196: 6a ; i32.add ␊
00000197: 20 ; get_local x<i32>␊
00000198: 1 ; i32.literal␊
00000199: 36 ; i32.store ␊
0000019a: 2 ; memory_immediate␊
0000019b: 0 ; memory_immediate␊
0000019c: 20 ; get_local obj<TestType>␊
0000019d: 2 ; i32.literal␊
0000019e: 41 ; i32.const ␊
0000019f: 0 ; i32.literal␊
000001a0: 6a ; i32.add ␊
000001a1: 20 ; get_local obj2<TestType>␊
000001a2: 3 ; i32.literal␊
000001a3: 41 ; i32.const ␊
000001a4: 0 ; i32.literal␊
000001a5: 6a ; i32.add ␊
000001a6: 28 ; i32.load ␊
000001a7: 2 ; memory_immediate␊
000001a8: 0 ; memory_immediate␊
000001a9: 36 ; i32.store ␊
000001aa: 2 ; memory_immediate␊
000001ab: 0 ; memory_immediate␊
000001ac: 20 ; get_local obj<TestType>␊
000001ad: 2 ; i32.literal␊
000001ae: 41 ; i32.const ␊
000001af: 4 ; i32.literal␊
000001b0: 6a ; i32.add ␊
000001b1: 20 ; get_local obj2<TestType>␊
000001b2: 3 ; i32.literal␊
000001b3: 41 ; i32.const ␊
000001b4: 4 ; i32.literal␊
000001b5: 6a ; i32.add ␊
000001b6: 28 ; i32.load ␊
000001b7: 2 ; memory_immediate␊
000001b8: 0 ; memory_immediate␊
000001b9: 36 ; i32.store ␊
000001ba: 2 ; memory_immediate␊
000001bb: 0 ; memory_immediate␊
000001bc: 20 ; get_local obj<TestType>␊
000001bd: 2 ; i32.literal␊
000001be: 41 ; i32.const ␊
000001bf: 8 ; i32.literal␊
000001c0: 6a ; i32.add ␊
000001c1: 20 ; get_local z<i32>␊
000001c2: 0 ; i32.literal␊
000001c3: 36 ; i32.store ␊
000001c4: 2 ; memory_immediate␊
000001c5: 0 ; memory_immediate␊
000001c6: 20 ; get_local obj<TestType>␊
000001c7: 2 ; i32.literal␊
000001c8: 41 ; i32.const ␊
000001c9: 0 ; i32.literal␊
000001ca: 6a ; i32.add ␊
000001cb: 28 ; i32.load ␊
000001cc: 2 ; memory_immediate␊
000001cd: 0 ; memory_immediate␊
000001ce: 20 ; get_local obj<TestType>␊
000001cf: 2 ; i32.literal␊
000001d0: 41 ; i32.const ␊
000001d1: 4 ; i32.literal␊
000001d2: 6a ; i32.add ␊
000001d3: 28 ; i32.load ␊
000001d4: 2 ; memory_immediate␊
000001d5: 0 ; memory_immediate␊
000001d6: 6a ; i32.add ␊
000001d7: 20 ; get_local obj<TestType>␊
000001d8: 2 ; i32.literal␊
000001d9: 41 ; i32.const ␊
000001da: 8 ; i32.literal␊
000001db: 6a ; i32.add ␊
000001dc: 28 ; i32.load ␊
000001dd: 2 ; memory_immediate␊
000001de: 0 ; memory_immediate␊
000001df: 6a ; i32.add ␊
000001e0: f ; return ␊
000001e1: b ; end␊
============ fin =============`