Changeset 220628 in webkit
- Timestamp:
- Aug 12, 2017 6:59:16 PM (7 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r220627 r220628 1 2017-08-12 Filip Pizlo <fpizlo@apple.com> 2 3 FTL's compileGetTypedArrayByteOffset needs to do caging 4 https://bugs.webkit.org/show_bug.cgi?id=175366 5 6 Reviewed by Saam Barati. 7 8 While implementing boxing in the DFG, I noticed that there was some missing boxing in the FTL. This 9 fixes the case in GetTypedArrayByteOffset, and files FIXMEs for more such cases. 10 11 * dfg/DFGSpeculativeJIT.cpp: 12 (JSC::DFG::SpeculativeJIT::compileGetTypedArrayByteOffset): 13 * ftl/FTLLowerDFGToB3.cpp: 14 (JSC::FTL::DFG::LowerDFGToB3::compileGetTypedArrayByteOffset): 15 (JSC::FTL::DFG::LowerDFGToB3::cagedMayBeNull): 16 * runtime/ArrayBuffer.h: 17 * runtime/ArrayBufferView.h: 18 * runtime/JSArrayBufferView.h: 19 1 20 2017-08-11 Ryosuke Niwa <rniwa@webkit.org> 2 21 -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
r220624 r220628 6199 6199 nullVector.link(&m_jit); 6200 6200 m_jit.loadPtr(MacroAssembler::Address(dataGPR, Butterfly::offsetOfArrayBuffer()), dataGPR); 6201 // FIXME: This needs caging. 6202 // https://bugs.webkit.org/show_bug.cgi?id=175515 6201 6203 m_jit.loadPtr(MacroAssembler::Address(dataGPR, ArrayBuffer::offsetOfData()), dataGPR); 6202 6204 m_jit.subPtr(dataGPR, vectorGPR); -
trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
r220625 r220628 3310 3310 m_out.appendTo(wastefulCase, continuation); 3311 3311 3312 // FIXME: This needs to do caging.3313 // https://bugs.webkit.org/show_bug.cgi?id=1753663314 LValue vectorPtr = m_out.loadPtr(basePtr, m_heaps.JSArrayBufferView_vector);3315 LValue butterflyPtr = m_out.loadPtr(basePtr, m_heaps.JSObject_butterfly);3312 LValue vectorPtr = cagedMayBeNull( 3313 Gigacage::Primitive, 3314 m_out.loadPtr(basePtr, m_heaps.JSArrayBufferView_vector)); 3315 LValue butterflyPtr = caged(Gigacage::JSValue, m_out.loadPtr(basePtr, m_heaps.JSObject_butterfly)); 3316 3316 LValue arrayBufferPtr = m_out.loadPtr(butterflyPtr, m_heaps.Butterfly_arrayBuffer); 3317 // FIXME: This needs caging. 3318 // https://bugs.webkit.org/show_bug.cgi?id=175515 3317 3319 LValue dataPtr = m_out.loadPtr(arrayBufferPtr, m_heaps.ArrayBuffer_data); 3318 3320 … … 11642 11644 // https://bugs.webkit.org/show_bug.cgi?id=175493 11643 11645 return m_out.opaque(result); 11646 } 11647 11648 LValue cagedMayBeNull(Gigacage::Kind kind, LValue ptr) 11649 { 11650 LBasicBlock notNull = m_out.newBlock(); 11651 LBasicBlock continuation = m_out.newBlock(); 11652 11653 LBasicBlock lastNext = m_out.insertNewBlocksBefore(notNull); 11654 11655 ValueFromBlock nullResult = m_out.anchor(ptr); 11656 m_out.branch(ptr, unsure(notNull), unsure(continuation)); 11657 11658 m_out.appendTo(notNull, continuation); 11659 ValueFromBlock notNullResult = m_out.anchor(caged(kind, ptr)); 11660 m_out.jump(continuation); 11661 11662 m_out.appendTo(continuation, lastNext); 11663 return m_out.phi(pointerType(), nullResult, notNullResult); 11644 11664 } 11645 11665 -
trunk/Source/JavaScriptCore/runtime/ArrayBuffer.h
r217052 r220628 51 51 52 52 private: 53 // FIXME: This should be CagedPtr<>. 54 // https://bugs.webkit.org/show_bug.cgi?id=175515 53 55 void* m_data; 54 56 ArrayBufferDestructorFunction m_destructor; … … 96 98 ArrayBufferDestructorFunction m_destructor; 97 99 RefPtr<SharedArrayBufferContents> m_shared; 100 // FIXME: This should be CagedPtr<>. 101 // https://bugs.webkit.org/show_bug.cgi?id=175515 98 102 void* m_data; 99 103 unsigned m_sizeInBytes; -
trunk/Source/JavaScriptCore/runtime/ArrayBufferView.h
r212535 r220628 148 148 149 149 // This is the address of the ArrayBuffer's storage, plus the byte offset. 150 // FIXME: This should be CagedPtr<>. 151 // https://bugs.webkit.org/show_bug.cgi?id=175515 150 152 void* m_baseAddress; 151 153 -
trunk/Source/JavaScriptCore/runtime/JSArrayBufferView.h
r215345 r220628 141 141 private: 142 142 Structure* m_structure; 143 // FIXME: This should be CagedPtr<>. 144 // https://bugs.webkit.org/show_bug.cgi?id=175515 143 145 void* m_vector; 144 146 uint32_t m_length; … … 191 193 static String toStringName(const JSObject*, ExecState*); 192 194 195 // FIXME: This should be CagedBarrierPtr<>. 196 // https://bugs.webkit.org/show_bug.cgi?id=175515 193 197 AuxiliaryBarrier<void*> m_vector; 194 198 uint32_t m_length;
Note: See TracChangeset
for help on using the changeset viewer.