Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Unified Diff: test/cctest/wasm/test-run-wasm-relocation.cc

Issue 2551043002: [wasm] Make WasmRunner the central test structure (Closed)
Patch Set: Make DoCall return void - quickfix Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/wasm/test-run-wasm-js.cc ('k') | test/cctest/wasm/test-run-wasm-simd.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/wasm/test-run-wasm-relocation.cc
diff --git a/test/cctest/wasm/test-run-wasm-relocation.cc b/test/cctest/wasm/test-run-wasm-relocation.cc
index 614e9a4ba5dd7f479d1b7d285680ae769c888584..f34a1a323e709435bb4332e571181b53a3834fce 100644
--- a/test/cctest/wasm/test-run-wasm-relocation.cc
+++ b/test/cctest/wasm/test-run-wasm-relocation.cc
@@ -13,31 +13,29 @@
using namespace v8::internal;
using namespace v8::internal::compiler;
-#define FOREACH_TYPE(TEST_BODY) \
- TEST_BODY(int32_t, I32, WASM_I32_ADD) \
- TEST_BODY(int64_t, I64, WASM_I64_ADD) \
- TEST_BODY(float, F32, WASM_F32_ADD) \
- TEST_BODY(double, F64, WASM_F64_ADD)
+#define FOREACH_TYPE(TEST_BODY) \
+ TEST_BODY(int32_t, WASM_I32_ADD) \
+ TEST_BODY(int64_t, WASM_I64_ADD) \
+ TEST_BODY(float, WASM_F32_ADD) \
+ TEST_BODY(double, WASM_F64_ADD)
-#define LOAD_SET_GLOBAL_TEST_BODY(C_TYPE, MACHINE_TYPE, ADD) \
- TEST(WasmRelocateGlobal##MACHINE_TYPE) { \
- TestingModule module(kExecuteCompiled); \
- module.AddGlobal<C_TYPE>(kAst##MACHINE_TYPE); \
- module.AddGlobal<C_TYPE>(kAst##MACHINE_TYPE); \
+#define LOAD_SET_GLOBAL_TEST_BODY(C_TYPE, ADD) \
+ TEST(WasmRelocateGlobal_##C_TYPE) { \
+ WasmRunner<C_TYPE, C_TYPE> r(kExecuteCompiled); \
\
- WasmRunner<C_TYPE> r(&module, \
- WasmOpcodes::MachineTypeFor(kAst##MACHINE_TYPE)); \
+ r.module().AddGlobal<C_TYPE>(); \
+ r.module().AddGlobal<C_TYPE>(); \
\
/* global = global + p0 */ \
BUILD(r, WASM_SET_GLOBAL(1, ADD(WASM_GET_GLOBAL(0), WASM_GET_LOCAL(0))), \
WASM_GET_GLOBAL(0)); \
- CHECK_EQ(1u, module.instance->function_code.size()); \
+ CHECK_EQ(1, r.module().instance->function_code.size()); \
\
int filter = 1 << RelocInfo::WASM_GLOBAL_REFERENCE; \
\
- Handle<Code> code = module.instance->function_code[0]; \
+ Handle<Code> code = r.module().instance->function_code[0]; \
\
- Address old_start = module.instance->globals_start; \
+ Address old_start = r.module().instance->globals_start; \
Address new_start = old_start + 1; \
\
Address old_addresses[4]; \
« no previous file with comments | « test/cctest/wasm/test-run-wasm-js.cc ('k') | test/cctest/wasm/test-run-wasm-simd.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698