diff --git a/test/unittests/interpreter/bytecode-array-writer-unittest.cc b/test/unittests/interpreter/bytecode-array-writer-unittest.cc index 8773a2f5ab..e4a956a0ce 100644 --- a/test/unittests/interpreter/bytecode-array-writer-unittest.cc +++ b/test/unittests/interpreter/bytecode-array-writer-unittest.cc @@ -24,6 +24,7 @@ namespace internal { namespace interpreter { namespace bytecode_array_writer_unittest { +#define B(Name) static_cast(Bytecode::k##Name) #define R(i) static_cast(Register(i).ToOperand()) class BytecodeArrayWriterUnittest : public TestWithIsolateAndZone { @@ -364,6 +365,7 @@ TEST_F(BytecodeArrayWriterUnittest, DeadcodeElimination) { CHECK(source_iterator.done()); } +#undef B #undef R } // namespace bytecode_array_writer_unittest diff --git a/test/unittests/interpreter/bytecode-decoder-unittest.cc b/test/unittests/interpreter/bytecode-decoder-unittest.cc index 612b96e32c..018263f06b 100644 --- a/test/unittests/interpreter/bytecode-decoder-unittest.cc +++ b/test/unittests/interpreter/bytecode-decoder-unittest.cc @@ -16,6 +16,8 @@ namespace v8 { namespace internal { namespace interpreter { +#define B(Name) static_cast(Bytecode::k##Name) + TEST(BytecodeDecoder, DecodeBytecodeAndOperands) { struct BytecodesAndResult { const uint8_t bytecode[32]; @@ -95,6 +97,8 @@ TEST(BytecodeDecoder, DecodeBytecodeAndOperands) { } } +#undef B + } // namespace interpreter } // namespace internal } // namespace v8 diff --git a/test/unittests/interpreter/bytecode-utils.h b/test/unittests/interpreter/bytecode-utils.h index fffb7190c8..9a2cee3014 100644 --- a/test/unittests/interpreter/bytecode-utils.h +++ b/test/unittests/interpreter/bytecode-utils.h @@ -27,7 +27,6 @@ #endif #define U8(i) static_cast(i) -#define B(Name) static_cast(Bytecode::k##Name) #define REG_OPERAND(i) \ (InterpreterFrameConstants::kRegisterFileFromFp / kPointerSize - (i)) #define R8(i) static_cast(REG_OPERAND(i))