Changeset 142377 in webkit for trunk/Source/JavaScriptCore/dfg/DFGGraph.cpp
- Timestamp:
- Feb 9, 2013, 11:33:00 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGGraph.cpp
r141069 r142377 28 28 29 29 #include "CodeBlock.h" 30 #include "CodeBlockWithJITType.h" 30 31 #include "DFGVariableAccessDataDump.h" 31 32 #include "FunctionExecutableDump.h" … … 54 55 , m_mustHandleValues(mustHandleValues) 55 56 , m_fixpointState(BeforeFixpoint) 57 , m_form(LoadStore) 58 , m_unificationState(LocallyUnified) 56 59 { 57 60 ASSERT(m_profiledBlock); … … 196 199 if (node->hasFunction()) { 197 200 out.print(comma, "function(", RawPointer(node->function()), ", "); 198 if (node->function()->inherits(&JSFunction::s_info)) 199 out.print(FunctionExecutableDump(jsCast<JSFunction*>(node->function())->jsExecutable())); 200 else 201 if (node->function()->inherits(&JSFunction::s_info)) { 202 JSFunction* function = jsCast<JSFunction*>(node->function()); 203 if (function->isHostFunction()) 204 out.print("<host function>"); 205 else 206 out.print(FunctionExecutableDump(function->jsExecutable())); 207 } else 201 208 out.print("<not JSFunction>"); 202 209 out.print(")"); … … 305 312 void Graph::dump(PrintStream& out) 306 313 { 314 dataLog("DFG for ", CodeBlockWithJITType(m_codeBlock, JITCode::DFGJIT), ":\n"); 315 dataLog(" Fixpoint state: ", m_fixpointState, "; Form: ", m_form, "; Unification state: ", m_unificationState, "\n"); 316 307 317 Node* lastNode = 0; 308 318 for (size_t b = 0; b < m_blocks.size(); ++b) { … … 378 388 } 379 389 380 void Graph::predictArgumentTypes() 381 { 382 ASSERT(m_codeBlock->numParameters() >= 1); 383 for (size_t arg = 0; arg < static_cast<size_t>(m_codeBlock->numParameters()); ++arg) { 384 ValueProfile* profile = m_profiledBlock->valueProfileForArgument(arg); 385 if (!profile) 386 continue; 387 388 m_arguments[arg]->variableAccessData()->predict(profile->computeUpdatedPrediction()); 389 390 #if DFG_ENABLE(DEBUG_VERBOSE) 391 dataLog( 392 "Argument [", arg, "] prediction: ", 393 SpeculationDump(m_arguments[arg]->variableAccessData()->prediction()), "\n"); 394 #endif 395 } 390 void Graph::dethread() 391 { 392 if (m_form == LoadStore) 393 return; 394 395 if (logCompilationChanges()) 396 dataLog("Dethreading DFG graph.\n"); 397 398 SamplingRegion samplingRegion("DFG Dethreading"); 399 400 for (BlockIndex blockIndex = m_blocks.size(); blockIndex--;) { 401 BasicBlock* block = m_blocks[blockIndex].get(); 402 if (!block) 403 continue; 404 for (unsigned phiIndex = block->phis.size(); phiIndex--;) { 405 Node* phi = block->phis[phiIndex]; 406 phi->children.reset(); 407 } 408 } 409 410 m_form = LoadStore; 396 411 } 397 412 … … 409 424 void Graph::collectGarbage() 410 425 { 426 SamplingRegion samplingRegion("DFG Garbage Collection"); 427 411 428 // First reset the counts to 0 for all nodes. 412 429 for (BlockIndex blockIndex = 0; blockIndex < m_blocks.size(); ++blockIndex) {
Note:
See TracChangeset
for help on using the changeset viewer.