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