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 27 matching lines...) Expand all Loading... |
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|. | 42 // Return bytecode handler for |bytecode|. |
43 Code* GetBytecodeHandler(Bytecode bytecode); | 43 Code* GetBytecodeHandler(Bytecode bytecode); |
44 | 44 |
45 // GC support. | 45 // GC support. |
46 void IterateDispatchTable(ObjectVisitor* v); | 46 void IterateDispatchTable(ObjectVisitor* v); |
47 | 47 |
48 void TraceCodegen(Handle<Code> code, const char* name); | 48 // Disassembler support (only useful with ENABLE_DISASSEMBLER defined). |
| 49 void TraceCodegen(Handle<Code> code); |
| 50 const char* LookupNameOfBytecodeHandler(Code* code); |
49 | 51 |
50 Address dispatch_table_address() { | 52 Address dispatch_table_address() { |
51 return reinterpret_cast<Address>(&dispatch_table_[0]); | 53 return reinterpret_cast<Address>(&dispatch_table_[0]); |
52 } | 54 } |
53 | 55 |
54 private: | 56 private: |
55 // Bytecode handler generator functions. | 57 // Bytecode handler generator functions. |
56 #define DECLARE_BYTECODE_HANDLER_GENERATOR(Name, ...) \ | 58 #define DECLARE_BYTECODE_HANDLER_GENERATOR(Name, ...) \ |
57 void Do##Name(InterpreterAssembler* assembler); | 59 void Do##Name(InterpreterAssembler* assembler); |
58 BYTECODE_LIST(DECLARE_BYTECODE_HANDLER_GENERATOR) | 60 BYTECODE_LIST(DECLARE_BYTECODE_HANDLER_GENERATOR) |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 Code* dispatch_table_[kDispatchTableSize]; | 138 Code* dispatch_table_[kDispatchTableSize]; |
137 | 139 |
138 DISALLOW_COPY_AND_ASSIGN(Interpreter); | 140 DISALLOW_COPY_AND_ASSIGN(Interpreter); |
139 }; | 141 }; |
140 | 142 |
141 } // namespace interpreter | 143 } // namespace interpreter |
142 } // namespace internal | 144 } // namespace internal |
143 } // namespace v8 | 145 } // namespace v8 |
144 | 146 |
145 #endif // V8_INTERPRETER_INTERPRETER_H_ | 147 #endif // V8_INTERPRETER_INTERPRETER_H_ |
OLD | NEW |