Commit edf12f10 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[wasm] [cleanup] Rename tests

After renaming the WasmExecutionMode constants, I should also have
renamed the tests generated from the WASM_EXEC_TEST macro. This CL
cleans this up.

R=titzer@chromium.org

Change-Id: Ifcb1a1e09422a06f89c3b44dc6b7799d3f84f7ac
Reviewed-on: https://chromium-review.googlesource.com/744044
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49082}
parent b976b30b
...@@ -22,7 +22,7 @@ namespace wasm { ...@@ -22,7 +22,7 @@ namespace wasm {
namespace test_run_wasm_interpreter { namespace test_run_wasm_interpreter {
TEST(Run_WasmInt8Const_i) { TEST(Run_WasmInt8Const_i) {
WasmRunner<int32_t> r(kExecuteInterpreted); WasmRunner<int32_t> r(kExecuteInterpreter);
const byte kExpectedValue = 109; const byte kExpectedValue = 109;
// return(kExpectedValue) // return(kExpectedValue)
BUILD(r, WASM_I32V_2(kExpectedValue)); BUILD(r, WASM_I32V_2(kExpectedValue));
...@@ -30,14 +30,14 @@ TEST(Run_WasmInt8Const_i) { ...@@ -30,14 +30,14 @@ TEST(Run_WasmInt8Const_i) {
} }
TEST(Run_WasmIfElse) { TEST(Run_WasmIfElse) {
WasmRunner<int32_t, int32_t> r(kExecuteInterpreted); WasmRunner<int32_t, int32_t> r(kExecuteInterpreter);
BUILD(r, WASM_IF_ELSE_I(WASM_GET_LOCAL(0), WASM_I32V_1(9), WASM_I32V_1(10))); BUILD(r, WASM_IF_ELSE_I(WASM_GET_LOCAL(0), WASM_I32V_1(9), WASM_I32V_1(10)));
CHECK_EQ(10, r.Call(0)); CHECK_EQ(10, r.Call(0));
CHECK_EQ(9, r.Call(1)); CHECK_EQ(9, r.Call(1));
} }
TEST(Run_WasmIfReturn) { TEST(Run_WasmIfReturn) {
WasmRunner<int32_t, int32_t> r(kExecuteInterpreted); WasmRunner<int32_t, int32_t> r(kExecuteInterpreter);
BUILD(r, WASM_IF(WASM_GET_LOCAL(0), WASM_RETURN1(WASM_I32V_2(77))), BUILD(r, WASM_IF(WASM_GET_LOCAL(0), WASM_RETURN1(WASM_I32V_2(77))),
WASM_I32V_2(65)); WASM_I32V_2(65));
CHECK_EQ(65, r.Call(0)); CHECK_EQ(65, r.Call(0));
...@@ -53,7 +53,7 @@ TEST(Run_WasmNopsN) { ...@@ -53,7 +53,7 @@ TEST(Run_WasmNopsN) {
code[nops] = kExprI32Const; code[nops] = kExprI32Const;
code[nops + 1] = expected; code[nops + 1] = expected;
WasmRunner<int32_t> r(kExecuteInterpreted); WasmRunner<int32_t> r(kExecuteInterpreter);
r.Build(code, code + nops + 2); r.Build(code, code + nops + 2);
CHECK_EQ(expected, r.Call()); CHECK_EQ(expected, r.Call());
} }
...@@ -76,7 +76,7 @@ TEST(Run_WasmConstsN) { ...@@ -76,7 +76,7 @@ TEST(Run_WasmConstsN) {
} }
} }
WasmRunner<int32_t> r(kExecuteInterpreted); WasmRunner<int32_t> r(kExecuteInterpreter);
r.Build(code, code + (count * 3)); r.Build(code, code + (count * 3));
CHECK_EQ(expected, r.Call()); CHECK_EQ(expected, r.Call());
} }
...@@ -95,7 +95,7 @@ TEST(Run_WasmBlocksN) { ...@@ -95,7 +95,7 @@ TEST(Run_WasmBlocksN) {
code[2 + nops + 1] = expected; code[2 + nops + 1] = expected;
code[2 + nops + 2] = kExprEnd; code[2 + nops + 2] = kExprEnd;
WasmRunner<int32_t> r(kExecuteInterpreted); WasmRunner<int32_t> r(kExecuteInterpreter);
r.Build(code, code + nops + kExtra); r.Build(code, code + nops + kExtra);
CHECK_EQ(expected, r.Call()); CHECK_EQ(expected, r.Call());
} }
...@@ -120,7 +120,7 @@ TEST(Run_WasmBlockBreakN) { ...@@ -120,7 +120,7 @@ TEST(Run_WasmBlockBreakN) {
code[2 + index + 2] = kExprBr; code[2 + index + 2] = kExprBr;
code[2 + index + 3] = 0; code[2 + index + 3] = 0;
WasmRunner<int32_t> r(kExecuteInterpreted); WasmRunner<int32_t> r(kExecuteInterpreter);
r.Build(code, code + kMaxNops + kExtra); r.Build(code, code + kMaxNops + kExtra);
CHECK_EQ(expected, r.Call()); CHECK_EQ(expected, r.Call());
} }
...@@ -128,7 +128,7 @@ TEST(Run_WasmBlockBreakN) { ...@@ -128,7 +128,7 @@ TEST(Run_WasmBlockBreakN) {
} }
TEST(Run_Wasm_nested_ifs_i) { TEST(Run_Wasm_nested_ifs_i) {
WasmRunner<int32_t, int32_t, int32_t> r(kExecuteInterpreted); WasmRunner<int32_t, int32_t, int32_t> r(kExecuteInterpreter);
BUILD( BUILD(
r, r,
...@@ -178,7 +178,7 @@ TEST(Breakpoint_I32Add) { ...@@ -178,7 +178,7 @@ TEST(Breakpoint_I32Add) {
Find(code, sizeof(code), kNumBreakpoints, kExprGetLocal, kExprGetLocal, Find(code, sizeof(code), kNumBreakpoints, kExprGetLocal, kExprGetLocal,
kExprI32Add); kExprI32Add);
WasmRunner<int32_t, uint32_t, uint32_t> r(kExecuteInterpreted); WasmRunner<int32_t, uint32_t, uint32_t> r(kExecuteInterpreter);
r.Build(code, code + arraysize(code)); r.Build(code, code + arraysize(code));
...@@ -217,7 +217,7 @@ TEST(Step_I32Mul) { ...@@ -217,7 +217,7 @@ TEST(Step_I32Mul) {
static const int kTraceLength = 4; static const int kTraceLength = 4;
byte code[] = {WASM_I32_MUL(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))}; byte code[] = {WASM_I32_MUL(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))};
WasmRunner<int32_t, uint32_t, uint32_t> r(kExecuteInterpreted); WasmRunner<int32_t, uint32_t, uint32_t> r(kExecuteInterpreter);
r.Build(code, code + arraysize(code)); r.Build(code, code + arraysize(code));
...@@ -255,7 +255,7 @@ TEST(Breakpoint_I32And_disable) { ...@@ -255,7 +255,7 @@ TEST(Breakpoint_I32And_disable) {
std::unique_ptr<int[]> offsets = std::unique_ptr<int[]> offsets =
Find(code, sizeof(code), kNumBreakpoints, kExprI32And); Find(code, sizeof(code), kNumBreakpoints, kExprI32And);
WasmRunner<int32_t, uint32_t, uint32_t> r(kExecuteInterpreted); WasmRunner<int32_t, uint32_t, uint32_t> r(kExecuteInterpreter);
r.Build(code, code + arraysize(code)); r.Build(code, code + arraysize(code));
...@@ -293,14 +293,14 @@ TEST(Breakpoint_I32And_disable) { ...@@ -293,14 +293,14 @@ TEST(Breakpoint_I32And_disable) {
TEST(GrowMemory) { TEST(GrowMemory) {
{ {
WasmRunner<int32_t, uint32_t> r(kExecuteInterpreted); WasmRunner<int32_t, uint32_t> r(kExecuteInterpreter);
r.builder().AddMemory(WasmModule::kPageSize); r.builder().AddMemory(WasmModule::kPageSize);
r.builder().SetMaxMemPages(10); r.builder().SetMaxMemPages(10);
BUILD(r, WASM_GROW_MEMORY(WASM_GET_LOCAL(0))); BUILD(r, WASM_GROW_MEMORY(WASM_GET_LOCAL(0)));
CHECK_EQ(1, r.Call(1)); CHECK_EQ(1, r.Call(1));
} }
{ {
WasmRunner<int32_t, uint32_t> r(kExecuteInterpreted); WasmRunner<int32_t, uint32_t> r(kExecuteInterpreter);
r.builder().AddMemory(WasmModule::kPageSize); r.builder().AddMemory(WasmModule::kPageSize);
r.builder().SetMaxMemPages(10); r.builder().SetMaxMemPages(10);
BUILD(r, WASM_GROW_MEMORY(WASM_GET_LOCAL(0))); BUILD(r, WASM_GROW_MEMORY(WASM_GET_LOCAL(0)));
...@@ -311,7 +311,7 @@ TEST(GrowMemory) { ...@@ -311,7 +311,7 @@ TEST(GrowMemory) {
TEST(GrowMemoryPreservesData) { TEST(GrowMemoryPreservesData) {
int32_t index = 16; int32_t index = 16;
int32_t value = 2335; int32_t value = 2335;
WasmRunner<int32_t, uint32_t> r(kExecuteInterpreted); WasmRunner<int32_t, uint32_t> r(kExecuteInterpreter);
r.builder().AddMemory(WasmModule::kPageSize); r.builder().AddMemory(WasmModule::kPageSize);
BUILD(r, WASM_STORE_MEM(MachineType::Int32(), WASM_I32V(index), BUILD(r, WASM_STORE_MEM(MachineType::Int32(), WASM_I32V(index),
WASM_I32V(value)), WASM_I32V(value)),
...@@ -322,7 +322,7 @@ TEST(GrowMemoryPreservesData) { ...@@ -322,7 +322,7 @@ TEST(GrowMemoryPreservesData) {
TEST(GrowMemoryInvalidSize) { TEST(GrowMemoryInvalidSize) {
// Grow memory by an invalid amount without initial memory. // Grow memory by an invalid amount without initial memory.
WasmRunner<int32_t, uint32_t> r(kExecuteInterpreted); WasmRunner<int32_t, uint32_t> r(kExecuteInterpreter);
r.builder().AddMemory(WasmModule::kPageSize); r.builder().AddMemory(WasmModule::kPageSize);
BUILD(r, WASM_GROW_MEMORY(WASM_GET_LOCAL(0))); BUILD(r, WASM_GROW_MEMORY(WASM_GET_LOCAL(0)));
CHECK_EQ(-1, r.Call(1048575)); CHECK_EQ(-1, r.Call(1048575));
...@@ -330,7 +330,7 @@ TEST(GrowMemoryInvalidSize) { ...@@ -330,7 +330,7 @@ TEST(GrowMemoryInvalidSize) {
TEST(TestPossibleNondeterminism) { TEST(TestPossibleNondeterminism) {
{ {
WasmRunner<int32_t, float> r(kExecuteInterpreted); WasmRunner<int32_t, float> r(kExecuteInterpreter);
BUILD(r, WASM_I32_REINTERPRET_F32(WASM_GET_LOCAL(0))); BUILD(r, WASM_I32_REINTERPRET_F32(WASM_GET_LOCAL(0)));
r.Call(1048575.5f); r.Call(1048575.5f);
CHECK(!r.possible_nondeterminism()); CHECK(!r.possible_nondeterminism());
...@@ -338,7 +338,7 @@ TEST(TestPossibleNondeterminism) { ...@@ -338,7 +338,7 @@ TEST(TestPossibleNondeterminism) {
CHECK(!r.possible_nondeterminism()); CHECK(!r.possible_nondeterminism());
} }
{ {
WasmRunner<int64_t, double> r(kExecuteInterpreted); WasmRunner<int64_t, double> r(kExecuteInterpreter);
BUILD(r, WASM_I64_REINTERPRET_F64(WASM_GET_LOCAL(0))); BUILD(r, WASM_I64_REINTERPRET_F64(WASM_GET_LOCAL(0)));
r.Call(16.0); r.Call(16.0);
CHECK(!r.possible_nondeterminism()); CHECK(!r.possible_nondeterminism());
...@@ -346,7 +346,7 @@ TEST(TestPossibleNondeterminism) { ...@@ -346,7 +346,7 @@ TEST(TestPossibleNondeterminism) {
CHECK(!r.possible_nondeterminism()); CHECK(!r.possible_nondeterminism());
} }
{ {
WasmRunner<float, float> r(kExecuteInterpreted); WasmRunner<float, float> r(kExecuteInterpreter);
BUILD(r, WASM_F32_COPYSIGN(WASM_F32(42.0f), WASM_GET_LOCAL(0))); BUILD(r, WASM_F32_COPYSIGN(WASM_F32(42.0f), WASM_GET_LOCAL(0)));
r.Call(16.0f); r.Call(16.0f);
CHECK(!r.possible_nondeterminism()); CHECK(!r.possible_nondeterminism());
...@@ -354,7 +354,7 @@ TEST(TestPossibleNondeterminism) { ...@@ -354,7 +354,7 @@ TEST(TestPossibleNondeterminism) {
CHECK(!r.possible_nondeterminism()); CHECK(!r.possible_nondeterminism());
} }
{ {
WasmRunner<double, double> r(kExecuteInterpreted); WasmRunner<double, double> r(kExecuteInterpreter);
BUILD(r, WASM_F64_COPYSIGN(WASM_F64(42.0), WASM_GET_LOCAL(0))); BUILD(r, WASM_F64_COPYSIGN(WASM_F64(42.0), WASM_GET_LOCAL(0)));
r.Call(16.0); r.Call(16.0);
CHECK(!r.possible_nondeterminism()); CHECK(!r.possible_nondeterminism());
...@@ -363,7 +363,7 @@ TEST(TestPossibleNondeterminism) { ...@@ -363,7 +363,7 @@ TEST(TestPossibleNondeterminism) {
} }
{ {
int32_t index = 16; int32_t index = 16;
WasmRunner<int32_t, float> r(kExecuteInterpreted); WasmRunner<int32_t, float> r(kExecuteInterpreter);
r.builder().AddMemory(WasmModule::kPageSize); r.builder().AddMemory(WasmModule::kPageSize);
BUILD(r, WASM_STORE_MEM(MachineType::Float32(), WASM_I32V(index), BUILD(r, WASM_STORE_MEM(MachineType::Float32(), WASM_I32V(index),
WASM_GET_LOCAL(0)), WASM_GET_LOCAL(0)),
...@@ -375,7 +375,7 @@ TEST(TestPossibleNondeterminism) { ...@@ -375,7 +375,7 @@ TEST(TestPossibleNondeterminism) {
} }
{ {
int32_t index = 16; int32_t index = 16;
WasmRunner<int32_t, double> r(kExecuteInterpreted); WasmRunner<int32_t, double> r(kExecuteInterpreter);
r.builder().AddMemory(WasmModule::kPageSize); r.builder().AddMemory(WasmModule::kPageSize);
BUILD(r, WASM_STORE_MEM(MachineType::Float64(), WASM_I32V(index), BUILD(r, WASM_STORE_MEM(MachineType::Float64(), WASM_I32V(index),
WASM_GET_LOCAL(0)), WASM_GET_LOCAL(0)),
...@@ -386,7 +386,7 @@ TEST(TestPossibleNondeterminism) { ...@@ -386,7 +386,7 @@ TEST(TestPossibleNondeterminism) {
CHECK(!r.possible_nondeterminism()); CHECK(!r.possible_nondeterminism());
} }
{ {
WasmRunner<float, float> r(kExecuteInterpreted); WasmRunner<float, float> r(kExecuteInterpreter);
BUILD(r, WASM_F32_ADD(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0))); BUILD(r, WASM_F32_ADD(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0)));
r.Call(1048575.5f); r.Call(1048575.5f);
CHECK(!r.possible_nondeterminism()); CHECK(!r.possible_nondeterminism());
...@@ -394,7 +394,7 @@ TEST(TestPossibleNondeterminism) { ...@@ -394,7 +394,7 @@ TEST(TestPossibleNondeterminism) {
CHECK(r.possible_nondeterminism()); CHECK(r.possible_nondeterminism());
} }
{ {
WasmRunner<double, double> r(kExecuteInterpreted); WasmRunner<double, double> r(kExecuteInterpreter);
BUILD(r, WASM_F64_ADD(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0))); BUILD(r, WASM_F64_ADD(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0)));
r.Call(16.0); r.Call(16.0);
CHECK(!r.possible_nondeterminism()); CHECK(!r.possible_nondeterminism());
...@@ -402,7 +402,7 @@ TEST(TestPossibleNondeterminism) { ...@@ -402,7 +402,7 @@ TEST(TestPossibleNondeterminism) {
CHECK(r.possible_nondeterminism()); CHECK(r.possible_nondeterminism());
} }
{ {
WasmRunner<int32_t, float> r(kExecuteInterpreted); WasmRunner<int32_t, float> r(kExecuteInterpreter);
BUILD(r, WASM_F32_EQ(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0))); BUILD(r, WASM_F32_EQ(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0)));
r.Call(16.0); r.Call(16.0);
CHECK(!r.possible_nondeterminism()); CHECK(!r.possible_nondeterminism());
...@@ -410,7 +410,7 @@ TEST(TestPossibleNondeterminism) { ...@@ -410,7 +410,7 @@ TEST(TestPossibleNondeterminism) {
CHECK(!r.possible_nondeterminism()); CHECK(!r.possible_nondeterminism());
} }
{ {
WasmRunner<int32_t, double> r(kExecuteInterpreted); WasmRunner<int32_t, double> r(kExecuteInterpreter);
BUILD(r, WASM_F64_EQ(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0))); BUILD(r, WASM_F64_EQ(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0)));
r.Call(16.0); r.Call(16.0);
CHECK(!r.possible_nondeterminism()); CHECK(!r.possible_nondeterminism());
...@@ -418,7 +418,7 @@ TEST(TestPossibleNondeterminism) { ...@@ -418,7 +418,7 @@ TEST(TestPossibleNondeterminism) {
CHECK(!r.possible_nondeterminism()); CHECK(!r.possible_nondeterminism());
} }
{ {
WasmRunner<float, float> r(kExecuteInterpreted); WasmRunner<float, float> r(kExecuteInterpreter);
BUILD(r, WASM_F32_MIN(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0))); BUILD(r, WASM_F32_MIN(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0)));
r.Call(1048575.5f); r.Call(1048575.5f);
CHECK(!r.possible_nondeterminism()); CHECK(!r.possible_nondeterminism());
...@@ -426,7 +426,7 @@ TEST(TestPossibleNondeterminism) { ...@@ -426,7 +426,7 @@ TEST(TestPossibleNondeterminism) {
CHECK(r.possible_nondeterminism()); CHECK(r.possible_nondeterminism());
} }
{ {
WasmRunner<double, double> r(kExecuteInterpreted); WasmRunner<double, double> r(kExecuteInterpreter);
BUILD(r, WASM_F64_MAX(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0))); BUILD(r, WASM_F64_MAX(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0)));
r.Call(16.0); r.Call(16.0);
CHECK(!r.possible_nondeterminism()); CHECK(!r.possible_nondeterminism());
...@@ -436,7 +436,7 @@ TEST(TestPossibleNondeterminism) { ...@@ -436,7 +436,7 @@ TEST(TestPossibleNondeterminism) {
} }
TEST(WasmInterpreterActivations) { TEST(WasmInterpreterActivations) {
WasmRunner<void> r(kExecuteInterpreted); WasmRunner<void> r(kExecuteInterpreter);
Isolate* isolate = r.main_isolate(); Isolate* isolate = r.main_isolate();
BUILD(r, WASM_NOP); BUILD(r, WASM_NOP);
...@@ -466,7 +466,7 @@ TEST(WasmInterpreterActivations) { ...@@ -466,7 +466,7 @@ TEST(WasmInterpreterActivations) {
} }
TEST(InterpreterLoadWithoutMemory) { TEST(InterpreterLoadWithoutMemory) {
WasmRunner<int32_t, int32_t> r(kExecuteInterpreted); WasmRunner<int32_t, int32_t> r(kExecuteInterpreter);
r.builder().AddMemory(0); r.builder().AddMemory(0);
BUILD(r, WASM_LOAD_MEM(MachineType::Int32(), WASM_GET_LOCAL(0))); BUILD(r, WASM_LOAD_MEM(MachineType::Int32(), WASM_GET_LOCAL(0)));
CHECK_TRAP32(r.Call(0)); CHECK_TRAP32(r.Call(0));
......
...@@ -29,7 +29,7 @@ TestingModuleBuilder::TestingModuleBuilder( ...@@ -29,7 +29,7 @@ TestingModuleBuilder::TestingModuleBuilder(
test_module_.globals_size = kMaxGlobalsSize; test_module_.globals_size = kMaxGlobalsSize;
memset(globals_data_, 0, sizeof(globals_data_)); memset(globals_data_, 0, sizeof(globals_data_));
instance_object_ = InitInstanceObject(); instance_object_ = InitInstanceObject();
if (mode == kExecuteInterpreted) { if (mode == kExecuteInterpreter) {
interpreter_ = WasmDebugInfo::SetupForTesting(instance_object_); interpreter_ = WasmDebugInfo::SetupForTesting(instance_object_);
} }
} }
......
...@@ -48,9 +48,10 @@ constexpr uint32_t kMaxFunctions = 10; ...@@ -48,9 +48,10 @@ constexpr uint32_t kMaxFunctions = 10;
constexpr uint32_t kMaxGlobalsSize = 128; constexpr uint32_t kMaxGlobalsSize = 128;
enum WasmExecutionMode { enum WasmExecutionMode {
kExecuteInterpreted, kExecuteInterpreter,
kExecuteTurbofan, kExecuteTurbofan,
kExecuteLiftoff, kExecuteLiftoff,
// TODO(bug:7028): Introduce another enum for simd lowering.
kExecuteSimdLowered kExecuteSimdLowered
}; };
...@@ -481,30 +482,30 @@ class WasmRunner : public WasmRunnerBase { ...@@ -481,30 +482,30 @@ class WasmRunner : public WasmRunnerBase {
// A macro to define tests that run in different engine configurations. // A macro to define tests that run in different engine configurations.
#define WASM_EXEC_TEST(name) \ #define WASM_EXEC_TEST(name) \
void RunWasm_##name(WasmExecutionMode execution_mode); \ void RunWasm_##name(WasmExecutionMode execution_mode); \
TEST(RunWasmTFCompiled_##name) { RunWasm_##name(kExecuteTurbofan); } \ TEST(RunWasmTurbofan_##name) { RunWasm_##name(kExecuteTurbofan); } \
TEST(RunWasmLiftoffCompiled_##name) { RunWasm_##name(kExecuteLiftoff); } \ TEST(RunWasmLiftoff_##name) { RunWasm_##name(kExecuteLiftoff); } \
TEST(RunWasmInterpreted_##name) { RunWasm_##name(kExecuteInterpreted); } \ TEST(RunWasmInterpreter_##name) { RunWasm_##name(kExecuteInterpreter); } \
void RunWasm_##name(WasmExecutionMode execution_mode) void RunWasm_##name(WasmExecutionMode execution_mode)
#define WASM_COMPILED_EXEC_TEST(name) \ #define WASM_COMPILED_EXEC_TEST(name) \
void RunWasm_##name(WasmExecutionMode execution_mode); \ void RunWasm_##name(WasmExecutionMode execution_mode); \
TEST(RunWasmTFCompiled_##name) { RunWasm_##name(kExecuteTurbofan); } \ TEST(RunWasmTurbofan_##name) { RunWasm_##name(kExecuteTurbofan); } \
TEST(RunWasmLiftoffCompiled_##name) { RunWasm_##name(kExecuteLiftoff); } \ TEST(RunWasmLiftoff_##name) { RunWasm_##name(kExecuteLiftoff); } \
void RunWasm_##name(WasmExecutionMode execution_mode) void RunWasm_##name(WasmExecutionMode execution_mode)
#define WASM_EXEC_TEST_WITH_TRAP(name) \ #define WASM_EXEC_TEST_WITH_TRAP(name) \
void RunWasm_##name(WasmExecutionMode execution_mode); \ void RunWasm_##name(WasmExecutionMode execution_mode); \
TEST(RunWasmCompiled_##name) { \ TEST(RunWasmTurbofan_##name) { \
if (trap_handler::UseTrapHandler()) return; \ if (trap_handler::UseTrapHandler()) return; \
RunWasm_##name(kExecuteTurbofan); \ RunWasm_##name(kExecuteTurbofan); \
} \ } \
TEST(RunWasmLiftoffCompiled_##name) { \ TEST(RunWasmLiftoff_##name) { \
if (trap_handler::UseTrapHandler()) return; \ if (trap_handler::UseTrapHandler()) return; \
RunWasm_##name(kExecuteLiftoff); \ RunWasm_##name(kExecuteLiftoff); \
} \ } \
TEST(RunWasmInterpreted_##name) { \ TEST(RunWasmInterpreter_##name) { \
if (trap_handler::UseTrapHandler()) return; \ if (trap_handler::UseTrapHandler()) return; \
RunWasm_##name(kExecuteInterpreted); \ RunWasm_##name(kExecuteInterpreter); \
} \ } \
void RunWasm_##name(WasmExecutionMode execution_mode) void RunWasm_##name(WasmExecutionMode execution_mode)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment