diff options
author | Ben Smith <binji@chromium.org> | 2016-03-08 17:03:45 -0800 |
---|---|---|
committer | Ben Smith <binji@chromium.org> | 2016-03-08 17:06:20 -0800 |
commit | 321fe24509c916ebee7da5568ee4c09c6211b27a (patch) | |
tree | 4af14f101db12da693a1deeb3717a85be55e66e3 /test/dump | |
parent | d1a32218bfeb3c535fca702fb180c2b9abe2fc73 (diff) | |
download | wabt-321fe24509c916ebee7da5568ee4c09c6211b27a.tar.gz wabt-321fe24509c916ebee7da5568ee4c09c6211b27a.tar.bz2 wabt-321fe24509c916ebee7da5568ee4c09c6211b27a.zip |
update v8, more leb128, two-level imports
Diffstat (limited to 'test/dump')
-rw-r--r-- | test/dump/basic.txt | 16 | ||||
-rw-r--r-- | test/dump/block-257-exprs-br.txt | 23 | ||||
-rw-r--r-- | test/dump/block-257-exprs.txt | 18 | ||||
-rw-r--r-- | test/dump/brtable.txt | 37 | ||||
-rw-r--r-- | test/dump/callimport.txt | 56 | ||||
-rw-r--r-- | test/dump/callindirect-after-import.txt | 71 | ||||
-rw-r--r-- | test/dump/callindirect.txt | 6 | ||||
-rw-r--r-- | test/dump/dedupe-sig.txt | 42 | ||||
-rw-r--r-- | test/dump/export-multi.txt | 26 | ||||
-rw-r--r-- | test/dump/func-exported.txt | 15 | ||||
-rw-r--r-- | test/dump/import.txt | 46 | ||||
-rw-r--r-- | test/dump/loop-257-exprs-br.txt | 26 | ||||
-rw-r--r-- | test/dump/loop-257-exprs.txt | 18 | ||||
-rw-r--r-- | test/dump/table.txt | 12 |
14 files changed, 197 insertions, 215 deletions
diff --git a/test/dump/basic.txt b/test/dump/basic.txt index f2e3847b..7e5e9274 100644 --- a/test/dump/basic.txt +++ b/test/dump/basic.txt @@ -45,16 +45,16 @@ 0000017: 1100 ; FIXUP func body size 000002a: 09 ; WASM_BINARY_SECTION_EXPORTS 000002b: 01 ; num exports -000002c: 0000 ; export func index -000002e: 0000 0000 ; export name offset -0000032: 06 ; WASM_BINARY_SECTION_END +000002c: 00 ; export func index +000002d: 0000 0000 ; export name offset +0000031: 06 ; WASM_BINARY_SECTION_END ; export 0 -000002e: 3300 0000 ; FIXUP func name offset -0000033: 66 ; export name -0000034: 00 ; \0 +000002d: 3200 0000 ; FIXUP func name offset +0000032: 66 ; export name +0000033: 00 ; \0 ;; dump 0000000: 0061 736d 0a00 0000 0001 0101 0101 0201 0000010: 0101 0201 0000 0011 0000 3300 0a00 402a -0000020: 000a 000a 0140 0e00 0e01 0901 0000 3300 -0000030: 0000 0666 00 +0000020: 000a 000a 0140 0e00 0e01 0901 0032 0000 +0000030: 0006 6600 ;;; STDOUT ;;) diff --git a/test/dump/block-257-exprs-br.txt b/test/dump/block-257-exprs-br.txt index 9acde81a..51b0798a 100644 --- a/test/dump/block-257-exprs-br.txt +++ b/test/dump/block-257-exprs-br.txt @@ -62,9 +62,8 @@ 0000011: 0000 ; func body size 0000013: 00 ; local decl count 0000014: 01 ; OPCODE_BLOCK -0000015: 02 ; num expressions (byte 1) -0000016: 01 ; OPCODE_BLOCK -0000017: ff ; num expressions (byte 0) +0000015: 8202 ; num expressions +0000017: 00 ; OPCODE_NOP 0000018: 00 ; OPCODE_NOP 0000019: 00 ; OPCODE_NOP 000001a: 00 ; OPCODE_NOP @@ -320,20 +319,17 @@ 0000114: 00 ; OPCODE_NOP 0000115: 00 ; OPCODE_NOP 0000116: 00 ; OPCODE_NOP -0000117: 01 ; OPCODE_BLOCK -0000118: 03 ; num expressions (byte 0) +0000117: 06 ; OPCODE_BR +0000118: 00 ; break depth 0000119: 00 ; OPCODE_NOP 000011a: 06 ; OPCODE_BR -000011b: 01 ; break depth +000011b: 00 ; break depth 000011c: 00 ; OPCODE_NOP -000011d: 06 ; OPCODE_BR -000011e: 01 ; break depth -000011f: 00 ; OPCODE_NOP -0000011: 0d01 ; FIXUP func body size -0000120: 06 ; WASM_BINARY_SECTION_END +0000011: 0a01 ; FIXUP func body size +000011d: 06 ; WASM_BINARY_SECTION_END ;; dump 0000000: 0061 736d 0a00 0000 0101 0000 0201 0000 -0000010: 000d 0100 0102 01ff 0000 0000 0000 0000 +0000010: 000a 0100 0182 0200 0000 0000 0000 0000 0000020: 0000 0000 0000 0000 0000 0000 0000 0000 0000030: 0000 0000 0000 0000 0000 0000 0000 0000 0000040: 0000 0000 0000 0000 0000 0000 0000 0000 @@ -349,6 +345,5 @@ 00000e0: 0000 0000 0000 0000 0000 0000 0000 0000 00000f0: 0000 0000 0000 0000 0000 0000 0000 0000 0000100: 0000 0000 0000 0000 0000 0000 0000 0000 -0000110: 0000 0000 0000 0001 0300 0601 0006 0100 -0000120: 06 +0000110: 0000 0000 0000 0006 0000 0600 0006 ;;; STDOUT ;;) diff --git a/test/dump/block-257-exprs.txt b/test/dump/block-257-exprs.txt index 96c0c808..1bf0273c 100644 --- a/test/dump/block-257-exprs.txt +++ b/test/dump/block-257-exprs.txt @@ -60,9 +60,8 @@ 0000011: 0000 ; func body size 0000013: 00 ; local decl count 0000014: 01 ; OPCODE_BLOCK -0000015: 02 ; num expressions (byte 1) -0000016: 01 ; OPCODE_BLOCK -0000017: ff ; num expressions (byte 0) +0000015: 8102 ; num expressions +0000017: 00 ; OPCODE_NOP 0000018: 00 ; OPCODE_NOP 0000019: 00 ; OPCODE_NOP 000001a: 00 ; OPCODE_NOP @@ -318,15 +317,12 @@ 0000114: 00 ; OPCODE_NOP 0000115: 00 ; OPCODE_NOP 0000116: 00 ; OPCODE_NOP -0000117: 01 ; OPCODE_BLOCK -0000118: 02 ; num expressions (byte 0) -0000119: 00 ; OPCODE_NOP -000011a: 00 ; OPCODE_NOP -0000011: 0801 ; FIXUP func body size -000011b: 06 ; WASM_BINARY_SECTION_END +0000117: 00 ; OPCODE_NOP +0000011: 0501 ; FIXUP func body size +0000118: 06 ; WASM_BINARY_SECTION_END ;; dump 0000000: 0061 736d 0a00 0000 0101 0000 0201 0000 -0000010: 0008 0100 0102 01ff 0000 0000 0000 0000 +0000010: 0005 0100 0181 0200 0000 0000 0000 0000 0000020: 0000 0000 0000 0000 0000 0000 0000 0000 0000030: 0000 0000 0000 0000 0000 0000 0000 0000 0000040: 0000 0000 0000 0000 0000 0000 0000 0000 @@ -342,5 +338,5 @@ 00000e0: 0000 0000 0000 0000 0000 0000 0000 0000 00000f0: 0000 0000 0000 0000 0000 0000 0000 0000 0000100: 0000 0000 0000 0000 0000 0000 0000 0000 -0000110: 0000 0000 0000 0001 0200 0006 +0000110: 0000 0000 0000 0000 06 ;;; STDOUT ;;) diff --git a/test/dump/brtable.txt b/test/dump/brtable.txt index 8d4b3b8f..7d84a4ca 100644 --- a/test/dump/brtable.txt +++ b/test/dump/brtable.txt @@ -35,25 +35,26 @@ 0000018: 01 ; OPCODE_BLOCK 0000019: 01 ; num expressions 000001a: 08 ; OPCODE_BR_TABLE -000001b: 0200 ; num targets -000001d: 0000 ; break depth -000001f: 0100 ; break depth -0000021: 0000 ; break depth for default -0000023: 0a ; OPCODE_I32_CONST -0000024: 00 ; i32 literal -0000025: 0a ; OPCODE_I32_CONST -0000026: 01 ; i32 literal -0000027: 0a ; OPCODE_I32_CONST -0000028: 02 ; i32 literal -0000029: 06 ; OPCODE_BR -000002a: 01 ; break depth -000002b: 00 ; OPCODE_NOP +000001b: 02 ; num targets +000001c: 0000 0000 ; break depth +0000020: 0100 0000 ; break depth +0000024: 0000 0000 ; break depth for default +0000028: 0a ; OPCODE_I32_CONST +0000029: 00 ; i32 literal +000002a: 0a ; OPCODE_I32_CONST +000002b: 01 ; i32 literal 000002c: 0a ; OPCODE_I32_CONST -000002d: 03 ; i32 literal -0000011: 1b00 ; FIXUP func body size -000002e: 06 ; WASM_BINARY_SECTION_END +000002d: 02 ; i32 literal +000002e: 06 ; OPCODE_BR +000002f: 01 ; break depth +0000030: 00 ; OPCODE_NOP +0000031: 0a ; OPCODE_I32_CONST +0000032: 03 ; i32 literal +0000011: 2000 ; FIXUP func body size +0000033: 06 ; WASM_BINARY_SECTION_END ;; dump 0000000: 0061 736d 0a00 0000 0101 0000 0201 0000 -0000010: 001b 0000 0101 0104 0101 0802 0000 0001 -0000020: 0000 000a 000a 010a 0206 0100 0a03 06 +0000010: 0020 0000 0101 0104 0101 0802 0000 0000 +0000020: 0100 0000 0000 0000 0a00 0a01 0a02 0601 +0000030: 000a 0306 ;;; STDOUT ;;) diff --git a/test/dump/callimport.txt b/test/dump/callimport.txt index 63148809..6945289d 100644 --- a/test/dump/callimport.txt +++ b/test/dump/callimport.txt @@ -25,36 +25,36 @@ 0000010: 08 ; WASM_BINARY_SECTION_IMPORTS 0000011: 01 ; num imports ; import header 0 -0000012: 0000 ; import signature index -0000014: 0000 0000 ; import module name offset -0000018: 0000 0000 ; import function name offset -000001c: 02 ; WASM_BINARY_SECTION_FUNCTIONS -000001d: 01 ; num functions +0000012: 00 ; import signature index +0000013: 0000 0000 ; import module name offset +0000017: 0000 0000 ; import function name offset +000001b: 02 ; WASM_BINARY_SECTION_FUNCTIONS +000001c: 01 ; num functions ; function 0 -000001e: 00 ; func flags -000001f: 0100 ; func signature index -0000021: 0000 ; func body size -0000023: 00 ; local decl count -0000024: 1f ; OPCODE_CALL_IMPORT -0000025: 00 ; import index -0000026: 0a ; OPCODE_I32_CONST -0000027: 01 ; i32 literal -0000028: 0d ; OPCODE_F32_CONST -0000029: 0000 0040 ; f32 literal -000002d: 12 ; OPCODE_CALL_FUNCTION -000002e: 00 ; func index -0000021: 0c00 ; FIXUP func body size -000002f: 06 ; WASM_BINARY_SECTION_END +000001d: 00 ; func flags +000001e: 0100 ; func signature index +0000020: 0000 ; func body size +0000022: 00 ; local decl count +0000023: 1f ; OPCODE_CALL_IMPORT +0000024: 00 ; import index +0000025: 0a ; OPCODE_I32_CONST +0000026: 01 ; i32 literal +0000027: 0d ; OPCODE_F32_CONST +0000028: 0000 0040 ; f32 literal +000002c: 12 ; OPCODE_CALL_FUNCTION +000002d: 00 ; func index +0000020: 0c00 ; FIXUP func body size +000002e: 06 ; WASM_BINARY_SECTION_END ; import 0 -0000014: 3000 0000 ; FIXUP import module name offset -0000030: 666f 6f ; import module name -0000033: 00 ; \0 -0000018: 3400 0000 ; FIXUP import function name offset -0000034: 6261 72 ; import function name -0000037: 00 ; \0 +0000013: 2f00 0000 ; FIXUP import module name offset +000002f: 666f 6f ; import module name +0000032: 00 ; \0 +0000017: 3300 0000 ; FIXUP import function name offset +0000033: 6261 72 ; import function name +0000036: 00 ; \0 ;; dump 0000000: 0061 736d 0a00 0000 0102 0201 0103 0001 -0000010: 0801 0000 3000 0000 3400 0000 0201 0001 -0000020: 000c 0000 1f00 0a01 0d00 0000 4012 0006 -0000030: 666f 6f00 6261 7200 +0000010: 0801 002f 0000 0033 0000 0002 0100 0100 +0000020: 0c00 001f 000a 010d 0000 0040 1200 0666 +0000030: 6f6f 0062 6172 00 ;;; STDOUT ;;) diff --git a/test/dump/callindirect-after-import.txt b/test/dump/callindirect-after-import.txt index 1f3e6a49..2ef50232 100644 --- a/test/dump/callindirect-after-import.txt +++ b/test/dump/callindirect-after-import.txt @@ -35,45 +35,44 @@ 0000011: 08 ; WASM_BINARY_SECTION_IMPORTS 0000012: 01 ; num imports ; import header 0 -0000013: 0100 ; import signature index -0000015: 0000 0000 ; import module name offset -0000019: 0000 0000 ; import function name offset -000001d: 02 ; WASM_BINARY_SECTION_FUNCTIONS -000001e: 02 ; num functions +0000013: 01 ; import signature index +0000014: 0000 0000 ; import module name offset +0000018: 0000 0000 ; import function name offset +000001c: 02 ; WASM_BINARY_SECTION_FUNCTIONS +000001d: 02 ; num functions ; function 0 -000001f: 00 ; func flags -0000020: 0000 ; func signature index -0000022: 0000 ; func body size -0000024: 00 ; local decl count -0000025: 00 ; OPCODE_NOP -0000022: 0200 ; FIXUP func body size +000001e: 00 ; func flags +000001f: 0000 ; func signature index +0000021: 0000 ; func body size +0000023: 00 ; local decl count +0000024: 00 ; OPCODE_NOP +0000021: 0200 ; FIXUP func body size ; function 1 -0000026: 00 ; func flags -0000027: 0200 ; func signature index -0000029: 0000 ; func body size -000002b: 00 ; local decl count -000002c: 13 ; OPCODE_CALL_INDIRECT -000002d: 00 ; signature index -000002e: 0a ; OPCODE_I32_CONST -000002f: 00 ; i32 literal -0000030: 0d ; OPCODE_F32_CONST -0000031: 0000 803f ; f32 literal -0000029: 0a00 ; FIXUP func body size -0000035: 05 ; WASM_BINARY_SECTION_FUNCTION_TABLE -0000036: 01 ; num function table entries -0000037: 0000 ; function table entry -0000039: 06 ; WASM_BINARY_SECTION_END +0000025: 00 ; func flags +0000026: 0200 ; func signature index +0000028: 0000 ; func body size +000002a: 00 ; local decl count +000002b: 13 ; OPCODE_CALL_INDIRECT +000002c: 00 ; signature index +000002d: 0a ; OPCODE_I32_CONST +000002e: 00 ; i32 literal +000002f: 0d ; OPCODE_F32_CONST +0000030: 0000 803f ; f32 literal +0000028: 0a00 ; FIXUP func body size +0000034: 05 ; WASM_BINARY_SECTION_FUNCTION_TABLE +0000035: 01 ; num function table entries +0000036: 00 ; function table entry +0000037: 06 ; WASM_BINARY_SECTION_END ; import 0 -0000015: 3a00 0000 ; FIXUP import module name offset -000003a: 666f 6f ; import module name -000003d: 00 ; \0 -0000019: 3e00 0000 ; FIXUP import function name offset -000003e: 6261 72 ; import function name -0000041: 00 ; \0 +0000014: 3800 0000 ; FIXUP import module name offset +0000038: 666f 6f ; import module name +000003b: 00 ; \0 +0000018: 3c00 0000 ; FIXUP import function name offset +000003c: 6261 72 ; import function name +000003f: 00 ; \0 ;; dump 0000000: 0061 736d 0a00 0000 0103 0100 0300 0100 -0000010: 0008 0101 003a 0000 003e 0000 0002 0200 -0000020: 0000 0200 0000 0002 000a 0000 1300 0a00 -0000030: 0d00 0080 3f05 0100 0006 666f 6f00 6261 -0000040: 7200 +0000010: 0008 0101 3800 0000 3c00 0000 0202 0000 +0000020: 0002 0000 0000 0200 0a00 0013 000a 000d +0000030: 0000 803f 0501 0006 666f 6f00 6261 7200 ;;; STDOUT ;;) diff --git a/test/dump/callindirect.txt b/test/dump/callindirect.txt index 1fed7cf9..29efedf4 100644 --- a/test/dump/callindirect.txt +++ b/test/dump/callindirect.txt @@ -29,9 +29,9 @@ 0000012: 0700 ; FIXUP func body size 000001b: 05 ; WASM_BINARY_SECTION_FUNCTION_TABLE 000001c: 01 ; num function table entries -000001d: 0000 ; function table entry -000001f: 06 ; WASM_BINARY_SECTION_END +000001d: 00 ; function table entry +000001e: 06 ; WASM_BINARY_SECTION_END ;; dump 0000000: 0061 736d 0a00 0000 0101 0100 0102 0100 -0000010: 0000 0700 0013 000a 000a 0005 0100 0006 +0000010: 0000 0700 0013 000a 000a 0005 0100 06 ;;; STDOUT ;;) diff --git a/test/dump/dedupe-sig.txt b/test/dump/dedupe-sig.txt index 3efb7333..df6bcfdb 100644 --- a/test/dump/dedupe-sig.txt +++ b/test/dump/dedupe-sig.txt @@ -15,29 +15,29 @@ 000000d: 08 ; WASM_BINARY_SECTION_IMPORTS 000000e: 01 ; num imports ; import header 0 -000000f: 0000 ; import signature index -0000011: 0000 0000 ; import module name offset -0000015: 0000 0000 ; import function name offset -0000019: 02 ; WASM_BINARY_SECTION_FUNCTIONS -000001a: 01 ; num functions +000000f: 00 ; import signature index +0000010: 0000 0000 ; import module name offset +0000014: 0000 0000 ; import function name offset +0000018: 02 ; WASM_BINARY_SECTION_FUNCTIONS +0000019: 01 ; num functions ; function 0 -000001b: 00 ; func flags -000001c: 0000 ; func signature index -000001e: 0000 ; func body size -0000020: 00 ; local decl count -0000021: 0b ; OPCODE_I64_CONST -0000022: 00 ; i64 literal -000001e: 0300 ; FIXUP func body size -0000023: 06 ; WASM_BINARY_SECTION_END +000001a: 00 ; func flags +000001b: 0000 ; func signature index +000001d: 0000 ; func body size +000001f: 00 ; local decl count +0000020: 0b ; OPCODE_I64_CONST +0000021: 00 ; i64 literal +000001d: 0300 ; FIXUP func body size +0000022: 06 ; WASM_BINARY_SECTION_END ; import 0 -0000011: 2400 0000 ; FIXUP import module name offset -0000024: 666f 6f ; import module name -0000027: 00 ; \0 -0000015: 2800 0000 ; FIXUP import function name offset -0000028: 6261 72 ; import function name -000002b: 00 ; \0 +0000010: 2300 0000 ; FIXUP import module name offset +0000023: 666f 6f ; import module name +0000026: 00 ; \0 +0000014: 2700 0000 ; FIXUP import function name offset +0000027: 6261 72 ; import function name +000002a: 00 ; \0 ;; dump 0000000: 0061 736d 0a00 0000 0101 0102 0108 0100 -0000010: 0024 0000 0028 0000 0002 0100 0000 0300 -0000020: 000b 0006 666f 6f00 6261 7200 +0000010: 2300 0000 2700 0000 0201 0000 0003 0000 +0000020: 0b00 0666 6f6f 0062 6172 00 ;;; STDOUT ;;) diff --git a/test/dump/export-multi.txt b/test/dump/export-multi.txt index 183752c2..ee596827 100644 --- a/test/dump/export-multi.txt +++ b/test/dump/export-multi.txt @@ -22,21 +22,21 @@ 0000011: 0200 ; FIXUP func body size 0000015: 09 ; WASM_BINARY_SECTION_EXPORTS 0000016: 02 ; num exports -0000017: 0000 ; export func index -0000019: 0000 0000 ; export name offset -000001d: 0000 ; export func index -000001f: 0000 0000 ; export name offset -0000023: 06 ; WASM_BINARY_SECTION_END +0000017: 00 ; export func index +0000018: 0000 0000 ; export name offset +000001c: 00 ; export func index +000001d: 0000 0000 ; export name offset +0000021: 06 ; WASM_BINARY_SECTION_END ; export 0 -0000019: 2400 0000 ; FIXUP func name offset -0000024: 61 ; export name -0000025: 00 ; \0 +0000018: 2200 0000 ; FIXUP func name offset +0000022: 61 ; export name +0000023: 00 ; \0 ; export 1 -000001f: 2600 0000 ; FIXUP func name offset -0000026: 62 ; export name -0000027: 00 ; \0 +000001d: 2400 0000 ; FIXUP func name offset +0000024: 62 ; export name +0000025: 00 ; \0 ;; dump 0000000: 0061 736d 0a00 0000 0101 0000 0201 0000 -0000010: 0002 0000 0009 0200 0024 0000 0000 0026 -0000020: 0000 0006 6100 6200 +0000010: 0002 0000 0009 0200 2200 0000 0024 0000 +0000020: 0006 6100 6200 ;;; STDOUT ;;) diff --git a/test/dump/func-exported.txt b/test/dump/func-exported.txt index 13fd1de6..562998c8 100644 --- a/test/dump/func-exported.txt +++ b/test/dump/func-exported.txt @@ -20,15 +20,14 @@ 0000011: 0100 ; FIXUP func body size 0000014: 09 ; WASM_BINARY_SECTION_EXPORTS 0000015: 01 ; num exports -0000016: 0000 ; export func index -0000018: 0000 0000 ; export name offset -000001c: 06 ; WASM_BINARY_SECTION_END +0000016: 00 ; export func index +0000017: 0000 0000 ; export name offset +000001b: 06 ; WASM_BINARY_SECTION_END ; export 0 -0000018: 1d00 0000 ; FIXUP func name offset -000001d: 666f 6f ; export name -0000020: 00 ; \0 +0000017: 1c00 0000 ; FIXUP func name offset +000001c: 666f 6f ; export name +000001f: 00 ; \0 ;; dump 0000000: 0061 736d 0a00 0000 0101 0000 0201 0000 -0000010: 0001 0000 0901 0000 1d00 0000 0666 6f6f -0000020: 00 +0000010: 0001 0000 0901 001c 0000 0006 666f 6f00 ;;; STDOUT ;;) diff --git a/test/dump/import.txt b/test/dump/import.txt index ce58aa57..256fd314 100644 --- a/test/dump/import.txt +++ b/test/dump/import.txt @@ -23,32 +23,32 @@ 0000013: 08 ; WASM_BINARY_SECTION_IMPORTS 0000014: 02 ; num imports ; import header 0 -0000015: 0000 ; import signature index -0000017: 0000 0000 ; import module name offset -000001b: 0000 0000 ; import function name offset +0000015: 00 ; import signature index +0000016: 0000 0000 ; import module name offset +000001a: 0000 0000 ; import function name offset ; import header 1 -000001f: 0100 ; import signature index -0000021: 0000 0000 ; import module name offset -0000025: 0000 0000 ; import function name offset -0000029: 06 ; WASM_BINARY_SECTION_END +000001e: 01 ; import signature index +000001f: 0000 0000 ; import module name offset +0000023: 0000 0000 ; import function name offset +0000027: 06 ; WASM_BINARY_SECTION_END ; import 0 -0000017: 2a00 0000 ; FIXUP import module name offset -000002a: 6967 6e6f 7265 64 ; import module name -0000031: 00 ; \0 -000001b: 3200 0000 ; FIXUP import function name offset -0000032: 7465 7374 ; import function name -0000036: 00 ; \0 +0000016: 2800 0000 ; FIXUP import module name offset +0000028: 6967 6e6f 7265 64 ; import module name +000002f: 00 ; \0 +000001a: 3000 0000 ; FIXUP import function name offset +0000030: 7465 7374 ; import function name +0000034: 00 ; \0 ; import 1 -0000021: 3700 0000 ; FIXUP import module name offset -0000037: 6967 6e6f 7265 64 ; import module name -000003e: 00 ; \0 -0000025: 3f00 0000 ; FIXUP import function name offset -000003f: 7465 7374 32 ; import function name -0000044: 00 ; \0 +000001f: 3500 0000 ; FIXUP import module name offset +0000035: 6967 6e6f 7265 64 ; import module name +000003c: 00 ; \0 +0000023: 3d00 0000 ; FIXUP import function name offset +000003d: 7465 7374 32 ; import function name +0000042: 00 ; \0 ;; dump 0000000: 0061 736d 0a00 0000 0102 0400 0102 0304 -0000010: 0101 0108 0200 002a 0000 0032 0000 0001 -0000020: 0037 0000 003f 0000 0006 6967 6e6f 7265 -0000030: 6400 7465 7374 0069 676e 6f72 6564 0074 -0000040: 6573 7432 00 +0000010: 0101 0108 0200 2800 0000 3000 0000 0135 +0000020: 0000 003d 0000 0006 6967 6e6f 7265 6400 +0000030: 7465 7374 0069 676e 6f72 6564 0074 6573 +0000040: 7432 00 ;;; STDOUT ;;) diff --git a/test/dump/loop-257-exprs-br.txt b/test/dump/loop-257-exprs-br.txt index be6db161..4b1df178 100644 --- a/test/dump/loop-257-exprs-br.txt +++ b/test/dump/loop-257-exprs-br.txt @@ -64,9 +64,8 @@ 0000011: 0000 ; func body size 0000013: 00 ; local decl count 0000014: 02 ; OPCODE_LOOP -0000015: 02 ; num expressions (byte 1) -0000016: 01 ; OPCODE_BLOCK -0000017: ff ; num expressions (byte 0) +0000015: 8402 ; num expressions +0000017: 00 ; OPCODE_NOP 0000018: 00 ; OPCODE_NOP 0000019: 00 ; OPCODE_NOP 000001a: 00 ; OPCODE_NOP @@ -322,26 +321,23 @@ 0000114: 00 ; OPCODE_NOP 0000115: 00 ; OPCODE_NOP 0000116: 00 ; OPCODE_NOP -0000117: 01 ; OPCODE_BLOCK -0000118: 05 ; num expressions (byte 0) +0000117: 06 ; OPCODE_BR +0000118: 01 ; break depth 0000119: 00 ; OPCODE_NOP 000011a: 06 ; OPCODE_BR -000011b: 02 ; break depth +000011b: 00 ; break depth 000011c: 00 ; OPCODE_NOP 000011d: 06 ; OPCODE_BR 000011e: 01 ; break depth 000011f: 00 ; OPCODE_NOP 0000120: 06 ; OPCODE_BR -0000121: 02 ; break depth +0000121: 00 ; break depth 0000122: 00 ; OPCODE_NOP -0000123: 06 ; OPCODE_BR -0000124: 01 ; break depth -0000125: 00 ; OPCODE_NOP -0000011: 1301 ; FIXUP func body size -0000126: 06 ; WASM_BINARY_SECTION_END +0000011: 1001 ; FIXUP func body size +0000123: 06 ; WASM_BINARY_SECTION_END ;; dump 0000000: 0061 736d 0a00 0000 0101 0000 0201 0000 -0000010: 0013 0100 0202 01ff 0000 0000 0000 0000 +0000010: 0010 0100 0284 0200 0000 0000 0000 0000 0000020: 0000 0000 0000 0000 0000 0000 0000 0000 0000030: 0000 0000 0000 0000 0000 0000 0000 0000 0000040: 0000 0000 0000 0000 0000 0000 0000 0000 @@ -357,6 +353,6 @@ 00000e0: 0000 0000 0000 0000 0000 0000 0000 0000 00000f0: 0000 0000 0000 0000 0000 0000 0000 0000 0000100: 0000 0000 0000 0000 0000 0000 0000 0000 -0000110: 0000 0000 0000 0001 0500 0602 0006 0100 -0000120: 0602 0006 0100 06 +0000110: 0000 0000 0000 0006 0100 0600 0006 0100 +0000120: 0600 0006 ;;; STDOUT ;;) diff --git a/test/dump/loop-257-exprs.txt b/test/dump/loop-257-exprs.txt index e5808ab5..022f4d11 100644 --- a/test/dump/loop-257-exprs.txt +++ b/test/dump/loop-257-exprs.txt @@ -60,9 +60,8 @@ 0000011: 0000 ; func body size 0000013: 00 ; local decl count 0000014: 02 ; OPCODE_LOOP -0000015: 02 ; num expressions (byte 1) -0000016: 01 ; OPCODE_BLOCK -0000017: ff ; num expressions (byte 0) +0000015: 8102 ; num expressions +0000017: 00 ; OPCODE_NOP 0000018: 00 ; OPCODE_NOP 0000019: 00 ; OPCODE_NOP 000001a: 00 ; OPCODE_NOP @@ -318,15 +317,12 @@ 0000114: 00 ; OPCODE_NOP 0000115: 00 ; OPCODE_NOP 0000116: 00 ; OPCODE_NOP -0000117: 01 ; OPCODE_BLOCK -0000118: 02 ; num expressions (byte 0) -0000119: 00 ; OPCODE_NOP -000011a: 00 ; OPCODE_NOP -0000011: 0801 ; FIXUP func body size -000011b: 06 ; WASM_BINARY_SECTION_END +0000117: 00 ; OPCODE_NOP +0000011: 0501 ; FIXUP func body size +0000118: 06 ; WASM_BINARY_SECTION_END ;; dump 0000000: 0061 736d 0a00 0000 0101 0000 0201 0000 -0000010: 0008 0100 0202 01ff 0000 0000 0000 0000 +0000010: 0005 0100 0281 0200 0000 0000 0000 0000 0000020: 0000 0000 0000 0000 0000 0000 0000 0000 0000030: 0000 0000 0000 0000 0000 0000 0000 0000 0000040: 0000 0000 0000 0000 0000 0000 0000 0000 @@ -342,5 +338,5 @@ 00000e0: 0000 0000 0000 0000 0000 0000 0000 0000 00000f0: 0000 0000 0000 0000 0000 0000 0000 0000 0000100: 0000 0000 0000 0000 0000 0000 0000 0000 -0000110: 0000 0000 0000 0001 0200 0006 +0000110: 0000 0000 0000 0000 06 ;;; STDOUT ;;) diff --git a/test/dump/table.txt b/test/dump/table.txt index 97b09128..463c910f 100644 --- a/test/dump/table.txt +++ b/test/dump/table.txt @@ -46,14 +46,14 @@ 0000024: 0a00 ; FIXUP func body size 0000030: 05 ; WASM_BINARY_SECTION_FUNCTION_TABLE 0000031: 04 ; num function table entries -0000032: 0000 ; function table entry -0000034: 0000 ; function table entry -0000036: 0100 ; function table entry -0000038: 0200 ; function table entry -000003a: 06 ; WASM_BINARY_SECTION_END +0000032: 00 ; function table entry +0000033: 00 ; function table entry +0000034: 01 ; function table entry +0000035: 02 ; function table entry +0000036: 06 ; WASM_BINARY_SECTION_END ;; dump 0000000: 0061 736d 0a00 0000 0103 0100 0102 0001 0000010: 0200 0402 0300 0000 0100 0000 0100 0100 0000020: 0000 0200 0a00 000c 0000 0000 0000 0000 -0000030: 0504 0000 0000 0100 0200 06 +0000030: 0504 0000 0102 06 ;;; STDOUT ;;) |