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

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

Issue 1387543002: Revert of [Interpreter] Add CallRuntime support to the interpreter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | src/arm/code-stubs-arm.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 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_ARM 5 #if V8_TARGET_ARCH_ARM
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.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 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 __ LeaveFrame(StackFrame::JAVA_SCRIPT); 959 __ LeaveFrame(StackFrame::JAVA_SCRIPT);
960 960
961 // Drop receiver + arguments and return. 961 // Drop receiver + arguments and return.
962 __ ldr(ip, FieldMemOperand(kInterpreterBytecodeArrayRegister, 962 __ ldr(ip, FieldMemOperand(kInterpreterBytecodeArrayRegister,
963 BytecodeArray::kParameterSizeOffset)); 963 BytecodeArray::kParameterSizeOffset));
964 __ add(sp, sp, ip, LeaveCC); 964 __ add(sp, sp, ip, LeaveCC);
965 __ Jump(lr); 965 __ Jump(lr);
966 } 966 }
967 967
968 968
969 // static
970 void Builtins::Generate_InterpreterPushArgsAndCall(MacroAssembler* masm) {
971 // ----------- S t a t e -------------
972 // -- r0 : the number of arguments (not including the receiver)
973 // -- r2 : the address of the first argument to be pushed. Subsequent
974 // arguments should be consecutive above this, in the same order as
975 // they are to be pushed onto the stack.
976 // -- r1 : the target to call (can be any Object).
977
978 // Find the address of the last argument.
979 __ add(r3, r0, Operand(1)); // Add one for receiver.
980 __ mov(r3, Operand(r3, LSL, kPointerSizeLog2));
981 __ sub(r3, r2, r3);
982
983 // Push the arguments.
984 Label loop_header, loop_check;
985 __ b(al, &loop_check);
986 __ bind(&loop_header);
987 __ ldr(r4, MemOperand(r2, -kPointerSize, PostIndex));
988 __ push(r4);
989 __ bind(&loop_check);
990 __ cmp(r2, r3);
991 __ b(gt, &loop_header);
992
993 // Call the target.
994 __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
995 }
996
997
998 void Builtins::Generate_CompileLazy(MacroAssembler* masm) { 969 void Builtins::Generate_CompileLazy(MacroAssembler* masm) {
999 CallRuntimePassFunction(masm, Runtime::kCompileLazy); 970 CallRuntimePassFunction(masm, Runtime::kCompileLazy);
1000 GenerateTailCallToReturnedCode(masm); 971 GenerateTailCallToReturnedCode(masm);
1001 } 972 }
1002 973
1003 974
1004 static void CallCompileOptimized(MacroAssembler* masm, bool concurrent) { 975 static void CallCompileOptimized(MacroAssembler* masm, bool concurrent) {
1005 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); 976 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
1006 // Push a copy of the function onto the stack. 977 // Push a copy of the function onto the stack.
1007 __ push(r1); 978 __ push(r1);
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
1718 // method. 1689 // method.
1719 __ bind(&non_constructor); 1690 __ bind(&non_constructor);
1720 { 1691 {
1721 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); 1692 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
1722 __ Push(r1); 1693 __ Push(r1);
1723 __ CallRuntime(Runtime::kThrowCalledNonCallable, 1); 1694 __ CallRuntime(Runtime::kThrowCalledNonCallable, 1);
1724 } 1695 }
1725 } 1696 }
1726 1697
1727 1698
1699 // static
1700 void Builtins::Generate_PushArgsAndCall(MacroAssembler* masm) {
1701 // ----------- S t a t e -------------
1702 // -- r0 : the number of arguments (not including the receiver)
1703 // -- r2 : the address of the first argument to be pushed. Subsequent
1704 // arguments should be consecutive above this, in the same order as
1705 // they are to be pushed onto the stack.
1706 // -- r1 : the target to call (can be any Object).
1707
1708 // Find the address of the last argument.
1709 __ add(r3, r0, Operand(1)); // Add one for receiver.
1710 __ mov(r3, Operand(r3, LSL, kPointerSizeLog2));
1711 __ sub(r3, r2, r3);
1712
1713 // Push the arguments.
1714 Label loop_header, loop_check;
1715 __ b(al, &loop_check);
1716 __ bind(&loop_header);
1717 __ ldr(r4, MemOperand(r2, -kPointerSize, PostIndex));
1718 __ push(r4);
1719 __ bind(&loop_check);
1720 __ cmp(r2, r3);
1721 __ b(gt, &loop_header);
1722
1723 // Call the target.
1724 __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
1725 }
1726
1727
1728 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { 1728 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
1729 // ----------- S t a t e ------------- 1729 // ----------- S t a t e -------------
1730 // -- r0 : actual number of arguments 1730 // -- r0 : actual number of arguments
1731 // -- r1 : function (passed through to callee) 1731 // -- r1 : function (passed through to callee)
1732 // -- r2 : expected number of arguments 1732 // -- r2 : expected number of arguments
1733 // ----------------------------------- 1733 // -----------------------------------
1734 1734
1735 Label stack_overflow; 1735 Label stack_overflow;
1736 ArgumentAdaptorStackCheck(masm, &stack_overflow); 1736 ArgumentAdaptorStackCheck(masm, &stack_overflow);
1737 Label invoke, dont_adapt_arguments; 1737 Label invoke, dont_adapt_arguments;
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1868 } 1868 }
1869 } 1869 }
1870 1870
1871 1871
1872 #undef __ 1872 #undef __
1873 1873
1874 } // namespace internal 1874 } // namespace internal
1875 } // namespace v8 1875 } // namespace v8
1876 1876
1877 #endif // V8_TARGET_ARCH_ARM 1877 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/code-stubs-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698