| 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 // Clients of this interface shouldn't depend on lots of interpreter internals. | 8 // Clients of this interface shouldn't depend on lots of interpreter internals. |
| 9 // Do not include anything from src/interpreter other than | 9 // Do not include anything from src/interpreter other than |
| 10 // src/interpreter/bytecodes.h here! | 10 // src/interpreter/bytecodes.h here! |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 class InterpreterAssembler; | 26 class InterpreterAssembler; |
| 27 | 27 |
| 28 class Interpreter { | 28 class Interpreter { |
| 29 public: | 29 public: |
| 30 explicit Interpreter(Isolate* isolate); | 30 explicit Interpreter(Isolate* isolate); |
| 31 virtual ~Interpreter() {} | 31 virtual ~Interpreter() {} |
| 32 | 32 |
| 33 // Initializes the interpreter dispatch table. | 33 // Initializes the interpreter dispatch table. |
| 34 void Initialize(); | 34 void Initialize(); |
| 35 | 35 |
| 36 // Returns the interrupt budget which should be used for the profiler counter. |
| 37 static int InterruptBudget(); |
| 38 |
| 36 // Generate bytecode for |info|. | 39 // Generate bytecode for |info|. |
| 37 static bool MakeBytecode(CompilationInfo* info); | 40 static bool MakeBytecode(CompilationInfo* info); |
| 38 | 41 |
| 39 // GC support. | 42 // GC support. |
| 40 void IterateDispatchTable(ObjectVisitor* v); | 43 void IterateDispatchTable(ObjectVisitor* v); |
| 41 | 44 |
| 42 void TraceCodegen(Handle<Code> code, const char* name); | 45 void TraceCodegen(Handle<Code> code, const char* name); |
| 43 | 46 |
| 44 Address dispatch_table_address() { | 47 Address dispatch_table_address() { |
| 45 return reinterpret_cast<Address>(&dispatch_table_[0]); | 48 return reinterpret_cast<Address>(&dispatch_table_[0]); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 Object* dispatch_table_[kDispatchTableSize]; | 127 Object* dispatch_table_[kDispatchTableSize]; |
| 125 | 128 |
| 126 DISALLOW_COPY_AND_ASSIGN(Interpreter); | 129 DISALLOW_COPY_AND_ASSIGN(Interpreter); |
| 127 }; | 130 }; |
| 128 | 131 |
| 129 } // namespace interpreter | 132 } // namespace interpreter |
| 130 } // namespace internal | 133 } // namespace internal |
| 131 } // namespace v8 | 134 } // namespace v8 |
| 132 | 135 |
| 133 #endif // V8_INTERPRETER_INTERPRETER_H_ | 136 #endif // V8_INTERPRETER_INTERPRETER_H_ |
| OLD | NEW |