Changeset 179756 in webkit for trunk/Source/JavaScriptCore/dfg/DFGCPSRethreadingPhase.cpp
- Timestamp:
- Feb 6, 2015, 1:39:04 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGCPSRethreadingPhase.cpp
r179477 r179756 55 55 m_graph.clearReplacements(); 56 56 canonicalizeLocalsInBlocks(); 57 specialCaseArguments(); 57 58 propagatePhis<LocalOperand>(); 58 59 propagatePhis<ArgumentOperand>(); … … 234 235 } 235 236 236 void canonicalizeSetLocal(Node* node)237 {238 m_block->variablesAtTail.setOperand(node->local(), node);239 }240 241 237 template<NodeType nodeType, OperandKind operandKind> 242 238 void canonicalizeFlushOrPhantomLocalFor(Node* node, VariableAccessData* variable, size_t idx) … … 299 295 } 300 296 301 void canonicalizeSetArgument(Node* node) 302 { 303 VirtualRegister local = node->local(); 304 ASSERT(local.isArgument()); 305 int argument = local.toArgument(); 306 m_block->variablesAtHead.setArgumentFirstTime(argument, node); 307 m_block->variablesAtTail.setArgumentFirstTime(argument, node); 297 void canonicalizeSet(Node* node) 298 { 299 m_block->variablesAtTail.setOperand(node->local(), node); 308 300 } 309 301 … … 370 362 371 363 case SetLocal: 372 canonicalizeSet Local(node);364 canonicalizeSet(node); 373 365 break; 374 366 … … 382 374 383 375 case SetArgument: 384 canonicalizeSet Argument(node);376 canonicalizeSet(node); 385 377 break; 386 378 … … 403 395 canonicalizeLocalsInBlock(); 404 396 } 397 } 398 399 void specialCaseArguments() 400 { 401 // Normally, a SetArgument denotes the start of a live range for a local's value on the stack. 402 // But those SetArguments used for the actual arguments to the machine CodeBlock get 403 // special-cased. We could have instead used two different node types - one for the arguments 404 // at the prologue case, and another for the other uses. But this seemed like IR overkill. 405 for (unsigned i = m_graph.m_arguments.size(); i--;) 406 m_graph.block(0)->variablesAtHead.setArgumentFirstTime(i, m_graph.m_arguments[i]); 405 407 } 406 408
Note:
See TracChangeset
for help on using the changeset viewer.