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 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 __ ld(a5, MemOperand(a4)); | 585 __ ld(a5, MemOperand(a4)); |
586 __ push(a5); | 586 __ push(a5); |
587 __ bind(&entry); | 587 __ bind(&entry); |
588 __ Daddu(t0, t0, Operand(-1)); | 588 __ Daddu(t0, t0, Operand(-1)); |
589 __ Branch(&loop, greater_equal, t0, Operand(zero_reg)); | 589 __ Branch(&loop, greater_equal, t0, Operand(zero_reg)); |
590 | 590 |
591 // Call the function. | 591 // Call the function. |
592 // a0: number of arguments | 592 // a0: number of arguments |
593 // a1: constructor function | 593 // a1: constructor function |
594 // a3: new target | 594 // a3: new target |
595 if (is_api_function) { | 595 ParameterCount actual(a0); |
596 __ ld(cp, FieldMemOperand(a1, JSFunction::kContextOffset)); | 596 __ InvokeFunction(a1, a3, actual, CALL_FUNCTION, |
597 Handle<Code> code = | 597 CheckDebugStepCallWrapper()); |
598 masm->isolate()->builtins()->HandleApiCallConstruct(); | |
599 __ Call(code, RelocInfo::CODE_TARGET); | |
600 } else { | |
601 ParameterCount actual(a0); | |
602 __ InvokeFunction(a1, a3, actual, CALL_FUNCTION, | |
603 CheckDebugStepCallWrapper()); | |
604 } | |
605 | 598 |
606 // Store offset of return address for deoptimizer. | 599 // Store offset of return address for deoptimizer. |
607 if (create_implicit_receiver && !is_api_function) { | 600 if (create_implicit_receiver && !is_api_function) { |
608 masm->isolate()->heap()->SetConstructStubDeoptPCOffset(masm->pc_offset()); | 601 masm->isolate()->heap()->SetConstructStubDeoptPCOffset(masm->pc_offset()); |
609 } | 602 } |
610 | 603 |
611 // Restore context from the frame. | 604 // Restore context from the frame. |
612 __ ld(cp, MemOperand(fp, ConstructFrameConstants::kContextOffset)); | 605 __ ld(cp, MemOperand(fp, ConstructFrameConstants::kContextOffset)); |
613 | 606 |
614 if (create_implicit_receiver) { | 607 if (create_implicit_receiver) { |
(...skipping 2247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2862 } | 2855 } |
2863 } | 2856 } |
2864 | 2857 |
2865 | 2858 |
2866 #undef __ | 2859 #undef __ |
2867 | 2860 |
2868 } // namespace internal | 2861 } // namespace internal |
2869 } // namespace v8 | 2862 } // namespace v8 |
2870 | 2863 |
2871 #endif // V8_TARGET_ARCH_MIPS64 | 2864 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |