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

Unified Diff: src/ia32/builtins-ia32.cc

Issue 1671813003: [interpreter] move the dispatch table off heap. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
Index: src/ia32/builtins-ia32.cc
diff --git a/src/ia32/builtins-ia32.cc b/src/ia32/builtins-ia32.cc
index 0b75c4e83e0acf2a84b03a2193d048fef5a6fcce..ff9dc155f30b4633227b2af339a2c9511db45e74 100644
--- a/src/ia32/builtins-ia32.cc
+++ b/src/ia32/builtins-ia32.cc
@@ -608,10 +608,8 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
Immediate(InterpreterFrameConstants::kRegisterFilePointerFromFp));
__ mov(kInterpreterBytecodeOffsetRegister,
Immediate(BytecodeArray::kHeaderSize - kHeapObjectTag));
- // Since the dispatch table root might be set after builtins are generated,
- // load directly from the roots table.
- __ LoadRoot(ebx, Heap::kInterpreterTableRootIndex);
- __ add(ebx, Immediate(FixedArray::kHeaderSize - kHeapObjectTag));
+ __ mov(ebx, Immediate(ExternalReference::interpreter_dispatch_table_address(
+ masm->isolate())));
// Push dispatch table as a stack located parameter to the bytecode handler.
DCHECK_EQ(-1, kInterpreterDispatchTableSpillSlot);
@@ -773,8 +771,8 @@ static void Generate_EnterBytecodeDispatch(MacroAssembler* masm) {
__ SmiUntag(kInterpreterBytecodeOffsetRegister);
// Push dispatch table as a stack located parameter to the bytecode handler.
- __ LoadRoot(ebx, Heap::kInterpreterTableRootIndex);
- __ add(ebx, Immediate(FixedArray::kHeaderSize - kHeapObjectTag));
+ __ mov(ebx, Immediate(ExternalReference::interpreter_dispatch_table_address(
+ masm->isolate())));
DCHECK_EQ(-1, kInterpreterDispatchTableSpillSlot);
__ Pop(esi);
__ Push(ebx);

Powered by Google App Engine
This is Rietveld 408576698