Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: src/compiler/verifier.cc

Issue 2867603002: [turbofan] Create-lowering support for CreateGeneratorObject (Closed)
Patch Set: Nit. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/js-create-lowering.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/verifier.h" 5 #include "src/compiler/verifier.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 #include <queue> 9 #include <queue>
10 #include <sstream> 10 #include <sstream>
(...skipping 1696 matching lines...) Expand 10 before | Expand all | Expand 10 after
1707 1707
1708 // static 1708 // static
1709 void Verifier::VerifyNode(Node* node) { 1709 void Verifier::VerifyNode(Node* node) {
1710 CHECK_EQ(OperatorProperties::GetTotalInputCount(node->op()), 1710 CHECK_EQ(OperatorProperties::GetTotalInputCount(node->op()),
1711 node->InputCount()); 1711 node->InputCount());
1712 // If this node has no effect or no control outputs, 1712 // If this node has no effect or no control outputs,
1713 // we check that none of its uses are effect or control inputs. 1713 // we check that none of its uses are effect or control inputs.
1714 bool check_no_control = node->op()->ControlOutputCount() == 0; 1714 bool check_no_control = node->op()->ControlOutputCount() == 0;
1715 bool check_no_effect = node->op()->EffectOutputCount() == 0; 1715 bool check_no_effect = node->op()->EffectOutputCount() == 0;
1716 bool check_no_frame_state = node->opcode() != IrOpcode::kFrameState; 1716 bool check_no_frame_state = node->opcode() != IrOpcode::kFrameState;
1717 int effect_edges = 0;
1717 if (check_no_effect || check_no_control) { 1718 if (check_no_effect || check_no_control) {
1718 for (Edge edge : node->use_edges()) { 1719 for (Edge edge : node->use_edges()) {
1719 Node* const user = edge.from(); 1720 Node* const user = edge.from();
1720 CHECK(!user->IsDead()); 1721 CHECK(!user->IsDead());
1721 if (NodeProperties::IsControlEdge(edge)) { 1722 if (NodeProperties::IsControlEdge(edge)) {
1722 CHECK(!check_no_control); 1723 CHECK(!check_no_control);
1723 } else if (NodeProperties::IsEffectEdge(edge)) { 1724 } else if (NodeProperties::IsEffectEdge(edge)) {
1724 CHECK(!check_no_effect); 1725 CHECK(!check_no_effect);
1726 effect_edges++;
1725 } else if (NodeProperties::IsFrameStateEdge(edge)) { 1727 } else if (NodeProperties::IsFrameStateEdge(edge)) {
1726 CHECK(!check_no_frame_state); 1728 CHECK(!check_no_frame_state);
1727 } 1729 }
1728 } 1730 }
1729 } 1731 }
1730 // Frame state input should be a frame state (or sentinel). 1732 // Frame state input should be a frame state (or sentinel).
1731 if (OperatorProperties::GetFrameStateInputCount(node->op()) > 0) { 1733 if (OperatorProperties::GetFrameStateInputCount(node->op()) > 0) {
1732 Node* input = NodeProperties::GetFrameStateInput(node); 1734 Node* input = NodeProperties::GetFrameStateInput(node);
1733 CHECK(input->opcode() == IrOpcode::kFrameState || 1735 CHECK(input->opcode() == IrOpcode::kFrameState ||
1734 input->opcode() == IrOpcode::kStart || 1736 input->opcode() == IrOpcode::kStart ||
(...skipping 23 matching lines...) Expand all
1758 replacement->op()->EffectOutputCount() > 0); 1760 replacement->op()->EffectOutputCount() > 0);
1759 DCHECK(!NodeProperties::IsFrameStateEdge(edge) || 1761 DCHECK(!NodeProperties::IsFrameStateEdge(edge) ||
1760 replacement->opcode() == IrOpcode::kFrameState); 1762 replacement->opcode() == IrOpcode::kFrameState);
1761 } 1763 }
1762 1764
1763 #endif // DEBUG 1765 #endif // DEBUG
1764 1766
1765 } // namespace compiler 1767 } // namespace compiler
1766 } // namespace internal 1768 } // namespace internal
1767 } // namespace v8 1769 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-create-lowering.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698