OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
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 1746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1757 | 1757 |
1758 // static | 1758 // static |
1759 void Builtins::Generate_ConstructProxy(MacroAssembler* masm) { | 1759 void Builtins::Generate_ConstructProxy(MacroAssembler* masm) { |
1760 // ----------- S t a t e ------------- | 1760 // ----------- S t a t e ------------- |
1761 // -- r3 : the number of arguments (not including the receiver) | 1761 // -- r3 : the number of arguments (not including the receiver) |
1762 // -- r4 : the constructor to call (checked to be a JSProxy) | 1762 // -- r4 : the constructor to call (checked to be a JSProxy) |
1763 // -- r6 : the new target (either the same as the constructor or | 1763 // -- r6 : the new target (either the same as the constructor or |
1764 // the JSFunction on which new was invoked initially) | 1764 // the JSFunction on which new was invoked initially) |
1765 // ----------------------------------- | 1765 // ----------------------------------- |
1766 | 1766 |
1767 // TODO(neis): This doesn't match the ES6 spec for [[Construct]] on proxies. | 1767 // Call into the Runtime for Proxy [[Construct]]. |
1768 __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); | 1768 __ Push(r4); |
| 1769 __ Push(r6); |
| 1770 // Include the pushed new_target and the constructor/receiver at the bottom. |
| 1771 __ addi(r3, r3, Operand(3)); |
| 1772 // Tail-call to the runtime. |
| 1773 __ JumpToExternalReference( |
| 1774 ExternalReference(Runtime::kJSProxyConstruct, masm->isolate())); |
1769 } | 1775 } |
1770 | 1776 |
1771 | 1777 |
1772 // static | 1778 // static |
1773 void Builtins::Generate_Construct(MacroAssembler* masm) { | 1779 void Builtins::Generate_Construct(MacroAssembler* masm) { |
1774 // ----------- S t a t e ------------- | 1780 // ----------- S t a t e ------------- |
1775 // -- r3 : the number of arguments (not including the receiver) | 1781 // -- r3 : the number of arguments (not including the receiver) |
1776 // -- r4 : the constructor to call (can be any Object) | 1782 // -- r4 : the constructor to call (can be any Object) |
1777 // -- r6 : the new target (either the same as the constructor or | 1783 // -- r6 : the new target (either the same as the constructor or |
1778 // the JSFunction on which new was invoked initially) | 1784 // the JSFunction on which new was invoked initially) |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1971 __ bkpt(0); | 1977 __ bkpt(0); |
1972 } | 1978 } |
1973 } | 1979 } |
1974 | 1980 |
1975 | 1981 |
1976 #undef __ | 1982 #undef __ |
1977 } // namespace internal | 1983 } // namespace internal |
1978 } // namespace v8 | 1984 } // namespace v8 |
1979 | 1985 |
1980 #endif // V8_TARGET_ARCH_PPC | 1986 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |