Changeset 209594 in webkit
- Timestamp:
- Dec 8, 2016 7:30:03 PM (7 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r209576 r209594 1 2016-12-08 Filip Pizlo <fpizlo@apple.com> 2 3 Enable concurrent GC on ARM64 4 https://bugs.webkit.org/show_bug.cgi?id=165643 5 6 Reviewed by Saam Barati. 7 8 It looks stable enough to enable. 9 10 * assembler/CPU.h: 11 (JSC::useGCFences): Deleted. 12 * bytecode/PolymorphicAccess.cpp: 13 (JSC::AccessCase::generateImpl): 14 * dfg/DFGSpeculativeJIT.cpp: 15 (JSC::DFG::SpeculativeJIT::compileAllocatePropertyStorage): 16 (JSC::DFG::SpeculativeJIT::compileReallocatePropertyStorage): 17 * ftl/FTLLowerDFGToB3.cpp: 18 (JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewObject): 19 (JSC::FTL::DFG::LowerDFGToB3::allocatePropertyStorage): 20 (JSC::FTL::DFG::LowerDFGToB3::reallocatePropertyStorage): 21 (JSC::FTL::DFG::LowerDFGToB3::allocateObject): 22 * jit/AssemblyHelpers.h: 23 (JSC::AssemblyHelpers::mutatorFence): 24 (JSC::AssemblyHelpers::storeButterfly): 25 (JSC::AssemblyHelpers::nukeStructureAndStoreButterfly): 26 (JSC::AssemblyHelpers::emitInitializeInlineStorage): 27 (JSC::AssemblyHelpers::emitInitializeOutOfLineStorage): 28 * runtime/Options.cpp: 29 (JSC::recomputeDependentOptions): 30 1 31 2016-12-08 Filip Pizlo <fpizlo@apple.com> 2 32 -
trunk/Source/JavaScriptCore/assembler/CPU.h
r208860 r209594 86 86 } 87 87 88 inline bool useGCFences()89 {90 return isX86();91 }92 93 88 } // namespace JSC 94 89 -
trunk/Source/JavaScriptCore/bytecode/PolymorphicAccess.cpp
r209570 r209594 1302 1302 } 1303 1303 1304 if (useGCFences()) { 1305 for (size_t offset = oldSize; offset < newSize; offset += sizeof(void*)) 1306 jit.storePtr(CCallHelpers::TrustedImmPtr(0), CCallHelpers::Address(scratchGPR, -static_cast<ptrdiff_t>(offset + sizeof(JSValue) + sizeof(void*)))); 1307 } 1304 for (size_t offset = oldSize; offset < newSize; offset += sizeof(void*)) 1305 jit.storePtr(CCallHelpers::TrustedImmPtr(0), CCallHelpers::Address(scratchGPR, -static_cast<ptrdiff_t>(offset + sizeof(JSValue) + sizeof(void*)))); 1308 1306 } else { 1309 1307 // Handle the case where we are allocating out-of-line using an operation. -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
r209570 r209594 7412 7412 m_jit.addPtr(JITCompiler::TrustedImm32(size + sizeof(IndexingHeader)), scratchGPR1); 7413 7413 7414 if (useGCFences()) { 7415 for (ptrdiff_t offset = 0; offset < static_cast<ptrdiff_t>(size); offset += sizeof(void*)) 7416 m_jit.storePtr(TrustedImmPtr(0), JITCompiler::Address(scratchGPR1, -(offset + sizeof(JSValue) + sizeof(void*)))); 7417 } 7414 for (ptrdiff_t offset = 0; offset < static_cast<ptrdiff_t>(size); offset += sizeof(void*)) 7415 m_jit.storePtr(TrustedImmPtr(0), JITCompiler::Address(scratchGPR1, -(offset + sizeof(JSValue) + sizeof(void*)))); 7418 7416 7419 7417 addSlowPathGenerator( 7420 7418 slowPathCall(slowPath, this, operationAllocatePropertyStorageWithInitialCapacity, scratchGPR1)); 7421 7419 7422 if (useGCFences()) { 7423 m_jit.store32(TrustedImm32(0), JITCompiler::Address(baseGPR, JSCell::structureIDOffset())); 7424 m_jit.mutatorFence(); 7425 } 7426 7427 m_jit.storePtr(scratchGPR1, JITCompiler::Address(baseGPR, JSObject::butterflyOffset())); 7428 m_jit.mutatorFence(); 7420 m_jit.store32(TrustedImm32(0), JITCompiler::Address(baseGPR, JSCell::structureIDOffset())); 7421 m_jit.storeButterfly(scratchGPR1, baseGPR); 7429 7422 7430 7423 storageResult(scratchGPR1, node); … … 7472 7465 m_jit.addPtr(JITCompiler::TrustedImm32(newSize + sizeof(IndexingHeader)), scratchGPR1); 7473 7466 7474 if (useGCFences()) { 7475 for (ptrdiff_t offset = oldSize; offset < static_cast<ptrdiff_t>(newSize); offset += sizeof(void*)) 7476 m_jit.storePtr(TrustedImmPtr(0), JITCompiler::Address(scratchGPR1, -(offset + sizeof(JSValue) + sizeof(void*)))); 7477 } 7467 for (ptrdiff_t offset = oldSize; offset < static_cast<ptrdiff_t>(newSize); offset += sizeof(void*)) 7468 m_jit.storePtr(TrustedImmPtr(0), JITCompiler::Address(scratchGPR1, -(offset + sizeof(JSValue) + sizeof(void*)))); 7478 7469 7479 7470 addSlowPathGenerator( -
trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
r209570 r209594 8604 8604 ValueFromBlock haveButterfly = m_out.anchor(fastButterflyValue); 8605 8605 8606 if (useGCFences()) { 8607 splatWords( 8608 fastButterflyValue, 8609 m_out.constInt32(-structure->outOfLineCapacity() - 1), 8610 m_out.constInt32(-1), 8611 m_out.int64Zero, m_heaps.properties.atAnyNumber()); 8612 } 8606 splatWords( 8607 fastButterflyValue, 8608 m_out.constInt32(-structure->outOfLineCapacity() - 1), 8609 m_out.constInt32(-1), 8610 m_out.int64Zero, m_heaps.properties.atAnyNumber()); 8613 8611 8614 8612 m_out.store32(vectorLength, fastButterflyValue, m_heaps.Butterfly_vectorLength); … … 9485 9483 LValue result = allocatePropertyStorageWithSizeImpl(initialOutOfLineCapacity); 9486 9484 9487 if (useGCFences()) { 9488 splatWords( 9489 result, 9490 m_out.constInt32(-initialOutOfLineCapacity - 1), m_out.constInt32(-1), 9491 m_out.int64Zero, m_heaps.properties.atAnyNumber()); 9492 } 9485 splatWords( 9486 result, 9487 m_out.constInt32(-initialOutOfLineCapacity - 1), m_out.constInt32(-1), 9488 m_out.int64Zero, m_heaps.properties.atAnyNumber()); 9493 9489 9494 9490 nukeStructureAndSetButterfly(result, object); … … 9520 9516 } 9521 9517 9522 if (useGCFences()) { 9523 splatWords( 9524 result, 9525 m_out.constInt32(-newSize - 1), m_out.constInt32(-oldSize - 1), 9526 m_out.int64Zero, m_heaps.properties.atAnyNumber()); 9527 } 9518 splatWords( 9519 result, 9520 m_out.constInt32(-newSize - 1), m_out.constInt32(-oldSize - 1), 9521 m_out.int64Zero, m_heaps.properties.atAnyNumber()); 9528 9522 9529 9523 nukeStructureAndSetButterfly(result, object); … … 10402 10396 { 10403 10397 LValue result = allocateCell(allocator, structure, slowPath); 10404 if (useGCFences()) { 10405 splatWords( 10406 result, 10407 m_out.constInt32(JSFinalObject::offsetOfInlineStorage() / 8), 10408 m_out.constInt32(JSFinalObject::offsetOfInlineStorage() / 8 + structure->inlineCapacity()), 10409 m_out.int64Zero, 10410 m_heaps.properties.atAnyNumber()); 10411 } 10398 splatWords( 10399 result, 10400 m_out.constInt32(JSFinalObject::offsetOfInlineStorage() / 8), 10401 m_out.constInt32(JSFinalObject::offsetOfInlineStorage() / 8 + structure->inlineCapacity()), 10402 m_out.int64Zero, 10403 m_heaps.properties.atAnyNumber()); 10412 10404 m_out.storePtr(butterfly, result, m_heaps.JSObject_butterfly); 10413 10405 return result; -
trunk/Source/JavaScriptCore/jit/AssemblyHelpers.h
r209570 r209594 1364 1364 void mutatorFence() 1365 1365 { 1366 if (isX86() || !useGCFences())1366 if (isX86()) 1367 1367 return; 1368 1368 Jump ok = jumpIfMutatorFenceNotNeeded(); … … 1373 1373 void storeButterfly(GPRReg butterfly, GPRReg object) 1374 1374 { 1375 if (isX86() || !useGCFences()) {1375 if (isX86()) { 1376 1376 storePtr(butterfly, Address(object, JSObject::butterflyOffset())); 1377 1377 return; … … 1390 1390 void nukeStructureAndStoreButterfly(GPRReg butterfly, GPRReg object) 1391 1391 { 1392 if (isX86() || !useGCFences()) {1392 if (isX86()) { 1393 1393 or32(TrustedImm32(bitwise_cast<int32_t>(nukedStructureIDBit())), Address(object, JSCell::structureIDOffset())); 1394 1394 storePtr(butterfly, Address(object, JSObject::butterflyOffset())); … … 1638 1638 void emitInitializeInlineStorage(GPRReg baseGPR, unsigned inlineCapacity) 1639 1639 { 1640 if (!useGCFences())1641 return;1642 1640 for (unsigned i = 0; i < inlineCapacity; ++i) 1643 1641 storeTrustedValue(JSValue(), Address(baseGPR, JSObject::offsetOfInlineStorage() + i * sizeof(EncodedJSValue))); … … 1646 1644 void emitInitializeInlineStorage(GPRReg baseGPR, GPRReg inlineCapacity) 1647 1645 { 1648 if (!useGCFences())1649 return;1650 1646 Jump empty = branchTest32(Zero, inlineCapacity); 1651 1647 Label loop = label(); … … 1658 1654 void emitInitializeOutOfLineStorage(GPRReg butterflyGPR, unsigned outOfLineCapacity) 1659 1655 { 1660 if (!useGCFences())1661 return;1662 1656 for (unsigned i = 0; i < outOfLineCapacity; ++i) 1663 1657 storeTrustedValue(JSValue(), Address(butterflyGPR, -sizeof(IndexingHeader) - (i + 1) * sizeof(EncodedJSValue))); -
trunk/Source/JavaScriptCore/runtime/Options.cpp
r209576 r209594 333 333 #endif 334 334 335 #if !CPU(X86_64) 335 #if !CPU(X86_64) && !CPU(ARM64) 336 336 Options::useConcurrentGC() = false; 337 337 #endif
Note: See TracChangeset
for help on using the changeset viewer.