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

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

Issue 1146403008: [turbofan] Use Start as sentinel for frame states. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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-inlining.cc ('k') | test/cctest/compiler/test-run-inlining.cc » ('j') | 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 // Verify number of inputs matches up. 112 // Verify number of inputs matches up.
113 int input_count = value_count + context_count + frame_state_count + 113 int input_count = value_count + context_count + frame_state_count +
114 effect_count + control_count; 114 effect_count + control_count;
115 CHECK_EQ(input_count, node->InputCount()); 115 CHECK_EQ(input_count, node->InputCount());
116 116
117 // Verify that frame state has been inserted for the nodes that need it. 117 // Verify that frame state has been inserted for the nodes that need it.
118 for (int i = 0; i < frame_state_count; i++) { 118 for (int i = 0; i < frame_state_count; i++) {
119 Node* frame_state = NodeProperties::GetFrameStateInput(node, i); 119 Node* frame_state = NodeProperties::GetFrameStateInput(node, i);
120 CHECK(frame_state->opcode() == IrOpcode::kFrameState || 120 CHECK(frame_state->opcode() == IrOpcode::kFrameState ||
121 // kFrameState uses undefined as a sentinel. 121 // kFrameState uses Start as a sentinel.
122 (node->opcode() == IrOpcode::kFrameState && 122 (node->opcode() == IrOpcode::kFrameState &&
123 frame_state->opcode() == IrOpcode::kHeapConstant)); 123 frame_state->opcode() == IrOpcode::kStart));
124 CHECK(IsDefUseChainLinkPresent(frame_state, node)); 124 CHECK(IsDefUseChainLinkPresent(frame_state, node));
125 CHECK(IsUseDefChainLinkPresent(frame_state, node)); 125 CHECK(IsUseDefChainLinkPresent(frame_state, node));
126 } 126 }
127 127
128 // Verify all value inputs actually produce a value. 128 // Verify all value inputs actually produce a value.
129 for (int i = 0; i < value_count; ++i) { 129 for (int i = 0; i < value_count; ++i) {
130 Node* value = NodeProperties::GetValueInput(node, i); 130 Node* value = NodeProperties::GetValueInput(node, i);
131 CHECK(value->op()->ValueOutputCount() > 0); 131 CHECK(value->op()->ValueOutputCount() > 0);
132 CHECK(IsDefUseChainLinkPresent(value, node)); 132 CHECK(IsDefUseChainLinkPresent(value, node));
133 CHECK(IsUseDefChainLinkPresent(value, node)); 133 CHECK(IsUseDefChainLinkPresent(value, node));
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 // Check inputs for all nodes in the block. 1112 // Check inputs for all nodes in the block.
1113 for (size_t i = 0; i < block->NodeCount(); i++) { 1113 for (size_t i = 0; i < block->NodeCount(); i++) {
1114 Node* node = block->NodeAt(i); 1114 Node* node = block->NodeAt(i);
1115 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); 1115 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1);
1116 } 1116 }
1117 } 1117 }
1118 } 1118 }
1119 } // namespace compiler 1119 } // namespace compiler
1120 } // namespace internal 1120 } // namespace internal
1121 } // namespace v8 1121 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-inlining.cc ('k') | test/cctest/compiler/test-run-inlining.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698