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

Unified Diff: src/interpreter/interpreter.h

Issue 1671813003: [interpreter] move the dispatch table off heap. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix verify heap Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/interpreter.h
diff --git a/src/interpreter/interpreter.h b/src/interpreter/interpreter.h
index 6075df835f30d6d7f4332d07fcbe0cd8c5ba2d75..1a3143b02d8f5af69af1497e855932a63eb76885 100644
--- a/src/interpreter/interpreter.h
+++ b/src/interpreter/interpreter.h
@@ -32,17 +32,19 @@ class Interpreter {
explicit Interpreter(Isolate* isolate);
virtual ~Interpreter() {}
- // Creates an uninitialized interpreter handler table, where each handler
- // points to the Illegal builtin.
- static Handle<FixedArray> CreateUninitializedInterpreterTable(
- Isolate* isolate);
-
- // Initializes the interpreter.
+ // Initializes the interpreter dispatch table.
void Initialize();
// Generate bytecode for |info|.
static bool MakeBytecode(CompilationInfo* info);
+ // GC support.
+ void IterateDispatchTable(ObjectVisitor* v);
+
+ Address dispatch_table_address() {
+ return reinterpret_cast<Address>(&dispatch_table_[0]);
+ }
+
private:
// Bytecode handler generator functions.
#define DECLARE_BYTECODE_HANDLER_GENERATOR(Name, ...) \
@@ -115,9 +117,12 @@ class Interpreter {
void DoStoreLookupSlot(LanguageMode language_mode,
compiler::InterpreterAssembler* assembler);
- bool IsInterpreterTableInitialized(Handle<FixedArray> handler_table);
+ bool IsDispatchTableInitialized();
+
+ static const int kDispatchTableSize = static_cast<int>(Bytecode::kLast) + 1;
Isolate* isolate_;
+ Object* dispatch_table_[kDispatchTableSize];
DISALLOW_COPY_AND_ASSIGN(Interpreter);
};
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698