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 21 matching lines...) Expand all Loading... |
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. | 36 // Returns the interrupt budget which should be used for the profiler counter. |
37 static int InterruptBudget(); | 37 static int InterruptBudget(); |
38 | 38 |
39 // Generate bytecode for |info|. | 39 // Generate bytecode for |info|. |
40 static bool MakeBytecode(CompilationInfo* info); | 40 static bool MakeBytecode(CompilationInfo* info); |
41 | 41 |
| 42 // Return bytecode handler for |bytecode|. |
| 43 Code* GetBytecodeHandler(Bytecode bytecode); |
| 44 |
42 // GC support. | 45 // GC support. |
43 void IterateDispatchTable(ObjectVisitor* v); | 46 void IterateDispatchTable(ObjectVisitor* v); |
44 | 47 |
45 void TraceCodegen(Handle<Code> code, const char* name); | 48 void TraceCodegen(Handle<Code> code, const char* name); |
46 | 49 |
47 Address dispatch_table_address() { | 50 Address dispatch_table_address() { |
48 return reinterpret_cast<Address>(&dispatch_table_[0]); | 51 return reinterpret_cast<Address>(&dispatch_table_[0]); |
49 } | 52 } |
50 | 53 |
51 private: | 54 private: |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 120 |
118 // Generates code to perform a lookup slot store depending on |language_mode|. | 121 // Generates code to perform a lookup slot store depending on |language_mode|. |
119 void DoStoreLookupSlot(LanguageMode language_mode, | 122 void DoStoreLookupSlot(LanguageMode language_mode, |
120 InterpreterAssembler* assembler); | 123 InterpreterAssembler* assembler); |
121 | 124 |
122 bool IsDispatchTableInitialized(); | 125 bool IsDispatchTableInitialized(); |
123 | 126 |
124 static const int kDispatchTableSize = static_cast<int>(Bytecode::kLast) + 1; | 127 static const int kDispatchTableSize = static_cast<int>(Bytecode::kLast) + 1; |
125 | 128 |
126 Isolate* isolate_; | 129 Isolate* isolate_; |
127 Object* dispatch_table_[kDispatchTableSize]; | 130 Code* dispatch_table_[kDispatchTableSize]; |
128 | 131 |
129 DISALLOW_COPY_AND_ASSIGN(Interpreter); | 132 DISALLOW_COPY_AND_ASSIGN(Interpreter); |
130 }; | 133 }; |
131 | 134 |
132 } // namespace interpreter | 135 } // namespace interpreter |
133 } // namespace internal | 136 } // namespace internal |
134 } // namespace v8 | 137 } // namespace v8 |
135 | 138 |
136 #endif // V8_INTERPRETER_INTERPRETER_H_ | 139 #endif // V8_INTERPRETER_INTERPRETER_H_ |
OLD | NEW |