| 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/address-map.h" | 9 #include "src/address-map.h" |
| 10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
| (...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 // Run propagation phase to a fixpoint. | 561 // Run propagation phase to a fixpoint. |
| 562 TRACE("--{Propagation phase}--\n"); | 562 TRACE("--{Propagation phase}--\n"); |
| 563 phase_ = PROPAGATE; | 563 phase_ = PROPAGATE; |
| 564 EnqueueInitial(jsgraph_->graph()->end()); | 564 EnqueueInitial(jsgraph_->graph()->end()); |
| 565 // Process nodes from the queue until it is empty. | 565 // Process nodes from the queue until it is empty. |
| 566 while (!queue_.empty()) { | 566 while (!queue_.empty()) { |
| 567 Node* node = queue_.front(); | 567 Node* node = queue_.front(); |
| 568 NodeInfo* info = GetInfo(node); | 568 NodeInfo* info = GetInfo(node); |
| 569 queue_.pop(); | 569 queue_.pop(); |
| 570 info->set_visited(); | 570 info->set_visited(); |
| 571 TRACE(" visit #%d: %s\n", node->id(), node->op()->mnemonic()); | 571 TRACE(" visit #%d: %s (trunc: %s)\n", node->id(), node->op()->mnemonic(), |
| 572 info->truncation().description()); |
| 572 VisitNode(node, info->truncation(), nullptr); | 573 VisitNode(node, info->truncation(), nullptr); |
| 573 TRACE(" ==> output "); | 574 TRACE(" ==> output "); |
| 574 PrintOutputInfo(info); | 575 PrintOutputInfo(info); |
| 575 TRACE("\n"); | 576 TRACE("\n"); |
| 576 } | 577 } |
| 577 } | 578 } |
| 578 | 579 |
| 579 void Run(SimplifiedLowering* lowering) { | 580 void Run(SimplifiedLowering* lowering) { |
| 580 RunTruncationPropagationPhase(); | 581 RunTruncationPropagationPhase(); |
| 581 | 582 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 #ifdef DEBUG | 629 #ifdef DEBUG |
| 629 // Check monotonicity of input requirements. | 630 // Check monotonicity of input requirements. |
| 630 node_input_use_infos_[use_node->id()].SetAndCheckInput(use_node, index, | 631 node_input_use_infos_[use_node->id()].SetAndCheckInput(use_node, index, |
| 631 use_info); | 632 use_info); |
| 632 #endif // DEBUG | 633 #endif // DEBUG |
| 633 if (info->unvisited()) { | 634 if (info->unvisited()) { |
| 634 // First visit of this node. | 635 // First visit of this node. |
| 635 info->set_queued(); | 636 info->set_queued(); |
| 636 nodes_.push_back(node); | 637 nodes_.push_back(node); |
| 637 queue_.push(node); | 638 queue_.push(node); |
| 638 TRACE(" initial: "); | 639 TRACE(" initial #%i: ", node->id()); |
| 639 info->AddUse(use_info); | 640 info->AddUse(use_info); |
| 640 PrintTruncation(info->truncation()); | 641 PrintTruncation(info->truncation()); |
| 641 return; | 642 return; |
| 642 } | 643 } |
| 643 TRACE(" queue?: "); | 644 TRACE(" queue #%i?: ", node->id()); |
| 644 PrintTruncation(info->truncation()); | 645 PrintTruncation(info->truncation()); |
| 645 if (info->AddUse(use_info)) { | 646 if (info->AddUse(use_info)) { |
| 646 // New usage information for the node is available. | 647 // New usage information for the node is available. |
| 647 if (!info->queued()) { | 648 if (!info->queued()) { |
| 648 queue_.push(node); | 649 queue_.push(node); |
| 649 info->set_queued(); | 650 info->set_queued(); |
| 650 TRACE(" added: "); | 651 TRACE(" added: "); |
| 651 } else { | 652 } else { |
| 652 TRACE(" inqueue: "); | 653 TRACE(" inqueue: "); |
| 653 } | 654 } |
| (...skipping 2784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3438 isolate(), graph()->zone(), callable.descriptor(), 0, flags, | 3439 isolate(), graph()->zone(), callable.descriptor(), 0, flags, |
| 3439 Operator::kNoProperties); | 3440 Operator::kNoProperties); |
| 3440 to_number_operator_.set(common()->Call(desc)); | 3441 to_number_operator_.set(common()->Call(desc)); |
| 3441 } | 3442 } |
| 3442 return to_number_operator_.get(); | 3443 return to_number_operator_.get(); |
| 3443 } | 3444 } |
| 3444 | 3445 |
| 3445 } // namespace compiler | 3446 } // namespace compiler |
| 3446 } // namespace internal | 3447 } // namespace internal |
| 3447 } // namespace v8 | 3448 } // namespace v8 |
| OLD | NEW |