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 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1618 __ dsll(at, a0, kPointerSizeLog2); | 1618 __ dsll(at, a0, kPointerSizeLog2); |
1619 __ daddu(at, sp, at); | 1619 __ daddu(at, sp, at); |
1620 __ sd(a1, MemOperand(at)); | 1620 __ sd(a1, MemOperand(at)); |
1621 // Let the "call_as_function_delegate" take care of the rest. | 1621 // Let the "call_as_function_delegate" take care of the rest. |
1622 __ LoadGlobalFunction(Context::CALL_AS_FUNCTION_DELEGATE_INDEX, a1); | 1622 __ LoadGlobalFunction(Context::CALL_AS_FUNCTION_DELEGATE_INDEX, a1); |
1623 __ Jump(masm->isolate()->builtins()->CallFunction(), RelocInfo::CODE_TARGET); | 1623 __ Jump(masm->isolate()->builtins()->CallFunction(), RelocInfo::CODE_TARGET); |
1624 | 1624 |
1625 // 3. Call to something that is not callable. | 1625 // 3. Call to something that is not callable. |
1626 __ bind(&non_callable); | 1626 __ bind(&non_callable); |
1627 { | 1627 { |
1628 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); | 1628 FrameScope scope(masm, StackFrame::INTERNAL); |
1629 __ Push(a1); | 1629 __ Push(a1); |
1630 __ CallRuntime(Runtime::kThrowCalledNonCallable, 1); | 1630 __ CallRuntime(Runtime::kThrowCalledNonCallable, 1); |
1631 } | 1631 } |
1632 } | 1632 } |
1633 | 1633 |
1634 | 1634 |
1635 void Builtins::Generate_ConstructFunction(MacroAssembler* masm) { | 1635 void Builtins::Generate_ConstructFunction(MacroAssembler* masm) { |
1636 // ----------- S t a t e ------------- | 1636 // ----------- S t a t e ------------- |
1637 // -- a0 : the number of arguments (not including the receiver) | 1637 // -- a0 : the number of arguments (not including the receiver) |
1638 // -- a1 : the constructor to call (checked to be a JSFunction) | 1638 // -- a1 : the constructor to call (checked to be a JSFunction) |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1687 __ dsll(at, a0, kPointerSizeLog2); | 1687 __ dsll(at, a0, kPointerSizeLog2); |
1688 __ daddu(at, sp, at); | 1688 __ daddu(at, sp, at); |
1689 __ sd(a1, MemOperand(at)); | 1689 __ sd(a1, MemOperand(at)); |
1690 // Let the "call_as_constructor_delegate" take care of the rest. | 1690 // Let the "call_as_constructor_delegate" take care of the rest. |
1691 __ LoadGlobalFunction(Context::CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, a1); | 1691 __ LoadGlobalFunction(Context::CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, a1); |
1692 __ Jump(masm->isolate()->builtins()->CallFunction(), RelocInfo::CODE_TARGET); | 1692 __ Jump(masm->isolate()->builtins()->CallFunction(), RelocInfo::CODE_TARGET); |
1693 | 1693 |
1694 // 3. Construct of something that is not callable. | 1694 // 3. Construct of something that is not callable. |
1695 __ bind(&non_callable); | 1695 __ bind(&non_callable); |
1696 { | 1696 { |
1697 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); | 1697 FrameScope scope(masm, StackFrame::INTERNAL); |
1698 __ Push(a1); | 1698 __ Push(a1); |
1699 __ CallRuntime(Runtime::kThrowCalledNonCallable, 1); | 1699 __ CallRuntime(Runtime::kThrowCalledNonCallable, 1); |
1700 } | 1700 } |
1701 } | 1701 } |
1702 | 1702 |
1703 | 1703 |
1704 // static | 1704 // static |
1705 void Builtins::Generate_PushArgsAndCall(MacroAssembler* masm) { | 1705 void Builtins::Generate_PushArgsAndCall(MacroAssembler* masm) { |
1706 // ----------- S t a t e ------------- | 1706 // ----------- S t a t e ------------- |
1707 // -- a0 : the number of arguments (not including the receiver) | 1707 // -- a0 : the number of arguments (not including the receiver) |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1882 } | 1882 } |
1883 } | 1883 } |
1884 | 1884 |
1885 | 1885 |
1886 #undef __ | 1886 #undef __ |
1887 | 1887 |
1888 } // namespace internal | 1888 } // namespace internal |
1889 } // namespace v8 | 1889 } // namespace v8 |
1890 | 1890 |
1891 #endif // V8_TARGET_ARCH_MIPS64 | 1891 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |