OLD | NEW |
---|---|
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 17 matching lines...) Expand all Loading... | |
28 // -- sp[4 * argc] : receiver | 28 // -- sp[4 * argc] : receiver |
29 // ----------------------------------- | 29 // ----------------------------------- |
30 __ AssertFunction(r1); | 30 __ AssertFunction(r1); |
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 __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); | 36 __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); |
37 | 37 |
38 // Insert extra arguments. | |
39 const int num_extra_args = 2; | |
40 __ Push(r1, r3); | |
41 | |
42 // JumpToExternalReference expects r0 to contain the number of arguments | 38 // JumpToExternalReference expects r0 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 __ add(r0, r0, Operand(num_extra_args + 1)); | 41 __ add(r0, r0, Operand(num_extra_args + 1)); |
45 | 42 |
43 // Insert extra arguments. | |
44 __ SmiTag(r0); | |
Yang
2016/06/30 12:34:23
Since we now make the distinction between builtin-
jgruber
2016/06/30 14:40:29
Not without larger changes, since HandleApiCall* b
jgruber
2016/06/30 14:45:47
I guess we could also pass in whether we're callin
| |
45 __ Push(r0, r1, r3); | |
46 __ SmiUntag(r0); | |
47 | |
46 __ JumpToExternalReference(ExternalReference(id, masm->isolate()), | 48 __ JumpToExternalReference(ExternalReference(id, masm->isolate()), |
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 current native context. | 56 // Load the InternalArray function from the current native context. |
55 __ LoadNativeContextSlot(Context::INTERNAL_ARRAY_FUNCTION_INDEX, result); | 57 __ LoadNativeContextSlot(Context::INTERNAL_ARRAY_FUNCTION_INDEX, result); |
(...skipping 2822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2878 } | 2880 } |
2879 } | 2881 } |
2880 | 2882 |
2881 | 2883 |
2882 #undef __ | 2884 #undef __ |
2883 | 2885 |
2884 } // namespace internal | 2886 } // namespace internal |
2885 } // namespace v8 | 2887 } // namespace v8 |
2886 | 2888 |
2887 #endif // V8_TARGET_ARCH_ARM | 2889 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |