Changeset 190599 in webkit for trunk/Source/JavaScriptCore/dfg/DFGPlan.cpp
- Timestamp:
- Oct 5, 2015, 6:33:39 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGPlan.cpp
r190589 r190599 642 642 if (stage == Cancelled) 643 643 return false; 644 645 // NOTE: From here on, this method can return anything and still be sound. It's sound to return 646 // false because then we'll just cancel the compilation. It's always sound to do that. It's sound 647 // to return true because then we'll just keep alive everything that the compilation needs to 648 // have live. The only thing you have to worry about is performance. The goal of returning false 649 // is to try to minimize the likelihood that we expend effort compiling something that will be 650 // DOA - that is, the code being compiled is only reachable from the compilation worklist itself 651 // or the code being compiled is going to have weak references to things that are otherwise dead. 652 // If you return false too often, then you'll regress performance because you might be killing a 653 // compilation that wouldn't have been DOA, and so you're losing opportunities to run faster 654 // code. If you return true too often, then you'll regress performance because you might expend 655 // too much effort compiling something that will be DOA. 656 644 657 if (!Heap::isMarked(codeBlock->ownerExecutable())) 645 658 return false; 646 if (!codeBlock->alternative()->isKnownToBeLiveDuringGC()) 647 return false; 648 if (!!profiledDFGCodeBlock && !profiledDFGCodeBlock->isKnownToBeLiveDuringGC()) 649 return false; 659 660 // FIXME: We could detect if the alternate CodeBlock or the profiled DFG CodeBlock have 661 // experienced troubles and may be jettisoned. 662 // https://bugs.webkit.org/show_bug.cgi?id=149823 663 650 664 return true; 651 665 }
Note:
See TracChangeset
for help on using the changeset viewer.