| Index: test/cctest/wasm/test-run-wasm-module.cc
|
| diff --git a/test/cctest/wasm/test-run-wasm-module.cc b/test/cctest/wasm/test-run-wasm-module.cc
|
| index 118a91f3e9e33eccc2bb60421dd4858a41589d55..0bdb9fb7fb7d1417e46143f064dc40a4ba5ee3af 100644
|
| --- a/test/cctest/wasm/test-run-wasm-module.cc
|
| +++ b/test/cctest/wasm/test-run-wasm-module.cc
|
| @@ -37,25 +37,26 @@ TEST(Run_WasmModule_CallAdd_rev) {
|
| static const byte data[] = {
|
| WASM_MODULE_HEADER,
|
| // sig#0 ------------------------------------------
|
| - WASM_SECTION_SIGNATURES_SIZE + 7, // Section size.
|
| - WASM_SECTION_SIGNATURES, 2, 0, kLocalI32, // void -> int
|
| - 2, kLocalI32, kLocalI32, kLocalI32, // int,int -> int
|
| + WASM_SECTION_SIGNATURES_SIZE + 7, // Section size.
|
| + WASM_SECTION_SIGNATURES, 2, // --
|
| + 0, kLocalI32, // void -> int
|
| + 2, kLocalI32, kLocalI32, kLocalI32, // int,int -> int
|
| // func#0 (main) ----------------------------------
|
| - WASM_SECTION_FUNCTIONS_SIZE + 24, WASM_SECTION_FUNCTIONS, 2,
|
| + WASM_SECTION_FUNCTIONS_SIZE + 25, WASM_SECTION_FUNCTIONS, 2,
|
| kDeclFunctionExport, 0, 0, // sig index
|
| - 7, 0, // body size
|
| + 8, 0, // body size
|
| 0, // locals
|
| - kExprCallFunction, 1, // --
|
| kExprI8Const, 77, // --
|
| kExprI8Const, 22, // --
|
| + kExprCallFunction, 2, 1, // --
|
| // func#1 -----------------------------------------
|
| 0, // no name, not exported
|
| 1, 0, // sig index
|
| 6, 0, // body size
|
| 0, // locals
|
| - kExprI32Add, // --
|
| kExprGetLocal, 0, // --
|
| kExprGetLocal, 1, // --
|
| + kExprI32Add, // --
|
| };
|
|
|
| Isolate* isolate = CcTest::InitIsolateOnce();
|
| @@ -93,13 +94,12 @@ TEST(Run_WasmModule_CallAdd) {
|
| uint16_t param1 = f->AddParam(kAstI32);
|
| uint16_t param2 = f->AddParam(kAstI32);
|
| byte code1[] = {WASM_I32_ADD(WASM_GET_LOCAL(param1), WASM_GET_LOCAL(param2))};
|
| - uint32_t local_indices1[] = {2, 4};
|
| - f->EmitCode(code1, sizeof(code1), local_indices1, sizeof(local_indices1) / 4);
|
| + f->EmitCode(code1, sizeof(code1));
|
| uint16_t f2_index = builder->AddFunction();
|
| f = builder->FunctionAt(f2_index);
|
| f->ReturnType(kAstI32);
|
| f->Exported(1);
|
| - byte code2[] = {WASM_CALL_FUNCTION(f1_index, WASM_I8(77), WASM_I8(22))};
|
| + byte code2[] = {WASM_CALL_FUNCTION2(f1_index, WASM_I8(77), WASM_I8(22))};
|
| f->EmitCode(code2, sizeof(code2));
|
| WasmModuleWriter* writer = builder->Build(&zone);
|
| TestModule(writer->WriteTo(&zone), 99);
|
| @@ -188,7 +188,7 @@ TEST(Run_WasmModule_Global) {
|
| f->Exported(1);
|
| byte code2[] = {WASM_STORE_GLOBAL(global1, WASM_I32V_1(56)),
|
| WASM_STORE_GLOBAL(global2, WASM_I32V_1(41)),
|
| - WASM_RETURN(WASM_CALL_FUNCTION0(f1_index))};
|
| + WASM_RETURN1(WASM_CALL_FUNCTION0(f1_index))};
|
| f->EmitCode(code2, sizeof(code2));
|
| WasmModuleWriter* writer = builder->Build(&zone);
|
| TestModule(writer->WriteTo(&zone), 97);
|
|
|