Chromium Code Reviews| Index: src/interpreter/interpreter.h |
| diff --git a/src/interpreter/interpreter.h b/src/interpreter/interpreter.h |
| index 155b2b5abee577c3517f97031259907aec21cd15..b2023d50ee3dfa14363af8a1b3c85bcc6e73acaf 100644 |
| --- a/src/interpreter/interpreter.h |
| +++ b/src/interpreter/interpreter.h |
| @@ -49,14 +49,16 @@ class Interpreter { |
| void TraceCodegen(Handle<Code> code); |
| const char* LookupNameOfBytecodeHandler(Code* code); |
| - void WriteDispatchCounters(); |
| + uintptr_t GetDispatchCounter(Bytecode from, Bytecode to) const; |
|
rmcilroy
2016/04/25 13:05:45
This can be private
Stefano Sanfilippo
2016/04/25 13:24:07
Done.
|
| + |
| + Local<v8::Object> GetDispatchCountersObject(); |
| Address dispatch_table_address() { |
| return reinterpret_cast<Address>(&dispatch_table_[0]); |
| } |
| - uintptr_t* bytecode_dispatch_count_table() { |
| - return bytecode_dispatch_count_table_.get(); |
| + Address bytecode_dispatch_counters_table() { |
| + return reinterpret_cast<Address>(bytecode_dispatch_counters_table_.get()); |
| } |
| private: |
| @@ -144,10 +146,11 @@ class Interpreter { |
| static const int kNumberOfWideVariants = 3; |
| static const int kDispatchTableSize = kNumberOfWideVariants * (kMaxUInt8 + 1); |
| + static const int kNumberOfBytecodes = static_cast<int>(Bytecode::kLast) + 1; |
| Isolate* isolate_; |
| Address dispatch_table_[kDispatchTableSize]; |
| - v8::base::SmartArrayPointer<uintptr_t> bytecode_dispatch_count_table_; |
| + v8::base::SmartArrayPointer<uintptr_t> bytecode_dispatch_counters_table_; |
| DISALLOW_COPY_AND_ASSIGN(Interpreter); |
| }; |