| OLD | NEW |
| 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 29 matching lines...) Expand all Loading... |
| 40 // -- x0 : number of arguments excluding receiver | 40 // -- x0 : number of arguments excluding receiver |
| 41 // -- x1 : target | 41 // -- x1 : target |
| 42 // -- x3 : new target | 42 // -- x3 : new target |
| 43 // -- sp[0] : last argument | 43 // -- sp[0] : last argument |
| 44 // -- ... | 44 // -- ... |
| 45 // -- sp[4 * (argc - 1)] : first argument | 45 // -- sp[4 * (argc - 1)] : first argument |
| 46 // -- sp[4 * argc] : receiver | 46 // -- sp[4 * argc] : receiver |
| 47 // ----------------------------------- | 47 // ----------------------------------- |
| 48 __ AssertFunction(x1); | 48 __ AssertFunction(x1); |
| 49 | 49 |
| 50 // Make sure we operate in the context of the called function (for example |
| 51 // ConstructStubs implemented in C++ will be run in the context of the caller |
| 52 // instead of the callee, due to the way that [[Construct]] is defined for |
| 53 // ordinary functions). |
| 54 __ Ldr(cp, FieldMemOperand(x1, JSFunction::kContextOffset)); |
| 55 |
| 50 // Insert extra arguments. | 56 // Insert extra arguments. |
| 51 int num_extra_args = 0; | 57 int num_extra_args = 0; |
| 52 switch (extra_args) { | 58 switch (extra_args) { |
| 53 case BuiltinExtraArguments::kTarget: | 59 case BuiltinExtraArguments::kTarget: |
| 54 __ Push(x1); | 60 __ Push(x1); |
| 55 ++num_extra_args; | 61 ++num_extra_args; |
| 56 break; | 62 break; |
| 57 case BuiltinExtraArguments::kNewTarget: | 63 case BuiltinExtraArguments::kNewTarget: |
| 58 __ Push(x3); | 64 __ Push(x3); |
| 59 ++num_extra_args; | 65 ++num_extra_args; |
| (...skipping 2339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2399 } | 2405 } |
| 2400 } | 2406 } |
| 2401 | 2407 |
| 2402 | 2408 |
| 2403 #undef __ | 2409 #undef __ |
| 2404 | 2410 |
| 2405 } // namespace internal | 2411 } // namespace internal |
| 2406 } // namespace v8 | 2412 } // namespace v8 |
| 2407 | 2413 |
| 2408 #endif // V8_TARGET_ARCH_ARM | 2414 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |