|
Lines 2616-2647
void CodeBlock::propagateTransitions(Slo
Source/JavaScriptCore/bytecode/CodeBlock.cpp_sec1
|
| 2616 |
|
2616 |
|
| 2617 |
#if ENABLE(JIT) |
2617 |
#if ENABLE(JIT) |
| 2618 |
if (JITCode::isJIT(jitType())) { |
2618 |
if (JITCode::isJIT(jitType())) { |
| 2619 |
for (Bag<StructureStubInfo>::iterator iter = m_stubInfos.begin(); !!iter; ++iter) { |
2619 |
for (Bag<StructureStubInfo>::iterator iter = m_stubInfos.begin(); !!iter; ++iter) |
| 2620 |
StructureStubInfo& stubInfo = **iter; |
2620 |
allAreMarkedSoFar &= (*iter)->propagateTransitions(visitor); |
| 2621 |
if (stubInfo.cacheType != CacheType::Stub) |
|
|
| 2622 |
continue; |
| 2623 |
PolymorphicAccess* list = stubInfo.u.stub; |
| 2624 |
JSCell* origin = stubInfo.codeOrigin.codeOriginOwner(); |
| 2625 |
if (origin && !Heap::isMarked(origin)) { |
| 2626 |
allAreMarkedSoFar = false; |
| 2627 |
continue; |
| 2628 |
} |
| 2629 |
for (unsigned j = list->size(); j--;) { |
| 2630 |
const AccessCase& access = list->at(j); |
| 2631 |
if (access.type() != AccessCase::Transition) |
| 2632 |
continue; |
| 2633 |
if (Heap::isMarked(access.structure())) |
| 2634 |
visitor.appendUnbarrieredReadOnlyPointer(access.newStructure()); |
| 2635 |
else |
| 2636 |
allAreMarkedSoFar = false; |
| 2637 |
} |
| 2638 |
} |
| 2639 |
} |
2621 |
} |
| 2640 |
#endif // ENABLE(JIT) |
2622 |
#endif // ENABLE(JIT) |
| 2641 |
|
2623 |
|
| 2642 |
#if ENABLE(DFG_JIT) |
2624 |
#if ENABLE(DFG_JIT) |
| 2643 |
if (JITCode::isOptimizingJIT(jitType())) { |
2625 |
if (JITCode::isOptimizingJIT(jitType())) { |
| 2644 |
DFG::CommonData* dfgCommon = m_jitCode->dfgCommon(); |
2626 |
DFG::CommonData* dfgCommon = m_jitCode->dfgCommon(); |
|
|
2627 |
for (auto& weakReference : dfgCommon->weakStructureReferences) |
| 2628 |
allAreMarkedSoFar &= weakReference->markIfCheap(visitor); |
| 2645 |
|
2629 |
|
| 2646 |
for (unsigned i = 0; i < dfgCommon->transitions.size(); ++i) { |
2630 |
for (unsigned i = 0; i < dfgCommon->transitions.size(); ++i) { |
| 2647 |
if (shouldMarkTransition(dfgCommon->transitions[i])) { |
2631 |
if (shouldMarkTransition(dfgCommon->transitions[i])) { |