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

Side by Side Diff: src/ia32/builtins-ia32.cc

Issue 1294133004: [Interpreter] Pass context to interpreter bytecode handlers and add LoadConstextSlot (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #if V8_TARGET_ARCH_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 Immediate(kPointerSize + StandardFrameConstants::kFixedFrameSizeFromFp)); 718 Immediate(kPointerSize + StandardFrameConstants::kFixedFrameSizeFromFp));
719 __ mov(kInterpreterBytecodeOffsetRegister, 719 __ mov(kInterpreterBytecodeOffsetRegister,
720 Immediate(BytecodeArray::kHeaderSize - kHeapObjectTag)); 720 Immediate(BytecodeArray::kHeaderSize - kHeapObjectTag));
721 // Since the dispatch table root might be set after builtins are generated, 721 // Since the dispatch table root might be set after builtins are generated,
722 // load directly from the roots table. 722 // load directly from the roots table.
723 __ LoadRoot(kInterpreterDispatchTableRegister, 723 __ LoadRoot(kInterpreterDispatchTableRegister,
724 Heap::kInterpreterTableRootIndex); 724 Heap::kInterpreterTableRootIndex);
725 __ add(kInterpreterDispatchTableRegister, 725 __ add(kInterpreterDispatchTableRegister,
726 Immediate(FixedArray::kHeaderSize - kHeapObjectTag)); 726 Immediate(FixedArray::kHeaderSize - kHeapObjectTag));
727 727
728 // TODO(rmcilroy) Push our context as a stack located parameter of the 728 // Push context as a stack located parameter to the bytecode handler.
729 // bytecode handler. 729 DCHECK_EQ(-1, kInterpreterContextSpillSlot);
730 __ push(esi);
730 731
731 // Dispatch to the first bytecode handler for the function. 732 // Dispatch to the first bytecode handler for the function.
732 __ movzx_b(esi, Operand(kInterpreterBytecodeArrayRegister, 733 __ movzx_b(esi, Operand(kInterpreterBytecodeArrayRegister,
733 kInterpreterBytecodeOffsetRegister, times_1, 0)); 734 kInterpreterBytecodeOffsetRegister, times_1, 0));
734 __ mov(esi, Operand(kInterpreterDispatchTableRegister, esi, 735 __ mov(esi, Operand(kInterpreterDispatchTableRegister, esi,
735 times_pointer_size, 0)); 736 times_pointer_size, 0));
736 // TODO(rmcilroy): Make dispatch table point to code entrys to avoid untagging 737 // TODO(rmcilroy): Make dispatch table point to code entrys to avoid untagging
737 // and header removal. 738 // and header removal.
738 __ add(esi, Immediate(Code::kHeaderSize - kHeapObjectTag)); 739 __ add(esi, Immediate(Code::kHeaderSize - kHeapObjectTag));
739 __ call(esi); 740 __ call(esi);
(...skipping 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after
1781 1782
1782 __ bind(&ok); 1783 __ bind(&ok);
1783 __ ret(0); 1784 __ ret(0);
1784 } 1785 }
1785 1786
1786 #undef __ 1787 #undef __
1787 } // namespace internal 1788 } // namespace internal
1788 } // namespace v8 1789 } // namespace v8
1789 1790
1790 #endif // V8_TARGET_ARCH_IA32 1791 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698