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

Side by Side Diff: src/mips64/builtins-mips64.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/mips/builtins-mips.cc ('k') | src/x64/builtins-x64.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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
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 17 matching lines...) Expand all
28 // -- sp[8 * agrc] : receiver 28 // -- sp[8 * agrc] : receiver
29 // ----------------------------------- 29 // -----------------------------------
30 __ AssertFunction(a1); 30 __ AssertFunction(a1);
31 31
32 // Make sure we operate in the context of the called function (for example 32 // Make sure we operate in the context of the called function (for example
33 // ConstructStubs implemented in C++ will be run in the context of the caller 33 // ConstructStubs implemented in C++ will be run in the context of the caller
34 // instead of the callee, due to the way that [[Construct]] is defined for 34 // instead of the callee, due to the way that [[Construct]] is defined for
35 // ordinary functions). 35 // ordinary functions).
36 __ ld(cp, FieldMemOperand(a1, JSFunction::kContextOffset)); 36 __ ld(cp, FieldMemOperand(a1, JSFunction::kContextOffset));
37 37
38 // Insert extra arguments.
39 const int num_extra_args = 2;
40 __ Push(a1, a3);
41
42 // JumpToExternalReference expects a0 to contain the number of arguments 38 // JumpToExternalReference expects a0 to contain the number of arguments
43 // including the receiver and the extra arguments. 39 // including the receiver and the extra arguments.
40 const int num_extra_args = 3;
44 __ Daddu(a0, a0, num_extra_args + 1); 41 __ Daddu(a0, a0, num_extra_args + 1);
45 42
43 // Insert extra arguments.
44 __ SmiTag(a0);
45 __ Push(a0, a1, a3);
46 __ SmiUntag(a0);
47
46 __ JumpToExternalReference(ExternalReference(id, masm->isolate()), PROTECT, 48 __ JumpToExternalReference(ExternalReference(id, masm->isolate()), PROTECT,
47 exit_frame_type == BUILTIN_EXIT); 49 exit_frame_type == BUILTIN_EXIT);
48 } 50 }
49 51
50 52
51 // Load the built-in InternalArray function from the current context. 53 // Load the built-in InternalArray function from the current context.
52 static void GenerateLoadInternalArrayFunction(MacroAssembler* masm, 54 static void GenerateLoadInternalArrayFunction(MacroAssembler* masm,
53 Register result) { 55 Register result) {
54 // Load the InternalArray function from the native context. 56 // Load the InternalArray function from the native context.
55 __ LoadNativeContextSlot(Context::INTERNAL_ARRAY_FUNCTION_INDEX, result); 57 __ LoadNativeContextSlot(Context::INTERNAL_ARRAY_FUNCTION_INDEX, result);
(...skipping 2904 matching lines...) Expand 10 before | Expand all | Expand 10 after
2960 } 2962 }
2961 } 2963 }
2962 2964
2963 2965
2964 #undef __ 2966 #undef __
2965 2967
2966 } // namespace internal 2968 } // namespace internal
2967 } // namespace v8 2969 } // namespace v8
2968 2970
2969 #endif // V8_TARGET_ARCH_MIPS64 2971 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/builtins-mips.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698