Changeset 163324 in webkit for trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp
- Timestamp:
- Feb 3, 2014, 1:51:47 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp
r163119 r163324 435 435 compileNewArrayWithSize(); 436 436 break; 437 case GetTypedArrayByteOffset: 438 compileGetTypedArrayByteOffset(); 439 break; 437 440 case AllocatePropertyStorage: 438 441 compileAllocatePropertyStorage(); … … 1725 1728 BadIndexingType, jsValueValue(cell), 0, 1726 1729 m_out.bitNot(isArrayType(cell, m_node->arrayMode()))); 1730 } 1731 1732 void compileGetTypedArrayByteOffset() 1733 { 1734 LValue basePtr = lowCell(m_node->child1()); 1735 1736 LBasicBlock simpleCase = FTL_NEW_BLOCK(m_out, ("wasteless typed array")); 1737 LBasicBlock wastefulCase = FTL_NEW_BLOCK(m_out, ("wasteful typed array")); 1738 LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("continuation branch")); 1739 1740 LValue baseAddress = m_out.addPtr(basePtr, JSArrayBufferView::offsetOfMode()); 1741 m_out.branch(m_out.notEqual(baseAddress , m_out.constIntPtr(WastefulTypedArray)), simpleCase, wastefulCase); 1742 1743 // begin simple case 1744 LBasicBlock lastNext = m_out.appendTo(simpleCase, wastefulCase); 1745 1746 ValueFromBlock simpleOut = m_out.anchor(m_out.constIntPtr(0)); 1747 1748 m_out.jump(continuation); 1749 1750 // begin wasteful case 1751 m_out.appendTo(wastefulCase, continuation); 1752 1753 LValue vectorPtr = m_out.loadPtr(basePtr, m_heaps.JSArrayBufferView_vector); 1754 LValue butterflyPtr = m_out.loadPtr(basePtr, m_heaps.JSObject_butterfly); 1755 LValue arrayBufferPtr = m_out.loadPtr(butterflyPtr, m_heaps.Butterfly_arrayBuffer); 1756 LValue dataPtr = m_out.loadPtr(arrayBufferPtr, m_heaps.ArrayBuffer_data); 1757 1758 ValueFromBlock wastefulOut = m_out.anchor(m_out.sub(dataPtr, vectorPtr)); 1759 1760 m_out.jump(continuation); 1761 m_out.appendTo(continuation, lastNext); 1762 1763 // output 1764 setInt32(m_out.castToInt32(m_out.phi(m_out.intPtr, simpleOut, wastefulOut))); 1727 1765 } 1728 1766
Note:
See TracChangeset
for help on using the changeset viewer.