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

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

Issue 2106883003: [builtins] Add receiver to builtin exit frames (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments Created 4 years, 5 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/arm/builtins-arm.cc ('k') | src/builtins.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/deoptimizer.h" 10 #include "src/deoptimizer.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // -- sp[4 * argc] : receiver 44 // -- sp[4 * argc] : receiver
45 // ----------------------------------- 45 // -----------------------------------
46 __ AssertFunction(x1); 46 __ AssertFunction(x1);
47 47
48 // Make sure we operate in the context of the called function (for example 48 // Make sure we operate in the context of the called function (for example
49 // ConstructStubs implemented in C++ will be run in the context of the caller 49 // ConstructStubs implemented in C++ will be run in the context of the caller
50 // instead of the callee, due to the way that [[Construct]] is defined for 50 // instead of the callee, due to the way that [[Construct]] is defined for
51 // ordinary functions). 51 // ordinary functions).
52 __ Ldr(cp, FieldMemOperand(x1, JSFunction::kContextOffset)); 52 __ Ldr(cp, FieldMemOperand(x1, JSFunction::kContextOffset));
53 53
54 // Insert extra arguments.
55 const int num_extra_args = 2;
56 __ Push(x1, x3);
57
58 // JumpToExternalReference expects x0 to contain the number of arguments 54 // JumpToExternalReference expects x0 to contain the number of arguments
59 // including the receiver and the extra arguments. 55 // including the receiver and the extra arguments.
56 const int num_extra_args = 3;
60 __ Add(x0, x0, num_extra_args + 1); 57 __ Add(x0, x0, num_extra_args + 1);
61 58
59 // Insert extra arguments.
60 __ SmiTag(x0);
61 __ Push(x0, x1, x3);
62 __ SmiUntag(x0);
63
62 __ JumpToExternalReference(ExternalReference(id, masm->isolate()), 64 __ JumpToExternalReference(ExternalReference(id, masm->isolate()),
63 exit_frame_type == BUILTIN_EXIT); 65 exit_frame_type == BUILTIN_EXIT);
64 } 66 }
65 67
66 68
67 void Builtins::Generate_InternalArrayCode(MacroAssembler* masm) { 69 void Builtins::Generate_InternalArrayCode(MacroAssembler* masm) {
68 // ----------- S t a t e ------------- 70 // ----------- S t a t e -------------
69 // -- x0 : number of arguments 71 // -- x0 : number of arguments
70 // -- lr : return address 72 // -- lr : return address
71 // -- sp[...]: constructor arguments 73 // -- sp[...]: constructor arguments
(...skipping 2929 matching lines...) Expand 10 before | Expand all | Expand 10 after
3001 } 3003 }
3002 } 3004 }
3003 3005
3004 3006
3005 #undef __ 3007 #undef __
3006 3008
3007 } // namespace internal 3009 } // namespace internal
3008 } // namespace v8 3010 } // namespace v8
3009 3011
3010 #endif // V8_TARGET_ARCH_ARM 3012 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | src/builtins.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698