OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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_INTERPRETER_SETUP_INTERPRETER_H_ |
| 6 #define V8_INTERPRETER_SETUP_INTERPRETER_H_ |
| 7 |
| 8 #include "src/interpreter/bytecode-operands.h" |
| 9 #include "src/interpreter/bytecodes.h" |
| 10 |
| 11 namespace v8 { |
| 12 namespace internal { |
| 13 namespace interpreter { |
| 14 |
| 15 class Interpreter; |
| 16 |
| 17 class SetupInterpreter { |
| 18 public: |
| 19 static void InstallBytecodeHandlers(Interpreter* interpreter); |
| 20 |
| 21 private: |
| 22 // In the case of bytecodes that share handler implementations, copy the code |
| 23 // into the bytecode's dispatcher table entry and return true. |
| 24 static bool ReuseExistingHandler(Address* dispatch_table, Bytecode bytecode, |
| 25 OperandScale operand_scale); |
| 26 // Generates handler for given |bytecode| and |operand_scale| |
| 27 // and installs it into the |dispatch_table|. |
| 28 static void InstallBytecodeHandler(Isolate* isolate, Address* dispatch_table, |
| 29 Bytecode bytecode, |
| 30 OperandScale operand_scale); |
| 31 }; |
| 32 |
| 33 } // namespace interpreter |
| 34 } // namespace internal |
| 35 } // namespace v8 |
| 36 |
| 37 #endif // V8_INTERPRETER_SETUP_INTERPRETER_H_ |
OLD | NEW |