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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 | 60 |
61 Address dispatch_table_address() { | 61 Address dispatch_table_address() { |
62 return reinterpret_cast<Address>(&dispatch_table_[0]); | 62 return reinterpret_cast<Address>(&dispatch_table_[0]); |
63 } | 63 } |
64 | 64 |
65 Address bytecode_dispatch_counters_table() { | 65 Address bytecode_dispatch_counters_table() { |
66 return reinterpret_cast<Address>(bytecode_dispatch_counters_table_.get()); | 66 return reinterpret_cast<Address>(bytecode_dispatch_counters_table_.get()); |
67 } | 67 } |
68 | 68 |
69 // TODO(ignition): Tune code size multiplier. | 69 // TODO(ignition): Tune code size multiplier. |
70 static const int kCodeSizeMultiplier = 32; | 70 static const int kCodeSizeMultiplier = 72; |
71 | 71 |
72 private: | 72 private: |
73 // Bytecode handler generator functions. | 73 // Bytecode handler generator functions. |
74 #define DECLARE_BYTECODE_HANDLER_GENERATOR(Name, ...) \ | 74 #define DECLARE_BYTECODE_HANDLER_GENERATOR(Name, ...) \ |
75 void Do##Name(InterpreterAssembler* assembler); | 75 void Do##Name(InterpreterAssembler* assembler); |
76 BYTECODE_LIST(DECLARE_BYTECODE_HANDLER_GENERATOR) | 76 BYTECODE_LIST(DECLARE_BYTECODE_HANDLER_GENERATOR) |
77 #undef DECLARE_BYTECODE_HANDLER_GENERATOR | 77 #undef DECLARE_BYTECODE_HANDLER_GENERATOR |
78 | 78 |
79 // Generates code to perform the binary operation via |Generator|. | 79 // Generates code to perform the binary operation via |Generator|. |
80 template <class Generator> | 80 template <class Generator> |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 std::unique_ptr<uintptr_t[]> bytecode_dispatch_counters_table_; | 185 std::unique_ptr<uintptr_t[]> bytecode_dispatch_counters_table_; |
186 | 186 |
187 DISALLOW_COPY_AND_ASSIGN(Interpreter); | 187 DISALLOW_COPY_AND_ASSIGN(Interpreter); |
188 }; | 188 }; |
189 | 189 |
190 } // namespace interpreter | 190 } // namespace interpreter |
191 } // namespace internal | 191 } // namespace internal |
192 } // namespace v8 | 192 } // namespace v8 |
193 | 193 |
194 #endif // V8_INTERPRETER_INTERPRETER_H_ | 194 #endif // V8_INTERPRETER_INTERPRETER_H_ |
OLD | NEW |