Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Side by Side Diff: src/interpreter/interpreter.h

Issue 2801073006: Decouple root visitors from object visitors. (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/scavenger.cc ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 9
10 // Clients of this interface shouldn't depend on lots of interpreter internals. 10 // Clients of this interface shouldn't depend on lots of interpreter internals.
11 // Do not include anything from src/interpreter other than 11 // Do not include anything from src/interpreter other than
12 // src/interpreter/bytecodes.h here! 12 // src/interpreter/bytecodes.h here!
13 #include "src/base/macros.h" 13 #include "src/base/macros.h"
14 #include "src/builtins/builtins.h" 14 #include "src/builtins/builtins.h"
15 #include "src/interpreter/bytecodes.h" 15 #include "src/interpreter/bytecodes.h"
16 #include "src/parsing/token.h" 16 #include "src/parsing/token.h"
17 #include "src/runtime/runtime.h" 17 #include "src/runtime/runtime.h"
18 18
19 namespace v8 { 19 namespace v8 {
20 namespace internal { 20 namespace internal {
21 21
22 class Isolate; 22 class Isolate;
23 class Callable; 23 class Callable;
24 class CompilationInfo; 24 class CompilationInfo;
25 class CompilationJob; 25 class CompilationJob;
26 class SetupIsolateDelegate; 26 class SetupIsolateDelegate;
27 class RootVisitor;
27 28
28 namespace interpreter { 29 namespace interpreter {
29 30
30 class InterpreterAssembler; 31 class InterpreterAssembler;
31 32
32 class Interpreter { 33 class Interpreter {
33 public: 34 public:
34 explicit Interpreter(Isolate* isolate); 35 explicit Interpreter(Isolate* isolate);
35 virtual ~Interpreter() {} 36 virtual ~Interpreter() {}
36 37
37 // Returns the interrupt budget which should be used for the profiler counter. 38 // Returns the interrupt budget which should be used for the profiler counter.
38 static int InterruptBudget(); 39 static int InterruptBudget();
39 40
40 // Creates a compilation job which will generate bytecode for |info|. 41 // Creates a compilation job which will generate bytecode for |info|.
41 static CompilationJob* NewCompilationJob(CompilationInfo* info); 42 static CompilationJob* NewCompilationJob(CompilationInfo* info);
42 43
43 // Return bytecode handler for |bytecode|. 44 // Return bytecode handler for |bytecode|.
44 Code* GetBytecodeHandler(Bytecode bytecode, OperandScale operand_scale); 45 Code* GetBytecodeHandler(Bytecode bytecode, OperandScale operand_scale);
45 46
46 // GC support. 47 // GC support.
47 void IterateDispatchTable(ObjectVisitor* v); 48 void IterateDispatchTable(RootVisitor* v);
48 49
49 // Disassembler support (only useful with ENABLE_DISASSEMBLER defined). 50 // Disassembler support (only useful with ENABLE_DISASSEMBLER defined).
50 const char* LookupNameOfBytecodeHandler(Code* code); 51 const char* LookupNameOfBytecodeHandler(Code* code);
51 52
52 V8_EXPORT_PRIVATE Local<v8::Object> GetDispatchCountersObject(); 53 V8_EXPORT_PRIVATE Local<v8::Object> GetDispatchCountersObject();
53 54
54 Address dispatch_table_address() { 55 Address dispatch_table_address() {
55 return reinterpret_cast<Address>(&dispatch_table_[0]); 56 return reinterpret_cast<Address>(&dispatch_table_[0]);
56 } 57 }
57 58
(...skipping 25 matching lines...) Expand all
83 std::unique_ptr<uintptr_t[]> bytecode_dispatch_counters_table_; 84 std::unique_ptr<uintptr_t[]> bytecode_dispatch_counters_table_;
84 85
85 DISALLOW_COPY_AND_ASSIGN(Interpreter); 86 DISALLOW_COPY_AND_ASSIGN(Interpreter);
86 }; 87 };
87 88
88 } // namespace interpreter 89 } // namespace interpreter
89 } // namespace internal 90 } // namespace internal
90 } // namespace v8 91 } // namespace v8
91 92
92 #endif // V8_INTERPRETER_INTERPRETER_H_ 93 #endif // V8_INTERPRETER_INTERPRETER_H_
OLDNEW
« no previous file with comments | « src/heap/scavenger.cc ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698