diff options
author | Ben Smith <binji@chromium.org> | 2016-01-05 11:47:05 -0800 |
---|---|---|
committer | Ben Smith <binji@chromium.org> | 2016-01-05 11:50:20 -0800 |
commit | 519b49121bf028d8646a78e2621c3934fc92c095 (patch) | |
tree | 1b335a7e7ea4443ae4ff42858403174db6951fd6 /src | |
parent | d813f8351f17e8be44acd77127e9a6b8e1a69105 (diff) | |
download | wabt-519b49121bf028d8646a78e2621c3934fc92c095.tar.gz wabt-519b49121bf028d8646a78e2621c3934fc92c095.tar.bz2 wabt-519b49121bf028d8646a78e2621c3934fc92c095.zip |
Remove STORE_WRAP and LOAD_EXTEND expr nodes
They were copied as token types from the spec repo's parser, but they
were never treated distinctly. They don't provide any additional
information. Also, the spec repo doesn't reference them anymore anyway.
Diffstat (limited to 'src')
-rw-r--r-- | src/wasm-binary-writer.c | 6 | ||||
-rw-r--r-- | src/wasm-check.c | 20 | ||||
-rw-r--r-- | src/wasm-lexer.c | 30 | ||||
-rw-r--r-- | src/wasm-lexer.l | 30 | ||||
-rw-r--r-- | src/wasm-parser.c | 1645 | ||||
-rw-r--r-- | src/wasm-parser.h | 68 | ||||
-rw-r--r-- | src/wasm-parser.y | 21 | ||||
-rw-r--r-- | src/wasm.c | 2 | ||||
-rw-r--r-- | src/wasm.h | 2 |
9 files changed, 876 insertions, 948 deletions
diff --git a/src/wasm-binary-writer.c b/src/wasm-binary-writer.c index a62b668e..16c53095 100644 --- a/src/wasm-binary-writer.c +++ b/src/wasm-binary-writer.c @@ -838,8 +838,7 @@ static void write_expr(WasmWriteContext* ctx, write_expr(ctx, module, func, expr->if_else.true_); write_expr(ctx, module, func, expr->if_else.false_); break; - case WASM_EXPR_TYPE_LOAD: - case WASM_EXPR_TYPE_LOAD_EXTEND: { + case WASM_EXPR_TYPE_LOAD: { /* Access byte: 0bAaao0000 A = Alignment. If set, access is unaligned a = Atomicity. 0 = None, 1 = SeqCst, 2 = Acq, 3 = Rel @@ -897,8 +896,7 @@ static void write_expr(WasmWriteContext* ctx, write_expr(ctx, module, func, expr->set_local.expr); break; } - case WASM_EXPR_TYPE_STORE: - case WASM_EXPR_TYPE_STORE_WRAP: { + case WASM_EXPR_TYPE_STORE: { /* See LOAD for format of memory access byte */ out_opcode(ws, s_mem_opcodes[expr->store.op.op_type]); uint8_t access = 0; diff --git a/src/wasm-check.c b/src/wasm-check.c index b1501038..d6c33952 100644 --- a/src/wasm-check.c +++ b/src/wasm-check.c @@ -565,15 +565,6 @@ static WasmResult check_expr(WasmCheckContext* ctx, " of load index"); break; } - case WASM_EXPR_TYPE_LOAD_EXTEND: { - WasmType type = expr->load.op.type; - result |= check_align(ctx, &expr->loc, expr->load.align); - result |= check_offset(ctx, &expr->loc, expr->load.offset); - result |= check_type(ctx, &expr->loc, type, expected_type, desc); - result |= check_expr(ctx, module, func, expr->load.addr, WASM_TYPE_I32, - " of load index"); - break; - } case WASM_EXPR_TYPE_LOAD_GLOBAL: { WasmType type; if (check_global_var(ctx, module, &expr->load_global.var, &type) == @@ -660,17 +651,6 @@ static WasmResult check_expr(WasmCheckContext* ctx, } break; } - case WASM_EXPR_TYPE_STORE_WRAP: { - WasmType type = expr->store.op.type; - result |= check_align(ctx, &expr->loc, expr->store.align); - result |= check_offset(ctx, &expr->loc, expr->store.offset); - result |= check_type(ctx, &expr->loc, type, expected_type, desc); - result |= check_expr(ctx, module, func, expr->store.addr, WASM_TYPE_I32, - " of store index"); - result |= check_expr(ctx, module, func, expr->store.value, type, - " of store value"); - break; - } case WASM_EXPR_TYPE_TABLESWITCH: { result |= check_duplicate_bindings(ctx, &expr->tableswitch.case_bindings, "case"); diff --git a/src/wasm-lexer.c b/src/wasm-lexer.c index b17a698f..623e3738 100644 --- a/src/wasm-lexer.c +++ b/src/wasm-lexer.c @@ -1834,77 +1834,77 @@ YY_RULE_SETUP case 39: YY_RULE_SETUP #line 173 "src/wasm-lexer.l" -{ MEMOPSIGN(I32, LOAD, 8, S); return TOK(LOAD_EXTEND); } +{ MEMOPSIGN(I32, LOAD, 8, S); return TOK(LOAD); } YY_BREAK case 40: YY_RULE_SETUP #line 174 "src/wasm-lexer.l" -{ MEMOPSIGN(I64, LOAD, 8, S); return TOK(LOAD_EXTEND); } +{ MEMOPSIGN(I64, LOAD, 8, S); return TOK(LOAD); } YY_BREAK case 41: YY_RULE_SETUP #line 175 "src/wasm-lexer.l" -{ MEMOPSIGN(I32, LOAD, 8, U); return TOK(LOAD_EXTEND); } +{ MEMOPSIGN(I32, LOAD, 8, U); return TOK(LOAD); } YY_BREAK case 42: YY_RULE_SETUP #line 176 "src/wasm-lexer.l" -{ MEMOPSIGN(I64, LOAD, 8, U); return TOK(LOAD_EXTEND); } +{ MEMOPSIGN(I64, LOAD, 8, U); return TOK(LOAD); } YY_BREAK case 43: YY_RULE_SETUP #line 177 "src/wasm-lexer.l" -{ MEMOPSIGN(I32, LOAD, 16, S); return TOK(LOAD_EXTEND); } +{ MEMOPSIGN(I32, LOAD, 16, S); return TOK(LOAD); } YY_BREAK case 44: YY_RULE_SETUP #line 178 "src/wasm-lexer.l" -{ MEMOPSIGN(I64, LOAD, 16, S); return TOK(LOAD_EXTEND); } +{ MEMOPSIGN(I64, LOAD, 16, S); return TOK(LOAD); } YY_BREAK case 45: YY_RULE_SETUP #line 179 "src/wasm-lexer.l" -{ MEMOPSIGN(I32, LOAD, 16, U); return TOK(LOAD_EXTEND); } +{ MEMOPSIGN(I32, LOAD, 16, U); return TOK(LOAD); } YY_BREAK case 46: YY_RULE_SETUP #line 180 "src/wasm-lexer.l" -{ MEMOPSIGN(I64, LOAD, 16, U); return TOK(LOAD_EXTEND); } +{ MEMOPSIGN(I64, LOAD, 16, U); return TOK(LOAD); } YY_BREAK case 47: YY_RULE_SETUP #line 181 "src/wasm-lexer.l" -{ MEMOPSIGN(I64, LOAD, 32, S); return TOK(LOAD_EXTEND); } +{ MEMOPSIGN(I64, LOAD, 32, S); return TOK(LOAD); } YY_BREAK case 48: YY_RULE_SETUP #line 182 "src/wasm-lexer.l" -{ MEMOPSIGN(I64, LOAD, 32, U); return TOK(LOAD_EXTEND); } +{ MEMOPSIGN(I64, LOAD, 32, U); return TOK(LOAD); } YY_BREAK case 49: YY_RULE_SETUP #line 183 "src/wasm-lexer.l" -{ MEMOP(I32, STORE, 8); return TOK(STORE_WRAP); } +{ MEMOP(I32, STORE, 8); return TOK(STORE); } YY_BREAK case 50: YY_RULE_SETUP #line 184 "src/wasm-lexer.l" -{ MEMOP(I64, STORE, 8); return TOK(STORE_WRAP); } +{ MEMOP(I64, STORE, 8); return TOK(STORE); } YY_BREAK case 51: YY_RULE_SETUP #line 185 "src/wasm-lexer.l" -{ MEMOP(I32, STORE, 16); return TOK(STORE_WRAP); } +{ MEMOP(I32, STORE, 16); return TOK(STORE); } YY_BREAK case 52: YY_RULE_SETUP #line 186 "src/wasm-lexer.l" -{ MEMOP(I64, STORE, 16); return TOK(STORE_WRAP); } +{ MEMOP(I64, STORE, 16); return TOK(STORE); } YY_BREAK case 53: YY_RULE_SETUP #line 187 "src/wasm-lexer.l" -{ MEMOP(I64, STORE, 32); return TOK(STORE_WRAP); } +{ MEMOP(I64, STORE, 32); return TOK(STORE); } YY_BREAK case 54: YY_RULE_SETUP diff --git a/src/wasm-lexer.l b/src/wasm-lexer.l index 47990fef..f3edc8ab 100644 --- a/src/wasm-lexer.l +++ b/src/wasm-lexer.l @@ -170,21 +170,21 @@ NAME \${ATOM} "i64.store" { MEMOP(I64, STORE, 64); return TOK(STORE); } "f32.store" { MEMOP(F32, STORE, 32); return TOK(STORE); } "f64.store" { MEMOP(F64, STORE, 64); return TOK(STORE); } -"i32.load8_s" { MEMOPSIGN(I32, LOAD, 8, S); return TOK(LOAD_EXTEND); } -"i64.load8_s" { MEMOPSIGN(I64, LOAD, 8, S); return TOK(LOAD_EXTEND); } -"i32.load8_u" { MEMOPSIGN(I32, LOAD, 8, U); return TOK(LOAD_EXTEND); } -"i64.load8_u" { MEMOPSIGN(I64, LOAD, 8, U); return TOK(LOAD_EXTEND); } -"i32.load16_s" { MEMOPSIGN(I32, LOAD, 16, S); return TOK(LOAD_EXTEND); } -"i64.load16_s" { MEMOPSIGN(I64, LOAD, 16, S); return TOK(LOAD_EXTEND); } -"i32.load16_u" { MEMOPSIGN(I32, LOAD, 16, U); return TOK(LOAD_EXTEND); } -"i64.load16_u" { MEMOPSIGN(I64, LOAD, 16, U); return TOK(LOAD_EXTEND); } -"i64.load32_s" { MEMOPSIGN(I64, LOAD, 32, S); return TOK(LOAD_EXTEND); } -"i64.load32_u" { MEMOPSIGN(I64, LOAD, 32, U); return TOK(LOAD_EXTEND); } -"i32.store8" { MEMOP(I32, STORE, 8); return TOK(STORE_WRAP); } -"i64.store8" { MEMOP(I64, STORE, 8); return TOK(STORE_WRAP); } -"i32.store16" { MEMOP(I32, STORE, 16); return TOK(STORE_WRAP); } -"i64.store16" { MEMOP(I64, STORE, 16); return TOK(STORE_WRAP); } -"i64.store32" { MEMOP(I64, STORE, 32); return TOK(STORE_WRAP); } +"i32.load8_s" { MEMOPSIGN(I32, LOAD, 8, S); return TOK(LOAD); } +"i64.load8_s" { MEMOPSIGN(I64, LOAD, 8, S); return TOK(LOAD); } +"i32.load8_u" { MEMOPSIGN(I32, LOAD, 8, U); return TOK(LOAD); } +"i64.load8_u" { MEMOPSIGN(I64, LOAD, 8, U); return TOK(LOAD); } +"i32.load16_s" { MEMOPSIGN(I32, LOAD, 16, S); return TOK(LOAD); } +"i64.load16_s" { MEMOPSIGN(I64, LOAD, 16, S); return TOK(LOAD); } +"i32.load16_u" { MEMOPSIGN(I32, LOAD, 16, U); return TOK(LOAD); } +"i64.load16_u" { MEMOPSIGN(I64, LOAD, 16, U); return TOK(LOAD); } +"i64.load32_s" { MEMOPSIGN(I64, LOAD, 32, S); return TOK(LOAD); } +"i64.load32_u" { MEMOPSIGN(I64, LOAD, 32, U); return TOK(LOAD); } +"i32.store8" { MEMOP(I32, STORE, 8); return TOK(STORE); } +"i64.store8" { MEMOP(I64, STORE, 8); return TOK(STORE); } +"i32.store16" { MEMOP(I32, STORE, 16); return TOK(STORE); } +"i64.store16" { MEMOP(I64, STORE, 16); return TOK(STORE); } +"i64.store32" { MEMOP(I64, STORE, 32); return TOK(STORE); } "offset="{DIGITS} { TEXT_AT(7); return TOK(OFFSET); } "align="{DIGITS} { TEXT_AT(6); return TOK(ALIGN); } "i32.const" { TYPE(I32); return TOK(CONST); } diff --git a/src/wasm-parser.c b/src/wasm-parser.c index c4f93757..fc610b97 100644 --- a/src/wasm-parser.c +++ b/src/wasm-parser.c @@ -211,41 +211,39 @@ extern int wasm_debug; WASM_TOKEN_TYPE_SET_LOCAL = 279, WASM_TOKEN_TYPE_LOAD = 280, WASM_TOKEN_TYPE_STORE = 281, - WASM_TOKEN_TYPE_LOAD_EXTEND = 282, - WASM_TOKEN_TYPE_STORE_WRAP = 283, - WASM_TOKEN_TYPE_OFFSET = 284, - WASM_TOKEN_TYPE_ALIGN = 285, - WASM_TOKEN_TYPE_CONST = 286, - WASM_TOKEN_TYPE_UNARY = 287, - WASM_TOKEN_TYPE_BINARY = 288, - WASM_TOKEN_TYPE_COMPARE = 289, - WASM_TOKEN_TYPE_CONVERT = 290, - WASM_TOKEN_TYPE_CAST = 291, - WASM_TOKEN_TYPE_SELECT = 292, - WASM_TOKEN_TYPE_FUNC = 293, - WASM_TOKEN_TYPE_TYPE = 294, - WASM_TOKEN_TYPE_PARAM = 295, - WASM_TOKEN_TYPE_RESULT = 296, - WASM_TOKEN_TYPE_LOCAL = 297, - WASM_TOKEN_TYPE_MODULE = 298, - WASM_TOKEN_TYPE_MEMORY = 299, - WASM_TOKEN_TYPE_SEGMENT = 300, - WASM_TOKEN_TYPE_IMPORT = 301, - WASM_TOKEN_TYPE_EXPORT = 302, - WASM_TOKEN_TYPE_TABLE = 303, - WASM_TOKEN_TYPE_UNREACHABLE = 304, - WASM_TOKEN_TYPE_MEMORY_SIZE = 305, - WASM_TOKEN_TYPE_GROW_MEMORY = 306, - WASM_TOKEN_TYPE_HAS_FEATURE = 307, - WASM_TOKEN_TYPE_ASSERT_INVALID = 308, - WASM_TOKEN_TYPE_ASSERT_RETURN = 309, - WASM_TOKEN_TYPE_ASSERT_RETURN_NAN = 310, - WASM_TOKEN_TYPE_ASSERT_TRAP = 311, - WASM_TOKEN_TYPE_INVOKE = 312, - WASM_TOKEN_TYPE_GLOBAL = 313, - WASM_TOKEN_TYPE_LOAD_GLOBAL = 314, - WASM_TOKEN_TYPE_STORE_GLOBAL = 315, - WASM_TOKEN_TYPE_LOW = 316 + WASM_TOKEN_TYPE_OFFSET = 282, + WASM_TOKEN_TYPE_ALIGN = 283, + WASM_TOKEN_TYPE_CONST = 284, + WASM_TOKEN_TYPE_UNARY = 285, + WASM_TOKEN_TYPE_BINARY = 286, + WASM_TOKEN_TYPE_COMPARE = 287, + WASM_TOKEN_TYPE_CONVERT = 288, + WASM_TOKEN_TYPE_CAST = 289, + WASM_TOKEN_TYPE_SELECT = 290, + WASM_TOKEN_TYPE_FUNC = 291, + WASM_TOKEN_TYPE_TYPE = 292, + WASM_TOKEN_TYPE_PARAM = 293, + WASM_TOKEN_TYPE_RESULT = 294, + WASM_TOKEN_TYPE_LOCAL = 295, + WASM_TOKEN_TYPE_MODULE = 296, + WASM_TOKEN_TYPE_MEMORY = 297, + WASM_TOKEN_TYPE_SEGMENT = 298, + WASM_TOKEN_TYPE_IMPORT = 299, + WASM_TOKEN_TYPE_EXPORT = 300, + WASM_TOKEN_TYPE_TABLE = 301, + WASM_TOKEN_TYPE_UNREACHABLE = 302, + WASM_TOKEN_TYPE_MEMORY_SIZE = 303, + WASM_TOKEN_TYPE_GROW_MEMORY = 304, + WASM_TOKEN_TYPE_HAS_FEATURE = 305, + WASM_TOKEN_TYPE_ASSERT_INVALID = 306, + WASM_TOKEN_TYPE_ASSERT_RETURN = 307, + WASM_TOKEN_TYPE_ASSERT_RETURN_NAN = 308, + WASM_TOKEN_TYPE_ASSERT_TRAP = 309, + WASM_TOKEN_TYPE_INVOKE = 310, + WASM_TOKEN_TYPE_GLOBAL = 311, + WASM_TOKEN_TYPE_LOAD_GLOBAL = 312, + WASM_TOKEN_TYPE_STORE_GLOBAL = 313, + WASM_TOKEN_TYPE_LOW = 314 }; #endif @@ -278,7 +276,7 @@ int wasm_parse (WasmScanner scanner, WasmParser* parser); /* Copy the second part of user declarations. */ -#line 282 "src/wasm-parser.c" /* yacc.c:358 */ +#line 280 "src/wasm-parser.c" /* yacc.c:358 */ #ifdef short # undef short @@ -522,21 +520,21 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 7 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 691 +#define YYLAST 722 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 62 +#define YYNTOKENS 60 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 45 /* YYNRULES -- Number of rules. */ -#define YYNRULES 187 +#define YYNRULES 185 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 356 +#define YYNSTATES 347 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 316 +#define YYMAXUTOK 314 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -576,7 +574,7 @@ static const yytype_uint8 yytranslate[] = 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61 + 55, 56, 57, 58, 59 }; #if WASM_DEBUG @@ -587,21 +585,21 @@ static const yytype_uint16 yyrline[] = 201, 210, 218, 219, 222, 226, 230, 234, 238, 239, 243, 244, 251, 252, 260, 263, 267, 272, 278, 285, 291, 297, 304, 311, 318, 326, 332, 337, 359, 365, - 371, 378, 383, 389, 397, 406, 414, 423, 432, 438, - 445, 453, 460, 466, 472, 476, 480, 485, 490, 495, - 503, 504, 507, 511, 517, 518, 522, 526, 532, 533, - 539, 540, 543, 544, 554, 559, 568, 573, 584, 587, - 592, 601, 606, 617, 620, 624, 629, 635, 642, 650, - 659, 669, 678, 686, 695, 703, 710, 718, 727, 735, - 742, 750, 757, 763, 770, 776, 783, 791, 800, 808, - 815, 823, 830, 836, 843, 851, 858, 864, 869, 875, - 882, 890, 899, 907, 914, 922, 929, 935, 942, 950, - 957, 963, 970, 976, 981, 987, 994, 1002, 1009, 1015, - 1022, 1028, 1033, 1039, 1046, 1052, 1057, 1063, 1070, 1076, - 1087, 1088, 1095, 1105, 1116, 1120, 1127, 1131, 1138, 1146, - 1153, 1164, 1171, 1175, 1187, 1188, 1196, 1204, 1212, 1220, - 1228, 1236, 1246, 1324, 1325, 1331, 1336, 1343, 1349, 1358, - 1359, 1366, 1375, 1376, 1379, 1380, 1387, 1393 + 371, 378, 383, 389, 397, 406, 415, 421, 428, 436, + 443, 449, 455, 459, 463, 468, 473, 478, 486, 487, + 490, 494, 500, 501, 505, 509, 515, 516, 522, 523, + 526, 527, 537, 542, 551, 556, 567, 570, 575, 584, + 589, 600, 603, 607, 612, 618, 625, 633, 642, 652, + 661, 669, 678, 686, 693, 701, 710, 718, 725, 733, + 740, 746, 753, 759, 766, 774, 783, 791, 798, 806, + 813, 819, 826, 834, 841, 847, 852, 858, 865, 873, + 882, 890, 897, 905, 912, 918, 925, 933, 940, 946, + 953, 959, 964, 970, 977, 985, 992, 998, 1005, 1011, + 1016, 1022, 1029, 1035, 1040, 1046, 1053, 1059, 1070, 1071, + 1078, 1088, 1099, 1103, 1110, 1114, 1121, 1129, 1136, 1147, + 1154, 1158, 1170, 1171, 1179, 1187, 1195, 1203, 1211, 1219, + 1229, 1307, 1308, 1314, 1319, 1326, 1332, 1341, 1342, 1349, + 1358, 1359, 1362, 1363, 1370, 1376 }; #endif @@ -614,20 +612,20 @@ static const char *const yytname[] = "TEXT", "VAR", "VALUE_TYPE", "NOP", "BLOCK", "IF", "IF_ELSE", "LOOP", "BR", "BR_IF", "TABLESWITCH", "CASE", "CALL", "CALL_IMPORT", "CALL_INDIRECT", "RETURN", "GET_LOCAL", "SET_LOCAL", "LOAD", "STORE", - "LOAD_EXTEND", "STORE_WRAP", "OFFSET", "ALIGN", "CONST", "UNARY", - "BINARY", "COMPARE", "CONVERT", "CAST", "SELECT", "FUNC", "TYPE", - "PARAM", "RESULT", "LOCAL", "MODULE", "MEMORY", "SEGMENT", "IMPORT", - "EXPORT", "TABLE", "UNREACHABLE", "MEMORY_SIZE", "GROW_MEMORY", - "HAS_FEATURE", "ASSERT_INVALID", "ASSERT_RETURN", "ASSERT_RETURN_NAN", - "ASSERT_TRAP", "INVOKE", "GLOBAL", "LOAD_GLOBAL", "STORE_GLOBAL", "LOW", - "$accept", "value_type_list", "func_type", "literal", "var", "var_list", - "bind_var", "text", "quoted_text", "string_contents", "labeling", - "offset", "align", "expr", "expr1", "expr_opt", "non_empty_expr_list", - "expr_list", "target", "target_list", "case", "case_list", "param_list", - "result", "local_list", "type_use", "func_info", "func", "segment", - "segment_list", "memory", "type_def", "table", "import", "export", - "global", "module_fields", "module", "cmd", "cmd_list", "const", - "const_opt", "const_list", "script", "start", YY_NULLPTR + "OFFSET", "ALIGN", "CONST", "UNARY", "BINARY", "COMPARE", "CONVERT", + "CAST", "SELECT", "FUNC", "TYPE", "PARAM", "RESULT", "LOCAL", "MODULE", + "MEMORY", "SEGMENT", "IMPORT", "EXPORT", "TABLE", "UNREACHABLE", + "MEMORY_SIZE", "GROW_MEMORY", "HAS_FEATURE", "ASSERT_INVALID", + "ASSERT_RETURN", "ASSERT_RETURN_NAN", "ASSERT_TRAP", "INVOKE", "GLOBAL", + "LOAD_GLOBAL", "STORE_GLOBAL", "LOW", "$accept", "value_type_list", + "func_type", "literal", "var", "var_list", "bind_var", "text", + "quoted_text", "string_contents", "labeling", "offset", "align", "expr", + "expr1", "expr_opt", "non_empty_expr_list", "expr_list", "target", + "target_list", "case", "case_list", "param_list", "result", "local_list", + "type_use", "func_info", "func", "segment", "segment_list", "memory", + "type_def", "table", "import", "export", "global", "module_fields", + "module", "cmd", "cmd_list", "const", "const_opt", "const_list", + "script", "start", YY_NULLPTR }; #endif @@ -641,15 +639,14 @@ static const yytype_uint16 yytoknum[] = 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316 + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314 }; # endif -#define YYPACT_NINF -155 +#define YYPACT_NINF -154 #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-155))) + (!!((Yystate) == (-154))) #define YYTABLE_NINF -1 @@ -660,42 +657,41 @@ static const yytype_uint16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - -155, 2, -155, 11, 99, -155, -155, -155, -155, 10, - 27, 34, 41, 47, 20, 29, 47, 13, 37, 61, - -155, -155, 1, -155, -155, -155, -155, -155, -155, -155, - -155, 130, 47, 47, 47, 80, 12, 30, 160, 117, - 47, -155, 167, -155, -155, -155, -155, 147, -155, -155, - 333, -155, 180, -155, 183, 191, 197, 198, 199, 200, - 165, 203, 202, 47, 47, 93, 48, 42, 201, 134, - 141, 144, 145, -155, 167, 183, 183, 167, 23, 183, - 167, 93, 93, 93, 183, 93, 93, 179, 179, 179, - 179, 145, 183, 183, 183, 183, 183, 183, 93, 167, - 204, 167, -155, -155, 183, 208, 93, 93, 205, 183, - 191, 197, 198, 199, 631, -155, 414, 183, 197, 198, - 529, 183, 198, 580, 183, 478, 183, 191, 197, 198, - -155, 214, 173, -155, 156, 47, 216, -155, -155, 218, - -155, -155, -155, -155, 219, 217, 221, 47, -155, -155, - 222, -155, 183, 183, 183, 167, 183, 183, -155, -155, - 93, 183, 183, 183, 183, -155, -155, 183, -155, 206, - 206, 206, 206, -155, -155, 183, 183, -155, -155, 183, - 223, 46, 224, 228, 58, 226, -155, -155, -155, -155, - 183, -155, 183, 197, 198, 183, 198, 183, 183, 191, - 197, 198, 167, 183, 198, 183, 183, 167, 183, 197, - 198, 183, 198, 183, 127, 233, 214, 166, 193, -155, - -155, 216, 74, 235, 236, -155, -155, -155, 237, -155, - 239, -155, 183, -155, 183, 183, 183, -155, -155, 183, - 245, -155, -155, 183, -155, -155, 183, 183, 183, 183, - -155, -155, 183, -155, -155, 246, -155, -155, 248, -155, - 183, 198, 183, 183, 183, 197, 198, 183, 198, 183, - 60, 244, 183, 64, 247, 183, 198, 183, 183, -155, - 249, 251, 257, -155, 260, 258, 268, -155, -155, -155, - -155, -155, -155, -155, 225, -155, -155, 183, -155, 183, - -155, -155, -155, 183, 183, 198, 183, 183, -155, 272, - -155, 273, 183, 91, 274, -155, 278, 276, -155, -155, - -155, -155, -155, 183, -155, -155, 281, -155, -155, -155, - 283, 188, 250, -155, 67, 287, -155, 284, 93, 93, - -155, 288, 291, 292, 294, -155, -155, -155, 280, -155, - 104, 183, 295, 296, -155, -155 + -154, 2, -154, 15, 75, -154, -154, -154, -154, 14, + 22, 24, 41, 53, 64, 7, 53, 3, 26, 32, + -154, -154, 20, -154, -154, -154, -154, -154, -154, -154, + -154, 85, 53, 53, 53, 146, 25, 51, 74, 145, + 53, -154, 90, -154, -154, -154, -154, 83, -154, -154, + 419, -154, 116, -154, 120, 122, 162, 165, 178, 179, + 97, 192, 191, 53, 53, 135, 130, 71, 188, 151, + 153, 155, 167, -154, 90, 120, 120, 90, 69, 120, + 90, 135, 135, 135, 120, 135, 135, 176, 176, 167, + 120, 120, 120, 120, 120, 120, 135, 90, 195, 90, + -154, -154, 120, 198, 135, 135, 202, 120, 122, 162, + 165, 178, 664, -154, 468, 120, 162, 165, 566, 120, + 165, 615, 120, 517, 120, 122, 162, 165, -154, 205, + 173, -154, 157, 53, 207, -154, -154, 208, -154, -154, + -154, -154, 215, 217, 218, 53, -154, -154, 219, -154, + 120, 120, 120, 90, 120, 120, -154, -154, 135, 120, + 120, 120, 120, -154, -154, 120, -154, 193, 193, -154, + -154, 120, 120, -154, -154, 120, 220, 84, 222, 223, + 98, 226, -154, -154, -154, -154, 120, -154, 120, 162, + 165, 120, 165, 120, 120, 122, 162, 165, 90, 120, + 165, 120, 120, 90, 120, 162, 165, 120, 165, 120, + 137, 224, 205, 183, 168, -154, -154, 207, -2, 228, + 233, -154, -154, -154, 235, -154, 236, -154, 120, -154, + 120, 120, 120, -154, -154, 120, 238, -154, -154, 120, + -154, -154, 120, 120, -154, -154, 120, -154, -154, 239, + -154, -154, 242, -154, 120, 165, 120, 120, 120, 162, + 165, 120, 165, 120, 105, 240, 120, 109, 241, 120, + 165, 120, 120, -154, 243, 244, 247, -154, 221, 249, + 251, -154, -154, -154, -154, -154, -154, -154, 210, -154, + -154, 120, -154, -154, -154, 120, 120, 165, 120, 120, + -154, 253, -154, 254, 120, 127, 255, -154, 256, 257, + -154, -154, -154, -154, 120, -154, -154, 258, -154, -154, + -154, 259, 190, 227, -154, 126, 262, -154, 260, 135, + 135, -154, 266, 268, 269, 273, -154, -154, -154, 261, + -154, 129, 120, 276, 277, -154, -154 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -703,62 +699,61 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 179, 186, 187, 0, 0, 173, 180, 1, 164, 0, + 177, 184, 185, 0, 0, 171, 178, 1, 162, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 16, 184, 0, 172, 165, 170, 169, 168, 166, 167, - 171, 0, 0, 0, 0, 0, 84, 0, 0, 0, - 0, 12, 2, 175, 184, 184, 184, 0, 174, 185, - 0, 14, 85, 62, 147, 133, 141, 145, 117, 0, - 0, 0, 150, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 25, 18, 0, 0, 18, 60, 0, - 18, 0, 0, 0, 60, 0, 0, 20, 20, 20, - 20, 0, 0, 0, 0, 0, 0, 0, 0, 2, - 0, 2, 54, 55, 0, 0, 0, 0, 0, 116, - 104, 112, 102, 86, 0, 63, 0, 140, 134, 138, - 0, 144, 142, 0, 146, 0, 132, 118, 126, 130, - 148, 4, 0, 150, 0, 0, 4, 10, 11, 0, - 156, 13, 162, 3, 0, 182, 0, 0, 8, 9, - 0, 19, 26, 0, 0, 19, 64, 60, 61, 34, - 0, 0, 64, 64, 0, 36, 41, 0, 21, 22, - 22, 22, 22, 47, 48, 0, 0, 52, 53, 0, - 0, 0, 0, 0, 0, 0, 56, 15, 57, 58, - 0, 24, 111, 105, 109, 115, 113, 103, 101, 87, - 95, 99, 2, 137, 135, 139, 143, 2, 125, 119, - 123, 129, 127, 131, 0, 0, 4, 0, 0, 153, - 151, 4, 0, 0, 0, 161, 163, 183, 0, 177, - 0, 181, 27, 29, 0, 64, 65, 32, 35, 30, - 0, 38, 39, 64, 42, 23, 0, 0, 0, 0, - 49, 51, 0, 83, 74, 0, 78, 79, 0, 59, - 108, 106, 110, 114, 94, 88, 92, 98, 96, 100, - 0, 0, 136, 0, 0, 122, 120, 124, 128, 2, - 0, 0, 0, 152, 0, 0, 0, 159, 157, 176, - 178, 28, 33, 31, 0, 40, 43, 0, 45, 0, - 50, 75, 80, 107, 91, 89, 93, 97, 76, 0, - 81, 0, 121, 0, 0, 154, 0, 0, 160, 158, - 68, 44, 46, 90, 77, 82, 5, 7, 155, 17, - 0, 0, 0, 149, 0, 0, 69, 0, 0, 0, - 72, 0, 0, 0, 37, 6, 67, 66, 0, 73, - 64, 64, 0, 0, 70, 71 + 16, 182, 0, 170, 163, 168, 167, 166, 164, 165, + 169, 0, 0, 0, 0, 0, 82, 0, 0, 0, + 0, 12, 2, 173, 182, 182, 182, 0, 172, 183, + 0, 14, 83, 60, 145, 131, 139, 143, 115, 0, + 0, 0, 148, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 25, 18, 0, 0, 18, 58, 0, + 18, 0, 0, 0, 58, 0, 0, 20, 20, 0, + 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, + 52, 53, 0, 0, 0, 0, 0, 114, 102, 110, + 100, 84, 0, 61, 0, 138, 132, 136, 0, 142, + 140, 0, 144, 0, 130, 116, 124, 128, 146, 4, + 0, 148, 0, 0, 4, 10, 11, 0, 154, 13, + 160, 3, 0, 180, 0, 0, 8, 9, 0, 19, + 26, 0, 0, 19, 62, 58, 59, 34, 0, 0, + 62, 62, 0, 36, 41, 0, 21, 22, 22, 45, + 46, 0, 0, 50, 51, 0, 0, 0, 0, 0, + 0, 0, 54, 15, 55, 56, 0, 24, 109, 103, + 107, 113, 111, 101, 99, 85, 93, 97, 2, 135, + 133, 137, 141, 2, 123, 117, 121, 127, 125, 129, + 0, 0, 4, 0, 0, 151, 149, 4, 0, 0, + 0, 159, 161, 181, 0, 175, 0, 179, 27, 29, + 0, 62, 63, 32, 35, 30, 0, 38, 39, 62, + 42, 23, 0, 0, 47, 49, 0, 81, 72, 0, + 76, 77, 0, 57, 106, 104, 108, 112, 92, 86, + 90, 96, 94, 98, 0, 0, 134, 0, 0, 120, + 118, 122, 126, 2, 0, 0, 0, 150, 0, 0, + 0, 157, 155, 174, 176, 28, 33, 31, 0, 40, + 43, 0, 48, 73, 78, 105, 89, 87, 91, 95, + 74, 0, 79, 0, 119, 0, 0, 152, 0, 0, + 158, 156, 66, 44, 88, 75, 80, 5, 7, 153, + 17, 0, 0, 0, 147, 0, 0, 67, 0, 0, + 0, 70, 0, 0, 0, 37, 6, 65, 64, 0, + 71, 62, 62, 0, 0, 68, 69 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -155, -74, -124, 210, -64, -155, -36, -155, 77, -155, - 25, 32, -40, -18, -155, -77, 211, -154, -33, -155, - -155, -155, -42, -23, 71, -48, -155, -155, -155, 170, - -155, -155, -155, -155, -155, -155, -155, 297, -155, -155, - 159, -155, 118, -155, -155 + -154, -88, -120, 194, -62, -154, -36, -154, 6, -154, + 65, 174, 118, 123, -154, -82, -26, -153, -49, -154, + -154, -154, -40, -3, -5, -39, -154, -154, -154, 156, + -154, -154, -154, -154, -154, -154, -154, 275, -154, -154, + 147, -154, 102, -154, -154 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 67, 215, 150, 139, 66, 151, 188, 21, 330, - 152, 169, 246, 53, 108, 159, 236, 237, 336, 331, - 349, 344, 55, 56, 57, 58, 59, 24, 220, 134, + -1, 67, 211, 148, 137, 66, 149, 184, 21, 321, + 150, 167, 242, 53, 106, 157, 232, 233, 327, 322, + 340, 335, 55, 56, 57, 58, 59, 24, 216, 132, 25, 26, 27, 28, 29, 30, 14, 5, 6, 1, - 49, 228, 35, 2, 3 + 49, 224, 35, 2, 3 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -766,216 +761,221 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint16 yytable[] = { - 52, 61, 141, 63, 113, 4, 68, 165, 241, 242, - 110, 7, 223, 15, 157, 50, 127, 162, 163, 164, - 51, 166, 167, 22, 23, 181, 114, 184, 137, 111, - 17, 138, 118, 60, 180, 128, 115, 18, 51, 36, - 37, 155, 189, 190, 19, 38, 142, 39, 40, 41, - 254, 143, 140, 137, 20, 143, 138, 153, 154, 42, - 158, 160, 257, 182, 308, 185, 158, 143, 310, 143, - 32, 199, 8, 143, 174, 175, 176, 177, 178, 179, - 238, 292, 338, 47, 48, 339, 186, 193, 224, 295, - 200, 115, 282, 31, 33, 326, 239, 285, 137, 115, - 143, 138, 156, 115, 209, 161, 115, 114, 115, 44, - 45, 46, 51, 98, 279, 280, 64, 65, 34, 235, - 170, 171, 172, 112, 20, 51, 119, 122, 270, 129, - 247, 248, 249, 273, 43, 233, 234, 47, 145, 158, - 135, 136, 8, 240, 47, 146, 243, 47, 147, 244, - 148, 149, 9, 10, 11, 12, 13, 250, 251, 218, - 219, 252, 69, 70, 71, 62, 271, 279, 280, 218, - 283, 274, 259, 286, 115, 51, 265, 115, 72, 115, - 115, 194, 196, 50, 201, 115, 114, 115, 115, 204, - 115, 334, 335, 115, 116, 115, 352, 353, 210, 212, - 120, 123, 125, 131, 130, 313, 132, 133, 168, 191, - 144, 216, 221, 183, 115, 187, 291, 214, 115, 222, - 47, 293, 225, 226, 230, 229, 231, 253, 296, 297, - 298, 299, 256, 255, 300, 258, 245, 281, 284, 287, - 288, 289, 115, 290, 115, 115, 115, 54, 294, 115, - 301, 115, 302, 309, 115, 315, 311, 115, 314, 115, - 115, 316, 318, 109, 261, 317, 117, 121, 124, 126, - 266, 268, 319, 320, 342, 343, 324, 325, 327, 321, - 276, 322, 328, 329, 332, 115, 115, 333, 115, 115, - 334, 337, 345, 341, 115, 346, 347, 348, 350, 354, - 355, 173, 340, 217, 227, 115, 16, 0, 0, 0, - 0, 0, 0, 0, 351, 0, 0, 0, 0, 0, - 0, 192, 195, 197, 198, 0, 0, 0, 0, 203, - 205, 0, 0, 206, 0, 0, 305, 0, 208, 211, - 213, 0, 0, 73, 74, 75, 76, 77, 78, 79, - 80, 0, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 0, 232, 91, 92, 93, 94, 95, 96, - 97, 0, 98, 99, 100, 101, 0, 0, 0, 0, - 0, 0, 102, 103, 104, 105, 0, 0, 0, 0, - 0, 0, 106, 107, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 260, 262, 0, 263, 0, 0, - 264, 267, 269, 0, 0, 272, 0, 0, 0, 0, - 275, 277, 0, 278, 73, 74, 75, 76, 77, 78, - 79, 80, 0, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 0, 0, 91, 92, 93, 94, 95, - 96, 97, 0, 0, 202, 100, 101, 0, 0, 0, - 0, 0, 0, 102, 103, 104, 105, 0, 0, 0, - 0, 0, 303, 106, 107, 0, 304, 306, 0, 307, - 0, 0, 0, 0, 0, 0, 0, 312, 73, 74, + 52, 61, 163, 63, 139, 4, 68, 237, 238, 177, + 54, 180, 108, 111, 219, 7, 155, 15, 125, 160, + 161, 162, 31, 164, 165, 17, 107, 18, 50, 115, + 119, 122, 124, 51, 176, 96, 273, 274, 44, 45, + 46, 153, 185, 186, 19, 64, 65, 110, 8, 109, + 117, 120, 116, 127, 60, 126, 36, 37, 32, 51, + 20, 178, 38, 181, 39, 40, 41, 22, 23, 133, + 134, 195, 112, 234, 135, 140, 42, 136, 286, 62, + 141, 33, 188, 191, 193, 194, 289, 34, 248, 43, + 199, 201, 276, 141, 202, 220, 235, 279, 51, 204, + 207, 209, 251, 190, 192, 189, 197, 141, 196, 300, + 264, 200, 72, 302, 141, 267, 8, 231, 141, 50, + 206, 208, 205, 112, 228, 114, 9, 10, 11, 12, + 13, 317, 112, 129, 138, 135, 141, 51, 136, 217, + 135, 329, 154, 136, 330, 159, 69, 70, 71, 47, + 48, 226, 20, 51, 47, 143, 47, 144, 47, 145, + 214, 215, 265, 254, 256, 118, 257, 268, 121, 258, + 261, 263, 146, 147, 266, 273, 274, 113, 280, 269, + 271, 123, 272, 128, 255, 305, 214, 277, 343, 344, + 260, 262, 259, 325, 326, 130, 131, 142, 151, 152, + 270, 156, 158, 166, 179, 183, 187, 156, 210, 212, + 218, 278, 221, 170, 171, 172, 173, 174, 175, 222, + 47, 241, 225, 227, 247, 182, 309, 250, 275, 295, + 113, 249, 281, 296, 298, 252, 299, 282, 113, 283, + 284, 288, 113, 293, 304, 113, 294, 113, 307, 301, + 303, 308, 306, 310, 297, 311, 312, 315, 316, 318, + 319, 323, 168, 324, 320, 325, 328, 333, 334, 332, + 336, 314, 337, 338, 229, 230, 339, 331, 156, 341, + 345, 346, 236, 169, 16, 239, 243, 213, 240, 0, + 223, 0, 0, 0, 244, 245, 0, 0, 246, 0, + 0, 0, 0, 0, 0, 342, 0, 0, 0, 253, + 0, 113, 0, 0, 113, 0, 113, 113, 0, 0, + 0, 0, 113, 0, 113, 113, 0, 113, 0, 0, + 113, 0, 113, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 113, 0, 285, 0, 113, 0, 0, 287, 0, + 0, 0, 0, 0, 0, 290, 291, 0, 0, 292, + 0, 0, 0, 0, 0, 0, 0, 113, 0, 113, + 113, 113, 0, 0, 113, 0, 113, 0, 0, 113, + 0, 0, 113, 0, 113, 113, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 313, 0, 0, 0, 113, 113, + 0, 113, 113, 0, 0, 0, 0, 113, 0, 73, + 74, 75, 76, 77, 78, 79, 80, 113, 81, 82, + 83, 84, 85, 86, 87, 88, 0, 0, 89, 90, + 91, 92, 93, 94, 95, 0, 96, 97, 98, 99, + 0, 0, 0, 0, 0, 0, 100, 101, 102, 103, + 0, 0, 0, 0, 0, 0, 104, 105, 73, 74, 75, 76, 77, 78, 79, 80, 0, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 0, 0, 91, - 92, 93, 94, 95, 96, 97, 323, 0, 99, 100, - 101, 0, 0, 0, 0, 0, 0, 102, 103, 104, - 105, 0, 0, 0, 0, 0, 0, 106, 107, 73, - 74, 75, 76, 77, 78, 79, 80, 0, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 0, 0, - 91, 92, 93, 94, 95, 96, 97, 0, 0, 0, - 0, 101, 0, 0, 0, 0, 0, 0, 102, 103, - 104, 105, 0, 0, 0, 0, 0, 0, 106, 107, - 73, 74, 75, 76, 77, 78, 79, 80, 0, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 0, - 0, 91, 92, 93, 94, 95, 96, 97, 0, 0, - 0, 0, 207, 0, 0, 0, 0, 0, 0, 102, - 103, 104, 105, 0, 0, 0, 0, 0, 0, 106, - 107, 73, 74, 75, 76, 77, 78, 79, 80, 0, - 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, - 0, 0, 91, 92, 93, 94, 95, 96, 97, 0, + 84, 85, 86, 87, 88, 0, 0, 89, 90, 91, + 92, 93, 94, 95, 0, 0, 198, 98, 99, 0, + 0, 0, 0, 0, 0, 100, 101, 102, 103, 0, + 0, 0, 0, 0, 0, 104, 105, 73, 74, 75, + 76, 77, 78, 79, 80, 0, 81, 82, 83, 84, + 85, 86, 87, 88, 0, 0, 89, 90, 91, 92, + 93, 94, 95, 0, 0, 97, 98, 99, 0, 0, + 0, 0, 0, 0, 100, 101, 102, 103, 0, 0, + 0, 0, 0, 0, 104, 105, 73, 74, 75, 76, + 77, 78, 79, 80, 0, 81, 82, 83, 84, 85, + 86, 87, 88, 0, 0, 89, 90, 91, 92, 93, + 94, 95, 0, 0, 0, 0, 99, 0, 0, 0, + 0, 0, 0, 100, 101, 102, 103, 0, 0, 0, + 0, 0, 0, 104, 105, 73, 74, 75, 76, 77, + 78, 79, 80, 0, 81, 82, 83, 84, 85, 86, + 87, 88, 0, 0, 89, 90, 91, 92, 93, 94, + 95, 0, 0, 0, 0, 203, 0, 0, 0, 0, + 0, 0, 100, 101, 102, 103, 0, 0, 0, 0, + 0, 0, 104, 105, 73, 74, 75, 76, 77, 78, + 79, 80, 0, 81, 82, 83, 84, 85, 86, 87, + 88, 0, 0, 89, 90, 91, 92, 93, 94, 95, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 102, 103, 104, 105, 0, 0, 0, 0, 0, 0, - 106, 107 + 0, 100, 101, 102, 103, 0, 0, 0, 0, 0, + 0, 104, 105 }; static const yytype_int16 yycheck[] = { - 36, 37, 66, 39, 52, 3, 42, 84, 162, 163, - 52, 0, 136, 3, 78, 3, 58, 81, 82, 83, - 8, 85, 86, 3, 4, 99, 3, 101, 5, 52, - 3, 8, 55, 3, 98, 58, 54, 3, 8, 38, - 39, 77, 106, 107, 3, 44, 4, 46, 47, 48, - 4, 9, 4, 5, 7, 9, 8, 75, 76, 58, - 78, 79, 4, 99, 4, 101, 84, 9, 4, 9, - 57, 113, 43, 9, 92, 93, 94, 95, 96, 97, - 157, 235, 15, 3, 4, 18, 104, 110, 136, 243, - 113, 109, 216, 16, 57, 4, 160, 221, 5, 117, - 9, 8, 77, 121, 127, 80, 124, 3, 126, 32, - 33, 34, 8, 39, 40, 41, 39, 40, 57, 155, - 88, 89, 90, 52, 7, 8, 55, 56, 202, 58, - 170, 171, 172, 207, 4, 153, 154, 3, 4, 157, - 63, 64, 43, 161, 3, 4, 164, 3, 4, 167, - 5, 6, 53, 54, 55, 56, 57, 175, 176, 3, - 4, 179, 44, 45, 46, 5, 202, 40, 41, 3, - 4, 207, 190, 221, 192, 8, 199, 195, 31, 197, - 198, 110, 111, 3, 113, 203, 3, 205, 206, 118, - 208, 3, 4, 211, 3, 213, 350, 351, 127, 128, - 3, 3, 3, 38, 4, 279, 3, 5, 29, 4, - 9, 38, 135, 9, 232, 7, 234, 3, 236, 3, - 3, 239, 4, 4, 147, 4, 4, 4, 246, 247, - 248, 249, 4, 9, 252, 9, 30, 4, 45, 4, - 4, 4, 260, 4, 262, 263, 264, 36, 3, 267, - 4, 269, 4, 9, 272, 4, 9, 275, 9, 277, - 278, 4, 4, 52, 193, 5, 55, 56, 57, 58, - 199, 200, 4, 48, 338, 339, 4, 4, 4, 297, - 209, 299, 4, 7, 3, 303, 304, 4, 306, 307, - 3, 41, 4, 9, 312, 4, 4, 3, 18, 4, - 4, 91, 335, 133, 145, 323, 9, -1, -1, -1, - -1, -1, -1, -1, 350, -1, -1, -1, -1, -1, - -1, 110, 111, 112, 113, -1, -1, -1, -1, 118, - 119, -1, -1, 122, -1, -1, 265, -1, 127, 128, - 129, -1, -1, 10, 11, 12, 13, 14, 15, 16, - 17, -1, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, -1, 152, 31, 32, 33, 34, 35, 36, - 37, -1, 39, 40, 41, 42, -1, -1, -1, -1, - -1, -1, 49, 50, 51, 52, -1, -1, -1, -1, - -1, -1, 59, 60, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 193, 194, -1, 196, -1, -1, - 199, 200, 201, -1, -1, 204, -1, -1, -1, -1, - 209, 210, -1, 212, 10, 11, 12, 13, 14, 15, - 16, 17, -1, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, -1, -1, 31, 32, 33, 34, 35, - 36, 37, -1, -1, 40, 41, 42, -1, -1, -1, - -1, -1, -1, 49, 50, 51, 52, -1, -1, -1, - -1, -1, 261, 59, 60, -1, 265, 266, -1, 268, - -1, -1, -1, -1, -1, -1, -1, 276, 10, 11, + 36, 37, 84, 39, 66, 3, 42, 160, 161, 97, + 36, 99, 52, 52, 134, 0, 78, 3, 58, 81, + 82, 83, 16, 85, 86, 3, 52, 3, 3, 55, + 56, 57, 58, 8, 96, 37, 38, 39, 32, 33, + 34, 77, 104, 105, 3, 39, 40, 52, 41, 52, + 55, 56, 55, 58, 3, 58, 36, 37, 55, 8, + 7, 97, 42, 99, 44, 45, 46, 3, 4, 63, + 64, 111, 3, 155, 5, 4, 56, 8, 231, 5, + 9, 55, 108, 109, 110, 111, 239, 55, 4, 4, + 116, 117, 212, 9, 120, 134, 158, 217, 8, 125, + 126, 127, 4, 108, 109, 108, 111, 9, 111, 4, + 198, 116, 29, 4, 9, 203, 41, 153, 9, 3, + 125, 126, 125, 3, 150, 3, 51, 52, 53, 54, + 55, 4, 3, 36, 4, 5, 9, 8, 8, 133, + 5, 15, 77, 8, 18, 80, 44, 45, 46, 3, + 4, 145, 7, 8, 3, 4, 3, 4, 3, 4, + 3, 4, 198, 189, 190, 3, 192, 203, 3, 195, + 196, 197, 5, 6, 200, 38, 39, 54, 217, 205, + 206, 3, 208, 4, 189, 273, 3, 4, 341, 342, + 195, 196, 195, 3, 4, 3, 5, 9, 75, 76, + 205, 78, 79, 27, 9, 7, 4, 84, 3, 36, + 3, 43, 4, 90, 91, 92, 93, 94, 95, 4, + 3, 28, 4, 4, 4, 102, 5, 4, 4, 255, + 107, 9, 4, 259, 260, 9, 262, 4, 115, 4, + 4, 3, 119, 4, 270, 122, 4, 124, 4, 9, + 9, 4, 9, 4, 259, 4, 46, 4, 4, 4, + 4, 3, 88, 4, 7, 3, 39, 329, 330, 9, + 4, 297, 4, 4, 151, 152, 3, 326, 155, 18, + 4, 4, 159, 89, 9, 162, 168, 131, 165, -1, + 143, -1, -1, -1, 171, 172, -1, -1, 175, -1, + -1, -1, -1, -1, -1, 341, -1, -1, -1, 186, + -1, 188, -1, -1, 191, -1, 193, 194, -1, -1, + -1, -1, 199, -1, 201, 202, -1, 204, -1, -1, + 207, -1, 209, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 228, -1, 230, -1, 232, -1, -1, 235, -1, + -1, -1, -1, -1, -1, 242, 243, -1, -1, 246, + -1, -1, -1, -1, -1, -1, -1, 254, -1, 256, + 257, 258, -1, -1, 261, -1, 263, -1, -1, 266, + -1, -1, 269, -1, 271, 272, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 291, -1, -1, -1, 295, 296, + -1, 298, 299, -1, -1, -1, -1, 304, -1, 10, + 11, 12, 13, 14, 15, 16, 17, 314, 19, 20, + 21, 22, 23, 24, 25, 26, -1, -1, 29, 30, + 31, 32, 33, 34, 35, -1, 37, 38, 39, 40, + -1, -1, -1, -1, -1, -1, 47, 48, 49, 50, + -1, -1, -1, -1, -1, -1, 57, 58, 10, 11, 12, 13, 14, 15, 16, 17, -1, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, -1, -1, 31, - 32, 33, 34, 35, 36, 37, 305, -1, 40, 41, - 42, -1, -1, -1, -1, -1, -1, 49, 50, 51, - 52, -1, -1, -1, -1, -1, -1, 59, 60, 10, - 11, 12, 13, 14, 15, 16, 17, -1, 19, 20, - 21, 22, 23, 24, 25, 26, 27, 28, -1, -1, - 31, 32, 33, 34, 35, 36, 37, -1, -1, -1, - -1, 42, -1, -1, -1, -1, -1, -1, 49, 50, - 51, 52, -1, -1, -1, -1, -1, -1, 59, 60, - 10, 11, 12, 13, 14, 15, 16, 17, -1, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, -1, - -1, 31, 32, 33, 34, 35, 36, 37, -1, -1, - -1, -1, 42, -1, -1, -1, -1, -1, -1, 49, - 50, 51, 52, -1, -1, -1, -1, -1, -1, 59, - 60, 10, 11, 12, 13, 14, 15, 16, 17, -1, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - -1, -1, 31, 32, 33, 34, 35, 36, 37, -1, + 22, 23, 24, 25, 26, -1, -1, 29, 30, 31, + 32, 33, 34, 35, -1, -1, 38, 39, 40, -1, + -1, -1, -1, -1, -1, 47, 48, 49, 50, -1, + -1, -1, -1, -1, -1, 57, 58, 10, 11, 12, + 13, 14, 15, 16, 17, -1, 19, 20, 21, 22, + 23, 24, 25, 26, -1, -1, 29, 30, 31, 32, + 33, 34, 35, -1, -1, 38, 39, 40, -1, -1, + -1, -1, -1, -1, 47, 48, 49, 50, -1, -1, + -1, -1, -1, -1, 57, 58, 10, 11, 12, 13, + 14, 15, 16, 17, -1, 19, 20, 21, 22, 23, + 24, 25, 26, -1, -1, 29, 30, 31, 32, 33, + 34, 35, -1, -1, -1, -1, 40, -1, -1, -1, + -1, -1, -1, 47, 48, 49, 50, -1, -1, -1, + -1, -1, -1, 57, 58, 10, 11, 12, 13, 14, + 15, 16, 17, -1, 19, 20, 21, 22, 23, 24, + 25, 26, -1, -1, 29, 30, 31, 32, 33, 34, + 35, -1, -1, -1, -1, 40, -1, -1, -1, -1, + -1, -1, 47, 48, 49, 50, -1, -1, -1, -1, + -1, -1, 57, 58, 10, 11, 12, 13, 14, 15, + 16, 17, -1, 19, 20, 21, 22, 23, 24, 25, + 26, -1, -1, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 49, 50, 51, 52, -1, -1, -1, -1, -1, -1, - 59, 60 + -1, 47, 48, 49, 50, -1, -1, -1, -1, -1, + -1, 57, 58 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 101, 105, 106, 3, 99, 100, 0, 43, 53, - 54, 55, 56, 57, 98, 3, 99, 3, 3, 3, - 7, 70, 3, 4, 89, 92, 93, 94, 95, 96, - 97, 70, 57, 57, 57, 104, 38, 39, 44, 46, - 47, 48, 58, 4, 70, 70, 70, 3, 4, 102, - 3, 8, 68, 75, 78, 84, 85, 86, 87, 88, - 3, 68, 5, 68, 70, 70, 67, 63, 68, 104, - 104, 104, 31, 10, 11, 12, 13, 14, 15, 16, - 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 31, 32, 33, 34, 35, 36, 37, 39, 40, - 41, 42, 49, 50, 51, 52, 59, 60, 76, 78, - 84, 85, 86, 87, 3, 75, 3, 78, 85, 86, - 3, 78, 86, 3, 78, 3, 78, 84, 85, 86, - 4, 38, 3, 5, 91, 70, 70, 5, 8, 66, - 4, 66, 4, 9, 9, 4, 4, 4, 5, 6, - 65, 68, 72, 75, 75, 68, 72, 66, 75, 77, - 75, 72, 66, 66, 66, 77, 66, 66, 29, 73, - 73, 73, 73, 65, 75, 75, 75, 75, 75, 75, - 66, 63, 68, 9, 63, 68, 75, 7, 69, 66, - 66, 4, 78, 85, 86, 78, 86, 78, 78, 84, - 85, 86, 40, 78, 86, 78, 78, 42, 78, 85, - 86, 78, 86, 78, 3, 64, 38, 91, 3, 4, - 90, 70, 3, 64, 87, 4, 4, 102, 103, 4, - 70, 4, 78, 75, 75, 68, 78, 79, 77, 66, - 75, 79, 79, 75, 75, 30, 74, 74, 74, 74, - 75, 75, 75, 4, 4, 9, 4, 4, 9, 75, - 78, 86, 78, 78, 78, 85, 86, 78, 86, 78, - 63, 68, 78, 63, 68, 78, 86, 78, 78, 40, - 41, 4, 64, 4, 45, 64, 87, 4, 4, 4, - 4, 75, 79, 75, 3, 79, 75, 75, 75, 75, - 75, 4, 4, 78, 78, 86, 78, 78, 4, 9, - 4, 9, 78, 63, 9, 4, 4, 5, 4, 4, - 48, 75, 75, 78, 4, 4, 4, 4, 4, 7, - 71, 81, 3, 4, 3, 4, 80, 41, 15, 18, - 80, 9, 66, 66, 83, 4, 4, 4, 3, 82, - 18, 68, 79, 79, 4, 4 + 0, 99, 103, 104, 3, 97, 98, 0, 41, 51, + 52, 53, 54, 55, 96, 3, 97, 3, 3, 3, + 7, 68, 3, 4, 87, 90, 91, 92, 93, 94, + 95, 68, 55, 55, 55, 102, 36, 37, 42, 44, + 45, 46, 56, 4, 68, 68, 68, 3, 4, 100, + 3, 8, 66, 73, 76, 82, 83, 84, 85, 86, + 3, 66, 5, 66, 68, 68, 65, 61, 66, 102, + 102, 102, 29, 10, 11, 12, 13, 14, 15, 16, + 17, 19, 20, 21, 22, 23, 24, 25, 26, 29, + 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, + 47, 48, 49, 50, 57, 58, 74, 76, 82, 83, + 84, 85, 3, 73, 3, 76, 83, 84, 3, 76, + 84, 3, 76, 3, 76, 82, 83, 84, 4, 36, + 3, 5, 89, 68, 68, 5, 8, 64, 4, 64, + 4, 9, 9, 4, 4, 4, 5, 6, 63, 66, + 70, 73, 73, 66, 70, 64, 73, 75, 73, 70, + 64, 64, 64, 75, 64, 64, 27, 71, 71, 63, + 73, 73, 73, 73, 73, 73, 64, 61, 66, 9, + 61, 66, 73, 7, 67, 64, 64, 4, 76, 83, + 84, 76, 84, 76, 76, 82, 83, 84, 38, 76, + 84, 76, 76, 40, 76, 83, 84, 76, 84, 76, + 3, 62, 36, 89, 3, 4, 88, 68, 3, 62, + 85, 4, 4, 100, 101, 4, 68, 4, 76, 73, + 73, 66, 76, 77, 75, 64, 73, 77, 77, 73, + 73, 28, 72, 72, 73, 73, 73, 4, 4, 9, + 4, 4, 9, 73, 76, 84, 76, 76, 76, 83, + 84, 76, 84, 76, 61, 66, 76, 61, 66, 76, + 84, 76, 76, 38, 39, 4, 62, 4, 43, 62, + 85, 4, 4, 4, 4, 73, 77, 73, 3, 77, + 73, 73, 73, 4, 4, 76, 76, 84, 76, 76, + 4, 9, 4, 9, 76, 61, 9, 4, 4, 5, + 4, 4, 46, 73, 76, 4, 4, 4, 4, 4, + 7, 69, 79, 3, 4, 3, 4, 78, 39, 15, + 18, 78, 9, 64, 64, 81, 4, 4, 4, 3, + 80, 18, 66, 77, 77, 4, 4 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 62, 63, 63, 64, 64, 64, 64, 65, 65, - 66, 66, 67, 67, 68, 69, 70, 71, 72, 72, - 73, 73, 74, 74, 75, 76, 76, 76, 76, 76, - 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, - 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, - 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, - 77, 77, 78, 78, 79, 79, 80, 80, 81, 81, - 82, 82, 83, 83, 84, 84, 84, 84, 85, 86, - 86, 86, 86, 87, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, - 88, 88, 88, 88, 88, 88, 88, 88, 89, 90, - 91, 91, 92, 92, 93, 93, 94, 95, 95, 95, - 95, 96, 97, 97, 98, 98, 98, 98, 98, 98, - 98, 98, 99, 100, 100, 100, 100, 100, 100, 101, - 101, 102, 103, 103, 104, 104, 105, 106 + 0, 60, 61, 61, 62, 62, 62, 62, 63, 63, + 64, 64, 65, 65, 66, 67, 68, 69, 70, 70, + 71, 71, 72, 72, 73, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, 75, 75, + 76, 76, 77, 77, 78, 78, 79, 79, 80, 80, + 81, 81, 82, 82, 82, 82, 83, 84, 84, 84, + 84, 85, 86, 86, 86, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 87, 88, 89, 89, + 90, 90, 91, 91, 92, 93, 93, 93, 93, 94, + 95, 95, 96, 96, 96, 96, 96, 96, 96, 96, + 97, 98, 98, 98, 98, 98, 98, 99, 99, 100, + 101, 101, 102, 102, 103, 104 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -985,21 +985,21 @@ static const yytype_uint8 yyr2[] = 1, 1, 0, 2, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 3, 1, 2, 3, 4, 3, 3, 4, 3, 4, 2, 3, 2, 9, 3, 3, - 4, 2, 3, 4, 5, 4, 5, 2, 2, 3, - 4, 3, 2, 2, 1, 1, 2, 2, 2, 3, - 0, 1, 1, 2, 0, 1, 4, 4, 0, 2, - 4, 5, 0, 2, 4, 5, 5, 6, 4, 4, - 5, 5, 6, 4, 0, 1, 2, 3, 4, 5, - 6, 5, 4, 5, 4, 3, 4, 5, 4, 3, - 4, 3, 2, 3, 2, 3, 4, 5, 4, 3, - 4, 3, 2, 3, 4, 3, 2, 1, 2, 3, - 4, 5, 4, 3, 4, 3, 2, 3, 4, 3, - 2, 3, 2, 1, 2, 3, 4, 3, 2, 3, - 2, 1, 2, 3, 2, 1, 2, 1, 4, 5, - 0, 2, 6, 5, 7, 8, 4, 6, 7, 6, - 7, 5, 4, 5, 0, 2, 2, 2, 2, 2, - 2, 2, 4, 1, 5, 5, 9, 8, 9, 0, - 2, 4, 0, 1, 0, 2, 1, 1 + 4, 2, 3, 4, 5, 2, 2, 3, 4, 3, + 2, 2, 1, 1, 2, 2, 2, 3, 0, 1, + 1, 2, 0, 1, 4, 4, 0, 2, 4, 5, + 0, 2, 4, 5, 5, 6, 4, 4, 5, 5, + 6, 4, 0, 1, 2, 3, 4, 5, 6, 5, + 4, 5, 4, 3, 4, 5, 4, 3, 4, 3, + 2, 3, 2, 3, 4, 5, 4, 3, 4, 3, + 2, 3, 4, 3, 2, 1, 2, 3, 4, 5, + 4, 3, 4, 3, 2, 3, 4, 3, 2, 3, + 2, 1, 2, 3, 4, 3, 2, 3, 2, 1, + 2, 3, 2, 1, 2, 1, 4, 5, 0, 2, + 6, 5, 7, 8, 4, 6, 7, 6, 7, 5, + 4, 5, 0, 2, 2, 2, 2, 2, 2, 2, + 4, 1, 5, 5, 9, 8, 9, 0, 2, 4, + 0, 1, 0, 2, 1, 1 }; @@ -1495,223 +1495,223 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN switch (yytype) { - case 63: /* value_type_list */ + case 61: /* value_type_list */ #line 138 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_type_vector(&((*yyvaluep).types)); } #line 1502 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 64: /* func_type */ + case 62: /* func_type */ #line 152 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_func_signature(&((*yyvaluep).func_sig)); } #line 1508 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 65: /* literal */ + case 63: /* literal */ #line 137 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_string_slice(&((*yyvaluep).text)); } #line 1514 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 66: /* var */ + case 64: /* var */ #line 139 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_var(&((*yyvaluep).var)); } #line 1520 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 67: /* var_list */ + case 65: /* var_list */ #line 140 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_var_vector_and_elements(&((*yyvaluep).vars)); } #line 1526 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 68: /* bind_var */ + case 66: /* bind_var */ #line 137 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_string_slice(&((*yyvaluep).text)); } #line 1532 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 69: /* text */ + case 67: /* text */ #line 137 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_string_slice(&((*yyvaluep).text)); } #line 1538 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 70: /* quoted_text */ + case 68: /* quoted_text */ #line 137 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_string_slice(&((*yyvaluep).text)); } #line 1544 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 71: /* string_contents */ + case 69: /* string_contents */ #line 149 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_segment(&((*yyvaluep).segment)); } #line 1550 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 72: /* labeling */ + case 70: /* labeling */ #line 137 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_string_slice(&((*yyvaluep).text)); } #line 1556 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 75: /* expr */ + case 73: /* expr */ #line 141 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_expr_ptr(&((*yyvaluep).expr)); } #line 1562 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 76: /* expr1 */ + case 74: /* expr1 */ #line 141 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_expr_ptr(&((*yyvaluep).expr)); } #line 1568 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 77: /* expr_opt */ + case 75: /* expr_opt */ #line 141 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_expr_ptr(&((*yyvaluep).expr)); } #line 1574 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 78: /* non_empty_expr_list */ + case 76: /* non_empty_expr_list */ #line 142 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_expr_ptr_vector_and_elements(&((*yyvaluep).exprs)); } #line 1580 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 79: /* expr_list */ + case 77: /* expr_list */ #line 142 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_expr_ptr_vector_and_elements(&((*yyvaluep).exprs)); } #line 1586 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 80: /* target */ + case 78: /* target */ #line 143 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_target(&((*yyvaluep).target)); } #line 1592 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 81: /* target_list */ + case 79: /* target_list */ #line 144 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_target_vector_and_elements(&((*yyvaluep).targets)); } #line 1598 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 82: /* case */ + case 80: /* case */ #line 145 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_case(&((*yyvaluep).case_)); } #line 1604 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 83: /* case_list */ + case 81: /* case_list */ #line 146 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_case_vector_and_elements(&((*yyvaluep).cases)); } #line 1610 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 84: /* param_list */ + case 82: /* param_list */ #line 147 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_type_bindings(&((*yyvaluep).type_bindings)); } #line 1616 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 86: /* local_list */ + case 84: /* local_list */ #line 147 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_type_bindings(&((*yyvaluep).type_bindings)); } #line 1622 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 88: /* func_info */ + case 86: /* func_info */ #line 148 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_func(&((*yyvaluep).func)); } #line 1628 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 89: /* func */ + case 87: /* func */ #line 148 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_func(&((*yyvaluep).func)); } #line 1634 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 90: /* segment */ + case 88: /* segment */ #line 149 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_segment(&((*yyvaluep).segment)); } #line 1640 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 91: /* segment_list */ + case 89: /* segment_list */ #line 150 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_segment_vector_and_elements(&((*yyvaluep).segments)); } #line 1646 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 92: /* memory */ + case 90: /* memory */ #line 151 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_memory(&((*yyvaluep).memory)); } #line 1652 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 93: /* type_def */ + case 91: /* type_def */ #line 153 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_func_type(&((*yyvaluep).func_type)); } #line 1658 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 94: /* table */ + case 92: /* table */ #line 140 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_var_vector_and_elements(&((*yyvaluep).vars)); } #line 1664 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 95: /* import */ + case 93: /* import */ #line 154 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_import(&((*yyvaluep).import)); } #line 1670 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 96: /* export */ + case 94: /* export */ #line 155 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_export(&((*yyvaluep).export)); } #line 1676 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 97: /* global */ + case 95: /* global */ #line 147 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_type_bindings(&((*yyvaluep).type_bindings)); } #line 1682 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 98: /* module_fields */ + case 96: /* module_fields */ #line 156 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_module_field_vector_and_elements(&((*yyvaluep).module_fields)); } #line 1688 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 99: /* module */ + case 97: /* module */ #line 157 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_module(&((*yyvaluep).module)); } #line 1694 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 100: /* cmd */ + case 98: /* cmd */ #line 159 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_command(&((*yyvaluep).command)); } #line 1700 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 101: /* cmd_list */ + case 99: /* cmd_list */ #line 160 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_command_vector_and_elements(&((*yyvaluep).commands)); } #line 1706 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 104: /* const_list */ + case 102: /* const_list */ #line 158 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_const_vector(&((*yyvaluep).consts)); } #line 1712 "src/wasm-parser.c" /* yacc.c:1257 */ break; - case 105: /* script */ + case 103: /* script */ #line 161 "src/wasm-parser.y" /* yacc.c:1257 */ { wasm_destroy_script(&((*yyvaluep).script)); } #line 1718 "src/wasm-parser.c" /* yacc.c:1257 */ @@ -2419,33 +2419,6 @@ yyreduce: case 45: #line 406 "src/wasm-parser.y" /* yacc.c:1646 */ { - (yyval.expr) = wasm_new_expr(WASM_EXPR_TYPE_LOAD_EXTEND); - CHECK_ALLOC_NULL((yyval.expr)); - (yyval.expr)->load.op = (yyvsp[-3].mem); - (yyval.expr)->load.offset = (yyvsp[-2].u64); - (yyval.expr)->load.align = (yyvsp[-1].u32); - (yyval.expr)->load.addr = (yyvsp[0].expr); - } -#line 2430 "src/wasm-parser.c" /* yacc.c:1646 */ - break; - - case 46: -#line 414 "src/wasm-parser.y" /* yacc.c:1646 */ - { - (yyval.expr) = wasm_new_expr(WASM_EXPR_TYPE_STORE_WRAP); - CHECK_ALLOC_NULL((yyval.expr)); - (yyval.expr)->store.op = (yyvsp[-4].mem); - (yyval.expr)->store.offset = (yyvsp[-3].u64); - (yyval.expr)->store.align = (yyvsp[-2].u32); - (yyval.expr)->store.addr = (yyvsp[-1].expr); - (yyval.expr)->store.value = (yyvsp[0].expr); - } -#line 2444 "src/wasm-parser.c" /* yacc.c:1646 */ - break; - - case 47: -#line 423 "src/wasm-parser.y" /* yacc.c:1646 */ - { (yyval.expr) = wasm_new_expr(WASM_EXPR_TYPE_CONST); CHECK_ALLOC_NULL((yyval.expr)); (yyval.expr)->const_.loc = (yylsp[-1]); @@ -2454,22 +2427,22 @@ yyreduce: (yyvsp[0].text).start); free((char*)(yyvsp[0].text).start); } -#line 2458 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2431 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 48: -#line 432 "src/wasm-parser.y" /* yacc.c:1646 */ + case 46: +#line 415 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.expr) = wasm_new_expr(WASM_EXPR_TYPE_UNARY); CHECK_ALLOC_NULL((yyval.expr)); (yyval.expr)->unary.op = (yyvsp[-1].unary); (yyval.expr)->unary.expr = (yyvsp[0].expr); } -#line 2469 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2442 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 49: -#line 438 "src/wasm-parser.y" /* yacc.c:1646 */ + case 47: +#line 421 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.expr) = wasm_new_expr(WASM_EXPR_TYPE_BINARY); CHECK_ALLOC_NULL((yyval.expr)); @@ -2477,11 +2450,11 @@ yyreduce: (yyval.expr)->binary.left = (yyvsp[-1].expr); (yyval.expr)->binary.right = (yyvsp[0].expr); } -#line 2481 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2454 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 50: -#line 445 "src/wasm-parser.y" /* yacc.c:1646 */ + case 48: +#line 428 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.expr) = wasm_new_expr(WASM_EXPR_TYPE_SELECT); CHECK_ALLOC_NULL((yyval.expr)); @@ -2490,11 +2463,11 @@ yyreduce: (yyval.expr)->select.true_ = (yyvsp[-1].expr); (yyval.expr)->select.false_ = (yyvsp[0].expr); } -#line 2494 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2467 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 51: -#line 453 "src/wasm-parser.y" /* yacc.c:1646 */ + case 49: +#line 436 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.expr) = wasm_new_expr(WASM_EXPR_TYPE_COMPARE); CHECK_ALLOC_NULL((yyval.expr)); @@ -2502,192 +2475,192 @@ yyreduce: (yyval.expr)->compare.left = (yyvsp[-1].expr); (yyval.expr)->compare.right = (yyvsp[0].expr); } -#line 2506 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2479 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 52: -#line 460 "src/wasm-parser.y" /* yacc.c:1646 */ + case 50: +#line 443 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.expr) = wasm_new_expr(WASM_EXPR_TYPE_CONVERT); CHECK_ALLOC_NULL((yyval.expr)); (yyval.expr)->convert.op = (yyvsp[-1].convert); (yyval.expr)->convert.expr = (yyvsp[0].expr); } -#line 2517 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2490 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 53: -#line 466 "src/wasm-parser.y" /* yacc.c:1646 */ + case 51: +#line 449 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.expr) = wasm_new_expr(WASM_EXPR_TYPE_CAST); CHECK_ALLOC_NULL((yyval.expr)); (yyval.expr)->cast.op = (yyvsp[-1].cast); (yyval.expr)->cast.expr = (yyvsp[0].expr); } -#line 2528 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2501 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 54: -#line 472 "src/wasm-parser.y" /* yacc.c:1646 */ + case 52: +#line 455 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.expr) = wasm_new_expr(WASM_EXPR_TYPE_UNREACHABLE); CHECK_ALLOC_NULL((yyval.expr)); } -#line 2537 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2510 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 55: -#line 476 "src/wasm-parser.y" /* yacc.c:1646 */ + case 53: +#line 459 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.expr) = wasm_new_expr(WASM_EXPR_TYPE_MEMORY_SIZE); CHECK_ALLOC_NULL((yyval.expr)); } -#line 2546 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2519 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 56: -#line 480 "src/wasm-parser.y" /* yacc.c:1646 */ + case 54: +#line 463 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.expr) = wasm_new_expr(WASM_EXPR_TYPE_GROW_MEMORY); CHECK_ALLOC_NULL((yyval.expr)); (yyval.expr)->grow_memory.expr = (yyvsp[0].expr); } -#line 2556 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2529 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 57: -#line 485 "src/wasm-parser.y" /* yacc.c:1646 */ + case 55: +#line 468 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.expr) = wasm_new_expr(WASM_EXPR_TYPE_HAS_FEATURE); CHECK_ALLOC_NULL((yyval.expr)); (yyval.expr)->has_feature.text = (yyvsp[0].text); } -#line 2566 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2539 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 58: -#line 490 "src/wasm-parser.y" /* yacc.c:1646 */ + case 56: +#line 473 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.expr) = wasm_new_expr(WASM_EXPR_TYPE_LOAD_GLOBAL); CHECK_ALLOC_NULL((yyval.expr)); (yyval.expr)->load_global.var = (yyvsp[0].var); } -#line 2576 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2549 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 59: -#line 495 "src/wasm-parser.y" /* yacc.c:1646 */ + case 57: +#line 478 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.expr) = wasm_new_expr(WASM_EXPR_TYPE_STORE_GLOBAL); CHECK_ALLOC_NULL((yyval.expr)); (yyval.expr)->store_global.var = (yyvsp[-1].var); (yyval.expr)->store_global.expr = (yyvsp[0].expr); } -#line 2587 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2560 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 60: -#line 503 "src/wasm-parser.y" /* yacc.c:1646 */ + case 58: +#line 486 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.expr) = NULL; } -#line 2593 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2566 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 62: -#line 507 "src/wasm-parser.y" /* yacc.c:1646 */ + case 60: +#line 490 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.exprs)); CHECK_ALLOC(wasm_append_expr_ptr_value(&(yyval.exprs), &(yyvsp[0].expr))); } -#line 2602 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2575 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 63: -#line 511 "src/wasm-parser.y" /* yacc.c:1646 */ + case 61: +#line 494 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.exprs) = (yyvsp[-1].exprs); CHECK_ALLOC(wasm_append_expr_ptr_value(&(yyval.exprs), &(yyvsp[0].expr))); } -#line 2611 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2584 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 64: -#line 517 "src/wasm-parser.y" /* yacc.c:1646 */ + case 62: +#line 500 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.exprs)); } -#line 2617 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2590 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 66: -#line 522 "src/wasm-parser.y" /* yacc.c:1646 */ + case 64: +#line 505 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.target).type = WASM_TARGET_TYPE_CASE; (yyval.target).var = (yyvsp[-1].var); } -#line 2626 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2599 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 67: -#line 526 "src/wasm-parser.y" /* yacc.c:1646 */ + case 65: +#line 509 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.target).type = WASM_TARGET_TYPE_BR; (yyval.target).var = (yyvsp[-1].var); } -#line 2635 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2608 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 68: -#line 532 "src/wasm-parser.y" /* yacc.c:1646 */ + case 66: +#line 515 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.targets)); } -#line 2641 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2614 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 69: -#line 533 "src/wasm-parser.y" /* yacc.c:1646 */ + case 67: +#line 516 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.targets) = (yyvsp[-1].targets); CHECK_ALLOC(wasm_append_target_value(&(yyval.targets), &(yyvsp[0].target))); } -#line 2650 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2623 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 70: -#line 539 "src/wasm-parser.y" /* yacc.c:1646 */ + case 68: +#line 522 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.case_).label); (yyval.case_).exprs = (yyvsp[-1].exprs); } -#line 2656 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2629 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 71: -#line 540 "src/wasm-parser.y" /* yacc.c:1646 */ + case 69: +#line 523 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.case_).label = (yyvsp[-2].text); (yyval.case_).exprs = (yyvsp[-1].exprs); } -#line 2662 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2635 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 72: -#line 543 "src/wasm-parser.y" /* yacc.c:1646 */ + case 70: +#line 526 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.cases)); } -#line 2668 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2641 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 73: -#line 544 "src/wasm-parser.y" /* yacc.c:1646 */ + case 71: +#line 527 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.cases) = (yyvsp[-1].cases); CHECK_ALLOC(wasm_append_case_value(&(yyval.cases), &(yyvsp[0].case_))); } -#line 2677 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2650 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 74: -#line 554 "src/wasm-parser.y" /* yacc.c:1646 */ + case 72: +#line 537 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.type_bindings)); CHECK_ALLOC(wasm_extend_types(&(yyval.type_bindings).types, &(yyvsp[-1].types))); wasm_destroy_type_vector(&(yyvsp[-1].types)); } -#line 2687 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2660 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 75: -#line 559 "src/wasm-parser.y" /* yacc.c:1646 */ + case 73: +#line 542 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.type_bindings)); WasmBinding* binding = wasm_append_binding(&(yyval.type_bindings).bindings); @@ -2697,21 +2670,21 @@ yyreduce: binding->index = (yyval.type_bindings).types.size; CHECK_ALLOC(wasm_append_type_value(&(yyval.type_bindings).types, &(yyvsp[-1].type))); } -#line 2701 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2674 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 76: -#line 568 "src/wasm-parser.y" /* yacc.c:1646 */ + case 74: +#line 551 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.type_bindings) = (yyvsp[-4].type_bindings); CHECK_ALLOC(wasm_extend_types(&(yyval.type_bindings).types, &(yyvsp[-1].types))); wasm_destroy_type_vector(&(yyvsp[-1].types)); } -#line 2711 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2684 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 77: -#line 573 "src/wasm-parser.y" /* yacc.c:1646 */ + case 75: +#line 556 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.type_bindings) = (yyvsp[-5].type_bindings); WasmBinding* binding = wasm_append_binding(&(yyval.type_bindings).bindings); @@ -2721,27 +2694,27 @@ yyreduce: binding->index = (yyval.type_bindings).types.size; CHECK_ALLOC(wasm_append_type_value(&(yyval.type_bindings).types, &(yyvsp[-1].type))); } -#line 2725 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2698 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 78: -#line 584 "src/wasm-parser.y" /* yacc.c:1646 */ + case 76: +#line 567 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.type) = (yyvsp[-1].type); } -#line 2731 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2704 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 79: -#line 587 "src/wasm-parser.y" /* yacc.c:1646 */ + case 77: +#line 570 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.type_bindings)); CHECK_ALLOC(wasm_extend_types(&(yyval.type_bindings).types, &(yyvsp[-1].types))); wasm_destroy_type_vector(&(yyvsp[-1].types)); } -#line 2741 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2714 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 80: -#line 592 "src/wasm-parser.y" /* yacc.c:1646 */ + case 78: +#line 575 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.type_bindings)); WasmBinding* binding = wasm_append_binding(&(yyval.type_bindings).bindings); @@ -2751,21 +2724,21 @@ yyreduce: binding->index = (yyval.type_bindings).types.size; CHECK_ALLOC(wasm_append_type_value(&(yyval.type_bindings).types, &(yyvsp[-1].type))); } -#line 2755 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2728 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 81: -#line 601 "src/wasm-parser.y" /* yacc.c:1646 */ + case 79: +#line 584 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.type_bindings) = (yyvsp[-4].type_bindings); CHECK_ALLOC(wasm_extend_types(&(yyval.type_bindings).types, &(yyvsp[-1].types))); wasm_destroy_type_vector(&(yyvsp[-1].types)); } -#line 2765 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2738 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 82: -#line 606 "src/wasm-parser.y" /* yacc.c:1646 */ + case 80: +#line 589 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.type_bindings) = (yyvsp[-5].type_bindings); WasmBinding* binding = wasm_append_binding(&(yyval.type_bindings).bindings); @@ -2775,47 +2748,47 @@ yyreduce: binding->index = (yyval.type_bindings).types.size; CHECK_ALLOC(wasm_append_type_value(&(yyval.type_bindings).types, &(yyvsp[-1].type))); } -#line 2779 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2752 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 83: -#line 617 "src/wasm-parser.y" /* yacc.c:1646 */ + case 81: +#line 600 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.var) = (yyvsp[-1].var); } -#line 2785 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2758 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 84: -#line 620 "src/wasm-parser.y" /* yacc.c:1646 */ + case 82: +#line 603 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; } -#line 2794 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2767 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 85: -#line 624 "src/wasm-parser.y" /* yacc.c:1646 */ + case 83: +#line 607 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; (yyval.func).name = (yyvsp[0].text); } -#line 2804 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2777 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 86: -#line 629 "src/wasm-parser.y" /* yacc.c:1646 */ + case 84: +#line 612 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE; (yyval.func).name = (yyvsp[-1].text); (yyval.func).type_var = (yyvsp[0].var); } -#line 2815 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2788 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 87: -#line 635 "src/wasm-parser.y" /* yacc.c:1646 */ + case 85: +#line 618 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE | WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -2823,11 +2796,11 @@ yyreduce: (yyval.func).type_var = (yyvsp[-1].var); (yyval.func).params = (yyvsp[0].type_bindings); } -#line 2827 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2800 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 88: -#line 642 "src/wasm-parser.y" /* yacc.c:1646 */ + case 86: +#line 625 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE | WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -2836,11 +2809,11 @@ yyreduce: (yyval.func).params = (yyvsp[-1].type_bindings); (yyval.func).result_type = (yyvsp[0].type); } -#line 2840 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2813 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 89: -#line 650 "src/wasm-parser.y" /* yacc.c:1646 */ + case 87: +#line 633 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE | WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -2850,11 +2823,11 @@ yyreduce: (yyval.func).result_type = (yyvsp[-1].type); (yyval.func).locals = (yyvsp[0].type_bindings); } -#line 2854 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2827 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 90: -#line 659 "src/wasm-parser.y" /* yacc.c:1646 */ + case 88: +#line 642 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE | WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -2865,11 +2838,11 @@ yyreduce: (yyval.func).locals = (yyvsp[-1].type_bindings); (yyval.func).exprs = (yyvsp[0].exprs); } -#line 2869 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2842 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 91: -#line 669 "src/wasm-parser.y" /* yacc.c:1646 */ + case 89: +#line 652 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE | WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -2879,11 +2852,11 @@ yyreduce: (yyval.func).result_type = (yyvsp[-1].type); (yyval.func).exprs = (yyvsp[0].exprs); } -#line 2883 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2856 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 92: -#line 678 "src/wasm-parser.y" /* yacc.c:1646 */ + case 90: +#line 661 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE | WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -2892,11 +2865,11 @@ yyreduce: (yyval.func).params = (yyvsp[-1].type_bindings); (yyval.func).locals = (yyvsp[0].type_bindings); } -#line 2896 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2869 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 93: -#line 686 "src/wasm-parser.y" /* yacc.c:1646 */ + case 91: +#line 669 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE | WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -2906,11 +2879,11 @@ yyreduce: (yyval.func).locals = (yyvsp[-1].type_bindings); (yyval.func).exprs = (yyvsp[0].exprs); } -#line 2910 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2883 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 94: -#line 695 "src/wasm-parser.y" /* yacc.c:1646 */ + case 92: +#line 678 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE | WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -2919,11 +2892,11 @@ yyreduce: (yyval.func).params = (yyvsp[-1].type_bindings); (yyval.func).exprs = (yyvsp[0].exprs); } -#line 2923 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2896 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 95: -#line 703 "src/wasm-parser.y" /* yacc.c:1646 */ + case 93: +#line 686 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE | WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -2931,11 +2904,11 @@ yyreduce: (yyval.func).type_var = (yyvsp[-1].var); (yyval.func).result_type = (yyvsp[0].type); } -#line 2935 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2908 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 96: -#line 710 "src/wasm-parser.y" /* yacc.c:1646 */ + case 94: +#line 693 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE | WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -2944,11 +2917,11 @@ yyreduce: (yyval.func).result_type = (yyvsp[-1].type); (yyval.func).locals = (yyvsp[0].type_bindings); } -#line 2948 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2921 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 97: -#line 718 "src/wasm-parser.y" /* yacc.c:1646 */ + case 95: +#line 701 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE | WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -2958,11 +2931,11 @@ yyreduce: (yyval.func).locals = (yyvsp[-1].type_bindings); (yyval.func).exprs = (yyvsp[0].exprs); } -#line 2962 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2935 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 98: -#line 727 "src/wasm-parser.y" /* yacc.c:1646 */ + case 96: +#line 710 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE | WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -2971,11 +2944,11 @@ yyreduce: (yyval.func).result_type = (yyvsp[-1].type); (yyval.func).exprs = (yyvsp[0].exprs); } -#line 2975 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2948 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 99: -#line 735 "src/wasm-parser.y" /* yacc.c:1646 */ + case 97: +#line 718 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE; @@ -2983,11 +2956,11 @@ yyreduce: (yyval.func).type_var = (yyvsp[-1].var); (yyval.func).locals = (yyvsp[0].type_bindings); } -#line 2987 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2960 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 100: -#line 742 "src/wasm-parser.y" /* yacc.c:1646 */ + case 98: +#line 725 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE; @@ -2996,11 +2969,11 @@ yyreduce: (yyval.func).locals = (yyvsp[-1].type_bindings); (yyval.func).exprs = (yyvsp[0].exprs); } -#line 3000 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2973 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 101: -#line 750 "src/wasm-parser.y" /* yacc.c:1646 */ + case 99: +#line 733 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE; @@ -3008,22 +2981,22 @@ yyreduce: (yyval.func).type_var = (yyvsp[-1].var); (yyval.func).exprs = (yyvsp[0].exprs); } -#line 3012 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2985 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 102: -#line 757 "src/wasm-parser.y" /* yacc.c:1646 */ + case 100: +#line 740 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; (yyval.func).name = (yyvsp[-1].text); (yyval.func).locals = (yyvsp[0].type_bindings); } -#line 3023 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 2996 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 103: -#line 763 "src/wasm-parser.y" /* yacc.c:1646 */ + case 101: +#line 746 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -3031,22 +3004,22 @@ yyreduce: (yyval.func).locals = (yyvsp[-1].type_bindings); (yyval.func).exprs = (yyvsp[0].exprs); } -#line 3035 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3008 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 104: -#line 770 "src/wasm-parser.y" /* yacc.c:1646 */ + case 102: +#line 753 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; (yyval.func).name = (yyvsp[-1].text); (yyval.func).params = (yyvsp[0].type_bindings); } -#line 3046 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3019 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 105: -#line 776 "src/wasm-parser.y" /* yacc.c:1646 */ + case 103: +#line 759 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -3054,11 +3027,11 @@ yyreduce: (yyval.func).params = (yyvsp[-1].type_bindings); (yyval.func).result_type = (yyvsp[0].type); } -#line 3058 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3031 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 106: -#line 783 "src/wasm-parser.y" /* yacc.c:1646 */ + case 104: +#line 766 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -3067,11 +3040,11 @@ yyreduce: (yyval.func).result_type = (yyvsp[-1].type); (yyval.func).locals = (yyvsp[0].type_bindings); } -#line 3071 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3044 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 107: -#line 791 "src/wasm-parser.y" /* yacc.c:1646 */ + case 105: +#line 774 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -3081,11 +3054,11 @@ yyreduce: (yyval.func).locals = (yyvsp[-1].type_bindings); (yyval.func).exprs = (yyvsp[0].exprs); } -#line 3085 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3058 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 108: -#line 800 "src/wasm-parser.y" /* yacc.c:1646 */ + case 106: +#line 783 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -3094,11 +3067,11 @@ yyreduce: (yyval.func).result_type = (yyvsp[-1].type); (yyval.func).exprs = (yyvsp[0].exprs); } -#line 3098 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3071 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 109: -#line 808 "src/wasm-parser.y" /* yacc.c:1646 */ + case 107: +#line 791 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -3106,11 +3079,11 @@ yyreduce: (yyval.func).params = (yyvsp[-1].type_bindings); (yyval.func).locals = (yyvsp[0].type_bindings); } -#line 3110 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3083 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 110: -#line 815 "src/wasm-parser.y" /* yacc.c:1646 */ + case 108: +#line 798 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -3119,11 +3092,11 @@ yyreduce: (yyval.func).locals = (yyvsp[-1].type_bindings); (yyval.func).exprs = (yyvsp[0].exprs); } -#line 3123 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3096 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 111: -#line 823 "src/wasm-parser.y" /* yacc.c:1646 */ + case 109: +#line 806 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -3131,22 +3104,22 @@ yyreduce: (yyval.func).params = (yyvsp[-1].type_bindings); (yyval.func).exprs = (yyvsp[0].exprs); } -#line 3135 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3108 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 112: -#line 830 "src/wasm-parser.y" /* yacc.c:1646 */ + case 110: +#line 813 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; (yyval.func).name = (yyvsp[-1].text); (yyval.func).result_type = (yyvsp[0].type); } -#line 3146 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3119 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 113: -#line 836 "src/wasm-parser.y" /* yacc.c:1646 */ + case 111: +#line 819 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -3154,11 +3127,11 @@ yyreduce: (yyval.func).result_type = (yyvsp[-1].type); (yyval.func).locals = (yyvsp[0].type_bindings); } -#line 3158 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3131 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 114: -#line 843 "src/wasm-parser.y" /* yacc.c:1646 */ + case 112: +#line 826 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -3167,11 +3140,11 @@ yyreduce: (yyval.func).locals = (yyvsp[-1].type_bindings); (yyval.func).exprs = (yyvsp[0].exprs); } -#line 3171 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3144 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 115: -#line 851 "src/wasm-parser.y" /* yacc.c:1646 */ + case 113: +#line 834 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -3179,43 +3152,43 @@ yyreduce: (yyval.func).result_type = (yyvsp[-1].type); (yyval.func).exprs = (yyvsp[0].exprs); } -#line 3183 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3156 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 116: -#line 858 "src/wasm-parser.y" /* yacc.c:1646 */ + case 114: +#line 841 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; (yyval.func).name = (yyvsp[-1].text); (yyval.func).exprs = (yyvsp[0].exprs); } -#line 3194 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3167 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 117: -#line 864 "src/wasm-parser.y" /* yacc.c:1646 */ + case 115: +#line 847 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE; (yyval.func).type_var = (yyvsp[0].var); } -#line 3204 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3177 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 118: -#line 869 "src/wasm-parser.y" /* yacc.c:1646 */ + case 116: +#line 852 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE | WASM_FUNC_FLAG_HAS_SIGNATURE; (yyval.func).type_var = (yyvsp[-1].var); (yyval.func).params = (yyvsp[0].type_bindings); } -#line 3215 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3188 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 119: -#line 875 "src/wasm-parser.y" /* yacc.c:1646 */ + case 117: +#line 858 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE | WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -3223,11 +3196,11 @@ yyreduce: (yyval.func).params = (yyvsp[-1].type_bindings); (yyval.func).result_type = (yyvsp[0].type); } -#line 3227 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3200 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 120: -#line 882 "src/wasm-parser.y" /* yacc.c:1646 */ + case 118: +#line 865 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE | WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -3236,11 +3209,11 @@ yyreduce: (yyval.func).result_type = (yyvsp[-1].type); (yyval.func).locals = (yyvsp[0].type_bindings); } -#line 3240 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3213 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 121: -#line 890 "src/wasm-parser.y" /* yacc.c:1646 */ + case 119: +#line 873 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE | WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -3250,11 +3223,11 @@ yyreduce: (yyval.func).locals = (yyvsp[-1].type_bindings); (yyval.func).exprs = (yyvsp[0].exprs); } -#line 3254 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3227 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 122: -#line 899 "src/wasm-parser.y" /* yacc.c:1646 */ + case 120: +#line 882 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE | WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -3263,11 +3236,11 @@ yyreduce: (yyval.func).result_type = (yyvsp[-1].type); (yyval.func).exprs = (yyvsp[0].exprs); } -#line 3267 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3240 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 123: -#line 907 "src/wasm-parser.y" /* yacc.c:1646 */ + case 121: +#line 890 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE | WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -3275,11 +3248,11 @@ yyreduce: (yyval.func).params = (yyvsp[-1].type_bindings); (yyval.func).locals = (yyvsp[0].type_bindings); } -#line 3279 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3252 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 124: -#line 914 "src/wasm-parser.y" /* yacc.c:1646 */ + case 122: +#line 897 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE | WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -3288,11 +3261,11 @@ yyreduce: (yyval.func).locals = (yyvsp[-1].type_bindings); (yyval.func).exprs = (yyvsp[0].exprs); } -#line 3292 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3265 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 125: -#line 922 "src/wasm-parser.y" /* yacc.c:1646 */ + case 123: +#line 905 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE | WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -3300,22 +3273,22 @@ yyreduce: (yyval.func).params = (yyvsp[-1].type_bindings); (yyval.func).exprs = (yyvsp[0].exprs); } -#line 3304 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3277 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 126: -#line 929 "src/wasm-parser.y" /* yacc.c:1646 */ + case 124: +#line 912 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE | WASM_FUNC_FLAG_HAS_SIGNATURE; (yyval.func).type_var = (yyvsp[-1].var); (yyval.func).result_type = (yyvsp[0].type); } -#line 3315 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3288 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 127: -#line 935 "src/wasm-parser.y" /* yacc.c:1646 */ + case 125: +#line 918 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE | WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -3323,11 +3296,11 @@ yyreduce: (yyval.func).result_type = (yyvsp[-1].type); (yyval.func).locals = (yyvsp[0].type_bindings); } -#line 3327 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3300 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 128: -#line 942 "src/wasm-parser.y" /* yacc.c:1646 */ + case 126: +#line 925 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE | WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -3336,11 +3309,11 @@ yyreduce: (yyval.func).locals = (yyvsp[-1].type_bindings); (yyval.func).exprs = (yyvsp[0].exprs); } -#line 3340 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3313 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 129: -#line 950 "src/wasm-parser.y" /* yacc.c:1646 */ + case 127: +#line 933 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE | WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -3348,22 +3321,22 @@ yyreduce: (yyval.func).result_type = (yyvsp[-1].type); (yyval.func).exprs = (yyvsp[0].exprs); } -#line 3352 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3325 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 130: -#line 957 "src/wasm-parser.y" /* yacc.c:1646 */ + case 128: +#line 940 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE; (yyval.func).type_var = (yyvsp[-1].var); (yyval.func).locals = (yyvsp[0].type_bindings); } -#line 3363 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3336 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 131: -#line 963 "src/wasm-parser.y" /* yacc.c:1646 */ + case 129: +#line 946 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE; @@ -3371,43 +3344,43 @@ yyreduce: (yyval.func).locals = (yyvsp[-1].type_bindings); (yyval.func).exprs = (yyvsp[0].exprs); } -#line 3375 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3348 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 132: -#line 970 "src/wasm-parser.y" /* yacc.c:1646 */ + case 130: +#line 953 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_FUNC_TYPE; (yyval.func).type_var = (yyvsp[-1].var); (yyval.func).exprs = (yyvsp[0].exprs); } -#line 3386 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3359 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 133: -#line 976 "src/wasm-parser.y" /* yacc.c:1646 */ + case 131: +#line 959 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; (yyval.func).params = (yyvsp[0].type_bindings); } -#line 3396 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3369 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 134: -#line 981 "src/wasm-parser.y" /* yacc.c:1646 */ + case 132: +#line 964 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; (yyval.func).params = (yyvsp[-1].type_bindings); (yyval.func).result_type = (yyvsp[0].type); } -#line 3407 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3380 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 135: -#line 987 "src/wasm-parser.y" /* yacc.c:1646 */ + case 133: +#line 970 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -3415,11 +3388,11 @@ yyreduce: (yyval.func).result_type = (yyvsp[-1].type); (yyval.func).locals = (yyvsp[0].type_bindings); } -#line 3419 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3392 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 136: -#line 994 "src/wasm-parser.y" /* yacc.c:1646 */ + case 134: +#line 977 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -3428,11 +3401,11 @@ yyreduce: (yyval.func).locals = (yyvsp[-1].type_bindings); (yyval.func).exprs = (yyvsp[0].exprs); } -#line 3432 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3405 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 137: -#line 1002 "src/wasm-parser.y" /* yacc.c:1646 */ + case 135: +#line 985 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -3440,22 +3413,22 @@ yyreduce: (yyval.func).result_type = (yyvsp[-1].type); (yyval.func).exprs = (yyvsp[0].exprs); } -#line 3444 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3417 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 138: -#line 1009 "src/wasm-parser.y" /* yacc.c:1646 */ + case 136: +#line 992 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; (yyval.func).params = (yyvsp[-1].type_bindings); (yyval.func).locals = (yyvsp[0].type_bindings); } -#line 3455 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3428 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 139: -#line 1015 "src/wasm-parser.y" /* yacc.c:1646 */ + case 137: +#line 998 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -3463,43 +3436,43 @@ yyreduce: (yyval.func).locals = (yyvsp[-1].type_bindings); (yyval.func).exprs = (yyvsp[0].exprs); } -#line 3467 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3440 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 140: -#line 1022 "src/wasm-parser.y" /* yacc.c:1646 */ + case 138: +#line 1005 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; (yyval.func).params = (yyvsp[-1].type_bindings); (yyval.func).exprs = (yyvsp[0].exprs); } -#line 3478 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3451 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 141: -#line 1028 "src/wasm-parser.y" /* yacc.c:1646 */ + case 139: +#line 1011 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; (yyval.func).result_type = (yyvsp[0].type); } -#line 3488 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3461 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 142: -#line 1033 "src/wasm-parser.y" /* yacc.c:1646 */ + case 140: +#line 1016 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; (yyval.func).result_type = (yyvsp[-1].type); (yyval.func).locals = (yyvsp[0].type_bindings); } -#line 3499 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3472 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 143: -#line 1039 "src/wasm-parser.y" /* yacc.c:1646 */ + case 141: +#line 1022 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; @@ -3507,59 +3480,59 @@ yyreduce: (yyval.func).locals = (yyvsp[-1].type_bindings); (yyval.func).exprs = (yyvsp[0].exprs); } -#line 3511 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3484 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 144: -#line 1046 "src/wasm-parser.y" /* yacc.c:1646 */ + case 142: +#line 1029 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; (yyval.func).result_type = (yyvsp[-1].type); (yyval.func).exprs = (yyvsp[0].exprs); } -#line 3522 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3495 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 145: -#line 1052 "src/wasm-parser.y" /* yacc.c:1646 */ + case 143: +#line 1035 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; (yyval.func).locals = (yyvsp[0].type_bindings); } -#line 3532 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3505 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 146: -#line 1057 "src/wasm-parser.y" /* yacc.c:1646 */ + case 144: +#line 1040 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; (yyval.func).locals = (yyvsp[-1].type_bindings); (yyval.func).exprs = (yyvsp[0].exprs); } -#line 3543 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3516 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 147: -#line 1063 "src/wasm-parser.y" /* yacc.c:1646 */ + case 145: +#line 1046 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func)); (yyval.func).flags = WASM_FUNC_FLAG_HAS_SIGNATURE; (yyval.func).exprs = (yyvsp[0].exprs); } -#line 3553 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3526 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 148: -#line 1070 "src/wasm-parser.y" /* yacc.c:1646 */ + case 146: +#line 1053 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.func) = (yyvsp[-1].func); (yyval.func).loc = (yylsp[-2]); } -#line 3559 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3532 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 149: -#line 1076 "src/wasm-parser.y" /* yacc.c:1646 */ + case 147: +#line 1059 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.segment).loc = (yylsp[-3]); (yyval.segment).data = (yyvsp[-1].segment).data; @@ -3569,26 +3542,26 @@ yyreduce: "invalid memory segment address \"%.*s\"", (yyvsp[-2].text).length, (yyvsp[-2].text).start); } -#line 3573 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3546 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 150: -#line 1087 "src/wasm-parser.y" /* yacc.c:1646 */ + case 148: +#line 1070 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.segments)); } -#line 3579 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3552 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 151: -#line 1088 "src/wasm-parser.y" /* yacc.c:1646 */ + case 149: +#line 1071 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.segments) = (yyvsp[-1].segments); CHECK_ALLOC(wasm_append_segment_value(&(yyval.segments), &(yyvsp[0].segment))); } -#line 3588 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3561 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 152: -#line 1095 "src/wasm-parser.y" /* yacc.c:1646 */ + case 150: +#line 1078 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.memory).loc = (yylsp[-4]); if (!read_int32((yyvsp[-3].text).start, (yyvsp[-3].text).start + (yyvsp[-3].text).length, &(yyval.memory).initial_size, 0)) @@ -3599,11 +3572,11 @@ yyreduce: (yyvsp[-2].text).length, (yyvsp[-2].text).start); (yyval.memory).segments = (yyvsp[-1].segments); } -#line 3603 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3576 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 153: -#line 1105 "src/wasm-parser.y" /* yacc.c:1646 */ + case 151: +#line 1088 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.memory).loc = (yylsp[-3]); if (!read_int32((yyvsp[-2].text).start, (yyvsp[-2].text).start + (yyvsp[-2].text).length, &(yyval.memory).initial_size, 0)) @@ -3612,35 +3585,35 @@ yyreduce: (yyval.memory).max_size = (yyval.memory).initial_size; (yyval.memory).segments = (yyvsp[-1].segments); } -#line 3616 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3589 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 154: -#line 1116 "src/wasm-parser.y" /* yacc.c:1646 */ + case 152: +#line 1099 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.func_type)); (yyval.func_type).sig = (yyvsp[-2].func_sig); } -#line 3625 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3598 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 155: -#line 1120 "src/wasm-parser.y" /* yacc.c:1646 */ + case 153: +#line 1103 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.func_type).name = (yyvsp[-5].text); (yyval.func_type).sig = (yyvsp[-2].func_sig); } -#line 3634 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3607 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 156: -#line 1127 "src/wasm-parser.y" /* yacc.c:1646 */ + case 154: +#line 1110 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.vars) = (yyvsp[-1].vars); } -#line 3640 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3613 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 157: -#line 1131 "src/wasm-parser.y" /* yacc.c:1646 */ + case 155: +#line 1114 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.import)); (yyval.import).import_type = WASM_IMPORT_HAS_TYPE; @@ -3648,11 +3621,11 @@ yyreduce: (yyval.import).func_name = (yyvsp[-2].text); (yyval.import).type_var = (yyvsp[-1].var); } -#line 3652 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3625 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 158: -#line 1138 "src/wasm-parser.y" /* yacc.c:1646 */ + case 156: +#line 1121 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.import)); (yyval.import).import_type = WASM_IMPORT_HAS_TYPE; @@ -3661,11 +3634,11 @@ yyreduce: (yyval.import).func_name = (yyvsp[-2].text); (yyval.import).type_var = (yyvsp[-1].var); } -#line 3665 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3638 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 159: -#line 1146 "src/wasm-parser.y" /* yacc.c:1646 */ + case 157: +#line 1129 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.import)); (yyval.import).import_type = WASM_IMPORT_HAS_FUNC_SIGNATURE; @@ -3673,11 +3646,11 @@ yyreduce: (yyval.import).func_name = (yyvsp[-2].text); (yyval.import).func_sig = (yyvsp[-1].func_sig); } -#line 3677 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3650 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 160: -#line 1153 "src/wasm-parser.y" /* yacc.c:1646 */ + case 158: +#line 1136 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.import)); (yyval.import).import_type = WASM_IMPORT_HAS_FUNC_SIGNATURE; @@ -3686,29 +3659,29 @@ yyreduce: (yyval.import).func_name = (yyvsp[-2].text); (yyval.import).func_sig = (yyvsp[-1].func_sig); } -#line 3690 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3663 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 161: -#line 1164 "src/wasm-parser.y" /* yacc.c:1646 */ + case 159: +#line 1147 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.export).name = (yyvsp[-2].text); (yyval.export).var = (yyvsp[-1].var); } -#line 3699 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3672 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 162: -#line 1171 "src/wasm-parser.y" /* yacc.c:1646 */ + case 160: +#line 1154 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.type_bindings)); (yyval.type_bindings).types = (yyvsp[-1].types); } -#line 3708 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3681 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 163: -#line 1175 "src/wasm-parser.y" /* yacc.c:1646 */ + case 161: +#line 1158 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.type_bindings)); WasmBinding* binding = wasm_append_binding(&(yyval.type_bindings).bindings); @@ -3718,17 +3691,17 @@ yyreduce: binding->index = 0; CHECK_ALLOC(wasm_append_type_value(&(yyval.type_bindings).types, &(yyvsp[-1].type))); } -#line 3722 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3695 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 164: -#line 1187 "src/wasm-parser.y" /* yacc.c:1646 */ + case 162: +#line 1170 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.module_fields)); } -#line 3728 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3701 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 165: -#line 1188 "src/wasm-parser.y" /* yacc.c:1646 */ + case 163: +#line 1171 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.module_fields) = (yyvsp[-1].module_fields); WasmModuleField* field = wasm_append_module_field(&(yyval.module_fields)); @@ -3737,11 +3710,11 @@ yyreduce: field->type = WASM_MODULE_FIELD_TYPE_FUNC; field->func = (yyvsp[0].func); } -#line 3741 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3714 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 166: -#line 1196 "src/wasm-parser.y" /* yacc.c:1646 */ + case 164: +#line 1179 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.module_fields) = (yyvsp[-1].module_fields); WasmModuleField* field = wasm_append_module_field(&(yyval.module_fields)); @@ -3750,11 +3723,11 @@ yyreduce: field->type = WASM_MODULE_FIELD_TYPE_IMPORT; field->import = (yyvsp[0].import); } -#line 3754 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3727 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 167: -#line 1204 "src/wasm-parser.y" /* yacc.c:1646 */ + case 165: +#line 1187 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.module_fields) = (yyvsp[-1].module_fields); WasmModuleField* field = wasm_append_module_field(&(yyval.module_fields)); @@ -3763,11 +3736,11 @@ yyreduce: field->type = WASM_MODULE_FIELD_TYPE_EXPORT; field->export = (yyvsp[0].export); } -#line 3767 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3740 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 168: -#line 1212 "src/wasm-parser.y" /* yacc.c:1646 */ + case 166: +#line 1195 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.module_fields) = (yyvsp[-1].module_fields); WasmModuleField* field = wasm_append_module_field(&(yyval.module_fields)); @@ -3776,11 +3749,11 @@ yyreduce: field->type = WASM_MODULE_FIELD_TYPE_TABLE; field->table = (yyvsp[0].vars); } -#line 3780 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3753 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 169: -#line 1220 "src/wasm-parser.y" /* yacc.c:1646 */ + case 167: +#line 1203 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.module_fields) = (yyvsp[-1].module_fields); WasmModuleField* field = wasm_append_module_field(&(yyval.module_fields)); @@ -3789,11 +3762,11 @@ yyreduce: field->type = WASM_MODULE_FIELD_TYPE_FUNC_TYPE; field->func_type = (yyvsp[0].func_type); } -#line 3793 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3766 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 170: -#line 1228 "src/wasm-parser.y" /* yacc.c:1646 */ + case 168: +#line 1211 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.module_fields) = (yyvsp[-1].module_fields); WasmModuleField* field = wasm_append_module_field(&(yyval.module_fields)); @@ -3802,11 +3775,11 @@ yyreduce: field->type = WASM_MODULE_FIELD_TYPE_MEMORY; field->memory = (yyvsp[0].memory); } -#line 3806 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3779 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 171: -#line 1236 "src/wasm-parser.y" /* yacc.c:1646 */ + case 169: +#line 1219 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.module_fields) = (yyvsp[-1].module_fields); WasmModuleField* field = wasm_append_module_field(&(yyval.module_fields)); @@ -3815,11 +3788,11 @@ yyreduce: field->type = WASM_MODULE_FIELD_TYPE_GLOBAL; field->global = (yyvsp[0].type_bindings); } -#line 3819 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3792 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 172: -#line 1246 "src/wasm-parser.y" /* yacc.c:1646 */ + case 170: +#line 1229 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.module)); (yyval.module).loc = (yylsp[-2]); @@ -3892,38 +3865,38 @@ yyreduce: } } } -#line 3896 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3869 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 173: -#line 1324 "src/wasm-parser.y" /* yacc.c:1646 */ + case 171: +#line 1307 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.command).type = WASM_COMMAND_TYPE_MODULE; (yyval.command).module = (yyvsp[0].module); } -#line 3902 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3875 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 174: -#line 1325 "src/wasm-parser.y" /* yacc.c:1646 */ + case 172: +#line 1308 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.command).type = WASM_COMMAND_TYPE_INVOKE; (yyval.command).invoke.loc = (yylsp[-3]); (yyval.command).invoke.name = (yyvsp[-2].text); (yyval.command).invoke.args = (yyvsp[-1].consts); } -#line 3913 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3886 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 175: -#line 1331 "src/wasm-parser.y" /* yacc.c:1646 */ + case 173: +#line 1314 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.command).type = WASM_COMMAND_TYPE_ASSERT_INVALID; (yyval.command).assert_invalid.module = (yyvsp[-2].module); (yyval.command).assert_invalid.text = (yyvsp[-1].text); } -#line 3923 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3896 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 176: -#line 1336 "src/wasm-parser.y" /* yacc.c:1646 */ + case 174: +#line 1319 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.command).type = WASM_COMMAND_TYPE_ASSERT_RETURN; (yyval.command).assert_return.invoke.loc = (yylsp[-5]); @@ -3931,22 +3904,22 @@ yyreduce: (yyval.command).assert_return.invoke.args = (yyvsp[-3].consts); (yyval.command).assert_return.expected = (yyvsp[-1].const_); } -#line 3935 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3908 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 177: -#line 1343 "src/wasm-parser.y" /* yacc.c:1646 */ + case 175: +#line 1326 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.command).type = WASM_COMMAND_TYPE_ASSERT_RETURN_NAN; (yyval.command).assert_return_nan.invoke.loc = (yylsp[-4]); (yyval.command).assert_return_nan.invoke.name = (yyvsp[-3].text); (yyval.command).assert_return_nan.invoke.args = (yyvsp[-2].consts); } -#line 3946 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3919 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 178: -#line 1349 "src/wasm-parser.y" /* yacc.c:1646 */ + case 176: +#line 1332 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.command).type = WASM_COMMAND_TYPE_ASSERT_TRAP; (yyval.command).assert_trap.invoke.loc = (yylsp[-5]); @@ -3954,26 +3927,26 @@ yyreduce: (yyval.command).assert_trap.invoke.args = (yyvsp[-3].consts); (yyval.command).assert_trap.text = (yyvsp[-1].text); } -#line 3958 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3931 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 179: -#line 1358 "src/wasm-parser.y" /* yacc.c:1646 */ + case 177: +#line 1341 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.commands)); } -#line 3964 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3937 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 180: -#line 1359 "src/wasm-parser.y" /* yacc.c:1646 */ + case 178: +#line 1342 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.commands) = (yyvsp[-1].commands); CHECK_ALLOC(wasm_append_command_value(&(yyval.commands), &(yyvsp[0].command))); } -#line 3973 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3946 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 181: -#line 1366 "src/wasm-parser.y" /* yacc.c:1646 */ + case 179: +#line 1349 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.const_).loc = (yylsp[-2]); if (!read_const((yyvsp[-2].type), (yyvsp[-1].text).start, (yyvsp[-1].text).start + (yyvsp[-1].text).length, &(yyval.const_))) @@ -3981,38 +3954,38 @@ yyreduce: (yyvsp[-1].text).start); free((char*)(yyvsp[-1].text).start); } -#line 3985 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3958 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 182: -#line 1375 "src/wasm-parser.y" /* yacc.c:1646 */ + case 180: +#line 1358 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.const_).type = WASM_TYPE_VOID; } -#line 3991 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3964 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 184: -#line 1379 "src/wasm-parser.y" /* yacc.c:1646 */ + case 182: +#line 1362 "src/wasm-parser.y" /* yacc.c:1646 */ { ZEROMEM((yyval.consts)); } -#line 3997 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3970 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 185: -#line 1380 "src/wasm-parser.y" /* yacc.c:1646 */ + case 183: +#line 1363 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.consts) = (yyvsp[-1].consts); CHECK_ALLOC(wasm_append_const_value(&(yyval.consts), &(yyvsp[0].const_))); } -#line 4006 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3979 "src/wasm-parser.c" /* yacc.c:1646 */ break; - case 186: -#line 1387 "src/wasm-parser.y" /* yacc.c:1646 */ + case 184: +#line 1370 "src/wasm-parser.y" /* yacc.c:1646 */ { (yyval.script).commands = (yyvsp[0].commands); parser->script = (yyval.script); } -#line 4012 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3985 "src/wasm-parser.c" /* yacc.c:1646 */ break; -#line 4016 "src/wasm-parser.c" /* yacc.c:1646 */ +#line 3989 "src/wasm-parser.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -4247,7 +4220,7 @@ yyreturn: #endif return yyresult; } -#line 1396 "src/wasm-parser.y" /* yacc.c:1906 */ +#line 1379 "src/wasm-parser.y" /* yacc.c:1906 */ void wasm_error(WasmLocation* loc, diff --git a/src/wasm-parser.h b/src/wasm-parser.h index 76ea71eb..8a6312aa 100644 --- a/src/wasm-parser.h +++ b/src/wasm-parser.h @@ -78,41 +78,39 @@ extern int wasm_debug; WASM_TOKEN_TYPE_SET_LOCAL = 279, WASM_TOKEN_TYPE_LOAD = 280, WASM_TOKEN_TYPE_STORE = 281, - WASM_TOKEN_TYPE_LOAD_EXTEND = 282, - WASM_TOKEN_TYPE_STORE_WRAP = 283, - WASM_TOKEN_TYPE_OFFSET = 284, - WASM_TOKEN_TYPE_ALIGN = 285, - WASM_TOKEN_TYPE_CONST = 286, - WASM_TOKEN_TYPE_UNARY = 287, - WASM_TOKEN_TYPE_BINARY = 288, - WASM_TOKEN_TYPE_COMPARE = 289, - WASM_TOKEN_TYPE_CONVERT = 290, - WASM_TOKEN_TYPE_CAST = 291, - WASM_TOKEN_TYPE_SELECT = 292, - WASM_TOKEN_TYPE_FUNC = 293, - WASM_TOKEN_TYPE_TYPE = 294, - WASM_TOKEN_TYPE_PARAM = 295, - WASM_TOKEN_TYPE_RESULT = 296, - WASM_TOKEN_TYPE_LOCAL = 297, - WASM_TOKEN_TYPE_MODULE = 298, - WASM_TOKEN_TYPE_MEMORY = 299, - WASM_TOKEN_TYPE_SEGMENT = 300, - WASM_TOKEN_TYPE_IMPORT = 301, - WASM_TOKEN_TYPE_EXPORT = 302, - WASM_TOKEN_TYPE_TABLE = 303, - WASM_TOKEN_TYPE_UNREACHABLE = 304, - WASM_TOKEN_TYPE_MEMORY_SIZE = 305, - WASM_TOKEN_TYPE_GROW_MEMORY = 306, - WASM_TOKEN_TYPE_HAS_FEATURE = 307, - WASM_TOKEN_TYPE_ASSERT_INVALID = 308, - WASM_TOKEN_TYPE_ASSERT_RETURN = 309, - WASM_TOKEN_TYPE_ASSERT_RETURN_NAN = 310, - WASM_TOKEN_TYPE_ASSERT_TRAP = 311, - WASM_TOKEN_TYPE_INVOKE = 312, - WASM_TOKEN_TYPE_GLOBAL = 313, - WASM_TOKEN_TYPE_LOAD_GLOBAL = 314, - WASM_TOKEN_TYPE_STORE_GLOBAL = 315, - WASM_TOKEN_TYPE_LOW = 316 + WASM_TOKEN_TYPE_OFFSET = 282, + WASM_TOKEN_TYPE_ALIGN = 283, + WASM_TOKEN_TYPE_CONST = 284, + WASM_TOKEN_TYPE_UNARY = 285, + WASM_TOKEN_TYPE_BINARY = 286, + WASM_TOKEN_TYPE_COMPARE = 287, + WASM_TOKEN_TYPE_CONVERT = 288, + WASM_TOKEN_TYPE_CAST = 289, + WASM_TOKEN_TYPE_SELECT = 290, + WASM_TOKEN_TYPE_FUNC = 291, + WASM_TOKEN_TYPE_TYPE = 292, + WASM_TOKEN_TYPE_PARAM = 293, + WASM_TOKEN_TYPE_RESULT = 294, + WASM_TOKEN_TYPE_LOCAL = 295, + WASM_TOKEN_TYPE_MODULE = 296, + WASM_TOKEN_TYPE_MEMORY = 297, + WASM_TOKEN_TYPE_SEGMENT = 298, + WASM_TOKEN_TYPE_IMPORT = 299, + WASM_TOKEN_TYPE_EXPORT = 300, + WASM_TOKEN_TYPE_TABLE = 301, + WASM_TOKEN_TYPE_UNREACHABLE = 302, + WASM_TOKEN_TYPE_MEMORY_SIZE = 303, + WASM_TOKEN_TYPE_GROW_MEMORY = 304, + WASM_TOKEN_TYPE_HAS_FEATURE = 305, + WASM_TOKEN_TYPE_ASSERT_INVALID = 306, + WASM_TOKEN_TYPE_ASSERT_RETURN = 307, + WASM_TOKEN_TYPE_ASSERT_RETURN_NAN = 308, + WASM_TOKEN_TYPE_ASSERT_TRAP = 309, + WASM_TOKEN_TYPE_INVOKE = 310, + WASM_TOKEN_TYPE_GLOBAL = 311, + WASM_TOKEN_TYPE_LOAD_GLOBAL = 312, + WASM_TOKEN_TYPE_STORE_GLOBAL = 313, + WASM_TOKEN_TYPE_LOW = 314 }; #endif diff --git a/src/wasm-parser.y b/src/wasm-parser.y index 417b5998..ce0e747f 100644 --- a/src/wasm-parser.y +++ b/src/wasm-parser.y @@ -85,7 +85,7 @@ static WasmResult dup_string_contents(WasmStringSlice * text, void** out_data, %token INT FLOAT TEXT VAR VALUE_TYPE %token NOP BLOCK IF IF_ELSE LOOP BR BR_IF TABLESWITCH CASE %token CALL CALL_IMPORT CALL_INDIRECT RETURN -%token GET_LOCAL SET_LOCAL LOAD STORE LOAD_EXTEND STORE_WRAP OFFSET ALIGN +%token GET_LOCAL SET_LOCAL LOAD STORE OFFSET ALIGN %token CONST UNARY BINARY COMPARE CONVERT CAST SELECT %token FUNC TYPE PARAM RESULT LOCAL %token MODULE MEMORY SEGMENT IMPORT EXPORT TABLE @@ -98,7 +98,7 @@ static WasmResult dup_string_contents(WasmStringSlice * text, void** out_data, %type<cast> CAST %type<compare> COMPARE %type<convert> CONVERT -%type<mem> LOAD STORE LOAD_EXTEND STORE_WRAP +%type<mem> LOAD STORE %type<text> ALIGN FLOAT INT OFFSET TEXT VAR %type<type> SELECT %type<type> CONST VALUE_TYPE @@ -403,23 +403,6 @@ expr1 : $$->store.addr = $4; $$->store.value = $5; } - | LOAD_EXTEND offset align expr { - $$ = wasm_new_expr(WASM_EXPR_TYPE_LOAD_EXTEND); - CHECK_ALLOC_NULL($$); - $$->load.op = $1; - $$->load.offset = $2; - $$->load.align = $3; - $$->load.addr = $4; - } - | STORE_WRAP offset align expr expr { - $$ = wasm_new_expr(WASM_EXPR_TYPE_STORE_WRAP); - CHECK_ALLOC_NULL($$); - $$->store.op = $1; - $$->store.offset = $2; - $$->store.align = $3; - $$->store.addr = $4; - $$->store.value = $5; - } | CONST literal { $$ = wasm_new_expr(WASM_EXPR_TYPE_CONST); CHECK_ALLOC_NULL($$); @@ -233,7 +233,6 @@ static void wasm_destroy_expr(WasmExpr* expr) { wasm_destroy_expr_ptr(&expr->if_else.false_); break; case WASM_EXPR_TYPE_LOAD: - case WASM_EXPR_TYPE_LOAD_EXTEND: wasm_destroy_expr_ptr(&expr->load.addr); break; case WASM_EXPR_TYPE_LOAD_GLOBAL: @@ -258,7 +257,6 @@ static void wasm_destroy_expr(WasmExpr* expr) { wasm_destroy_expr_ptr(&expr->set_local.expr); break; case WASM_EXPR_TYPE_STORE: - case WASM_EXPR_TYPE_STORE_WRAP: wasm_destroy_expr_ptr(&expr->store.addr); wasm_destroy_expr_ptr(&expr->store.value); break; @@ -306,7 +306,6 @@ typedef enum WasmExprType { WASM_EXPR_TYPE_IF, WASM_EXPR_TYPE_IF_ELSE, WASM_EXPR_TYPE_LOAD, - WASM_EXPR_TYPE_LOAD_EXTEND, WASM_EXPR_TYPE_LOAD_GLOBAL, WASM_EXPR_TYPE_LOOP, WASM_EXPR_TYPE_MEMORY_SIZE, @@ -316,7 +315,6 @@ typedef enum WasmExprType { WASM_EXPR_TYPE_SET_LOCAL, WASM_EXPR_TYPE_STORE, WASM_EXPR_TYPE_STORE_GLOBAL, - WASM_EXPR_TYPE_STORE_WRAP, WASM_EXPR_TYPE_TABLESWITCH, WASM_EXPR_TYPE_UNARY, WASM_EXPR_TYPE_UNREACHABLE, |