| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_INTERPRETER_INTERPRETER_H_ | 5 #ifndef V8_INTERPRETER_INTERPRETER_H_ |
| 6 #define V8_INTERPRETER_INTERPRETER_H_ | 6 #define V8_INTERPRETER_INTERPRETER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 // Clients of this interface shouldn't depend on lots of interpreter internals. | 10 // Clients of this interface shouldn't depend on lots of interpreter internals. |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 Address dispatch_table_address() { | 56 Address dispatch_table_address() { |
| 57 return reinterpret_cast<Address>(&dispatch_table_[0]); | 57 return reinterpret_cast<Address>(&dispatch_table_[0]); |
| 58 } | 58 } |
| 59 | 59 |
| 60 Address bytecode_dispatch_counters_table() { | 60 Address bytecode_dispatch_counters_table() { |
| 61 return reinterpret_cast<Address>(bytecode_dispatch_counters_table_.get()); | 61 return reinterpret_cast<Address>(bytecode_dispatch_counters_table_.get()); |
| 62 } | 62 } |
| 63 | 63 |
| 64 // TODO(ignition): Tune code size multiplier. | 64 // TODO(ignition): Tune code size multiplier. |
| 65 static const int kCodeSizeMultiplier = 32; | 65 static const int kCodeSizeMultiplier = 24; |
| 66 | 66 |
| 67 private: | 67 private: |
| 68 // In the case of bytecodes that share handler implementations, copy the code | 68 // In the case of bytecodes that share handler implementations, copy the code |
| 69 // into the bytecode's dispatcher table entry and return true. | 69 // into the bytecode's dispatcher table entry and return true. |
| 70 bool ReuseExistingHandler(Bytecode bytecode, OperandScale operand_scale); | 70 bool ReuseExistingHandler(Bytecode bytecode, OperandScale operand_scale); |
| 71 | 71 |
| 72 // Generates handler for given |bytecode| and |operand_scale| | 72 // Generates handler for given |bytecode| and |operand_scale| |
| 73 // and installs it into the dispatch table. | 73 // and installs it into the dispatch table. |
| 74 void InstallBytecodeHandler(Isolate* isolate, Bytecode bytecode, | 74 void InstallBytecodeHandler(Isolate* isolate, Bytecode bytecode, |
| 75 OperandScale operand_scale); | 75 OperandScale operand_scale); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 92 std::unique_ptr<uintptr_t[]> bytecode_dispatch_counters_table_; | 92 std::unique_ptr<uintptr_t[]> bytecode_dispatch_counters_table_; |
| 93 | 93 |
| 94 DISALLOW_COPY_AND_ASSIGN(Interpreter); | 94 DISALLOW_COPY_AND_ASSIGN(Interpreter); |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 } // namespace interpreter | 97 } // namespace interpreter |
| 98 } // namespace internal | 98 } // namespace internal |
| 99 } // namespace v8 | 99 } // namespace v8 |
| 100 | 100 |
| 101 #endif // V8_INTERPRETER_INTERPRETER_H_ | 101 #endif // V8_INTERPRETER_INTERPRETER_H_ |
| OLD | NEW |