OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/compiler/simplified-lowering.h" | 5 #include "src/compiler/simplified-lowering.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 TRACE("--{Propagation phase}--\n"); | 321 TRACE("--{Propagation phase}--\n"); |
322 phase_ = PROPAGATE; | 322 phase_ = PROPAGATE; |
323 EnqueueInitial(jsgraph_->graph()->end()); | 323 EnqueueInitial(jsgraph_->graph()->end()); |
324 // Process nodes from the queue until it is empty. | 324 // Process nodes from the queue until it is empty. |
325 while (!queue_.empty()) { | 325 while (!queue_.empty()) { |
326 Node* node = queue_.front(); | 326 Node* node = queue_.front(); |
327 NodeInfo* info = GetInfo(node); | 327 NodeInfo* info = GetInfo(node); |
328 queue_.pop(); | 328 queue_.pop(); |
329 info->set_queued(false); | 329 info->set_queued(false); |
330 TRACE(" visit #%d: %s\n", node->id(), node->op()->mnemonic()); | 330 TRACE(" visit #%d: %s\n", node->id(), node->op()->mnemonic()); |
331 VisitNode(node, info->truncation(), NULL); | 331 VisitNode(node, info->truncation(), nullptr); |
332 TRACE(" ==> output "); | 332 TRACE(" ==> output "); |
333 PrintInfo(info->output_type()); | 333 PrintInfo(info->output_type()); |
334 TRACE("\n"); | 334 TRACE("\n"); |
335 } | 335 } |
336 | 336 |
337 // Run lowering and change insertion phase. | 337 // Run lowering and change insertion phase. |
338 TRACE("--{Simplified lowering phase}--\n"); | 338 TRACE("--{Simplified lowering phase}--\n"); |
339 phase_ = LOWER; | 339 phase_ = LOWER; |
340 // Process nodes from the collected {nodes_} vector. | 340 // Process nodes from the collected {nodes_} vector. |
341 for (NodeVector::iterator i = nodes_.begin(); i != nodes_.end(); ++i) { | 341 for (NodeVector::iterator i = nodes_.begin(); i != nodes_.end(); ++i) { |
(...skipping 1492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1834 ReplaceEffectUses(node, comparison); | 1834 ReplaceEffectUses(node, comparison); |
1835 node->ReplaceInput(0, comparison); | 1835 node->ReplaceInput(0, comparison); |
1836 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); | 1836 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); |
1837 node->TrimInputCount(2); | 1837 node->TrimInputCount(2); |
1838 NodeProperties::ChangeOp(node, machine()->IntLessThanOrEqual()); | 1838 NodeProperties::ChangeOp(node, machine()->IntLessThanOrEqual()); |
1839 } | 1839 } |
1840 | 1840 |
1841 } // namespace compiler | 1841 } // namespace compiler |
1842 } // namespace internal | 1842 } // namespace internal |
1843 } // namespace v8 | 1843 } // namespace v8 |
OLD | NEW |