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> |
| 9 |
8 // 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. |
9 // Do not include anything from src/interpreter other than | 11 // Do not include anything from src/interpreter other than |
10 // src/interpreter/bytecodes.h here! | 12 // src/interpreter/bytecodes.h here! |
11 #include "src/base/macros.h" | 13 #include "src/base/macros.h" |
12 #include "src/builtins/builtins.h" | 14 #include "src/builtins/builtins.h" |
13 #include "src/interpreter/bytecodes.h" | 15 #include "src/interpreter/bytecodes.h" |
14 #include "src/parsing/token.h" | 16 #include "src/parsing/token.h" |
15 #include "src/runtime/runtime.h" | 17 #include "src/runtime/runtime.h" |
16 | 18 |
17 namespace v8 { | 19 namespace v8 { |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 OperandScale operand_scale); | 166 OperandScale operand_scale); |
165 | 167 |
166 bool IsDispatchTableInitialized(); | 168 bool IsDispatchTableInitialized(); |
167 | 169 |
168 static const int kNumberOfWideVariants = 3; | 170 static const int kNumberOfWideVariants = 3; |
169 static const int kDispatchTableSize = kNumberOfWideVariants * (kMaxUInt8 + 1); | 171 static const int kDispatchTableSize = kNumberOfWideVariants * (kMaxUInt8 + 1); |
170 static const int kNumberOfBytecodes = static_cast<int>(Bytecode::kLast) + 1; | 172 static const int kNumberOfBytecodes = static_cast<int>(Bytecode::kLast) + 1; |
171 | 173 |
172 Isolate* isolate_; | 174 Isolate* isolate_; |
173 Address dispatch_table_[kDispatchTableSize]; | 175 Address dispatch_table_[kDispatchTableSize]; |
174 v8::base::SmartArrayPointer<uintptr_t> bytecode_dispatch_counters_table_; | 176 std::unique_ptr<uintptr_t[]> bytecode_dispatch_counters_table_; |
175 | 177 |
176 DISALLOW_COPY_AND_ASSIGN(Interpreter); | 178 DISALLOW_COPY_AND_ASSIGN(Interpreter); |
177 }; | 179 }; |
178 | 180 |
179 } // namespace interpreter | 181 } // namespace interpreter |
180 } // namespace internal | 182 } // namespace internal |
181 } // namespace v8 | 183 } // namespace v8 |
182 | 184 |
183 #endif // V8_INTERPRETER_INTERPRETER_H_ | 185 #endif // V8_INTERPRETER_INTERPRETER_H_ |
OLD | NEW |