| 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 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1687 | 1688 | 
| 1688   // ----------- S t a t e ------------- | 1689   // ----------- S t a t e ------------- | 
| 1689   //  -- a0 : the number of arguments (not including the receiver) | 1690   //  -- a0 : the number of arguments (not including the receiver) | 
| 1690   //  -- a1 : the function to call (checked to be a JSFunction) | 1691   //  -- a1 : the function to call (checked to be a JSFunction) | 
| 1691   //  -- a2 : the shared function info. | 1692   //  -- a2 : the shared function info. | 
| 1692   //  -- cp : the function context. | 1693   //  -- cp : the function context. | 
| 1693   // ----------------------------------- | 1694   // ----------------------------------- | 
| 1694 | 1695 | 
| 1695   __ lw(a2, | 1696   __ lw(a2, | 
| 1696         FieldMemOperand(a2, SharedFunctionInfo::kFormalParameterCountOffset)); | 1697         FieldMemOperand(a2, SharedFunctionInfo::kFormalParameterCountOffset)); | 
| 1697   __ ld(t0, FieldMemOperand(a1, JSFunction::kCodeEntryOffset)); |  | 
| 1698   ParameterCount actual(a0); | 1698   ParameterCount actual(a0); | 
| 1699   ParameterCount expected(a2); | 1699   ParameterCount expected(a2); | 
| 1700   __ InvokeCode(t0, no_reg, expected, actual, JUMP_FUNCTION, NullCallWrapper()); | 1700   __ InvokeFunctionCode(a1, no_reg, expected, actual, JUMP_FUNCTION, | 
|  | 1701                         CheckDebugStepCallWrapper()); | 
| 1701 | 1702 | 
| 1702   // The function is a "classConstructor", need to raise an exception. | 1703   // The function is a "classConstructor", need to raise an exception. | 
| 1703   __ bind(&class_constructor); | 1704   __ bind(&class_constructor); | 
| 1704   { | 1705   { | 
| 1705     FrameScope frame(masm, StackFrame::INTERNAL); | 1706     FrameScope frame(masm, StackFrame::INTERNAL); | 
| 1706     __ Push(a1); | 1707     __ Push(a1); | 
| 1707     __ CallRuntime(Runtime::kThrowConstructorNonCallableError, 1); | 1708     __ CallRuntime(Runtime::kThrowConstructorNonCallableError, 1); | 
| 1708   } | 1709   } | 
| 1709 } | 1710 } | 
| 1710 | 1711 | 
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1994   } | 1995   } | 
| 1995 } | 1996 } | 
| 1996 | 1997 | 
| 1997 | 1998 | 
| 1998 #undef __ | 1999 #undef __ | 
| 1999 | 2000 | 
| 2000 }  // namespace internal | 2001 }  // namespace internal | 
| 2001 }  // namespace v8 | 2002 }  // namespace v8 | 
| 2002 | 2003 | 
| 2003 #endif  // V8_TARGET_ARCH_MIPS64 | 2004 #endif  // V8_TARGET_ARCH_MIPS64 | 
| OLD | NEW | 
|---|