| 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_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 13 matching lines...) Expand all Loading... |
| 24 // -- a0 : number of arguments excluding receiver | 24 // -- a0 : number of arguments excluding receiver |
| 25 // -- a1 : target | 25 // -- a1 : target |
| 26 // -- a3 : new.target | 26 // -- a3 : new.target |
| 27 // -- sp[0] : last argument | 27 // -- sp[0] : last argument |
| 28 // -- ... | 28 // -- ... |
| 29 // -- sp[8 * (argc - 1)] : first argument | 29 // -- sp[8 * (argc - 1)] : first argument |
| 30 // -- sp[8 * agrc] : receiver | 30 // -- sp[8 * agrc] : receiver |
| 31 // ----------------------------------- | 31 // ----------------------------------- |
| 32 __ AssertFunction(a1); | 32 __ AssertFunction(a1); |
| 33 | 33 |
| 34 // Make sure we operate in the context of the called function (for example |
| 35 // ConstructStubs implemented in C++ will be run in the context of the caller |
| 36 // instead of the callee, due to the way that [[Construct]] is defined for |
| 37 // ordinary functions). |
| 38 __ ld(cp, FieldMemOperand(a1, JSFunction::kContextOffset)); |
| 39 |
| 34 // Insert extra arguments. | 40 // Insert extra arguments. |
| 35 int num_extra_args = 0; | 41 int num_extra_args = 0; |
| 36 switch (extra_args) { | 42 switch (extra_args) { |
| 37 case BuiltinExtraArguments::kTarget: | 43 case BuiltinExtraArguments::kTarget: |
| 38 __ Push(a1); | 44 __ Push(a1); |
| 39 ++num_extra_args; | 45 ++num_extra_args; |
| 40 break; | 46 break; |
| 41 case BuiltinExtraArguments::kNewTarget: | 47 case BuiltinExtraArguments::kNewTarget: |
| 42 __ Push(a3); | 48 __ Push(a3); |
| 43 ++num_extra_args; | 49 ++num_extra_args; |
| (...skipping 2363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2407 } | 2413 } |
| 2408 } | 2414 } |
| 2409 | 2415 |
| 2410 | 2416 |
| 2411 #undef __ | 2417 #undef __ |
| 2412 | 2418 |
| 2413 } // namespace internal | 2419 } // namespace internal |
| 2414 } // namespace v8 | 2420 } // namespace v8 |
| 2415 | 2421 |
| 2416 #endif // V8_TARGET_ARCH_MIPS64 | 2422 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |