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

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

Powered by Google App Engine
This is Rietveld 408576698