 Chromium Code Reviews
 Chromium Code Reviews Issue 1239793002:
  [interpreter] Add basic framework for bytecode handler code generation.  (Closed) 
  Base URL: https://chromium.googlesource.com/v8/v8.git@master
    
  
    Issue 1239793002:
  [interpreter] Add basic framework for bytecode handler code generation.  (Closed) 
  Base URL: https://chromium.googlesource.com/v8/v8.git@master| OLD | NEW | 
|---|---|
| (Empty) | |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef V8_UNITTESTS_COMPILER_INTERPRETER_ASSEMBLER_UNITTEST_H_ | |
| 6 #define V8_UNITTESTS_COMPILER_INTERPRETER_ASSEMBLER_UNITTEST_H_ | |
| 7 | |
| 8 #include "src/compiler/interpreter-assembler.h" | |
| 9 #include "src/compiler/linkage.h" | |
| 10 #include "src/compiler/machine-operator.h" | |
| 11 #include "test/unittests/test-utils.h" | |
| 12 #include "testing/gmock-support.h" | |
| 13 | |
| 14 namespace v8 { | |
| 15 namespace internal { | |
| 16 namespace compiler { | |
| 17 | |
| 18 using ::testing::Matcher; | |
| 19 | |
| 20 class InterpreterAssemblerTest : public TestWithIsolateAndZone { | |
| 21 public: | |
| 22 InterpreterAssemblerTest() {} | |
| 23 ~InterpreterAssemblerTest() override {} | |
| 24 | |
| 25 class InterpreterAssemblerForTest final : public InterpreterAssembler { | |
| 26 public: | |
| 27 InterpreterAssemblerForTest(InterpreterAssemblerTest* test, | |
| 28 interpreter::Bytecode bytecode) | |
| 29 : InterpreterAssembler(test->isolate(), test->zone(), bytecode) {} | |
| 30 ~InterpreterAssemblerForTest() override {} | |
| 31 | |
| 32 Graph* GetCompletedGraph(); | |
| 33 | |
| 34 Matcher<Node*> IsLoad(const Matcher<LoadRepresentation>& rep_matcher, | |
| 35 const Matcher<Node*>& base_matcher, | |
| 36 const Matcher<Node*>& index_matcher); | |
| 37 Matcher<Node*> IsStore(const Matcher<StoreRepresentation>& rep_matcher, | |
| 38 const Matcher<Node*>& base_matcher, | |
| 39 const Matcher<Node*>& index_matcher, | |
| 40 const Matcher<Node*>& value_matcher); | |
| 41 | |
| 42 CallDescriptor* call_descriptor() const { | |
| 
Michael Starzinger
2015/07/23 11:05:04
nit: Could we use "using InterpreterAssembler::cal
 
rmcilroy
2015/07/23 11:58:54
I learn something new about c++ every day :). Done
 | |
| 43 return InterpreterAssembler::call_descriptor(); | |
| 44 } | |
| 45 Graph* graph() { return InterpreterAssembler::graph(); } | |
| 
Michael Starzinger
2015/07/23 11:05:04
nit: Likewise.
 
rmcilroy
2015/07/23 11:58:54
Done. Also did the same for the constants below.
 | |
| 46 | |
| 47 int max_register_index() const { return kMaxRegisterIndex; } | |
| 48 int first_regster_offset_from_fp() const { | |
| 49 return kFirstRegsterOffsetFromFp; | |
| 50 } | |
| 51 | |
| 52 private: | |
| 53 DISALLOW_COPY_AND_ASSIGN(InterpreterAssemblerForTest); | |
| 54 }; | |
| 55 }; | |
| 56 | |
| 57 } // namespace compiler | |
| 58 } // namespace internal | |
| 59 } // namespace v8 | |
| 60 | |
| 61 #endif // V8_UNITTESTS_COMPILER_INTERPRETER_ASSEMBLER_UNITTEST_H_ | |
| OLD | NEW |