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

[wasm] Remove 'using namespace' from cctest/wasm

This required splitting wasm-run-utils.h in header and implementation,
since the anonymous namespace in wasm-run-utils.h is now gone.
This is a reasonable refactoring in itself.

R=titzer@chromium.org
CC=mstarzinger@chromium.org, mostynb@opera.com

Bug: chromium:746958
Change-Id: I0f3b30fef1865cd88eca37b69d0c3a9eb19e77ea
Reviewed-on: https://chromium-review.googlesource.com/647587Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47773}
parent 5931cc94
...@@ -204,6 +204,7 @@ v8_executable("cctest") { ...@@ -204,6 +204,7 @@ v8_executable("cctest") {
"wasm/test-wasm-interpreter-entry.cc", "wasm/test-wasm-interpreter-entry.cc",
"wasm/test-wasm-stack.cc", "wasm/test-wasm-stack.cc",
"wasm/test-wasm-trap-position.cc", "wasm/test-wasm-trap-position.cc",
"wasm/wasm-run-utils.cc",
"wasm/wasm-run-utils.h", "wasm/wasm-run-utils.h",
] ]
......
...@@ -222,6 +222,7 @@ ...@@ -222,6 +222,7 @@
'wasm/test-wasm-interpreter-entry.cc', 'wasm/test-wasm-interpreter-entry.cc',
'wasm/test-wasm-stack.cc', 'wasm/test-wasm-stack.cc',
'wasm/test-wasm-trap-position.cc', 'wasm/test-wasm-trap-position.cc',
'wasm/wasm-run-utils.cc',
'wasm/wasm-run-utils.h', 'wasm/wasm-run-utils.h',
], ],
'cctest_sources_ia32': [ ### gcmole(arch:ia32) ### 'cctest_sources_ia32': [ ### gcmole(arch:ia32) ###
......
...@@ -332,9 +332,10 @@ class ValueHelper { ...@@ -332,9 +332,10 @@ class ValueHelper {
// Helper macros that can be used in FOR_INT32_INPUTS(i) { ... *i ... } // Helper macros that can be used in FOR_INT32_INPUTS(i) { ... *i ... }
// Watch out, these macros aren't hygenic; they pollute your scope. Thanks STL. // Watch out, these macros aren't hygenic; they pollute your scope. Thanks STL.
#define FOR_INPUTS(ctype, itype, var) \ #define FOR_INPUTS(ctype, itype, var) \
std::vector<ctype> var##_vec = ValueHelper::itype##_vector(); \ std::vector<ctype> var##_vec = \
for (std::vector<ctype>::iterator var = var##_vec.begin(); \ ::v8::internal::compiler::ValueHelper::itype##_vector(); \
for (std::vector<ctype>::iterator var = var##_vec.begin(); \
var != var##_vec.end(); ++var) var != var##_vec.end(); ++var)
#define FOR_INT32_INPUTS(var) FOR_INPUTS(int32_t, int32, var) #define FOR_INT32_INPUTS(var) FOR_INPUTS(int32_t, int32, var)
...@@ -362,10 +363,10 @@ static inline void CheckFloatEq(volatile float x, volatile float y) { ...@@ -362,10 +363,10 @@ static inline void CheckFloatEq(volatile float x, volatile float y) {
} }
} }
#define CHECK_FLOAT_EQ(lhs, rhs) \ #define CHECK_FLOAT_EQ(lhs, rhs) \
do { \ do { \
volatile float tmp = lhs; \ volatile float tmp = lhs; \
CheckFloatEq(tmp, rhs); \ ::v8::internal::compiler::CheckFloatEq(tmp, rhs); \
} while (0) } while (0)
static inline void CheckDoubleEq(volatile double x, volatile double y) { static inline void CheckDoubleEq(volatile double x, volatile double y) {
...@@ -377,10 +378,10 @@ static inline void CheckDoubleEq(volatile double x, volatile double y) { ...@@ -377,10 +378,10 @@ static inline void CheckDoubleEq(volatile double x, volatile double y) {
} }
} }
#define CHECK_DOUBLE_EQ(lhs, rhs) \ #define CHECK_DOUBLE_EQ(lhs, rhs) \
do { \ do { \
volatile double tmp = lhs; \ volatile double tmp = lhs; \
CheckDoubleEq(tmp, rhs); \ ::v8::internal::compiler::CheckDoubleEq(tmp, rhs); \
} while (0) } while (0)
} // namespace compiler } // namespace compiler
......
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
#include "test/cctest/compiler/c-signature.h" #include "test/cctest/compiler/c-signature.h"
#include "test/cctest/compiler/call-tester.h" #include "test/cctest/compiler/call-tester.h"
using namespace v8::base; namespace v8 {
using namespace v8::internal; namespace internal {
using namespace v8::internal::compiler; namespace wasm {
#define __ assm. #define __ assm.
...@@ -40,8 +40,8 @@ TEST(WasmRelocationArmMemoryReference) { ...@@ -40,8 +40,8 @@ TEST(WasmRelocationArmMemoryReference) {
Handle<Code> code = isolate->factory()->NewCode( Handle<Code> code = isolate->factory()->NewCode(
desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
CSignature0<int32_t> csig; compiler::CSignature0<int32_t> csig;
CodeRunner<int32_t> runnable(isolate, code, &csig); compiler::CodeRunner<int32_t> runnable(isolate, code, &csig);
int32_t ret_value = runnable.Call(); int32_t ret_value = runnable.Call();
CHECK_EQ(ret_value, imm); CHECK_EQ(ret_value, imm);
...@@ -95,8 +95,8 @@ TEST(WasmRelocationArmMemorySizeReference) { ...@@ -95,8 +95,8 @@ TEST(WasmRelocationArmMemorySizeReference) {
Handle<Code> code = isolate->factory()->NewCode( Handle<Code> code = isolate->factory()->NewCode(
desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
CSignature0<int32_t> csig; compiler::CSignature0<int32_t> csig;
CodeRunner<int32_t> runnable(isolate, code, &csig); compiler::CodeRunner<int32_t> runnable(isolate, code, &csig);
int32_t ret_value = runnable.Call(); int32_t ret_value = runnable.Call();
CHECK_NE(ret_value, bit_cast<int32_t>(0xdeadbeef)); CHECK_NE(ret_value, bit_cast<int32_t>(0xdeadbeef));
...@@ -123,4 +123,9 @@ TEST(WasmRelocationArmMemorySizeReference) { ...@@ -123,4 +123,9 @@ TEST(WasmRelocationArmMemorySizeReference) {
::printf("f() = %d\n\n", ret_value); ::printf("f() = %d\n\n", ret_value);
#endif #endif
} }
#undef __ #undef __
} // namespace wasm
} // namespace internal
} // namespace v8
...@@ -19,9 +19,9 @@ ...@@ -19,9 +19,9 @@
#include "test/cctest/compiler/c-signature.h" #include "test/cctest/compiler/c-signature.h"
#include "test/cctest/compiler/call-tester.h" #include "test/cctest/compiler/call-tester.h"
using namespace v8::base; namespace v8 {
using namespace v8::internal; namespace internal {
using namespace v8::internal::compiler; namespace wasm {
#define __ masm. #define __ masm.
...@@ -45,8 +45,8 @@ TEST(WasmRelocationArm64MemoryReference) { ...@@ -45,8 +45,8 @@ TEST(WasmRelocationArm64MemoryReference) {
Handle<Code> code = isolate->factory()->NewCode( Handle<Code> code = isolate->factory()->NewCode(
desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
CSignature0<int64_t> csig; compiler::CSignature0<int64_t> csig;
CodeRunner<int64_t> runnable(isolate, code, &csig); compiler::CodeRunner<int64_t> runnable(isolate, code, &csig);
int64_t ret_value = runnable.Call(); int64_t ret_value = runnable.Call();
CHECK_EQ(ret_value, imm); CHECK_EQ(ret_value, imm);
...@@ -101,8 +101,8 @@ TEST(WasmRelocationArm64MemorySizeReference) { ...@@ -101,8 +101,8 @@ TEST(WasmRelocationArm64MemorySizeReference) {
Handle<Code> code = isolate->factory()->NewCode( Handle<Code> code = isolate->factory()->NewCode(
desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
CSignature0<int64_t> csig; compiler::CSignature0<int64_t> csig;
CodeRunner<int64_t> runnable(isolate, code, &csig); compiler::CodeRunner<int64_t> runnable(isolate, code, &csig);
int64_t ret_value = runnable.Call(); int64_t ret_value = runnable.Call();
CHECK_NE(ret_value, 0xdeadbeef); CHECK_NE(ret_value, 0xdeadbeef);
...@@ -131,3 +131,7 @@ TEST(WasmRelocationArm64MemorySizeReference) { ...@@ -131,3 +131,7 @@ TEST(WasmRelocationArm64MemorySizeReference) {
} }
#undef __ #undef __
} // namespace wasm
} // namespace internal
} // namespace v8
...@@ -16,8 +16,9 @@ ...@@ -16,8 +16,9 @@
#include "test/cctest/compiler/c-signature.h" #include "test/cctest/compiler/c-signature.h"
#include "test/cctest/compiler/call-tester.h" #include "test/cctest/compiler/call-tester.h"
using namespace v8::internal; namespace v8 {
using namespace v8::internal::compiler; namespace internal {
namespace wasm {
#define __ assm. #define __ assm.
...@@ -37,14 +38,14 @@ TEST(WasmRelocationIa32MemoryReference) { ...@@ -37,14 +38,14 @@ TEST(WasmRelocationIa32MemoryReference) {
__ nop(); __ nop();
__ ret(0); __ ret(0);
CSignature0<int32_t> csig; compiler::CSignature0<int32_t> csig;
CodeDesc desc; CodeDesc desc;
assm.GetCode(isolate, &desc); assm.GetCode(isolate, &desc);
Handle<Code> code = isolate->factory()->NewCode( Handle<Code> code = isolate->factory()->NewCode(
desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
USE(code); USE(code);
CodeRunner<int32_t> runnable(isolate, code, &csig); compiler::CodeRunner<int32_t> runnable(isolate, code, &csig);
int32_t ret_value = runnable.Call(); int32_t ret_value = runnable.Call();
CHECK_EQ(ret_value, imm); CHECK_EQ(ret_value, imm);
...@@ -100,14 +101,14 @@ TEST(WasmRelocationIa32MemorySizeReference) { ...@@ -100,14 +101,14 @@ TEST(WasmRelocationIa32MemorySizeReference) {
__ mov(eax, 0xdeadbeef); __ mov(eax, 0xdeadbeef);
__ ret(0); __ ret(0);
CSignature0<int32_t> csig; compiler::CSignature0<int32_t> csig;
CodeDesc desc; CodeDesc desc;
assm.GetCode(isolate, &desc); assm.GetCode(isolate, &desc);
Handle<Code> code = isolate->factory()->NewCode( Handle<Code> code = isolate->factory()->NewCode(
desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
USE(code); USE(code);
CodeRunner<int32_t> runnable(isolate, code, &csig); compiler::CodeRunner<int32_t> runnable(isolate, code, &csig);
int32_t ret_value = runnable.Call(); int32_t ret_value = runnable.Call();
CHECK_NE(ret_value, bit_cast<int32_t>(0xdeadbeef)); CHECK_NE(ret_value, bit_cast<int32_t>(0xdeadbeef));
...@@ -139,4 +140,9 @@ TEST(WasmRelocationIa32MemorySizeReference) { ...@@ -139,4 +140,9 @@ TEST(WasmRelocationIa32MemorySizeReference) {
disasm::Disassembler::Disassemble(stdout, begin, end); disasm::Disassembler::Disassemble(stdout, begin, end);
#endif #endif
} }
#undef __ #undef __
} // namespace wasm
} // namespace internal
} // namespace v8
...@@ -16,6 +16,10 @@ ...@@ -16,6 +16,10 @@
#include "test/common/wasm/test-signatures.h" #include "test/common/wasm/test-signatures.h"
#include "test/common/wasm/wasm-macro-gen.h" #include "test/common/wasm/wasm-macro-gen.h"
namespace v8 {
namespace internal {
namespace wasm {
// If the target architecture is 64-bit, enable all tests. // If the target architecture is 64-bit, enable all tests.
#if !V8_TARGET_ARCH_32_BIT || V8_TARGET_ARCH_X64 #if !V8_TARGET_ARCH_32_BIT || V8_TARGET_ARCH_X64
#define WASM_64 1 #define WASM_64 1
...@@ -1476,7 +1480,7 @@ WASM_EXEC_TEST(I64Ror) { ...@@ -1476,7 +1480,7 @@ WASM_EXEC_TEST(I64Ror) {
FOR_UINT64_INPUTS(i) { FOR_UINT64_INPUTS(i) {
FOR_UINT64_INPUTS(j) { FOR_UINT64_INPUTS(j) {
int64_t expected = bits::RotateRight64(*i, *j & 0x3f); int64_t expected = base::bits::RotateRight64(*i, *j & 0x3f);
CHECK_EQ(expected, r.Call(*i, *j)); CHECK_EQ(expected, r.Call(*i, *j));
} }
} }
...@@ -1489,7 +1493,7 @@ WASM_EXEC_TEST(I64Rol) { ...@@ -1489,7 +1493,7 @@ WASM_EXEC_TEST(I64Rol) {
FOR_UINT64_INPUTS(i) { FOR_UINT64_INPUTS(i) {
FOR_UINT64_INPUTS(j) { FOR_UINT64_INPUTS(j) {
int64_t expected = bits::RotateLeft64(*i, *j & 0x3f); int64_t expected = base::bits::RotateLeft64(*i, *j & 0x3f);
CHECK_EQ(expected, r.Call(*i, *j)); CHECK_EQ(expected, r.Call(*i, *j));
} }
} }
...@@ -1668,3 +1672,11 @@ WASM_EXEC_TEST(Regress5874) { ...@@ -1668,3 +1672,11 @@ WASM_EXEC_TEST(Regress5874) {
r.Call(); r.Call();
} }
// clang-format gets confused about these closing parentheses (wants to change
// the first comment to "// namespace v8". Disable it.
// clang-format off
} // namespace wasm
} // namespace internal
} // namespace v8
// clang-format on
...@@ -15,10 +15,9 @@ ...@@ -15,10 +15,9 @@
#include "test/common/wasm/test-signatures.h" #include "test/common/wasm/test-signatures.h"
#include "test/common/wasm/wasm-macro-gen.h" #include "test/common/wasm/wasm-macro-gen.h"
using namespace v8::base; namespace v8 {
using namespace v8::internal; namespace internal {
using namespace v8::internal::compiler; namespace wasm {
using namespace v8::internal::wasm;
// for even shorter tests. // for even shorter tests.
#define B2(a, b) kExprBlock, a, b, kExprEnd #define B2(a, b) kExprBlock, a, b, kExprEnd
...@@ -298,3 +297,7 @@ TEST(RunWasm_AsmCheckedStoreFloat64RelocInfo) { ...@@ -298,3 +297,7 @@ TEST(RunWasm_AsmCheckedStoreFloat64RelocInfo) {
CHECK_NE(0, GetMatchingRelocInfoCount(r.builder().GetFunctionCode(0), CHECK_NE(0, GetMatchingRelocInfoCount(r.builder().GetFunctionCode(0),
RelocInfo::WASM_MEMORY_SIZE_REFERENCE)); RelocInfo::WASM_MEMORY_SIZE_REFERENCE));
} }
} // namespace wasm
} // namespace internal
} // namespace v8
...@@ -7,6 +7,10 @@ ...@@ -7,6 +7,10 @@
#include "test/cctest/wasm/wasm-run-utils.h" #include "test/cctest/wasm/wasm-run-utils.h"
#include "test/common/wasm/wasm-macro-gen.h" #include "test/common/wasm/wasm-macro-gen.h"
namespace v8 {
namespace internal {
namespace wasm {
#define WASM_ATOMICS_OP(op) kAtomicPrefix, static_cast<byte>(op) #define WASM_ATOMICS_OP(op) kAtomicPrefix, static_cast<byte>(op)
#define WASM_ATOMICS_BINOP(op, x, y) x, y, WASM_ATOMICS_OP(op) #define WASM_ATOMICS_BINOP(op, x, y) x, y, WASM_ATOMICS_OP(op)
#define WASM_ATOMICS_TERNARY_OP(op, x, y, z) x, y, z, WASM_ATOMICS_OP(op) #define WASM_ATOMICS_TERNARY_OP(op, x, y, z) x, y, z, WASM_ATOMICS_OP(op)
...@@ -186,3 +190,7 @@ WASM_EXEC_TEST(I32CompareExchange8U) { ...@@ -186,3 +190,7 @@ WASM_EXEC_TEST(I32CompareExchange8U) {
} }
} }
} }
} // namespace wasm
} // namespace internal
} // namespace v8
...@@ -16,11 +16,6 @@ ...@@ -16,11 +16,6 @@
#include "test/common/wasm/test-signatures.h" #include "test/common/wasm/test-signatures.h"
#include "test/common/wasm/wasm-macro-gen.h" #include "test/common/wasm/wasm-macro-gen.h"
using namespace v8::base;
using namespace v8::internal;
using namespace v8::internal::compiler;
using namespace v8::internal::wasm;
namespace v8 { namespace v8 {
namespace internal { namespace internal {
namespace wasm { namespace wasm {
......
...@@ -14,10 +14,9 @@ ...@@ -14,10 +14,9 @@
#include "test/common/wasm/test-signatures.h" #include "test/common/wasm/test-signatures.h"
#include "test/common/wasm/wasm-macro-gen.h" #include "test/common/wasm/wasm-macro-gen.h"
using namespace v8::base; namespace v8 {
using namespace v8::internal; namespace internal {
using namespace v8::internal::compiler; namespace wasm {
using namespace v8::internal::wasm;
#define BUILD(r, ...) \ #define BUILD(r, ...) \
do { \ do { \
...@@ -84,7 +83,7 @@ void EXPECT_CALL(double expected, Handle<JSFunction> jsfunc, ...@@ -84,7 +83,7 @@ void EXPECT_CALL(double expected, Handle<JSFunction> jsfunc,
CHECK_EQ(expected, Smi::ToInt(*result)); CHECK_EQ(expected, Smi::ToInt(*result));
} else { } else {
CHECK(result->IsHeapNumber()); CHECK(result->IsHeapNumber());
CheckFloatEq(expected, HeapNumber::cast(*result)->value()); CHECK_FLOAT_EQ(expected, HeapNumber::cast(*result)->value());
} }
} }
...@@ -504,3 +503,7 @@ TEST(Run_JSSelectAlign_10) { ...@@ -504,3 +503,7 @@ TEST(Run_JSSelectAlign_10) {
RunJSSelectAlignTest(10, 9); RunJSSelectAlignTest(10, 9);
RunJSSelectAlignTest(10, 10); RunJSSelectAlignTest(10, 10);
} }
} // namespace wasm
} // namespace internal
} // namespace v8
...@@ -19,10 +19,9 @@ ...@@ -19,10 +19,9 @@
#include "test/common/wasm/wasm-macro-gen.h" #include "test/common/wasm/wasm-macro-gen.h"
#include "test/common/wasm/wasm-module-runner.h" #include "test/common/wasm/wasm-module-runner.h"
using namespace v8::base; namespace v8 {
using namespace v8::internal; namespace internal {
using namespace v8::internal::compiler; namespace wasm {
using namespace v8::internal::wasm;
namespace { namespace {
void Cleanup(Isolate* isolate = nullptr) { void Cleanup(Isolate* isolate = nullptr) {
...@@ -1170,3 +1169,7 @@ TEST(Run_WasmModule_Buffer_Externalized_Detach) { ...@@ -1170,3 +1169,7 @@ TEST(Run_WasmModule_Buffer_Externalized_Detach) {
} }
Cleanup(); Cleanup();
} }
} // namespace wasm
} // namespace internal
} // namespace v8
...@@ -12,8 +12,9 @@ ...@@ -12,8 +12,9 @@
#include "test/cctest/wasm/wasm-run-utils.h" #include "test/cctest/wasm/wasm-run-utils.h"
#include "test/common/wasm/wasm-macro-gen.h" #include "test/common/wasm/wasm-macro-gen.h"
using namespace v8::internal; namespace v8 {
using namespace v8::internal::compiler; namespace internal {
namespace wasm {
#define FOREACH_TYPE(TEST_BODY) \ #define FOREACH_TYPE(TEST_BODY) \
TEST_BODY(int32_t, WASM_I32_ADD) \ TEST_BODY(int32_t, WASM_I32_ADD) \
...@@ -60,3 +61,7 @@ using namespace v8::internal::compiler; ...@@ -60,3 +61,7 @@ using namespace v8::internal::compiler;
} }
FOREACH_TYPE(LOAD_SET_GLOBAL_TEST_BODY) FOREACH_TYPE(LOAD_SET_GLOBAL_TEST_BODY)
} // namespace wasm
} // namespace internal
} // namespace v8
...@@ -8,10 +8,9 @@ ...@@ -8,10 +8,9 @@
#include "test/cctest/wasm/wasm-run-utils.h" #include "test/cctest/wasm/wasm-run-utils.h"
#include "test/common/wasm/wasm-macro-gen.h" #include "test/common/wasm/wasm-macro-gen.h"
using namespace v8::base; namespace v8 {
using namespace v8::internal; namespace internal {
using namespace v8::internal::compiler; namespace wasm {
using namespace v8::internal::wasm;
namespace { namespace {
...@@ -2199,3 +2198,7 @@ WASM_SIMD_TEST(SimdLoadStoreLoad) { ...@@ -2199,3 +2198,7 @@ WASM_SIMD_TEST(SimdLoadStoreLoad) {
} }
#endif // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || SIMD_LOWERING_TARGET || #endif // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || SIMD_LOWERING_TARGET ||
// V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 // V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
} // namespace wasm
} // namespace internal
} // namespace v8
...@@ -15,10 +15,9 @@ ...@@ -15,10 +15,9 @@
#include "test/common/wasm/test-signatures.h" #include "test/common/wasm/test-signatures.h"
#include "test/common/wasm/wasm-macro-gen.h" #include "test/common/wasm/wasm-macro-gen.h"
using namespace v8::base; namespace v8 {
using namespace v8::internal; namespace internal {
using namespace v8::internal::compiler; namespace wasm {
using namespace v8::internal::wasm;
// for even shorter tests. // for even shorter tests.
#define B1(a) WASM_BLOCK(a) #define B1(a) WASM_BLOCK(a)
...@@ -1941,11 +1940,13 @@ static void TestBuildGraphForSimpleExpression(WasmOpcode opcode) { ...@@ -1941,11 +1940,13 @@ static void TestBuildGraphForSimpleExpression(WasmOpcode opcode) {
Zone zone(isolate->allocator(), ZONE_NAME); Zone zone(isolate->allocator(), ZONE_NAME);
HandleScope scope(isolate); HandleScope scope(isolate);
// Enable all optional operators. // Enable all optional operators.
CommonOperatorBuilder common(&zone); compiler::CommonOperatorBuilder common(&zone);
MachineOperatorBuilder machine(&zone, MachineType::PointerRepresentation(), compiler::MachineOperatorBuilder machine(
MachineOperatorBuilder::kAllOptionalOps); &zone, MachineType::PointerRepresentation(),
Graph graph(&zone); compiler::MachineOperatorBuilder::kAllOptionalOps);
JSGraph jsgraph(isolate, &graph, &common, nullptr, nullptr, &machine); compiler::Graph graph(&zone);
compiler::JSGraph jsgraph(isolate, &graph, &common, nullptr, nullptr,
&machine);
FunctionSig* sig = WasmOpcodes::Signature(opcode); FunctionSig* sig = WasmOpcodes::Signature(opcode);
if (sig->parameter_count() == 1) { if (sig->parameter_count() == 1) {
...@@ -3091,3 +3092,7 @@ WASM_EXEC_TEST(IfInsideUnreachable) { ...@@ -3091,3 +3092,7 @@ WASM_EXEC_TEST(IfInsideUnreachable) {
WASM_IF_ELSE_I(WASM_ONE, WASM_BRV(0, WASM_ONE), WASM_RETURN1(WASM_ONE))); WASM_IF_ELSE_I(WASM_ONE, WASM_BRV(0, WASM_ONE), WASM_RETURN1(WASM_ONE)));
CHECK_EQ(17, r.Call()); CHECK_EQ(17, r.Call());
} }
} // namespace wasm
} // namespace internal
} // namespace v8
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
#include "test/common/wasm/test-signatures.h" #include "test/common/wasm/test-signatures.h"
#include "test/common/wasm/wasm-macro-gen.h" #include "test/common/wasm/wasm-macro-gen.h"
using namespace v8::internal; namespace v8 {
using namespace v8::internal::wasm; namespace internal {
namespace debug = v8::debug; namespace wasm {
namespace { namespace {
...@@ -422,3 +422,7 @@ TEST(WasmGetLocalsAndStack) { ...@@ -422,3 +422,7 @@ TEST(WasmGetLocalsAndStack) {
Handle<Object> args[]{handle(Smi::FromInt(7), isolate)}; Handle<Object> args[]{handle(Smi::FromInt(7), isolate)};
CHECK(!Execution::Call(isolate, main_fun_wrapper, global, 1, args).is_null()); CHECK(!Execution::Call(isolate, main_fun_wrapper, global, 1, args).is_null());
} }
} // namespace wasm
} // namespace internal
} // namespace v8
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
#include "test/cctest/wasm/wasm-run-utils.h" #include "test/cctest/wasm/wasm-run-utils.h"
#include "test/common/wasm/wasm-macro-gen.h" #include "test/common/wasm/wasm-macro-gen.h"
using namespace v8::internal; namespace v8 {
using namespace v8::internal::wasm; namespace internal {
namespace debug = v8::debug; namespace wasm {
/** /**
* We test the interface from Wasm compiled code to the Wasm interpreter by * We test the interface from Wasm compiled code to the Wasm interpreter by
...@@ -257,3 +257,7 @@ TEST(TestArgumentPassing_AllTypes) { ...@@ -257,3 +257,7 @@ TEST(TestArgumentPassing_AllTypes) {
CheckCall(i32, i64, f32, f64); CheckCall(i32, i64, f32, f64);
} }
} }
} // namespace wasm
} // namespace internal
} // namespace v8
...@@ -9,10 +9,9 @@ ...@@ -9,10 +9,9 @@
#include "test/common/wasm/test-signatures.h" #include "test/common/wasm/test-signatures.h"
#include "test/common/wasm/wasm-macro-gen.h" #include "test/common/wasm/wasm-macro-gen.h"
using namespace v8::base; namespace v8 {
using namespace v8::internal; namespace internal {
using namespace v8::internal::compiler; namespace wasm {
using namespace v8::internal::wasm;
using v8::Local; using v8::Local;
using v8::Utils; using v8::Utils;
...@@ -191,3 +190,7 @@ TEST(CollectDetailedWasmStack_WasmError) { ...@@ -191,3 +190,7 @@ TEST(CollectDetailedWasmStack_WasmError) {
CheckExceptionInfos(isolate, exception, expected_exceptions); CheckExceptionInfos(isolate, exception, expected_exceptions);
} }
} }
} // namespace wasm
} // namespace internal
} // namespace v8
...@@ -10,10 +10,9 @@ ...@@ -10,10 +10,9 @@
#include "test/common/wasm/test-signatures.h" #include "test/common/wasm/test-signatures.h"
#include "test/common/wasm/wasm-macro-gen.h" #include "test/common/wasm/wasm-macro-gen.h"
using namespace v8::base; namespace v8 {
using namespace v8::internal; namespace internal {
using namespace v8::internal::compiler; namespace wasm {
using namespace v8::internal::wasm;
using v8::Local; using v8::Local;
using v8::Utils; using v8::Utils;
...@@ -141,3 +140,7 @@ TEST(IllegalLoad) { ...@@ -141,3 +140,7 @@ TEST(IllegalLoad) {
CheckExceptionInfos(isolate, maybe_exc.ToHandleChecked(), CheckExceptionInfos(isolate, maybe_exc.ToHandleChecked(),
expected_exceptions); expected_exceptions);
} }
} // namespace wasm
} // namespace internal
} // namespace v8
This diff is collapsed.
This diff is collapsed.
...@@ -19,9 +19,9 @@ ...@@ -19,9 +19,9 @@
#include "test/common/wasm/test-signatures.h" #include "test/common/wasm/test-signatures.h"
#include "test/common/wasm/wasm-macro-gen.h" #include "test/common/wasm/wasm-macro-gen.h"
using namespace v8::internal; namespace v8 {
using namespace v8::internal::wasm; namespace internal {
using namespace v8::internal::wasm::testing; namespace wasm {
#define B1(a) WASM_BLOCK(a) #define B1(a) WASM_BLOCK(a)
#define B2(a, b) WASM_BLOCK(a, b) #define B2(a, b) WASM_BLOCK(a, b)
...@@ -2853,3 +2853,7 @@ TEST_F(BytecodeIteratorTest, WithLocalDecls) { ...@@ -2853,3 +2853,7 @@ TEST_F(BytecodeIteratorTest, WithLocalDecls) {
iter.next(); iter.next();
EXPECT_FALSE(iter.has_next()); EXPECT_FALSE(iter.has_next());
} }
} // namespace wasm
} // namespace internal
} // namespace v8
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