diff options
28 files changed, 2226 insertions, 150 deletions
diff --git a/src/prebuilt/wasm-ast-parser-gen.c b/src/prebuilt/wasm-ast-parser-gen.c index 4234ed62..3aa1164e 100644 --- a/src/prebuilt/wasm-ast-parser-gen.c +++ b/src/prebuilt/wasm-ast-parser-gen.c @@ -610,11 +610,11 @@ static const yytype_uint16 yyrline[] = 516, 523, 530, 536, 540, 545, 552, 553, 556, 560, 568, 569, 574, 581, 587, 595, 601, 607, 617, 620, 684, 693, 703, 711, 723, 724, 731, 735, 748, 756, - 757, 764, 777, 789, 795, 804, 808, 815, 819, 826, - 834, 841, 852, 859, 865, 868, 909, 929, 948, 957, - 966, 986, 995, 1007, 1026, 1036, 1061, 1067, 1074, 1080, - 1088, 1095, 1105, 1106, 1114, 1126, 1127, 1130, 1131, 1138, - 1147 + 757, 764, 776, 787, 793, 802, 806, 813, 817, 824, + 832, 839, 850, 857, 863, 866, 907, 927, 946, 955, + 964, 984, 993, 1005, 1024, 1034, 1059, 1065, 1072, 1078, + 1086, 1093, 1103, 1104, 1112, 1124, 1125, 1128, 1129, 1136, + 1145 }; #endif @@ -2744,80 +2744,78 @@ yyreduce: case 81: #line 764 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { - if (WASM_FAILED(wasm_parse_int32((yyvsp[0].literal).text.start, - (yyvsp[0].literal).text.start + (yyvsp[0].literal).text.length, &(yyval.u32), - WASM_PARSE_UNSIGNED_ONLY))) { + if (WASM_FAILED(wasm_parse_uint64((yyvsp[0].literal).text.start, + (yyvsp[0].literal).text.start + (yyvsp[0].literal).text.length, &(yyval.u64)))) { wasm_ast_parser_error(&(yylsp[0]), lexer, parser, "invalid initial memory pages \"" PRIstringslice "\"", WASM_PRINTF_STRING_SLICE_ARG((yyvsp[0].literal).text)); } } -#line 2757 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 2756 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 82: -#line 777 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 776 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { - if (WASM_FAILED(wasm_parse_int32((yyvsp[0].literal).text.start, - (yyvsp[0].literal).text.start + (yyvsp[0].literal).text.length, &(yyval.u32), - WASM_PARSE_UNSIGNED_ONLY))) { + if (WASM_FAILED(wasm_parse_uint64((yyvsp[0].literal).text.start, + (yyvsp[0].literal).text.start + (yyvsp[0].literal).text.length, &(yyval.u64)))) { wasm_ast_parser_error(&(yylsp[0]), lexer, parser, "invalid max memory pages \"" PRIstringslice "\"", WASM_PRINTF_STRING_SLICE_ARG((yyvsp[0].literal).text)); } } -#line 2771 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 2769 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 83: -#line 789 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 787 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.memory).loc = (yylsp[-4]); - (yyval.memory).initial_pages = (yyvsp[-3].u32); - (yyval.memory).max_pages = (yyvsp[-2].u32); + (yyval.memory).initial_pages = (yyvsp[-3].u64); + (yyval.memory).max_pages = (yyvsp[-2].u64); (yyval.memory).segments = (yyvsp[-1].segments); } -#line 2782 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 2780 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 84: -#line 795 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 793 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.memory).loc = (yylsp[-3]); - (yyval.memory).initial_pages = (yyvsp[-2].u32); + (yyval.memory).initial_pages = (yyvsp[-2].u64); (yyval.memory).max_pages = (yyval.memory).initial_pages; (yyval.memory).segments = (yyvsp[-1].segments); } -#line 2793 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 2791 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 85: -#line 804 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 802 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { WASM_ZERO_MEMORY((yyval.func_type)); (yyval.func_type).sig = (yyvsp[-2].func_sig); } -#line 2802 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 2800 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 86: -#line 808 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 806 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.func_type).name = (yyvsp[-5].text); (yyval.func_type).sig = (yyvsp[-2].func_sig); } -#line 2811 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 2809 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 87: -#line 815 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 813 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.vars) = (yyvsp[-1].vars); } -#line 2817 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 2815 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 88: -#line 819 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 817 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.import) = new_import(parser->allocator); (yyval.import)->module_name = (yyvsp[-3].text); @@ -2825,11 +2823,11 @@ yyreduce: (yyval.import)->decl.flags = WASM_FUNC_DECLARATION_FLAG_HAS_FUNC_TYPE; (yyval.import)->decl.type_var = (yyvsp[-1].var); } -#line 2829 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 2827 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 89: -#line 826 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 824 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.import) = new_import(parser->allocator); (yyval.import)->name = (yyvsp[-4].text); @@ -2838,11 +2836,11 @@ yyreduce: (yyval.import)->decl.flags = WASM_FUNC_DECLARATION_FLAG_HAS_FUNC_TYPE; (yyval.import)->decl.type_var = (yyvsp[-1].var); } -#line 2842 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 2840 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 90: -#line 834 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 832 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.import) = new_import(parser->allocator); (yyval.import)->module_name = (yyvsp[-3].text); @@ -2850,11 +2848,11 @@ yyreduce: (yyval.import)->decl.flags = WASM_FUNC_DECLARATION_FLAG_HAS_SIGNATURE; (yyval.import)->decl.sig = (yyvsp[-1].func_sig); } -#line 2854 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 2852 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 91: -#line 841 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 839 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.import) = new_import(parser->allocator); (yyval.import)->name = (yyvsp[-4].text); @@ -2863,36 +2861,36 @@ yyreduce: (yyval.import)->decl.flags = WASM_FUNC_DECLARATION_FLAG_HAS_SIGNATURE; (yyval.import)->decl.sig = (yyvsp[-1].func_sig); } -#line 2867 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 2865 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 92: -#line 852 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 850 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.export_).name = (yyvsp[-2].text); (yyval.export_).var = (yyvsp[-1].var); } -#line 2876 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 2874 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 93: -#line 859 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 857 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.export_memory).name = (yyvsp[-2].text); } -#line 2884 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 2882 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 94: -#line 865 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 863 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.module) = new_module(parser->allocator); } -#line 2892 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 2890 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 95: -#line 868 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 866 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.module) = (yyvsp[-1].module); WasmModuleField* field = wasm_append_module_field(parser->allocator, (yyval.module)); @@ -2934,11 +2932,11 @@ yyreduce: binding->index = (yyval.module)->exports.size - 1; } } -#line 2938 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 2936 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 96: -#line 909 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 907 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.module) = (yyvsp[-1].module); WasmModuleField* field = wasm_append_module_field(parser->allocator, (yyval.module)); @@ -2959,11 +2957,11 @@ yyreduce: binding->index = (yyval.module)->imports.size - 1; } } -#line 2963 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 2961 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 97: -#line 929 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 927 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.module) = (yyvsp[-1].module); WasmModuleField* field = wasm_append_module_field(parser->allocator, (yyval.module)); @@ -2983,11 +2981,11 @@ yyreduce: binding->index = (yyval.module)->exports.size - 1; } } -#line 2987 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 2985 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 98: -#line 948 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 946 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.module) = (yyvsp[-1].module); WasmModuleField* field = wasm_append_module_field(parser->allocator, (yyval.module)); @@ -2997,11 +2995,11 @@ yyreduce: field->export_memory = (yyvsp[0].export_memory); (yyval.module)->export_memory = &field->export_memory; } -#line 3001 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 2999 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 99: -#line 957 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 955 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.module) = (yyvsp[-1].module); WasmModuleField* field = wasm_append_module_field(parser->allocator, (yyval.module)); @@ -3011,11 +3009,11 @@ yyreduce: field->table = (yyvsp[0].vars); (yyval.module)->table = &field->table; } -#line 3015 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 3013 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 100: -#line 966 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 964 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.module) = (yyvsp[-1].module); WasmModuleField* field = wasm_append_module_field(parser->allocator, (yyval.module)); @@ -3036,11 +3034,11 @@ yyreduce: binding->index = (yyval.module)->func_types.size - 1; } } -#line 3040 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 3038 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 101: -#line 986 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 984 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.module) = (yyvsp[-1].module); WasmModuleField* field = wasm_append_module_field(parser->allocator, (yyval.module)); @@ -3050,11 +3048,11 @@ yyreduce: field->memory = (yyvsp[0].memory); (yyval.module)->memory = &field->memory; } -#line 3054 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 3052 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 102: -#line 995 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 993 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.module) = (yyvsp[-1].module); WasmModuleField* field = wasm_append_module_field(parser->allocator, (yyval.module)); @@ -3064,11 +3062,11 @@ yyreduce: field->start = (yyvsp[0].var); (yyval.module)->start = &field->start; } -#line 3068 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 3066 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 103: -#line 1007 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 1005 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.raw_module).type = WASM_RAW_MODULE_TYPE_TEXT; (yyval.raw_module).text = (yyvsp[-1].module); @@ -3088,11 +3086,11 @@ yyreduce: &import->decl)); } } -#line 3092 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 3090 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 104: -#line 1026 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 1024 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.raw_module).type = WASM_RAW_MODULE_TYPE_BINARY; (yyval.raw_module).loc = (yylsp[-2]); @@ -3100,11 +3098,11 @@ yyreduce: &(yyval.raw_module).binary.size)); wasm_destroy_text_list(parser->allocator, &(yyvsp[-1].text_list)); } -#line 3104 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 3102 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 105: -#line 1036 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 1034 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { if ((yyvsp[0].raw_module).type == WASM_RAW_MODULE_TYPE_TEXT) { (yyval.module) = (yyvsp[0].raw_module).text; @@ -3125,22 +3123,22 @@ yyreduce: wasm_free(parser->allocator, (yyvsp[0].raw_module).binary.data); } } -#line 3129 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 3127 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 106: -#line 1061 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 1059 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.command) = new_command(parser->allocator); (yyval.command)->type = WASM_COMMAND_TYPE_MODULE; (yyval.command)->module = *(yyvsp[0].module); wasm_free(parser->allocator, (yyvsp[0].module)); } -#line 3140 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 3138 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 107: -#line 1067 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 1065 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.command) = new_command(parser->allocator); (yyval.command)->type = WASM_COMMAND_TYPE_INVOKE; @@ -3148,22 +3146,22 @@ yyreduce: (yyval.command)->invoke.name = (yyvsp[-2].text); (yyval.command)->invoke.args = (yyvsp[-1].consts); } -#line 3152 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 3150 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 108: -#line 1074 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 1072 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.command) = new_command(parser->allocator); (yyval.command)->type = WASM_COMMAND_TYPE_ASSERT_INVALID; (yyval.command)->assert_invalid.module = (yyvsp[-2].raw_module); (yyval.command)->assert_invalid.text = (yyvsp[-1].text); } -#line 3163 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 3161 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 109: -#line 1080 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 1078 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.command) = new_command(parser->allocator); (yyval.command)->type = WASM_COMMAND_TYPE_ASSERT_RETURN; @@ -3172,11 +3170,11 @@ yyreduce: (yyval.command)->assert_return.invoke.args = (yyvsp[-3].consts); (yyval.command)->assert_return.expected = (yyvsp[-1].const_); } -#line 3176 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 3174 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 110: -#line 1088 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 1086 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.command) = new_command(parser->allocator); (yyval.command)->type = WASM_COMMAND_TYPE_ASSERT_RETURN_NAN; @@ -3184,11 +3182,11 @@ yyreduce: (yyval.command)->assert_return_nan.invoke.name = (yyvsp[-3].text); (yyval.command)->assert_return_nan.invoke.args = (yyvsp[-2].consts); } -#line 3188 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 3186 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 111: -#line 1095 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 1093 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.command) = new_command(parser->allocator); (yyval.command)->type = WASM_COMMAND_TYPE_ASSERT_TRAP; @@ -3197,27 +3195,27 @@ yyreduce: (yyval.command)->assert_trap.invoke.args = (yyvsp[-3].consts); (yyval.command)->assert_trap.text = (yyvsp[-1].text); } -#line 3201 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 3199 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 112: -#line 1105 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 1103 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { WASM_ZERO_MEMORY((yyval.commands)); } -#line 3207 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 3205 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 113: -#line 1106 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 1104 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.commands) = (yyvsp[-1].commands); CHECK_ALLOC(wasm_append_command_value(parser->allocator, &(yyval.commands), (yyvsp[0].command))); wasm_free(parser->allocator, (yyvsp[0].command)); } -#line 3217 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 3215 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 114: -#line 1114 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 1112 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.const_).loc = (yylsp[-2]); if (WASM_FAILED(parse_const((yyvsp[-2].type), (yyvsp[-1].literal).type, (yyvsp[-1].literal).text.start, @@ -3228,41 +3226,41 @@ yyreduce: } wasm_free(parser->allocator, (char*)(yyvsp[-1].literal).text.start); } -#line 3232 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 3230 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 115: -#line 1126 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 1124 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.const_).type = WASM_TYPE_VOID; } -#line 3238 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 3236 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 117: -#line 1130 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 1128 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { WASM_ZERO_MEMORY((yyval.consts)); } -#line 3244 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 3242 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 118: -#line 1131 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 1129 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.consts) = (yyvsp[-1].consts); CHECK_ALLOC(wasm_append_const_value(parser->allocator, &(yyval.consts), &(yyvsp[0].const_))); } -#line 3253 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 3251 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; case 119: -#line 1138 "src/wasm-ast-parser.y" /* yacc.c:1646 */ +#line 1136 "src/wasm-ast-parser.y" /* yacc.c:1646 */ { (yyval.script).commands = (yyvsp[0].commands); parser->script = (yyval.script); } -#line 3262 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 3260 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ break; -#line 3266 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ +#line 3264 "src/prebuilt/wasm-ast-parser-gen.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -3497,7 +3495,7 @@ yyreturn: #endif return yyresult; } -#line 1150 "src/wasm-ast-parser.y" /* yacc.c:1906 */ +#line 1148 "src/wasm-ast-parser.y" /* yacc.c:1906 */ static WasmResult parse_const(WasmType type, diff --git a/src/wasm-ast-checker.c b/src/wasm-ast-checker.c index 1a4c45ae..a5082ca5 100644 --- a/src/wasm-ast-checker.c +++ b/src/wasm-ast-checker.c @@ -18,6 +18,7 @@ #include "wasm-config.h" #include <assert.h> +#include <inttypes.h> #include <memory.h> #include <stdarg.h> #include <stdio.h> @@ -742,20 +743,20 @@ static void check_table(Context* ctx, const WasmVarVector* table) { static void check_memory(Context* ctx, const WasmMemory* memory) { if (memory->initial_pages > WASM_MAX_PAGES) { - print_error(ctx, &memory->loc, "initial pages (%u) must be less than (%u)", + print_error(ctx, &memory->loc, + "initial pages (%" PRIu64 ") must be <= (%u)", memory->initial_pages, WASM_MAX_PAGES); } if (memory->max_pages > WASM_MAX_PAGES) { - print_error(ctx, &memory->loc, "max pages (%u) must be less than (%u)", + print_error(ctx, &memory->loc, "max pages (%" PRIu64 ") must be <= (%u)", memory->max_pages, WASM_MAX_PAGES); } if (memory->max_pages < memory->initial_pages) { - print_error( - ctx, &memory->loc, - "max pages (%u) must be greater than or equal to initial pages (%u)", - memory->max_pages, memory->initial_pages); + print_error(ctx, &memory->loc, "max pages (%" PRIu64 + ") must be >= initial pages (%" PRIu64 ")", + memory->max_pages, memory->initial_pages); } size_t i; @@ -769,12 +770,13 @@ static void check_memory(Context* ctx, const WasmMemory* memory) { } if (segment->addr > memory->initial_pages * WASM_PAGE_SIZE) { print_error(ctx, &segment->loc, - "address (%u) greater than initial memory size (%u)", + "address (%u) greater than initial memory size (%" PRIu64 ")", segment->addr, memory->initial_pages * WASM_PAGE_SIZE); } else if (segment->addr + segment->size > memory->initial_pages * WASM_PAGE_SIZE) { print_error(ctx, &segment->loc, - "segment ends past the end of initial memory size (%u)", + "segment ends past the end of initial memory size (%" PRIu64 + ")", memory->initial_pages * WASM_PAGE_SIZE); } last_end = segment->addr + segment->size; diff --git a/src/wasm-ast-parser.y b/src/wasm-ast-parser.y index aba1e5f0..c8f7512b 100644 --- a/src/wasm-ast-parser.y +++ b/src/wasm-ast-parser.y @@ -163,8 +163,8 @@ static void on_read_binary_error(uint32_t offset, const char* error, %type<text> bind_var labeling quoted_text export_opt %type<text_list> text_list %type<types> value_type_list -%type<u32> align initial_pages max_pages segment_address -%type<u64> offset +%type<u32> align segment_address +%type<u64> offset initial_pages max_pages %type<vars> table var_list %type<var> start type_use var @@ -762,9 +762,8 @@ segment_list : initial_pages : INT { - if (WASM_FAILED(wasm_parse_int32($1.text.start, - $1.text.start + $1.text.length, &$$, - WASM_PARSE_UNSIGNED_ONLY))) { + if (WASM_FAILED(wasm_parse_uint64($1.text.start, + $1.text.start + $1.text.length, &$$))) { wasm_ast_parser_error(&@1, lexer, parser, "invalid initial memory pages \"" PRIstringslice "\"", @@ -775,9 +774,8 @@ initial_pages : max_pages : INT { - if (WASM_FAILED(wasm_parse_int32($1.text.start, - $1.text.start + $1.text.length, &$$, - WASM_PARSE_UNSIGNED_ONLY))) { + if (WASM_FAILED(wasm_parse_uint64($1.text.start, + $1.text.start + $1.text.length, &$$))) { wasm_ast_parser_error(&@1, lexer, parser, "invalid max memory pages \"" PRIstringslice "\"", WASM_PRINTF_STRING_SLICE_ARG($1.text)); diff --git a/src/wasm-ast-writer.c b/src/wasm-ast-writer.c index 8f06abb7..6134fa07 100644 --- a/src/wasm-ast-writer.c +++ b/src/wasm-ast-writer.c @@ -664,9 +664,9 @@ static void write_segment(Context* ctx, const WasmSegment* segment) { static void write_memory(Context* ctx, const WasmMemory* memory) { write_open_space(ctx, "memory"); - writef(ctx, "%u", memory->initial_pages); + writef(ctx, "%" PRIu64, memory->initial_pages); if (memory->initial_pages != memory->max_pages) - writef(ctx, "%u", memory->max_pages); + writef(ctx, "%" PRIu64, memory->max_pages); write_newline(ctx, NO_FORCE_NEWLINE); size_t i; for (i = 0; i < memory->segments.size; ++i) { diff --git a/src/wasm-ast.h b/src/wasm-ast.h index b732ff01..cdb7e1f4 100644 --- a/src/wasm-ast.h +++ b/src/wasm-ast.h @@ -242,8 +242,8 @@ WASM_DEFINE_VECTOR(segment, WasmSegment); typedef struct WasmMemory { WasmLocation loc; - uint32_t initial_pages; - uint32_t max_pages; + uint64_t initial_pages; + uint64_t max_pages; WasmSegmentVector segments; } WasmMemory; diff --git a/src/wasm-common.h b/src/wasm-common.h index 21d7bd88..4d5f088f 100644 --- a/src/wasm-common.h +++ b/src/wasm-common.h @@ -40,7 +40,7 @@ #define WASM_UNKNOWN_OFFSET ((uint32_t)~0) #define WASM_PAGE_SIZE 0x10000 /* 64k */ -#define WASM_MAX_PAGES 0x10000 /* # of pages that fit in 32-bit address space */ +#define WASM_MAX_PAGES 0x0ffff /* # of pages that fit in 32-bit address space */ #define PRIstringslice "%.*s" #define WASM_PRINTF_STRING_SLICE_ARG(x) (int)((x).length), (x).start diff --git a/test/interp/spec/binary.txt b/test/interp/spec/binary.txt new file mode 100644 index 00000000..b053289b --- /dev/null +++ b/test/interp/spec/binary.txt @@ -0,0 +1,41 @@ +;;; TOOL: run-interp-spec +;;; STDIN_FILE: third_party/testsuite/binary.wast +(;; STDOUT ;;; +assert_invalid error: + third_party/testsuite/binary.wast:4:18: error in binary module: @0x00000000: unable to read uint32_t: magic +(assert_invalid (module "") "unexpected end") + ^^^^^^ +assert_invalid error: + third_party/testsuite/binary.wast:5:18: error in binary module: @0x00000000: unable to read uint32_t: magic +(assert_invalid (module "\01") "unexpected end") + ^^^^^^ +assert_invalid error: + third_party/testsuite/binary.wast:6:18: error in binary module: @0x00000000: unable to read uint32_t: magic +(assert_invalid (module "\00as") "unexpected end") + ^^^^^^ +assert_invalid error: + third_party/testsuite/binary.wast:7:18: error in binary module: @0x00000000: unable to read uint32_t: magic +(assert_invalid (module "\01") "unexpected end") + ^^^^^^ +assert_invalid error: + third_party/testsuite/binary.wast:8:18: error in binary module: @0x00000004: magic value mismatch +(assert_invalid (module "asm\00") "magic header not detected") + ^^^^^^ +assert_invalid error: + third_party/testsuite/binary.wast:10:18: error in binary module: @0x00000004: unable to read uint32_t: version +(assert_invalid (module "\00asm") "unexpected end") + ^^^^^^ +assert_invalid error: + third_party/testsuite/binary.wast:11:18: error in binary module: @0x00000004: unable to read uint32_t: version +(assert_invalid (module "\00asm\0b") "unexpected end") + ^^^^^^ +assert_invalid error: + third_party/testsuite/binary.wast:12:18: error in binary module: @0x00000004: unable to read uint32_t: version +(assert_invalid (module "\00asm\0b\00\00") "unexpected end") + ^^^^^^ +assert_invalid error: + third_party/testsuite/binary.wast:13:18: error in binary module: @0x00000008: version mismatch +(assert_invalid (module "\00asm\10\00\00\00") "unknown binary version") + ^^^^^^ +0/0 tests passed. +;;; STDOUT ;;) diff --git a/test/interp/spec/break-drop.txt b/test/interp/spec/break-drop.txt new file mode 100644 index 00000000..d432aae1 --- /dev/null +++ b/test/interp/spec/break-drop.txt @@ -0,0 +1,5 @@ +;;; TOOL: run-interp-spec +;;; STDIN_FILE: third_party/testsuite/break-drop.wast +(;; STDOUT ;;; +15/15 tests passed. +;;; STDOUT ;;) diff --git a/test/interp/spec/conversions.txt b/test/interp/spec/conversions.txt index 47228c3c..85d947c0 100644 --- a/test/interp/spec/conversions.txt +++ b/test/interp/spec/conversions.txt @@ -1,5 +1,5 @@ ;;; TOOL: run-interp-spec ;;; STDIN_FILE: third_party/testsuite/conversions.wast (;; STDOUT ;;; -318/318 tests passed. +344/344 tests passed. ;;; STDOUT ;;) diff --git a/test/interp/spec/float_exprs.txt b/test/interp/spec/float_exprs.txt index 7f1780b2..bc552623 100644 --- a/test/interp/spec/float_exprs.txt +++ b/test/interp/spec/float_exprs.txt @@ -11,5 +11,5 @@ $invoke_1() $invoke_2() $invoke_3() $invoke_8() -462/462 tests passed. +612/612 tests passed. ;;; STDOUT ;;) diff --git a/test/interp/spec/float_memory.txt b/test/interp/spec/float_memory.txt index d2fae3dc..c730c779 100644 --- a/test/interp/spec/float_memory.txt +++ b/test/interp/spec/float_memory.txt @@ -17,5 +17,13 @@ $invoke_2() $invoke_5() $invoke_8() $invoke_11() -40/40 tests passed. +$invoke_2() +$invoke_5() +$invoke_8() +$invoke_11() +$invoke_2() +$invoke_5() +$invoke_8() +$invoke_11() +60/60 tests passed. ;;; STDOUT ;;) diff --git a/test/interp/spec/float_misc.txt b/test/interp/spec/float_misc.txt index 36a7a7e0..6e55a883 100644 --- a/test/interp/spec/float_misc.txt +++ b/test/interp/spec/float_misc.txt @@ -1,5 +1,5 @@ ;;; TOOL: run-interp-spec ;;; STDIN_FILE: third_party/testsuite/float_misc.wast (;; STDOUT ;;; -323/323 tests passed. +354/354 tests passed. ;;; STDOUT ;;) diff --git a/test/interp/spec/int_exprs.txt b/test/interp/spec/int_exprs.txt index 518fa01a..c2816c95 100644 --- a/test/interp/spec/int_exprs.txt +++ b/test/interp/spec/int_exprs.txt @@ -1,5 +1,5 @@ ;;; TOOL: run-interp-spec ;;; STDIN_FILE: third_party/testsuite/int_exprs.wast (;; STDOUT ;;; -75/75 tests passed. +79/79 tests passed. ;;; STDOUT ;;) diff --git a/test/interp/spec/memory.txt b/test/interp/spec/memory.txt index 3c6e9a6f..42e97998 100644 --- a/test/interp/spec/memory.txt +++ b/test/interp/spec/memory.txt @@ -2,47 +2,59 @@ ;;; STDIN_FILE: third_party/testsuite/memory.wast (;; STDOUT ;;; assert_invalid error: - third_party/testsuite/memory.wast:11:12: max pages (0) must be greater than or equal to initial pages (1) + third_party/testsuite/memory.wast:12:12: max pages (0) must be >= initial pages (1) (module (memory 1 0)) ^^^^^^ assert_invalid error: - third_party/testsuite/memory.wast:15:24: segment ends past the end of initial memory size (0) + third_party/testsuite/memory.wast:16:24: segment ends past the end of initial memory size (0) (module (memory 0 0 (segment 0 "a"))) ^^^^^^^ assert_invalid error: - third_party/testsuite/memory.wast:19:40: address (98304) greater than initial memory size (65536) + third_party/testsuite/memory.wast:20:40: address (98304) greater than initial memory size (65536) (module (memory 1 2 (segment 0 "a") (segment 98304 "b"))) ^^^^^^^ assert_invalid error: - third_party/testsuite/memory.wast:23:42: address (0) less than end of previous segment (3) + third_party/testsuite/memory.wast:24:42: address (0) less than end of previous segment (3) (module (memory 1 2 (segment 0 "abc") (segment 0 "def"))) ^^^^^^^ assert_invalid error: - third_party/testsuite/memory.wast:27:41: address (0) less than end of previous segment (5) + third_party/testsuite/memory.wast:28:41: address (0) less than end of previous segment (5) (module (memory 1 2 (segment 3 "ab") (segment 0 "de"))) ^^^^^^^ assert_invalid error: - third_party/testsuite/memory.wast:31:56: address (1) less than end of previous segment (3) + third_party/testsuite/memory.wast:32:56: address (1) less than end of previous segment (3) (module (memory 1 2 (segment 0 "a") (segment 2 "b") (segment 1 "c"))) ^^^^^^^ assert_invalid error: - third_party/testsuite/memory.wast:42:28: alignment must be power-of-two + third_party/testsuite/memory.wast:36:12: max pages (65536) must be <= (65535) + (module (memory 0 65536)) + ^^^^^^ +assert_invalid error: + third_party/testsuite/memory.wast:40:12: max pages (2147483648) must be <= (65535) + (module (memory 0 2147483648)) + ^^^^^^ +assert_invalid error: + third_party/testsuite/memory.wast:44:12: max pages (4294967296) must be <= (65535) + (module (memory 0 4294967296)) + ^^^^^^ +assert_invalid error: + third_party/testsuite/memory.wast:55:28: alignment must be power-of-two (module (memory 0) (func (i64.load align=0 (i32.const 0)))) ^ assert_invalid error: - third_party/testsuite/memory.wast:46:28: alignment must be power-of-two + third_party/testsuite/memory.wast:59:28: alignment must be power-of-two (module (memory 0) (func (i64.load align=3 (i32.const 0)))) ^ assert_invalid error: - third_party/testsuite/memory.wast:50:28: alignment must be power-of-two + third_party/testsuite/memory.wast:63:28: alignment must be power-of-two (module (memory 0) (func (i64.load align=5 (i32.const 0)))) ^ assert_invalid error: - third_party/testsuite/memory.wast:54:28: alignment must be power-of-two + third_party/testsuite/memory.wast:67:28: alignment must be power-of-two (module (memory 0) (func (i64.load align=6 (i32.const 0)))) ^ assert_invalid error: - third_party/testsuite/memory.wast:58:28: alignment must be power-of-two + third_party/testsuite/memory.wast:71:28: alignment must be power-of-two (module (memory 0) (func (i64.load align=7 (i32.const 0)))) ^ 24/24 tests passed. diff --git a/test/interp/spec/typecheck.txt b/test/interp/spec/typecheck.txt new file mode 100644 index 00000000..8bef81ba --- /dev/null +++ b/test/interp/spec/typecheck.txt @@ -0,0 +1,973 @@ +;;; TOOL: run-interp-spec +;;; STDIN_FILE: third_party/testsuite/typecheck.wast +(;; STDOUT ;;; +assert_invalid error: + third_party/testsuite/typecheck.wast:5:35: type mismatch of condition. got f32, expected i32 +(assert_invalid (module (func (if (f32.const 0) (nop) (nop)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:8:47: type mismatch of br_if condition. got f32, expected i32 +(assert_invalid (module (func (block (br_if 0 (f32.const 0))))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:12:36: type mismatch of key. got f32, expected i32 + (module (func (block (br_table 0 (f32.const 0))))) + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:16:58: type mismatch of argument 0 of call. got f32, expected i32 +...id (module (func (param i32)) (func (call 0 (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:17:75: type mismatch of argument 0 of call_import. got f32, expected i32 +...t "a" "b" (param i32)) (func (call_import 0 (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:24:38: type mismatch of argument 0 of call_indirect. got f32, expected i32 + (call_indirect 0 (i32.const 0) (f32.const 0)))) + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:33:28: type mismatch of function index. got f32, expected i32 + (func (call_indirect 0 (f32.const 0)))) + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:37:52: type mismatch of return. got f32, expected i32 +..._invalid (module (func (result i32) (return (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:40:56: type mismatch of set_local. got f32, expected i32 +...alid (module (func (local i32) (set_local 0 (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:43:52: type mismatch of load index. got f32, expected i32 +..._invalid (module (memory 1) (func (i32.load (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:44:55: type mismatch of load index. got f32, expected i32 +...valid (module (memory 1) (func (i32.load8_s (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:45:55: type mismatch of load index. got f32, expected i32 +...valid (module (memory 1) (func (i32.load8_u (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:46:56: type mismatch of load index. got f32, expected i32 +...alid (module (memory 1) (func (i32.load16_s (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:47:56: type mismatch of load index. got f32, expected i32 +...alid (module (memory 1) (func (i32.load16_u (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:48:52: type mismatch of load index. got f32, expected i32 +..._invalid (module (memory 1) (func (i64.load (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:49:55: type mismatch of load index. got f32, expected i32 +...valid (module (memory 1) (func (i64.load8_s (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:50:55: type mismatch of load index. got f32, expected i32 +...valid (module (memory 1) (func (i64.load8_u (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:51:56: type mismatch of load index. got f32, expected i32 +...alid (module (memory 1) (func (i64.load16_s (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:52:56: type mismatch of load index. got f32, expected i32 +...alid (module (memory 1) (func (i64.load16_u (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:53:56: type mismatch of load index. got f32, expected i32 +...alid (module (memory 1) (func (i64.load32_s (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:54:56: type mismatch of load index. got f32, expected i32 +...alid (module (memory 1) (func (i64.load32_u (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:55:52: type mismatch of load index. got f32, expected i32 +..._invalid (module (memory 1) (func (f32.load (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:56:52: type mismatch of load index. got f32, expected i32 +..._invalid (module (memory 1) (func (f64.load (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:59:53: type mismatch of store index. got f32, expected i32 +... (module (memory 1) (func (i32.store (f32.const 0) (i32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:60:54: type mismatch of store index. got f32, expected i32 +...(module (memory 1) (func (i32.store8 (f32.const 0) (i32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:61:55: type mismatch of store index. got f32, expected i32 +...module (memory 1) (func (i32.store16 (f32.const 0) (i32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:62:53: type mismatch of store index. got f32, expected i32 +... (module (memory 1) (func (i64.store (f32.const 0) (i32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:62:67: type mismatch of store value. got i32, expected i64 +...e (memory 1) (func (i64.store (f32.const 0) (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:63:54: type mismatch of store index. got f32, expected i32 +...(module (memory 1) (func (i64.store8 (f32.const 0) (i64.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:64:55: type mismatch of store index. got f32, expected i32 +...module (memory 1) (func (i64.store16 (f32.const 0) (i64.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:65:55: type mismatch of store index. got f32, expected i32 +...module (memory 1) (func (i64.store32 (f32.const 0) (i64.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:66:53: type mismatch of store index. got f32, expected i32 +... (module (memory 1) (func (f32.store (f32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:67:53: type mismatch of store index. got f32, expected i32 +... (module (memory 1) (func (f64.store (f32.const 0) (f64.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:70:67: type mismatch of store value. got f32, expected i32 +...e (memory 1) (func (i32.store (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:71:68: type mismatch of store value. got f32, expected i32 +... (memory 1) (func (i32.store8 (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:72:69: type mismatch of store value. got f32, expected i32 +...(memory 1) (func (i32.store16 (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:73:67: type mismatch of store value. got f32, expected i64 +...e (memory 1) (func (i64.store (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:74:68: type mismatch of store value. got f64, expected i64 +... (memory 1) (func (i64.store8 (i32.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:75:69: type mismatch of store value. got f64, expected i64 +...(memory 1) (func (i64.store16 (i32.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:76:69: type mismatch of store value. got f64, expected i64 +...(memory 1) (func (i64.store32 (i32.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:77:67: type mismatch of store value. got i32, expected f32 +...e (memory 1) (func (f32.store (i32.const 0) (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:78:67: type mismatch of store value. got i64, expected f64 +...e (memory 1) (func (f64.store (i32.const 0) (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:81:40: type mismatch of argument 0 of binary op. got i64, expected i32 +(assert_invalid (module (func (i32.add (i64.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:81:54: type mismatch of argument 1 of binary op. got f32, expected i32 +...nvalid (module (func (i32.add (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:82:40: type mismatch of argument 0 of binary op. got i64, expected i32 +(assert_invalid (module (func (i32.and (i64.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:82:54: type mismatch of argument 1 of binary op. got f32, expected i32 +...nvalid (module (func (i32.and (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:83:42: type mismatch of argument 0 of binary op. got i64, expected i32 +...ert_invalid (module (func (i32.div_s (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:83:56: type mismatch of argument 1 of binary op. got f32, expected i32 +...alid (module (func (i32.div_s (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:84:42: type mismatch of argument 0 of binary op. got i64, expected i32 +...ert_invalid (module (func (i32.div_u (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:84:56: type mismatch of argument 1 of binary op. got f32, expected i32 +...alid (module (func (i32.div_u (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:85:40: type mismatch of argument 0 of binary op. got i64, expected i32 +(assert_invalid (module (func (i32.mul (i64.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:85:54: type mismatch of argument 1 of binary op. got f32, expected i32 +...nvalid (module (func (i32.mul (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:86:39: type mismatch of argument 0 of binary op. got i64, expected i32 +(assert_invalid (module (func (i32.or (i64.const 0) (f32.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:86:53: type mismatch of argument 1 of binary op. got f32, expected i32 +...invalid (module (func (i32.or (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:87:42: type mismatch of argument 0 of binary op. got i64, expected i32 +...ert_invalid (module (func (i32.rem_s (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:87:56: type mismatch of argument 1 of binary op. got f32, expected i32 +...alid (module (func (i32.rem_s (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:88:42: type mismatch of argument 0 of binary op. got i64, expected i32 +...ert_invalid (module (func (i32.rem_u (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:88:56: type mismatch of argument 1 of binary op. got f32, expected i32 +...alid (module (func (i32.rem_u (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:89:41: type mismatch of argument 0 of binary op. got i64, expected i32 +(assert_invalid (module (func (i32.rotl (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:89:55: type mismatch of argument 1 of binary op. got f32, expected i32 +...valid (module (func (i32.rotl (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:90:41: type mismatch of argument 0 of binary op. got i64, expected i32 +(assert_invalid (module (func (i32.rotr (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:90:55: type mismatch of argument 1 of binary op. got f32, expected i32 +...valid (module (func (i32.rotr (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:91:40: type mismatch of argument 0 of binary op. got i64, expected i32 +(assert_invalid (module (func (i32.shl (i64.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:91:54: type mismatch of argument 1 of binary op. got f32, expected i32 +...nvalid (module (func (i32.shl (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:92:42: type mismatch of argument 0 of binary op. got i64, expected i32 +...ert_invalid (module (func (i32.shr_s (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:92:56: type mismatch of argument 1 of binary op. got f32, expected i32 +...alid (module (func (i32.shr_s (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:93:42: type mismatch of argument 0 of binary op. got i64, expected i32 +...ert_invalid (module (func (i32.shr_u (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:93:56: type mismatch of argument 1 of binary op. got f32, expected i32 +...alid (module (func (i32.shr_u (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:94:40: type mismatch of argument 0 of binary op. got i64, expected i32 +(assert_invalid (module (func (i32.sub (i64.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:94:54: type mismatch of argument 1 of binary op. got f32, expected i32 +...nvalid (module (func (i32.sub (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:95:40: type mismatch of argument 0 of binary op. got i64, expected i32 +(assert_invalid (module (func (i32.xor (i64.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:95:54: type mismatch of argument 1 of binary op. got f32, expected i32 +...nvalid (module (func (i32.xor (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:96:40: type mismatch of argument 0 of binary op. got i32, expected i64 +(assert_invalid (module (func (i64.add (i32.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:96:54: type mismatch of argument 1 of binary op. got f32, expected i64 +...nvalid (module (func (i64.add (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:97:40: type mismatch of argument 0 of binary op. got i32, expected i64 +(assert_invalid (module (func (i64.and (i32.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:97:54: type mismatch of argument 1 of binary op. got f32, expected i64 +...nvalid (module (func (i64.and (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:98:42: type mismatch of argument 0 of binary op. got i32, expected i64 +...ert_invalid (module (func (i64.div_s (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:98:56: type mismatch of argument 1 of binary op. got f32, expected i64 +...alid (module (func (i64.div_s (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:99:42: type mismatch of argument 0 of binary op. got i32, expected i64 +...ert_invalid (module (func (i64.div_u (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:99:56: type mismatch of argument 1 of binary op. got f32, expected i64 +...alid (module (func (i64.div_u (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:100:40: type mismatch of argument 0 of binary op. got i32, expected i64 +(assert_invalid (module (func (i64.mul (i32.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:100:54: type mismatch of argument 1 of binary op. got f32, expected i64 +...nvalid (module (func (i64.mul (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:101:39: type mismatch of argument 0 of binary op. got i32, expected i64 +(assert_invalid (module (func (i64.or (i32.const 0) (f32.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:101:53: type mismatch of argument 1 of binary op. got f32, expected i64 +...invalid (module (func (i64.or (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:102:42: type mismatch of argument 0 of binary op. got i32, expected i64 +...ert_invalid (module (func (i64.rem_s (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:102:56: type mismatch of argument 1 of binary op. got f32, expected i64 +...alid (module (func (i64.rem_s (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:103:42: type mismatch of argument 0 of binary op. got i32, expected i64 +...ert_invalid (module (func (i64.rem_u (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:103:56: type mismatch of argument 1 of binary op. got f32, expected i64 +...alid (module (func (i64.rem_u (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:104:41: type mismatch of argument 0 of binary op. got i32, expected i64 +(assert_invalid (module (func (i64.rotl (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:104:55: type mismatch of argument 1 of binary op. got f32, expected i64 +...valid (module (func (i64.rotl (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:105:41: type mismatch of argument 0 of binary op. got i32, expected i64 +(assert_invalid (module (func (i64.rotr (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:105:55: type mismatch of argument 1 of binary op. got f32, expected i64 +...valid (module (func (i64.rotr (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:106:40: type mismatch of argument 0 of binary op. got i32, expected i64 +(assert_invalid (module (func (i64.shl (i32.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:106:54: type mismatch of argument 1 of binary op. got f32, expected i64 +...nvalid (module (func (i64.shl (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:107:42: type mismatch of argument 0 of binary op. got i32, expected i64 +...ert_invalid (module (func (i64.shr_s (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:107:56: type mismatch of argument 1 of binary op. got f32, expected i64 +...alid (module (func (i64.shr_s (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:108:42: type mismatch of argument 0 of binary op. got i32, expected i64 +...ert_invalid (module (func (i64.shr_u (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:108:56: type mismatch of argument 1 of binary op. got f32, expected i64 +...alid (module (func (i64.shr_u (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:109:40: type mismatch of argument 0 of binary op. got i32, expected i64 +(assert_invalid (module (func (i64.sub (i32.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:109:54: type mismatch of argument 1 of binary op. got f32, expected i64 +...nvalid (module (func (i64.sub (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:110:40: type mismatch of argument 0 of binary op. got i32, expected i64 +(assert_invalid (module (func (i64.xor (i32.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:110:54: type mismatch of argument 1 of binary op. got f32, expected i64 +...nvalid (module (func (i64.xor (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:111:40: type mismatch of argument 0 of binary op. got i64, expected f32 +(assert_invalid (module (func (f32.add (i64.const 0) (f64.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:111:54: type mismatch of argument 1 of binary op. got f64, expected f32 +...nvalid (module (func (f32.add (i64.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:112:45: type mismatch of argument 0 of binary op. got i64, expected f32 +..._invalid (module (func (f32.copysign (i64.const 0) (f64.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:112:59: type mismatch of argument 1 of binary op. got f64, expected f32 +...d (module (func (f32.copysign (i64.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:113:40: type mismatch of argument 0 of binary op. got i64, expected f32 +(assert_invalid (module (func (f32.div (i64.const 0) (f64.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:113:54: type mismatch of argument 1 of binary op. got f64, expected f32 +...nvalid (module (func (f32.div (i64.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:114:40: type mismatch of argument 0 of binary op. got i64, expected f32 +(assert_invalid (module (func (f32.max (i64.const 0) (f64.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:114:54: type mismatch of argument 1 of binary op. got f64, expected f32 +...nvalid (module (func (f32.max (i64.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:115:40: type mismatch of argument 0 of binary op. got i64, expected f32 +(assert_invalid (module (func (f32.min (i64.const 0) (f64.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:115:54: type mismatch of argument 1 of binary op. got f64, expected f32 +...nvalid (module (func (f32.min (i64.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:116:40: type mismatch of argument 0 of binary op. got i64, expected f32 +(assert_invalid (module (func (f32.mul (i64.const 0) (f64.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:116:54: type mismatch of argument 1 of binary op. got f64, expected f32 +...nvalid (module (func (f32.mul (i64.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:117:40: type mismatch of argument 0 of binary op. got i64, expected f32 +(assert_invalid (module (func (f32.sub (i64.const 0) (f64.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:117:54: type mismatch of argument 1 of binary op. got f64, expected f32 +...nvalid (module (func (f32.sub (i64.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:118:40: type mismatch of argument 0 of binary op. got i64, expected f64 +(assert_invalid (module (func (f64.add (i64.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:118:54: type mismatch of argument 1 of binary op. got f32, expected f64 +...nvalid (module (func (f64.add (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:119:45: type mismatch of argument 0 of binary op. got i64, expected f64 +..._invalid (module (func (f64.copysign (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:119:59: type mismatch of argument 1 of binary op. got f32, expected f64 +...d (module (func (f64.copysign (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:120:40: type mismatch of argument 0 of binary op. got i64, expected f64 +(assert_invalid (module (func (f64.div (i64.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:120:54: type mismatch of argument 1 of binary op. got f32, expected f64 +...nvalid (module (func (f64.div (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:121:40: type mismatch of argument 0 of binary op. got i64, expected f64 +(assert_invalid (module (func (f64.max (i64.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:121:54: type mismatch of argument 1 of binary op. got f32, expected f64 +...nvalid (module (func (f64.max (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:122:40: type mismatch of argument 0 of binary op. got i64, expected f64 +(assert_invalid (module (func (f64.min (i64.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:122:54: type mismatch of argument 1 of binary op. got f32, expected f64 +...nvalid (module (func (f64.min (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:123:40: type mismatch of argument 0 of binary op. got i64, expected f64 +(assert_invalid (module (func (f64.mul (i64.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:123:54: type mismatch of argument 1 of binary op. got f32, expected f64 +...nvalid (module (func (f64.mul (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:124:40: type mismatch of argument 0 of binary op. got i64, expected f64 +(assert_invalid (module (func (f64.sub (i64.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:124:54: type mismatch of argument 1 of binary op. got f32, expected f64 +...nvalid (module (func (f64.sub (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:127:40: type mismatch of convert op. got i64, expected i32 +(assert_invalid (module (func (i32.eqz (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:128:40: type mismatch of unary op. got i64, expected i32 +(assert_invalid (module (func (i32.clz (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:129:40: type mismatch of unary op. got i64, expected i32 +(assert_invalid (module (func (i32.ctz (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:130:43: type mismatch of unary op. got i64, expected i32 +(assert_invalid (module (func (i32.popcnt (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:131:40: type mismatch of convert op. got i32, expected i64 +(assert_invalid (module (func (i64.eqz (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:132:40: type mismatch of unary op. got i32, expected i64 +(assert_invalid (module (func (i64.clz (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:133:40: type mismatch of unary op. got i32, expected i64 +(assert_invalid (module (func (i64.ctz (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:134:43: type mismatch of unary op. got i32, expected i64 +(assert_invalid (module (func (i64.popcnt (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:135:40: type mismatch of unary op. got i64, expected f32 +(assert_invalid (module (func (f32.abs (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:136:41: type mismatch of unary op. got i64, expected f32 +(assert_invalid (module (func (f32.ceil (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:137:42: type mismatch of unary op. got i64, expected f32 +(assert_invalid (module (func (f32.floor (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:138:44: type mismatch of unary op. got i64, expected f32 +(assert_invalid (module (func (f32.nearest (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:139:40: type mismatch of unary op. got i64, expected f32 +(assert_invalid (module (func (f32.neg (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:140:41: type mismatch of unary op. got i64, expected f32 +(assert_invalid (module (func (f32.sqrt (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:141:42: type mismatch of unary op. got i64, expected f32 +(assert_invalid (module (func (f32.trunc (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:142:40: type mismatch of unary op. got i64, expected f64 +(assert_invalid (module (func (f64.abs (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:143:41: type mismatch of unary op. got i64, expected f64 +(assert_invalid (module (func (f64.ceil (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:144:42: type mismatch of unary op. got i64, expected f64 +(assert_invalid (module (func (f64.floor (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:145:44: type mismatch of unary op. got i64, expected f64 +(assert_invalid (module (func (f64.nearest (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:146:40: type mismatch of unary op. got i64, expected f64 +(assert_invalid (module (func (f64.neg (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:147:41: type mismatch of unary op. got i64, expected f64 +(assert_invalid (module (func (f64.sqrt (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:148:42: type mismatch of unary op. got i64, expected f64 +(assert_invalid (module (func (f64.trunc (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:151:39: type mismatch of argument 0 of compare op. got i64, expected i32 +(assert_invalid (module (func (i32.eq (i64.const 0) (f32.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:151:53: type mismatch of argument 1 of compare op. got f32, expected i32 +...invalid (module (func (i32.eq (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:152:41: type mismatch of argument 0 of compare op. got i64, expected i32 +(assert_invalid (module (func (i32.ge_s (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:152:55: type mismatch of argument 1 of compare op. got f32, expected i32 +...valid (module (func (i32.ge_s (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:153:41: type mismatch of argument 0 of compare op. got i64, expected i32 +(assert_invalid (module (func (i32.ge_u (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:153:55: type mismatch of argument 1 of compare op. got f32, expected i32 +...valid (module (func (i32.ge_u (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:154:41: type mismatch of argument 0 of compare op. got i64, expected i32 +(assert_invalid (module (func (i32.gt_s (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:154:55: type mismatch of argument 1 of compare op. got f32, expected i32 +...valid (module (func (i32.gt_s (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:155:41: type mismatch of argument 0 of compare op. got i64, expected i32 +(assert_invalid (module (func (i32.gt_u (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:155:55: type mismatch of argument 1 of compare op. got f32, expected i32 +...valid (module (func (i32.gt_u (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:156:41: type mismatch of argument 0 of compare op. got i64, expected i32 +(assert_invalid (module (func (i32.le_s (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:156:55: type mismatch of argument 1 of compare op. got f32, expected i32 +...valid (module (func (i32.le_s (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:157:41: type mismatch of argument 0 of compare op. got i64, expected i32 +(assert_invalid (module (func (i32.le_u (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:157:55: type mismatch of argument 1 of compare op. got f32, expected i32 +...valid (module (func (i32.le_u (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:158:41: type mismatch of argument 0 of compare op. got i64, expected i32 +(assert_invalid (module (func (i32.lt_s (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:158:55: type mismatch of argument 1 of compare op. got f32, expected i32 +...valid (module (func (i32.lt_s (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:159:41: type mismatch of argument 0 of compare op. got i64, expected i32 +(assert_invalid (module (func (i32.lt_u (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:159:55: type mismatch of argument 1 of compare op. got f32, expected i32 +...valid (module (func (i32.lt_u (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:160:39: type mismatch of argument 0 of compare op. got i64, expected i32 +(assert_invalid (module (func (i32.ne (i64.const 0) (f32.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:160:53: type mismatch of argument 1 of compare op. got f32, expected i32 +...invalid (module (func (i32.ne (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:161:39: type mismatch of argument 0 of compare op. got i32, expected i64 +(assert_invalid (module (func (i64.eq (i32.const 0) (f32.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:161:53: type mismatch of argument 1 of compare op. got f32, expected i64 +...invalid (module (func (i64.eq (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:162:41: type mismatch of argument 0 of compare op. got i32, expected i64 +(assert_invalid (module (func (i64.ge_s (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:162:55: type mismatch of argument 1 of compare op. got f32, expected i64 +...valid (module (func (i64.ge_s (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:163:41: type mismatch of argument 0 of compare op. got i32, expected i64 +(assert_invalid (module (func (i64.ge_u (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:163:55: type mismatch of argument 1 of compare op. got f32, expected i64 +...valid (module (func (i64.ge_u (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:164:41: type mismatch of argument 0 of compare op. got i32, expected i64 +(assert_invalid (module (func (i64.gt_s (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:164:55: type mismatch of argument 1 of compare op. got f32, expected i64 +...valid (module (func (i64.gt_s (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:165:41: type mismatch of argument 0 of compare op. got i32, expected i64 +(assert_invalid (module (func (i64.gt_u (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:165:55: type mismatch of argument 1 of compare op. got f32, expected i64 +...valid (module (func (i64.gt_u (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:166:41: type mismatch of argument 0 of compare op. got i32, expected i64 +(assert_invalid (module (func (i64.le_s (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:166:55: type mismatch of argument 1 of compare op. got f32, expected i64 +...valid (module (func (i64.le_s (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:167:41: type mismatch of argument 0 of compare op. got i32, expected i64 +(assert_invalid (module (func (i64.le_u (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:167:55: type mismatch of argument 1 of compare op. got f32, expected i64 +...valid (module (func (i64.le_u (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:168:41: type mismatch of argument 0 of compare op. got i32, expected i64 +(assert_invalid (module (func (i64.lt_s (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:168:55: type mismatch of argument 1 of compare op. got f32, expected i64 +...valid (module (func (i64.lt_s (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:169:41: type mismatch of argument 0 of compare op. got i32, expected i64 +(assert_invalid (module (func (i64.lt_u (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:169:55: type mismatch of argument 1 of compare op. got f32, expected i64 +...valid (module (func (i64.lt_u (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:170:39: type mismatch of argument 0 of compare op. got i32, expected i64 +(assert_invalid (module (func (i64.ne (i32.const 0) (f32.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:170:53: type mismatch of argument 1 of compare op. got f32, expected i64 +...invalid (module (func (i64.ne (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:171:39: type mismatch of argument 0 of compare op. got i64, expected f32 +(assert_invalid (module (func (f32.eq (i64.const 0) (f64.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:171:53: type mismatch of argument 1 of compare op. got f64, expected f32 +...invalid (module (func (f32.eq (i64.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:172:39: type mismatch of argument 0 of compare op. got i64, expected f32 +(assert_invalid (module (func (f32.ge (i64.const 0) (f64.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:172:53: type mismatch of argument 1 of compare op. got f64, expected f32 +...invalid (module (func (f32.ge (i64.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:173:39: type mismatch of argument 0 of compare op. got i64, expected f32 +(assert_invalid (module (func (f32.gt (i64.const 0) (f64.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:173:53: type mismatch of argument 1 of compare op. got f64, expected f32 +...invalid (module (func (f32.gt (i64.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:174:39: type mismatch of argument 0 of compare op. got i64, expected f32 +(assert_invalid (module (func (f32.le (i64.const 0) (f64.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:174:53: type mismatch of argument 1 of compare op. got f64, expected f32 +...invalid (module (func (f32.le (i64.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:175:39: type mismatch of argument 0 of compare op. got i64, expected f32 +(assert_invalid (module (func (f32.lt (i64.const 0) (f64.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:175:53: type mismatch of argument 1 of compare op. got f64, expected f32 +...invalid (module (func (f32.lt (i64.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:176:39: type mismatch of argument 0 of compare op. got i64, expected f32 +(assert_invalid (module (func (f32.ne (i64.const 0) (f64.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:176:53: type mismatch of argument 1 of compare op. got f64, expected f32 +...invalid (module (func (f32.ne (i64.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:177:39: type mismatch of argument 0 of compare op. got i64, expected f64 +(assert_invalid (module (func (f64.eq (i64.const 0) (f32.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:177:53: type mismatch of argument 1 of compare op. got f32, expected f64 +...invalid (module (func (f64.eq (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:178:39: type mismatch of argument 0 of compare op. got i64, expected f64 +(assert_invalid (module (func (f64.ge (i64.const 0) (f32.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:178:53: type mismatch of argument 1 of compare op. got f32, expected f64 +...invalid (module (func (f64.ge (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:179:39: type mismatch of argument 0 of compare op. got i64, expected f64 +(assert_invalid (module (func (f64.gt (i64.const 0) (f32.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:179:53: type mismatch of argument 1 of compare op. got f32, expected f64 +...invalid (module (func (f64.gt (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:180:39: type mismatch of argument 0 of compare op. got i64, expected f64 +(assert_invalid (module (func (f64.le (i64.const 0) (f32.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:180:53: type mismatch of argument 1 of compare op. got f32, expected f64 +...invalid (module (func (f64.le (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:181:39: type mismatch of argument 0 of compare op. got i64, expected f64 +(assert_invalid (module (func (f64.lt (i64.const 0) (f32.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:181:53: type mismatch of argument 1 of compare op. got f32, expected f64 +...invalid (module (func (f64.lt (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:182:39: type mismatch of argument 0 of compare op. got i64, expected f64 +(assert_invalid (module (func (f64.ne (i64.const 0) (f32.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:182:53: type mismatch of argument 1 of compare op. got f32, expected f64 +...invalid (module (func (f64.ne (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:185:45: type mismatch of convert op. got f32, expected i64 +(assert_invalid (module (func (i32.wrap/i64 (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:186:48: type mismatch of convert op. got i64, expected f32 +(assert_invalid (module (func (i32.trunc_s/f32 (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:187:48: type mismatch of convert op. got i64, expected f32 +(assert_invalid (module (func (i32.trunc_u/f32 (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:188:48: type mismatch of convert op. got i64, expected f64 +(assert_invalid (module (func (i32.trunc_s/f64 (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:189:48: type mismatch of convert op. got i64, expected f64 +(assert_invalid (module (func (i32.trunc_u/f64 (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:190:52: type mismatch of convert op. got i64, expected f32 +..._invalid (module (func (i32.reinterpret/f32 (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:191:49: type mismatch of convert op. got f32, expected i32 +...ert_invalid (module (func (i64.extend_s/i32 (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:192:49: type mismatch of convert op. got f32, expected i32 +...ert_invalid (module (func (i64.extend_u/i32 (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:193:48: type mismatch of convert op. got i32, expected f32 +(assert_invalid (module (func (i64.trunc_s/f32 (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:194:48: type mismatch of convert op. got i32, expected f32 +(assert_invalid (module (func (i64.trunc_u/f32 (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:195:48: type mismatch of convert op. got i32, expected f64 +(assert_invalid (module (func (i64.trunc_s/f64 (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:196:48: type mismatch of convert op. got i32, expected f64 +(assert_invalid (module (func (i64.trunc_u/f64 (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:197:52: type mismatch of convert op. got i32, expected f64 +..._invalid (module (func (i64.reinterpret/f64 (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:198:50: type mismatch of convert op. got i64, expected i32 +...rt_invalid (module (func (f32.convert_s/i32 (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:199:50: type mismatch of convert op. got i64, expected i32 +...rt_invalid (module (func (f32.convert_u/i32 (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:200:50: type mismatch of convert op. got i32, expected i64 +...rt_invalid (module (func (f32.convert_s/i64 (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:201:50: type mismatch of convert op. got i32, expected i64 +...rt_invalid (module (func (f32.convert_u/i64 (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:202:47: type mismatch of convert op. got i32, expected f64 +(assert_invalid (module (func (f32.demote/f64 (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:203:52: type mismatch of convert op. got i64, expected i32 +..._invalid (module (func (f32.reinterpret/i32 (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:204:50: type mismatch of convert op. got i64, expected i32 +...rt_invalid (module (func (f64.convert_s/i32 (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:205:50: type mismatch of convert op. got i64, expected i32 +...rt_invalid (module (func (f64.convert_u/i32 (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:206:50: type mismatch of convert op. got i32, expected i64 +...rt_invalid (module (func (f64.convert_s/i64 (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:207:50: type mismatch of convert op. got i32, expected i64 +...rt_invalid (module (func (f64.convert_u/i64 (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:208:48: type mismatch of convert op. got i32, expected f32 +(assert_invalid (module (func (f64.promote/f32 (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:209:52: type mismatch of convert op. got i32, expected i64 +..._invalid (module (func (f64.reinterpret/i64 (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:212:55: type mismatch of grow_memory. got f32, expected i32 +...valid (module (memory 1) (func (grow_memory (f32.const 0)))) "type mismatch") + ^ +0/0 tests passed. +;;; STDOUT ;;) diff --git a/test/parse/module/bad-memory-init-size-too-big.txt b/test/parse/module/bad-memory-init-size-too-big.txt index aa4d6594..2377b90e 100644 --- a/test/parse/module/bad-memory-init-size-too-big.txt +++ b/test/parse/module/bad-memory-init-size-too-big.txt @@ -1,10 +1,10 @@ ;;; ERROR: 1 (module (memory 65537)) (;; STDERR ;;; -parse/module/bad-memory-init-size-too-big.txt:2:10: initial pages (65537) must be less than (65536) +parse/module/bad-memory-init-size-too-big.txt:2:10: initial pages (65537) must be <= (65535) (module (memory 65537)) ^^^^^^ -parse/module/bad-memory-init-size-too-big.txt:2:10: max pages (65537) must be less than (65536) +parse/module/bad-memory-init-size-too-big.txt:2:10: max pages (65537) must be <= (65535) (module (memory 65537)) ^^^^^^ ;;; STDERR ;;) diff --git a/test/parse/module/bad-memory-max-less-than-init.txt b/test/parse/module/bad-memory-max-less-than-init.txt index 79668cc3..f64a9a48 100644 --- a/test/parse/module/bad-memory-max-less-than-init.txt +++ b/test/parse/module/bad-memory-max-less-than-init.txt @@ -1,7 +1,7 @@ ;;; ERROR: 1 (module (memory 2 1)) (;; STDERR ;;; -parse/module/bad-memory-max-less-than-init.txt:2:10: max pages (1) must be greater than or equal to initial pages (2) +parse/module/bad-memory-max-less-than-init.txt:2:10: max pages (1) must be >= initial pages (2) (module (memory 2 1)) ^^^^^^ ;;; STDERR ;;) diff --git a/test/parse/module/bad-memory-max-size-too-big.txt b/test/parse/module/bad-memory-max-size-too-big.txt index 88a09626..52744dbb 100644 --- a/test/parse/module/bad-memory-max-size-too-big.txt +++ b/test/parse/module/bad-memory-max-size-too-big.txt @@ -1,7 +1,7 @@ ;;; ERROR: 1 (module (memory 0 65537)) (;; STDERR ;;; -parse/module/bad-memory-max-size-too-big.txt:2:10: max pages (65537) must be less than (65536) +parse/module/bad-memory-max-size-too-big.txt:2:10: max pages (65537) must be <= (65535) (module (memory 0 65537)) ^^^^^^ ;;; STDERR ;;) diff --git a/test/spec/binary.txt b/test/spec/binary.txt new file mode 100644 index 00000000..a751911c --- /dev/null +++ b/test/spec/binary.txt @@ -0,0 +1,41 @@ +;;; TOOL: run-js-spec +;;; STDIN_FILE: third_party/testsuite/binary.wast +(;; STDOUT ;;; +assert_invalid error: + third_party/testsuite/binary.wast:4:18: error in binary module: @0x00000000: unable to read uint32_t: magic +(assert_invalid (module "") "unexpected end") + ^^^^^^ +assert_invalid error: + third_party/testsuite/binary.wast:5:18: error in binary module: @0x00000000: unable to read uint32_t: magic +(assert_invalid (module "\01") "unexpected end") + ^^^^^^ +assert_invalid error: + third_party/testsuite/binary.wast:6:18: error in binary module: @0x00000000: unable to read uint32_t: magic +(assert_invalid (module "\00as") "unexpected end") + ^^^^^^ +assert_invalid error: + third_party/testsuite/binary.wast:7:18: error in binary module: @0x00000000: unable to read uint32_t: magic +(assert_invalid (module "\01") "unexpected end") + ^^^^^^ +assert_invalid error: + third_party/testsuite/binary.wast:8:18: error in binary module: @0x00000004: magic value mismatch +(assert_invalid (module "asm\00") "magic header not detected") + ^^^^^^ +assert_invalid error: + third_party/testsuite/binary.wast:10:18: error in binary module: @0x00000004: unable to read uint32_t: version +(assert_invalid (module "\00asm") "unexpected end") + ^^^^^^ +assert_invalid error: + third_party/testsuite/binary.wast:11:18: error in binary module: @0x00000004: unable to read uint32_t: version +(assert_invalid (module "\00asm\0b") "unexpected end") + ^^^^^^ +assert_invalid error: + third_party/testsuite/binary.wast:12:18: error in binary module: @0x00000004: unable to read uint32_t: version +(assert_invalid (module "\00asm\0b\00\00") "unexpected end") + ^^^^^^ +assert_invalid error: + third_party/testsuite/binary.wast:13:18: error in binary module: @0x00000008: version mismatch +(assert_invalid (module "\00asm\10\00\00\00") "unknown binary version") + ^^^^^^ +0/0 tests passed. +;;; STDOUT ;;) diff --git a/test/spec/break-drop.txt b/test/spec/break-drop.txt new file mode 100644 index 00000000..ddf61844 --- /dev/null +++ b/test/spec/break-drop.txt @@ -0,0 +1,5 @@ +;;; TOOL: run-js-spec +;;; STDIN_FILE: third_party/testsuite/break-drop.wast +(;; STDOUT ;;; +15/15 tests passed. +;;; STDOUT ;;) diff --git a/test/spec/conversions.txt b/test/spec/conversions.txt index f8e54660..b18652ff 100644 --- a/test/spec/conversions.txt +++ b/test/spec/conversions.txt @@ -1,5 +1,5 @@ ;;; TOOL: run-js-spec ;;; STDIN_FILE: third_party/testsuite/conversions.wast (;; STDOUT ;;; -318/318 tests passed. +344/344 tests passed. ;;; STDOUT ;;) diff --git a/test/spec/float_exprs.txt b/test/spec/float_exprs.txt index 7aef6047..6e0e7a28 100644 --- a/test/spec/float_exprs.txt +++ b/test/spec/float_exprs.txt @@ -1,8 +1,8 @@ ;;; TOOL: run-js-spec ;;; STDIN_FILE: third_party/testsuite/float_exprs.wast (;; STDOUT ;;; -third_party/testsuite/float_exprs.wast:153: $assert_return_0 failed. -third_party/testsuite/float_exprs.wast:154: $assert_return_1 failed. +third_party/testsuite/float_exprs.wast:191: $assert_return_0 failed. +third_party/testsuite/float_exprs.wast:192: $assert_return_1 failed. $invoke_0 = undefined $invoke_1 = undefined $invoke_2 = undefined @@ -13,5 +13,5 @@ $invoke_1 = undefined $invoke_2 = undefined $invoke_3 = undefined $invoke_8 = undefined -460/462 tests passed. +610/612 tests passed. ;;; STDOUT ;;) diff --git a/test/spec/float_memory.txt b/test/spec/float_memory.txt index 03d5f5a4..b3c0a01d 100644 --- a/test/spec/float_memory.txt +++ b/test/spec/float_memory.txt @@ -17,5 +17,13 @@ $invoke_2 = undefined $invoke_5 = undefined $invoke_8 = undefined $invoke_11 = undefined -40/40 tests passed. +$invoke_2 = undefined +$invoke_5 = undefined +$invoke_8 = undefined +$invoke_11 = undefined +$invoke_2 = undefined +$invoke_5 = undefined +$invoke_8 = undefined +$invoke_11 = undefined +60/60 tests passed. ;;; STDOUT ;;) diff --git a/test/spec/float_misc.txt b/test/spec/float_misc.txt index 924ea3c4..d90ebab3 100644 --- a/test/spec/float_misc.txt +++ b/test/spec/float_misc.txt @@ -1,5 +1,5 @@ ;;; TOOL: run-js-spec ;;; STDIN_FILE: third_party/testsuite/float_misc.wast (;; STDOUT ;;; -323/323 tests passed. +354/354 tests passed. ;;; STDOUT ;;) diff --git a/test/spec/int_exprs.txt b/test/spec/int_exprs.txt index c258c2f9..c7fa9220 100644 --- a/test/spec/int_exprs.txt +++ b/test/spec/int_exprs.txt @@ -1,5 +1,5 @@ ;;; TOOL: run-js-spec ;;; STDIN_FILE: third_party/testsuite/int_exprs.wast (;; STDOUT ;;; -75/75 tests passed. +79/79 tests passed. ;;; STDOUT ;;) diff --git a/test/spec/memory.txt b/test/spec/memory.txt index 5ae416d1..fa4ee59f 100644 --- a/test/spec/memory.txt +++ b/test/spec/memory.txt @@ -2,47 +2,59 @@ ;;; STDIN_FILE: third_party/testsuite/memory.wast (;; STDOUT ;;; assert_invalid error: - third_party/testsuite/memory.wast:11:12: max pages (0) must be greater than or equal to initial pages (1) + third_party/testsuite/memory.wast:12:12: max pages (0) must be >= initial pages (1) (module (memory 1 0)) ^^^^^^ assert_invalid error: - third_party/testsuite/memory.wast:15:24: segment ends past the end of initial memory size (0) + third_party/testsuite/memory.wast:16:24: segment ends past the end of initial memory size (0) (module (memory 0 0 (segment 0 "a"))) ^^^^^^^ assert_invalid error: - third_party/testsuite/memory.wast:19:40: address (98304) greater than initial memory size (65536) + third_party/testsuite/memory.wast:20:40: address (98304) greater than initial memory size (65536) (module (memory 1 2 (segment 0 "a") (segment 98304 "b"))) ^^^^^^^ assert_invalid error: - third_party/testsuite/memory.wast:23:42: address (0) less than end of previous segment (3) + third_party/testsuite/memory.wast:24:42: address (0) less than end of previous segment (3) (module (memory 1 2 (segment 0 "abc") (segment 0 "def"))) ^^^^^^^ assert_invalid error: - third_party/testsuite/memory.wast:27:41: address (0) less than end of previous segment (5) + third_party/testsuite/memory.wast:28:41: address (0) less than end of previous segment (5) (module (memory 1 2 (segment 3 "ab") (segment 0 "de"))) ^^^^^^^ assert_invalid error: - third_party/testsuite/memory.wast:31:56: address (1) less than end of previous segment (3) + third_party/testsuite/memory.wast:32:56: address (1) less than end of previous segment (3) (module (memory 1 2 (segment 0 "a") (segment 2 "b") (segment 1 "c"))) ^^^^^^^ assert_invalid error: - third_party/testsuite/memory.wast:42:28: alignment must be power-of-two + third_party/testsuite/memory.wast:36:12: max pages (65536) must be <= (65535) + (module (memory 0 65536)) + ^^^^^^ +assert_invalid error: + third_party/testsuite/memory.wast:40:12: max pages (2147483648) must be <= (65535) + (module (memory 0 2147483648)) + ^^^^^^ +assert_invalid error: + third_party/testsuite/memory.wast:44:12: max pages (4294967296) must be <= (65535) + (module (memory 0 4294967296)) + ^^^^^^ +assert_invalid error: + third_party/testsuite/memory.wast:55:28: alignment must be power-of-two (module (memory 0) (func (i64.load align=0 (i32.const 0)))) ^ assert_invalid error: - third_party/testsuite/memory.wast:46:28: alignment must be power-of-two + third_party/testsuite/memory.wast:59:28: alignment must be power-of-two (module (memory 0) (func (i64.load align=3 (i32.const 0)))) ^ assert_invalid error: - third_party/testsuite/memory.wast:50:28: alignment must be power-of-two + third_party/testsuite/memory.wast:63:28: alignment must be power-of-two (module (memory 0) (func (i64.load align=5 (i32.const 0)))) ^ assert_invalid error: - third_party/testsuite/memory.wast:54:28: alignment must be power-of-two + third_party/testsuite/memory.wast:67:28: alignment must be power-of-two (module (memory 0) (func (i64.load align=6 (i32.const 0)))) ^ assert_invalid error: - third_party/testsuite/memory.wast:58:28: alignment must be power-of-two + third_party/testsuite/memory.wast:71:28: alignment must be power-of-two (module (memory 0) (func (i64.load align=7 (i32.const 0)))) ^ 24/24 tests passed. diff --git a/test/spec/typecheck.txt b/test/spec/typecheck.txt new file mode 100644 index 00000000..733db6ac --- /dev/null +++ b/test/spec/typecheck.txt @@ -0,0 +1,973 @@ +;;; TOOL: run-js-spec +;;; STDIN_FILE: third_party/testsuite/typecheck.wast +(;; STDOUT ;;; +assert_invalid error: + third_party/testsuite/typecheck.wast:5:35: type mismatch of condition. got f32, expected i32 +(assert_invalid (module (func (if (f32.const 0) (nop) (nop)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:8:47: type mismatch of br_if condition. got f32, expected i32 +(assert_invalid (module (func (block (br_if 0 (f32.const 0))))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:12:36: type mismatch of key. got f32, expected i32 + (module (func (block (br_table 0 (f32.const 0))))) + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:16:58: type mismatch of argument 0 of call. got f32, expected i32 +...id (module (func (param i32)) (func (call 0 (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:17:75: type mismatch of argument 0 of call_import. got f32, expected i32 +...t "a" "b" (param i32)) (func (call_import 0 (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:24:38: type mismatch of argument 0 of call_indirect. got f32, expected i32 + (call_indirect 0 (i32.const 0) (f32.const 0)))) + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:33:28: type mismatch of function index. got f32, expected i32 + (func (call_indirect 0 (f32.const 0)))) + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:37:52: type mismatch of return. got f32, expected i32 +..._invalid (module (func (result i32) (return (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:40:56: type mismatch of set_local. got f32, expected i32 +...alid (module (func (local i32) (set_local 0 (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:43:52: type mismatch of load index. got f32, expected i32 +..._invalid (module (memory 1) (func (i32.load (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:44:55: type mismatch of load index. got f32, expected i32 +...valid (module (memory 1) (func (i32.load8_s (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:45:55: type mismatch of load index. got f32, expected i32 +...valid (module (memory 1) (func (i32.load8_u (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:46:56: type mismatch of load index. got f32, expected i32 +...alid (module (memory 1) (func (i32.load16_s (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:47:56: type mismatch of load index. got f32, expected i32 +...alid (module (memory 1) (func (i32.load16_u (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:48:52: type mismatch of load index. got f32, expected i32 +..._invalid (module (memory 1) (func (i64.load (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:49:55: type mismatch of load index. got f32, expected i32 +...valid (module (memory 1) (func (i64.load8_s (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:50:55: type mismatch of load index. got f32, expected i32 +...valid (module (memory 1) (func (i64.load8_u (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:51:56: type mismatch of load index. got f32, expected i32 +...alid (module (memory 1) (func (i64.load16_s (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:52:56: type mismatch of load index. got f32, expected i32 +...alid (module (memory 1) (func (i64.load16_u (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:53:56: type mismatch of load index. got f32, expected i32 +...alid (module (memory 1) (func (i64.load32_s (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:54:56: type mismatch of load index. got f32, expected i32 +...alid (module (memory 1) (func (i64.load32_u (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:55:52: type mismatch of load index. got f32, expected i32 +..._invalid (module (memory 1) (func (f32.load (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:56:52: type mismatch of load index. got f32, expected i32 +..._invalid (module (memory 1) (func (f64.load (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:59:53: type mismatch of store index. got f32, expected i32 +... (module (memory 1) (func (i32.store (f32.const 0) (i32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:60:54: type mismatch of store index. got f32, expected i32 +...(module (memory 1) (func (i32.store8 (f32.const 0) (i32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:61:55: type mismatch of store index. got f32, expected i32 +...module (memory 1) (func (i32.store16 (f32.const 0) (i32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:62:53: type mismatch of store index. got f32, expected i32 +... (module (memory 1) (func (i64.store (f32.const 0) (i32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:62:67: type mismatch of store value. got i32, expected i64 +...e (memory 1) (func (i64.store (f32.const 0) (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:63:54: type mismatch of store index. got f32, expected i32 +...(module (memory 1) (func (i64.store8 (f32.const 0) (i64.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:64:55: type mismatch of store index. got f32, expected i32 +...module (memory 1) (func (i64.store16 (f32.const 0) (i64.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:65:55: type mismatch of store index. got f32, expected i32 +...module (memory 1) (func (i64.store32 (f32.const 0) (i64.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:66:53: type mismatch of store index. got f32, expected i32 +... (module (memory 1) (func (f32.store (f32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:67:53: type mismatch of store index. got f32, expected i32 +... (module (memory 1) (func (f64.store (f32.const 0) (f64.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:70:67: type mismatch of store value. got f32, expected i32 +...e (memory 1) (func (i32.store (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:71:68: type mismatch of store value. got f32, expected i32 +... (memory 1) (func (i32.store8 (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:72:69: type mismatch of store value. got f32, expected i32 +...(memory 1) (func (i32.store16 (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:73:67: type mismatch of store value. got f32, expected i64 +...e (memory 1) (func (i64.store (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:74:68: type mismatch of store value. got f64, expected i64 +... (memory 1) (func (i64.store8 (i32.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:75:69: type mismatch of store value. got f64, expected i64 +...(memory 1) (func (i64.store16 (i32.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:76:69: type mismatch of store value. got f64, expected i64 +...(memory 1) (func (i64.store32 (i32.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:77:67: type mismatch of store value. got i32, expected f32 +...e (memory 1) (func (f32.store (i32.const 0) (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:78:67: type mismatch of store value. got i64, expected f64 +...e (memory 1) (func (f64.store (i32.const 0) (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:81:40: type mismatch of argument 0 of binary op. got i64, expected i32 +(assert_invalid (module (func (i32.add (i64.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:81:54: type mismatch of argument 1 of binary op. got f32, expected i32 +...nvalid (module (func (i32.add (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:82:40: type mismatch of argument 0 of binary op. got i64, expected i32 +(assert_invalid (module (func (i32.and (i64.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:82:54: type mismatch of argument 1 of binary op. got f32, expected i32 +...nvalid (module (func (i32.and (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:83:42: type mismatch of argument 0 of binary op. got i64, expected i32 +...ert_invalid (module (func (i32.div_s (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:83:56: type mismatch of argument 1 of binary op. got f32, expected i32 +...alid (module (func (i32.div_s (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:84:42: type mismatch of argument 0 of binary op. got i64, expected i32 +...ert_invalid (module (func (i32.div_u (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:84:56: type mismatch of argument 1 of binary op. got f32, expected i32 +...alid (module (func (i32.div_u (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:85:40: type mismatch of argument 0 of binary op. got i64, expected i32 +(assert_invalid (module (func (i32.mul (i64.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:85:54: type mismatch of argument 1 of binary op. got f32, expected i32 +...nvalid (module (func (i32.mul (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:86:39: type mismatch of argument 0 of binary op. got i64, expected i32 +(assert_invalid (module (func (i32.or (i64.const 0) (f32.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:86:53: type mismatch of argument 1 of binary op. got f32, expected i32 +...invalid (module (func (i32.or (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:87:42: type mismatch of argument 0 of binary op. got i64, expected i32 +...ert_invalid (module (func (i32.rem_s (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:87:56: type mismatch of argument 1 of binary op. got f32, expected i32 +...alid (module (func (i32.rem_s (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:88:42: type mismatch of argument 0 of binary op. got i64, expected i32 +...ert_invalid (module (func (i32.rem_u (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:88:56: type mismatch of argument 1 of binary op. got f32, expected i32 +...alid (module (func (i32.rem_u (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:89:41: type mismatch of argument 0 of binary op. got i64, expected i32 +(assert_invalid (module (func (i32.rotl (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:89:55: type mismatch of argument 1 of binary op. got f32, expected i32 +...valid (module (func (i32.rotl (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:90:41: type mismatch of argument 0 of binary op. got i64, expected i32 +(assert_invalid (module (func (i32.rotr (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:90:55: type mismatch of argument 1 of binary op. got f32, expected i32 +...valid (module (func (i32.rotr (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:91:40: type mismatch of argument 0 of binary op. got i64, expected i32 +(assert_invalid (module (func (i32.shl (i64.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:91:54: type mismatch of argument 1 of binary op. got f32, expected i32 +...nvalid (module (func (i32.shl (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:92:42: type mismatch of argument 0 of binary op. got i64, expected i32 +...ert_invalid (module (func (i32.shr_s (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:92:56: type mismatch of argument 1 of binary op. got f32, expected i32 +...alid (module (func (i32.shr_s (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:93:42: type mismatch of argument 0 of binary op. got i64, expected i32 +...ert_invalid (module (func (i32.shr_u (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:93:56: type mismatch of argument 1 of binary op. got f32, expected i32 +...alid (module (func (i32.shr_u (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:94:40: type mismatch of argument 0 of binary op. got i64, expected i32 +(assert_invalid (module (func (i32.sub (i64.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:94:54: type mismatch of argument 1 of binary op. got f32, expected i32 +...nvalid (module (func (i32.sub (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:95:40: type mismatch of argument 0 of binary op. got i64, expected i32 +(assert_invalid (module (func (i32.xor (i64.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:95:54: type mismatch of argument 1 of binary op. got f32, expected i32 +...nvalid (module (func (i32.xor (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:96:40: type mismatch of argument 0 of binary op. got i32, expected i64 +(assert_invalid (module (func (i64.add (i32.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:96:54: type mismatch of argument 1 of binary op. got f32, expected i64 +...nvalid (module (func (i64.add (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:97:40: type mismatch of argument 0 of binary op. got i32, expected i64 +(assert_invalid (module (func (i64.and (i32.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:97:54: type mismatch of argument 1 of binary op. got f32, expected i64 +...nvalid (module (func (i64.and (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:98:42: type mismatch of argument 0 of binary op. got i32, expected i64 +...ert_invalid (module (func (i64.div_s (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:98:56: type mismatch of argument 1 of binary op. got f32, expected i64 +...alid (module (func (i64.div_s (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:99:42: type mismatch of argument 0 of binary op. got i32, expected i64 +...ert_invalid (module (func (i64.div_u (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:99:56: type mismatch of argument 1 of binary op. got f32, expected i64 +...alid (module (func (i64.div_u (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:100:40: type mismatch of argument 0 of binary op. got i32, expected i64 +(assert_invalid (module (func (i64.mul (i32.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:100:54: type mismatch of argument 1 of binary op. got f32, expected i64 +...nvalid (module (func (i64.mul (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:101:39: type mismatch of argument 0 of binary op. got i32, expected i64 +(assert_invalid (module (func (i64.or (i32.const 0) (f32.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:101:53: type mismatch of argument 1 of binary op. got f32, expected i64 +...invalid (module (func (i64.or (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:102:42: type mismatch of argument 0 of binary op. got i32, expected i64 +...ert_invalid (module (func (i64.rem_s (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:102:56: type mismatch of argument 1 of binary op. got f32, expected i64 +...alid (module (func (i64.rem_s (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:103:42: type mismatch of argument 0 of binary op. got i32, expected i64 +...ert_invalid (module (func (i64.rem_u (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:103:56: type mismatch of argument 1 of binary op. got f32, expected i64 +...alid (module (func (i64.rem_u (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:104:41: type mismatch of argument 0 of binary op. got i32, expected i64 +(assert_invalid (module (func (i64.rotl (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:104:55: type mismatch of argument 1 of binary op. got f32, expected i64 +...valid (module (func (i64.rotl (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:105:41: type mismatch of argument 0 of binary op. got i32, expected i64 +(assert_invalid (module (func (i64.rotr (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:105:55: type mismatch of argument 1 of binary op. got f32, expected i64 +...valid (module (func (i64.rotr (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:106:40: type mismatch of argument 0 of binary op. got i32, expected i64 +(assert_invalid (module (func (i64.shl (i32.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:106:54: type mismatch of argument 1 of binary op. got f32, expected i64 +...nvalid (module (func (i64.shl (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:107:42: type mismatch of argument 0 of binary op. got i32, expected i64 +...ert_invalid (module (func (i64.shr_s (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:107:56: type mismatch of argument 1 of binary op. got f32, expected i64 +...alid (module (func (i64.shr_s (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:108:42: type mismatch of argument 0 of binary op. got i32, expected i64 +...ert_invalid (module (func (i64.shr_u (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:108:56: type mismatch of argument 1 of binary op. got f32, expected i64 +...alid (module (func (i64.shr_u (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:109:40: type mismatch of argument 0 of binary op. got i32, expected i64 +(assert_invalid (module (func (i64.sub (i32.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:109:54: type mismatch of argument 1 of binary op. got f32, expected i64 +...nvalid (module (func (i64.sub (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:110:40: type mismatch of argument 0 of binary op. got i32, expected i64 +(assert_invalid (module (func (i64.xor (i32.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:110:54: type mismatch of argument 1 of binary op. got f32, expected i64 +...nvalid (module (func (i64.xor (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:111:40: type mismatch of argument 0 of binary op. got i64, expected f32 +(assert_invalid (module (func (f32.add (i64.const 0) (f64.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:111:54: type mismatch of argument 1 of binary op. got f64, expected f32 +...nvalid (module (func (f32.add (i64.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:112:45: type mismatch of argument 0 of binary op. got i64, expected f32 +..._invalid (module (func (f32.copysign (i64.const 0) (f64.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:112:59: type mismatch of argument 1 of binary op. got f64, expected f32 +...d (module (func (f32.copysign (i64.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:113:40: type mismatch of argument 0 of binary op. got i64, expected f32 +(assert_invalid (module (func (f32.div (i64.const 0) (f64.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:113:54: type mismatch of argument 1 of binary op. got f64, expected f32 +...nvalid (module (func (f32.div (i64.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:114:40: type mismatch of argument 0 of binary op. got i64, expected f32 +(assert_invalid (module (func (f32.max (i64.const 0) (f64.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:114:54: type mismatch of argument 1 of binary op. got f64, expected f32 +...nvalid (module (func (f32.max (i64.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:115:40: type mismatch of argument 0 of binary op. got i64, expected f32 +(assert_invalid (module (func (f32.min (i64.const 0) (f64.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:115:54: type mismatch of argument 1 of binary op. got f64, expected f32 +...nvalid (module (func (f32.min (i64.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:116:40: type mismatch of argument 0 of binary op. got i64, expected f32 +(assert_invalid (module (func (f32.mul (i64.const 0) (f64.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:116:54: type mismatch of argument 1 of binary op. got f64, expected f32 +...nvalid (module (func (f32.mul (i64.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:117:40: type mismatch of argument 0 of binary op. got i64, expected f32 +(assert_invalid (module (func (f32.sub (i64.const 0) (f64.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:117:54: type mismatch of argument 1 of binary op. got f64, expected f32 +...nvalid (module (func (f32.sub (i64.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:118:40: type mismatch of argument 0 of binary op. got i64, expected f64 +(assert_invalid (module (func (f64.add (i64.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:118:54: type mismatch of argument 1 of binary op. got f32, expected f64 +...nvalid (module (func (f64.add (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:119:45: type mismatch of argument 0 of binary op. got i64, expected f64 +..._invalid (module (func (f64.copysign (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:119:59: type mismatch of argument 1 of binary op. got f32, expected f64 +...d (module (func (f64.copysign (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:120:40: type mismatch of argument 0 of binary op. got i64, expected f64 +(assert_invalid (module (func (f64.div (i64.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:120:54: type mismatch of argument 1 of binary op. got f32, expected f64 +...nvalid (module (func (f64.div (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:121:40: type mismatch of argument 0 of binary op. got i64, expected f64 +(assert_invalid (module (func (f64.max (i64.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:121:54: type mismatch of argument 1 of binary op. got f32, expected f64 +...nvalid (module (func (f64.max (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:122:40: type mismatch of argument 0 of binary op. got i64, expected f64 +(assert_invalid (module (func (f64.min (i64.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:122:54: type mismatch of argument 1 of binary op. got f32, expected f64 +...nvalid (module (func (f64.min (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:123:40: type mismatch of argument 0 of binary op. got i64, expected f64 +(assert_invalid (module (func (f64.mul (i64.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:123:54: type mismatch of argument 1 of binary op. got f32, expected f64 +...nvalid (module (func (f64.mul (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:124:40: type mismatch of argument 0 of binary op. got i64, expected f64 +(assert_invalid (module (func (f64.sub (i64.const 0) (f32.const 0)))) "type m... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:124:54: type mismatch of argument 1 of binary op. got f32, expected f64 +...nvalid (module (func (f64.sub (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:127:40: type mismatch of convert op. got i64, expected i32 +(assert_invalid (module (func (i32.eqz (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:128:40: type mismatch of unary op. got i64, expected i32 +(assert_invalid (module (func (i32.clz (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:129:40: type mismatch of unary op. got i64, expected i32 +(assert_invalid (module (func (i32.ctz (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:130:43: type mismatch of unary op. got i64, expected i32 +(assert_invalid (module (func (i32.popcnt (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:131:40: type mismatch of convert op. got i32, expected i64 +(assert_invalid (module (func (i64.eqz (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:132:40: type mismatch of unary op. got i32, expected i64 +(assert_invalid (module (func (i64.clz (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:133:40: type mismatch of unary op. got i32, expected i64 +(assert_invalid (module (func (i64.ctz (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:134:43: type mismatch of unary op. got i32, expected i64 +(assert_invalid (module (func (i64.popcnt (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:135:40: type mismatch of unary op. got i64, expected f32 +(assert_invalid (module (func (f32.abs (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:136:41: type mismatch of unary op. got i64, expected f32 +(assert_invalid (module (func (f32.ceil (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:137:42: type mismatch of unary op. got i64, expected f32 +(assert_invalid (module (func (f32.floor (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:138:44: type mismatch of unary op. got i64, expected f32 +(assert_invalid (module (func (f32.nearest (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:139:40: type mismatch of unary op. got i64, expected f32 +(assert_invalid (module (func (f32.neg (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:140:41: type mismatch of unary op. got i64, expected f32 +(assert_invalid (module (func (f32.sqrt (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:141:42: type mismatch of unary op. got i64, expected f32 +(assert_invalid (module (func (f32.trunc (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:142:40: type mismatch of unary op. got i64, expected f64 +(assert_invalid (module (func (f64.abs (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:143:41: type mismatch of unary op. got i64, expected f64 +(assert_invalid (module (func (f64.ceil (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:144:42: type mismatch of unary op. got i64, expected f64 +(assert_invalid (module (func (f64.floor (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:145:44: type mismatch of unary op. got i64, expected f64 +(assert_invalid (module (func (f64.nearest (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:146:40: type mismatch of unary op. got i64, expected f64 +(assert_invalid (module (func (f64.neg (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:147:41: type mismatch of unary op. got i64, expected f64 +(assert_invalid (module (func (f64.sqrt (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:148:42: type mismatch of unary op. got i64, expected f64 +(assert_invalid (module (func (f64.trunc (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:151:39: type mismatch of argument 0 of compare op. got i64, expected i32 +(assert_invalid (module (func (i32.eq (i64.const 0) (f32.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:151:53: type mismatch of argument 1 of compare op. got f32, expected i32 +...invalid (module (func (i32.eq (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:152:41: type mismatch of argument 0 of compare op. got i64, expected i32 +(assert_invalid (module (func (i32.ge_s (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:152:55: type mismatch of argument 1 of compare op. got f32, expected i32 +...valid (module (func (i32.ge_s (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:153:41: type mismatch of argument 0 of compare op. got i64, expected i32 +(assert_invalid (module (func (i32.ge_u (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:153:55: type mismatch of argument 1 of compare op. got f32, expected i32 +...valid (module (func (i32.ge_u (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:154:41: type mismatch of argument 0 of compare op. got i64, expected i32 +(assert_invalid (module (func (i32.gt_s (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:154:55: type mismatch of argument 1 of compare op. got f32, expected i32 +...valid (module (func (i32.gt_s (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:155:41: type mismatch of argument 0 of compare op. got i64, expected i32 +(assert_invalid (module (func (i32.gt_u (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:155:55: type mismatch of argument 1 of compare op. got f32, expected i32 +...valid (module (func (i32.gt_u (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:156:41: type mismatch of argument 0 of compare op. got i64, expected i32 +(assert_invalid (module (func (i32.le_s (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:156:55: type mismatch of argument 1 of compare op. got f32, expected i32 +...valid (module (func (i32.le_s (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:157:41: type mismatch of argument 0 of compare op. got i64, expected i32 +(assert_invalid (module (func (i32.le_u (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:157:55: type mismatch of argument 1 of compare op. got f32, expected i32 +...valid (module (func (i32.le_u (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:158:41: type mismatch of argument 0 of compare op. got i64, expected i32 +(assert_invalid (module (func (i32.lt_s (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:158:55: type mismatch of argument 1 of compare op. got f32, expected i32 +...valid (module (func (i32.lt_s (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:159:41: type mismatch of argument 0 of compare op. got i64, expected i32 +(assert_invalid (module (func (i32.lt_u (i64.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:159:55: type mismatch of argument 1 of compare op. got f32, expected i32 +...valid (module (func (i32.lt_u (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:160:39: type mismatch of argument 0 of compare op. got i64, expected i32 +(assert_invalid (module (func (i32.ne (i64.const 0) (f32.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:160:53: type mismatch of argument 1 of compare op. got f32, expected i32 +...invalid (module (func (i32.ne (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:161:39: type mismatch of argument 0 of compare op. got i32, expected i64 +(assert_invalid (module (func (i64.eq (i32.const 0) (f32.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:161:53: type mismatch of argument 1 of compare op. got f32, expected i64 +...invalid (module (func (i64.eq (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:162:41: type mismatch of argument 0 of compare op. got i32, expected i64 +(assert_invalid (module (func (i64.ge_s (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:162:55: type mismatch of argument 1 of compare op. got f32, expected i64 +...valid (module (func (i64.ge_s (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:163:41: type mismatch of argument 0 of compare op. got i32, expected i64 +(assert_invalid (module (func (i64.ge_u (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:163:55: type mismatch of argument 1 of compare op. got f32, expected i64 +...valid (module (func (i64.ge_u (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:164:41: type mismatch of argument 0 of compare op. got i32, expected i64 +(assert_invalid (module (func (i64.gt_s (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:164:55: type mismatch of argument 1 of compare op. got f32, expected i64 +...valid (module (func (i64.gt_s (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:165:41: type mismatch of argument 0 of compare op. got i32, expected i64 +(assert_invalid (module (func (i64.gt_u (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:165:55: type mismatch of argument 1 of compare op. got f32, expected i64 +...valid (module (func (i64.gt_u (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:166:41: type mismatch of argument 0 of compare op. got i32, expected i64 +(assert_invalid (module (func (i64.le_s (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:166:55: type mismatch of argument 1 of compare op. got f32, expected i64 +...valid (module (func (i64.le_s (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:167:41: type mismatch of argument 0 of compare op. got i32, expected i64 +(assert_invalid (module (func (i64.le_u (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:167:55: type mismatch of argument 1 of compare op. got f32, expected i64 +...valid (module (func (i64.le_u (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:168:41: type mismatch of argument 0 of compare op. got i32, expected i64 +(assert_invalid (module (func (i64.lt_s (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:168:55: type mismatch of argument 1 of compare op. got f32, expected i64 +...valid (module (func (i64.lt_s (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:169:41: type mismatch of argument 0 of compare op. got i32, expected i64 +(assert_invalid (module (func (i64.lt_u (i32.const 0) (f32.const 0)))) "type ... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:169:55: type mismatch of argument 1 of compare op. got f32, expected i64 +...valid (module (func (i64.lt_u (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:170:39: type mismatch of argument 0 of compare op. got i32, expected i64 +(assert_invalid (module (func (i64.ne (i32.const 0) (f32.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:170:53: type mismatch of argument 1 of compare op. got f32, expected i64 +...invalid (module (func (i64.ne (i32.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:171:39: type mismatch of argument 0 of compare op. got i64, expected f32 +(assert_invalid (module (func (f32.eq (i64.const 0) (f64.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:171:53: type mismatch of argument 1 of compare op. got f64, expected f32 +...invalid (module (func (f32.eq (i64.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:172:39: type mismatch of argument 0 of compare op. got i64, expected f32 +(assert_invalid (module (func (f32.ge (i64.const 0) (f64.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:172:53: type mismatch of argument 1 of compare op. got f64, expected f32 +...invalid (module (func (f32.ge (i64.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:173:39: type mismatch of argument 0 of compare op. got i64, expected f32 +(assert_invalid (module (func (f32.gt (i64.const 0) (f64.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:173:53: type mismatch of argument 1 of compare op. got f64, expected f32 +...invalid (module (func (f32.gt (i64.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:174:39: type mismatch of argument 0 of compare op. got i64, expected f32 +(assert_invalid (module (func (f32.le (i64.const 0) (f64.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:174:53: type mismatch of argument 1 of compare op. got f64, expected f32 +...invalid (module (func (f32.le (i64.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:175:39: type mismatch of argument 0 of compare op. got i64, expected f32 +(assert_invalid (module (func (f32.lt (i64.const 0) (f64.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:175:53: type mismatch of argument 1 of compare op. got f64, expected f32 +...invalid (module (func (f32.lt (i64.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:176:39: type mismatch of argument 0 of compare op. got i64, expected f32 +(assert_invalid (module (func (f32.ne (i64.const 0) (f64.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:176:53: type mismatch of argument 1 of compare op. got f64, expected f32 +...invalid (module (func (f32.ne (i64.const 0) (f64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:177:39: type mismatch of argument 0 of compare op. got i64, expected f64 +(assert_invalid (module (func (f64.eq (i64.const 0) (f32.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:177:53: type mismatch of argument 1 of compare op. got f32, expected f64 +...invalid (module (func (f64.eq (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:178:39: type mismatch of argument 0 of compare op. got i64, expected f64 +(assert_invalid (module (func (f64.ge (i64.const 0) (f32.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:178:53: type mismatch of argument 1 of compare op. got f32, expected f64 +...invalid (module (func (f64.ge (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:179:39: type mismatch of argument 0 of compare op. got i64, expected f64 +(assert_invalid (module (func (f64.gt (i64.const 0) (f32.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:179:53: type mismatch of argument 1 of compare op. got f32, expected f64 +...invalid (module (func (f64.gt (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:180:39: type mismatch of argument 0 of compare op. got i64, expected f64 +(assert_invalid (module (func (f64.le (i64.const 0) (f32.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:180:53: type mismatch of argument 1 of compare op. got f32, expected f64 +...invalid (module (func (f64.le (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:181:39: type mismatch of argument 0 of compare op. got i64, expected f64 +(assert_invalid (module (func (f64.lt (i64.const 0) (f32.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:181:53: type mismatch of argument 1 of compare op. got f32, expected f64 +...invalid (module (func (f64.lt (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:182:39: type mismatch of argument 0 of compare op. got i64, expected f64 +(assert_invalid (module (func (f64.ne (i64.const 0) (f32.const 0)))) "type mi... + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:182:53: type mismatch of argument 1 of compare op. got f32, expected f64 +...invalid (module (func (f64.ne (i64.const 0) (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:185:45: type mismatch of convert op. got f32, expected i64 +(assert_invalid (module (func (i32.wrap/i64 (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:186:48: type mismatch of convert op. got i64, expected f32 +(assert_invalid (module (func (i32.trunc_s/f32 (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:187:48: type mismatch of convert op. got i64, expected f32 +(assert_invalid (module (func (i32.trunc_u/f32 (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:188:48: type mismatch of convert op. got i64, expected f64 +(assert_invalid (module (func (i32.trunc_s/f64 (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:189:48: type mismatch of convert op. got i64, expected f64 +(assert_invalid (module (func (i32.trunc_u/f64 (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:190:52: type mismatch of convert op. got i64, expected f32 +..._invalid (module (func (i32.reinterpret/f32 (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:191:49: type mismatch of convert op. got f32, expected i32 +...ert_invalid (module (func (i64.extend_s/i32 (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:192:49: type mismatch of convert op. got f32, expected i32 +...ert_invalid (module (func (i64.extend_u/i32 (f32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:193:48: type mismatch of convert op. got i32, expected f32 +(assert_invalid (module (func (i64.trunc_s/f32 (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:194:48: type mismatch of convert op. got i32, expected f32 +(assert_invalid (module (func (i64.trunc_u/f32 (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:195:48: type mismatch of convert op. got i32, expected f64 +(assert_invalid (module (func (i64.trunc_s/f64 (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:196:48: type mismatch of convert op. got i32, expected f64 +(assert_invalid (module (func (i64.trunc_u/f64 (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:197:52: type mismatch of convert op. got i32, expected f64 +..._invalid (module (func (i64.reinterpret/f64 (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:198:50: type mismatch of convert op. got i64, expected i32 +...rt_invalid (module (func (f32.convert_s/i32 (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:199:50: type mismatch of convert op. got i64, expected i32 +...rt_invalid (module (func (f32.convert_u/i32 (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:200:50: type mismatch of convert op. got i32, expected i64 +...rt_invalid (module (func (f32.convert_s/i64 (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:201:50: type mismatch of convert op. got i32, expected i64 +...rt_invalid (module (func (f32.convert_u/i64 (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:202:47: type mismatch of convert op. got i32, expected f64 +(assert_invalid (module (func (f32.demote/f64 (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:203:52: type mismatch of convert op. got i64, expected i32 +..._invalid (module (func (f32.reinterpret/i32 (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:204:50: type mismatch of convert op. got i64, expected i32 +...rt_invalid (module (func (f64.convert_s/i32 (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:205:50: type mismatch of convert op. got i64, expected i32 +...rt_invalid (module (func (f64.convert_u/i32 (i64.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:206:50: type mismatch of convert op. got i32, expected i64 +...rt_invalid (module (func (f64.convert_s/i64 (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:207:50: type mismatch of convert op. got i32, expected i64 +...rt_invalid (module (func (f64.convert_u/i64 (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:208:48: type mismatch of convert op. got i32, expected f32 +(assert_invalid (module (func (f64.promote/f32 (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:209:52: type mismatch of convert op. got i32, expected i64 +..._invalid (module (func (f64.reinterpret/i64 (i32.const 0)))) "type mismatch") + ^ +assert_invalid error: + third_party/testsuite/typecheck.wast:212:55: type mismatch of grow_memory. got f32, expected i32 +...valid (module (memory 1) (func (grow_memory (f32.const 0)))) "type mismatch") + ^ +0/0 tests passed. +;;; STDOUT ;;) diff --git a/third_party/testsuite b/third_party/testsuite -Subproject 4a2c9a6a38a537cbb200b3e6be553f7e583acdc +Subproject 5172451faba49b52bf1d4aeb37c182063e5b47b |