Chromium Code Reviews| 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 #include "src/v8.h" | 5 #include "src/v8.h" | 
| 6 | 6 | 
| 7 #if V8_TARGET_ARCH_PPC | 7 #if V8_TARGET_ARCH_PPC | 
| 8 | 8 | 
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" | 
| 10 #include "src/debug.h" | 10 #include "src/debug.h" | 
| (...skipping 1745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1756 __ push(r0); | 1756 __ push(r0); | 
| 1757 __ cmp(r3, r5); // Compare before moving to next argument. | 1757 __ cmp(r3, r5); // Compare before moving to next argument. | 
| 1758 __ subi(r3, r3, Operand(kPointerSize)); | 1758 __ subi(r3, r3, Operand(kPointerSize)); | 
| 1759 __ bne(©); | 1759 __ bne(©); | 
| 1760 | 1760 | 
| 1761 __ b(&invoke); | 1761 __ b(&invoke); | 
| 1762 } | 1762 } | 
| 1763 | 1763 | 
| 1764 { // Too few parameters: Actual < expected | 1764 { // Too few parameters: Actual < expected | 
| 1765 __ bind(&too_few); | 1765 __ bind(&too_few); | 
| 1766 | |
| 1767 // If the function is strong we need to throw an error. | |
| 1768 Label weak_function; | |
| 1769 __ LoadP(r7, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset)); | |
| 1770 __ lwz(r7, FieldMemOperand(r7, SharedFunctionInfo::kCompilerHintsOffset)); | |
| 1771 __ TestBit(r7, | |
| 1772 #if V8_TARGET_ARCH_PPC64 | |
| 
 
paul.l...
2015/05/12 01:49:49
Can you avoid ifdef here by using SharedFunctionIn
 
MTBrandyberry
2015/05/12 13:49:05
Makes sense.  I'll look at doing this in a future
 
 | |
| 1773 SharedFunctionInfo::kStrongModeFunction, | |
| 1774 #else | |
| 1775 SharedFunctionInfo::kStrongModeFunction + kSmiTagSize, | |
| 1776 #endif | |
| 1777 r0); | |
| 1778 __ beq(&weak_function, cr0); | |
| 1779 | |
| 1780 { | |
| 1781 FrameScope frame(masm, StackFrame::MANUAL); | |
| 1782 EnterArgumentsAdaptorFrame(masm); | |
| 1783 __ CallRuntime(Runtime::kThrowStrongModeTooFewArguments, 0); | |
| 1784 } | |
| 1785 | |
| 1786 __ bind(&weak_function); | |
| 1766 EnterArgumentsAdaptorFrame(masm); | 1787 EnterArgumentsAdaptorFrame(masm); | 
| 1767 | 1788 | 
| 1768 // Calculate copy start address into r0 and copy end address is fp. | 1789 // Calculate copy start address into r0 and copy end address is fp. | 
| 1769 // r3: actual number of arguments as a smi | 1790 // r3: actual number of arguments as a smi | 
| 1770 // r4: function | 1791 // r4: function | 
| 1771 // r5: expected number of arguments | 1792 // r5: expected number of arguments | 
| 1772 // ip: code entry to call | 1793 // ip: code entry to call | 
| 1773 __ SmiToPtrArrayOffset(r3, r3); | 1794 __ SmiToPtrArrayOffset(r3, r3); | 
| 1774 __ add(r3, r3, fp); | 1795 __ add(r3, r3, fp); | 
| 1775 | 1796 | 
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1831 __ bkpt(0); | 1852 __ bkpt(0); | 
| 1832 } | 1853 } | 
| 1833 } | 1854 } | 
| 1834 | 1855 | 
| 1835 | 1856 | 
| 1836 #undef __ | 1857 #undef __ | 
| 1837 } | 1858 } | 
| 1838 } // namespace v8::internal | 1859 } // namespace v8::internal | 
| 1839 | 1860 | 
| 1840 #endif // V8_TARGET_ARCH_PPC | 1861 #endif // V8_TARGET_ARCH_PPC | 
| OLD | NEW |