Changeset 190589 in webkit for trunk/Source/JavaScriptCore/dfg/DFGPlan.cpp
- Timestamp:
- Oct 5, 2015, 4:31:53 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGPlan.cpp
r190546 r190589 132 132 } // anonymous namespace 133 133 134 Plan::Plan( PassRefPtr<CodeBlock>passedCodeBlock, CodeBlock* profiledDFGCodeBlock,134 Plan::Plan(CodeBlock* passedCodeBlock, CodeBlock* profiledDFGCodeBlock, 135 135 CompilationMode mode, unsigned osrEntryBytecodeIndex, 136 136 const Operands<JSValue>& mustHandleValues) … … 141 141 , osrEntryBytecodeIndex(osrEntryBytecodeIndex) 142 142 , mustHandleValues(mustHandleValues) 143 , compilation(codeBlock->vm()->m_perBytecodeProfiler ? adoptRef(new Profiler::Compilation(codeBlock->vm()->m_perBytecodeProfiler->ensureBytecodesFor(codeBlock .get()), profilerCompilationKindForMode(mode))) : 0)143 , compilation(codeBlock->vm()->m_perBytecodeProfiler ? adoptRef(new Profiler::Compilation(codeBlock->vm()->m_perBytecodeProfiler->ensureBytecodesFor(codeBlock), profilerCompilationKindForMode(mode))) : 0) 144 144 , inlineCallFrames(adoptRef(new InlineCallFrameSet())) 145 , identifiers(codeBlock .get())146 , weakReferences(codeBlock .get())145 , identifiers(codeBlock) 146 , weakReferences(codeBlock) 147 147 , willTryToTierUp(false) 148 148 , stage(Preparing) … … 536 536 void Plan::reallyAdd(CommonData* commonData) 537 537 { 538 watchpoints.reallyAdd(codeBlock .get(), *commonData);538 watchpoints.reallyAdd(codeBlock, *commonData); 539 539 identifiers.reallyAdd(vm, commonData); 540 540 weakReferences.reallyAdd(vm, commonData); … … 554 554 void Plan::notifyReady() 555 555 { 556 callback->compilationDidBecomeReadyAsynchronously(codeBlock .get());556 callback->compilationDidBecomeReadyAsynchronously(codeBlock, profiledDFGCodeBlock); 557 557 stage = Ready; 558 558 } … … 561 561 { 562 562 // We will establish new references from the code block to things. So, we need a barrier. 563 vm.heap.writeBarrier(codeBlock ->ownerExecutable());563 vm.heap.writeBarrier(codeBlock); 564 564 565 565 if (!isStillValid()) … … 597 597 void Plan::finalizeAndNotifyCallback() 598 598 { 599 callback->compilationDidComplete(codeBlock .get(), finalizeWithoutNotifyingCallback());599 callback->compilationDidComplete(codeBlock, profiledDFGCodeBlock, finalizeWithoutNotifyingCallback()); 600 600 } 601 601 … … 605 605 } 606 606 607 void Plan:: clearCodeBlockMarks()607 void Plan::rememberCodeBlocks() 608 608 { 609 609 // Compilation writes lots of values to a CodeBlock without performing … … 611 611 // all our CodeBlocks must be visited during GC. 612 612 613 codeBlock->clearMarks(); 614 codeBlock->alternative()->clearMarks(); 613 Heap::heap(codeBlock)->writeBarrier(codeBlock); 615 614 if (profiledDFGCodeBlock) 616 profiledDFGCodeBlock->clearMarks();615 Heap::heap(profiledDFGCodeBlock)->writeBarrier(profiledDFGCodeBlock); 617 616 } 618 617 … … 625 624 visitor.appendUnbarrieredValue(&mustHandleValues[i]); 626 625 627 codeBlock->visitStrongly(visitor); 628 codeBlock->alternative()->visitStrongly(visitor); 629 if (profiledDFGCodeBlock) 630 profiledDFGCodeBlock->visitStrongly(visitor); 626 visitor.appendUnbarrieredReadOnlyPointer(codeBlock); 627 visitor.appendUnbarrieredReadOnlyPointer(profiledDFGCodeBlock); 631 628 632 629 if (inlineCallFrames) { 633 630 for (auto* inlineCallFrame : *inlineCallFrames) { 634 ASSERT(inlineCallFrame->baselineCodeBlock ());635 inlineCallFrame->baselineCodeBlock()->visitStrongly(visitor);631 ASSERT(inlineCallFrame->baselineCodeBlock.get()); 632 visitor.appendUnbarrieredReadOnlyPointer(inlineCallFrame->baselineCodeBlock.get()); 636 633 } 637 634 }
Note:
See TracChangeset
for help on using the changeset viewer.