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> | 8 #include <memory> |
9 #include <vector> | |
9 | 10 |
10 // Clients of this interface shouldn't depend on lots of interpreter internals. | 11 // Clients of this interface shouldn't depend on lots of interpreter internals. |
11 // Do not include anything from src/interpreter other than | 12 // Do not include anything from src/interpreter other than |
12 // src/interpreter/bytecodes.h here! | 13 // src/interpreter/bytecodes.h here! |
13 #include "src/base/macros.h" | 14 #include "src/base/macros.h" |
14 #include "src/builtins/builtins.h" | 15 #include "src/builtins/builtins.h" |
15 #include "src/interpreter/bytecodes.h" | 16 #include "src/interpreter/bytecodes.h" |
16 #include "src/parsing/token.h" | 17 #include "src/parsing/token.h" |
17 #include "src/runtime/runtime.h" | 18 #include "src/runtime/runtime.h" |
18 | 19 |
(...skipping 18 matching lines...) Expand all Loading... | |
37 explicit Interpreter(Isolate* isolate); | 38 explicit Interpreter(Isolate* isolate); |
38 virtual ~Interpreter() {} | 39 virtual ~Interpreter() {} |
39 | 40 |
40 // Initializes the interpreter dispatch table. | 41 // Initializes the interpreter dispatch table. |
41 void Initialize(); | 42 void Initialize(); |
42 | 43 |
43 // Returns the interrupt budget which should be used for the profiler counter. | 44 // Returns the interrupt budget which should be used for the profiler counter. |
44 static int InterruptBudget(); | 45 static int InterruptBudget(); |
45 | 46 |
46 // Creates a compilation job which will generate bytecode for |info|. | 47 // Creates a compilation job which will generate bytecode for |info|. |
47 static CompilationJob* NewCompilationJob(CompilationInfo* info); | 48 static std::vector<std::unique_ptr<CompilationJob>> NewCompilationJob( |
rmcilroy
2016/10/07 14:26:34
nit - Jobs and update the comment.
| |
49 CompilationInfo* info); | |
48 | 50 |
49 // Return bytecode handler for |bytecode|. | 51 // Return bytecode handler for |bytecode|. |
50 Code* GetBytecodeHandler(Bytecode bytecode, OperandScale operand_scale); | 52 Code* GetBytecodeHandler(Bytecode bytecode, OperandScale operand_scale); |
51 | 53 |
52 // GC support. | 54 // GC support. |
53 void IterateDispatchTable(ObjectVisitor* v); | 55 void IterateDispatchTable(ObjectVisitor* v); |
54 | 56 |
55 // Disassembler support (only useful with ENABLE_DISASSEMBLER defined). | 57 // Disassembler support (only useful with ENABLE_DISASSEMBLER defined). |
56 void TraceCodegen(Handle<Code> code); | 58 void TraceCodegen(Handle<Code> code); |
57 const char* LookupNameOfBytecodeHandler(Code* code); | 59 const char* LookupNameOfBytecodeHandler(Code* code); |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
185 std::unique_ptr<uintptr_t[]> bytecode_dispatch_counters_table_; | 187 std::unique_ptr<uintptr_t[]> bytecode_dispatch_counters_table_; |
186 | 188 |
187 DISALLOW_COPY_AND_ASSIGN(Interpreter); | 189 DISALLOW_COPY_AND_ASSIGN(Interpreter); |
188 }; | 190 }; |
189 | 191 |
190 } // namespace interpreter | 192 } // namespace interpreter |
191 } // namespace internal | 193 } // namespace internal |
192 } // namespace v8 | 194 } // namespace v8 |
193 | 195 |
194 #endif // V8_INTERPRETER_INTERPRETER_H_ | 196 #endif // V8_INTERPRETER_INTERPRETER_H_ |
OLD | NEW |