// Copyright 2015 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef V8_UNITTESTS_INTERPRETER_INTERPRETER_ASSEMBLER_UNITTEST_H_ #define V8_UNITTESTS_INTERPRETER_INTERPRETER_ASSEMBLER_UNITTEST_H_ #include "src/compiler/machine-operator.h" #include "src/interpreter/interpreter-assembler.h" #include "test/unittests/test-utils.h" #include "testing/gmock-support.h" namespace v8 { namespace internal { namespace interpreter { using ::testing::Matcher; class InterpreterAssemblerTest : public TestWithIsolateAndZone { public: InterpreterAssemblerTest() {} ~InterpreterAssemblerTest() override {} class InterpreterAssemblerForTest final : public InterpreterAssembler { public: InterpreterAssemblerForTest(InterpreterAssemblerTest* test, Bytecode bytecode) : InterpreterAssembler(test->isolate(), test->zone(), bytecode) {} ~InterpreterAssemblerForTest() override {} Matcher IsLoad( const Matcher& rep_matcher, const Matcher& base_matcher, const Matcher& index_matcher); Matcher IsStore( const Matcher& rep_matcher, const Matcher& base_matcher, const Matcher& index_matcher, const Matcher& value_matcher); Matcher IsBytecodeOperand(int offset); Matcher IsBytecodeOperandSignExtended(int offset); Matcher IsBytecodeOperandShort(int offset); Matcher IsBytecodeOperandShortSignExtended(int offset); using InterpreterAssembler::graph; private: DISALLOW_COPY_AND_ASSIGN(InterpreterAssemblerForTest); }; }; } // namespace interpreter } // namespace internal } // namespace v8 #endif // V8_UNITTESTS_INTERPRETER_INTERPRETER_ASSEMBLER_UNITTEST_H_