| 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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 // a0: number of arguments | 565 // a0: number of arguments |
| 566 // a1: constructor function | 566 // a1: constructor function |
| 567 // a3: new target | 567 // a3: new target |
| 568 if (is_api_function) { | 568 if (is_api_function) { |
| 569 __ ld(cp, FieldMemOperand(a1, JSFunction::kContextOffset)); | 569 __ ld(cp, FieldMemOperand(a1, JSFunction::kContextOffset)); |
| 570 Handle<Code> code = | 570 Handle<Code> code = |
| 571 masm->isolate()->builtins()->HandleApiCallConstruct(); | 571 masm->isolate()->builtins()->HandleApiCallConstruct(); |
| 572 __ Call(code, RelocInfo::CODE_TARGET); | 572 __ Call(code, RelocInfo::CODE_TARGET); |
| 573 } else { | 573 } else { |
| 574 ParameterCount actual(a0); | 574 ParameterCount actual(a0); |
| 575 __ InvokeFunction(a1, a3, actual, CALL_FUNCTION, | 575 __ InvokeFunction(a1, a3, actual, CALL_FUNCTION, NullCallWrapper()); |
| 576 CheckDebugStepCallWrapper()); | |
| 577 } | 576 } |
| 578 | 577 |
| 579 // Store offset of return address for deoptimizer. | 578 // Store offset of return address for deoptimizer. |
| 580 if (create_implicit_receiver && !is_api_function) { | 579 if (create_implicit_receiver && !is_api_function) { |
| 581 masm->isolate()->heap()->SetConstructStubDeoptPCOffset(masm->pc_offset()); | 580 masm->isolate()->heap()->SetConstructStubDeoptPCOffset(masm->pc_offset()); |
| 582 } | 581 } |
| 583 | 582 |
| 584 // Restore context from the frame. | 583 // Restore context from the frame. |
| 585 __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 584 __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 586 | 585 |
| (...skipping 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1686 | 1685 |
| 1687 // ----------- S t a t e ------------- | 1686 // ----------- S t a t e ------------- |
| 1688 // -- a0 : the number of arguments (not including the receiver) | 1687 // -- a0 : the number of arguments (not including the receiver) |
| 1689 // -- a1 : the function to call (checked to be a JSFunction) | 1688 // -- a1 : the function to call (checked to be a JSFunction) |
| 1690 // -- a2 : the shared function info. | 1689 // -- a2 : the shared function info. |
| 1691 // -- cp : the function context. | 1690 // -- cp : the function context. |
| 1692 // ----------------------------------- | 1691 // ----------------------------------- |
| 1693 | 1692 |
| 1694 __ lw(a2, | 1693 __ lw(a2, |
| 1695 FieldMemOperand(a2, SharedFunctionInfo::kFormalParameterCountOffset)); | 1694 FieldMemOperand(a2, SharedFunctionInfo::kFormalParameterCountOffset)); |
| 1695 __ ld(t0, FieldMemOperand(a1, JSFunction::kCodeEntryOffset)); |
| 1696 ParameterCount actual(a0); | 1696 ParameterCount actual(a0); |
| 1697 ParameterCount expected(a2); | 1697 ParameterCount expected(a2); |
| 1698 __ InvokeFunctionCode(a1, no_reg, expected, actual, JUMP_FUNCTION, | 1698 __ InvokeCode(t0, no_reg, expected, actual, JUMP_FUNCTION, NullCallWrapper()); |
| 1699 CheckDebugStepCallWrapper()); | |
| 1700 | 1699 |
| 1701 // The function is a "classConstructor", need to raise an exception. | 1700 // The function is a "classConstructor", need to raise an exception. |
| 1702 __ bind(&class_constructor); | 1701 __ bind(&class_constructor); |
| 1703 { | 1702 { |
| 1704 FrameScope frame(masm, StackFrame::INTERNAL); | 1703 FrameScope frame(masm, StackFrame::INTERNAL); |
| 1705 __ Push(a1); | 1704 __ Push(a1); |
| 1706 __ CallRuntime(Runtime::kThrowConstructorNonCallableError, 1); | 1705 __ CallRuntime(Runtime::kThrowConstructorNonCallableError, 1); |
| 1707 } | 1706 } |
| 1708 } | 1707 } |
| 1709 | 1708 |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1993 } | 1992 } |
| 1994 } | 1993 } |
| 1995 | 1994 |
| 1996 | 1995 |
| 1997 #undef __ | 1996 #undef __ |
| 1998 | 1997 |
| 1999 } // namespace internal | 1998 } // namespace internal |
| 2000 } // namespace v8 | 1999 } // namespace v8 |
| 2001 | 2000 |
| 2002 #endif // V8_TARGET_ARCH_MIPS64 | 2001 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |