Changeset 190546 in webkit for trunk/Source/JavaScriptCore/dfg/DFGPlan.cpp
- Timestamp:
- Oct 3, 2015, 6:45:21 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGPlan.cpp
r190522 r190546 132 132 } // anonymous namespace 133 133 134 Plan::Plan( CodeBlock*passedCodeBlock, CodeBlock* profiledDFGCodeBlock,134 Plan::Plan(PassRefPtr<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 ), profilerCompilationKindForMode(mode))) : 0)143 , compilation(codeBlock->vm()->m_perBytecodeProfiler ? adoptRef(new Profiler::Compilation(codeBlock->vm()->m_perBytecodeProfiler->ensureBytecodesFor(codeBlock.get()), profilerCompilationKindForMode(mode))) : 0) 144 144 , inlineCallFrames(adoptRef(new InlineCallFrameSet())) 145 , identifiers(codeBlock )146 , weakReferences(codeBlock )145 , identifiers(codeBlock.get()) 146 , weakReferences(codeBlock.get()) 147 147 , willTryToTierUp(false) 148 148 , stage(Preparing) … … 536 536 void Plan::reallyAdd(CommonData* commonData) 537 537 { 538 watchpoints.reallyAdd(codeBlock , *commonData);538 watchpoints.reallyAdd(codeBlock.get(), *commonData); 539 539 identifiers.reallyAdd(vm, commonData); 540 540 weakReferences.reallyAdd(vm, commonData); … … 554 554 void Plan::notifyReady() 555 555 { 556 callback->compilationDidBecomeReadyAsynchronously(codeBlock , profiledDFGCodeBlock);556 callback->compilationDidBecomeReadyAsynchronously(codeBlock.get()); 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 );563 vm.heap.writeBarrier(codeBlock->ownerExecutable()); 564 564 565 565 if (!isStillValid()) … … 597 597 void Plan::finalizeAndNotifyCallback() 598 598 { 599 callback->compilationDidComplete(codeBlock , profiledDFGCodeBlock, finalizeWithoutNotifyingCallback());599 callback->compilationDidComplete(codeBlock.get(), finalizeWithoutNotifyingCallback()); 600 600 } 601 601 … … 605 605 } 606 606 607 void Plan:: rememberCodeBlocks()607 void Plan::clearCodeBlockMarks() 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 Heap::heap(codeBlock)->writeBarrier(codeBlock); 613 codeBlock->clearMarks(); 614 codeBlock->alternative()->clearMarks(); 614 615 if (profiledDFGCodeBlock) 615 Heap::heap(profiledDFGCodeBlock)->writeBarrier(profiledDFGCodeBlock);616 profiledDFGCodeBlock->clearMarks(); 616 617 } 617 618 … … 624 625 visitor.appendUnbarrieredValue(&mustHandleValues[i]); 625 626 626 visitor.appendUnbarrieredReadOnlyPointer(codeBlock); 627 visitor.appendUnbarrieredReadOnlyPointer(profiledDFGCodeBlock); 627 codeBlock->visitStrongly(visitor); 628 codeBlock->alternative()->visitStrongly(visitor); 629 if (profiledDFGCodeBlock) 630 profiledDFGCodeBlock->visitStrongly(visitor); 628 631 629 632 if (inlineCallFrames) { 630 633 for (auto* inlineCallFrame : *inlineCallFrames) { 631 ASSERT(inlineCallFrame->baselineCodeBlock .get());632 visitor.appendUnbarrieredReadOnlyPointer(inlineCallFrame->baselineCodeBlock.get());634 ASSERT(inlineCallFrame->baselineCodeBlock()); 635 inlineCallFrame->baselineCodeBlock()->visitStrongly(visitor); 633 636 } 634 637 }
Note:
See TracChangeset
for help on using the changeset viewer.