| 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_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 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 __ lw(t1, MemOperand(t0)); | 596 __ lw(t1, MemOperand(t0)); |
| 597 __ push(t1); | 597 __ push(t1); |
| 598 __ bind(&entry); | 598 __ bind(&entry); |
| 599 __ Addu(t4, t4, Operand(-2)); | 599 __ Addu(t4, t4, Operand(-2)); |
| 600 __ Branch(&loop, greater_equal, t4, Operand(zero_reg)); | 600 __ Branch(&loop, greater_equal, t4, Operand(zero_reg)); |
| 601 | 601 |
| 602 // Call the function. | 602 // Call the function. |
| 603 // a0: number of arguments | 603 // a0: number of arguments |
| 604 // a1: constructor function | 604 // a1: constructor function |
| 605 // a3: new target | 605 // a3: new target |
| 606 if (is_api_function) { | 606 ParameterCount actual(a0); |
| 607 __ lw(cp, FieldMemOperand(a1, JSFunction::kContextOffset)); | 607 __ InvokeFunction(a1, a3, actual, CALL_FUNCTION, |
| 608 Handle<Code> code = | 608 CheckDebugStepCallWrapper()); |
| 609 masm->isolate()->builtins()->HandleApiCallConstruct(); | |
| 610 __ Call(code, RelocInfo::CODE_TARGET); | |
| 611 } else { | |
| 612 ParameterCount actual(a0); | |
| 613 __ InvokeFunction(a1, a3, actual, CALL_FUNCTION, | |
| 614 CheckDebugStepCallWrapper()); | |
| 615 } | |
| 616 | 609 |
| 617 // Store offset of return address for deoptimizer. | 610 // Store offset of return address for deoptimizer. |
| 618 if (create_implicit_receiver && !is_api_function) { | 611 if (create_implicit_receiver && !is_api_function) { |
| 619 masm->isolate()->heap()->SetConstructStubDeoptPCOffset(masm->pc_offset()); | 612 masm->isolate()->heap()->SetConstructStubDeoptPCOffset(masm->pc_offset()); |
| 620 } | 613 } |
| 621 | 614 |
| 622 // Restore context from the frame. | 615 // Restore context from the frame. |
| 623 __ lw(cp, MemOperand(fp, ConstructFrameConstants::kContextOffset)); | 616 __ lw(cp, MemOperand(fp, ConstructFrameConstants::kContextOffset)); |
| 624 | 617 |
| 625 if (create_implicit_receiver) { | 618 if (create_implicit_receiver) { |
| (...skipping 2246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2872 } | 2865 } |
| 2873 } | 2866 } |
| 2874 | 2867 |
| 2875 | 2868 |
| 2876 #undef __ | 2869 #undef __ |
| 2877 | 2870 |
| 2878 } // namespace internal | 2871 } // namespace internal |
| 2879 } // namespace v8 | 2872 } // namespace v8 |
| 2880 | 2873 |
| 2881 #endif // V8_TARGET_ARCH_MIPS | 2874 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |