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

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

Issue 983153002: [turbofan] Add an extra frame state for deoptimization before binary op. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tweak Created 5 years, 9 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/operator-properties.cc ('k') | test/cctest/compiler/simplified-graph-builder.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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 OperatorProperties::GetFrameStateInputCount(node->op()); 118 OperatorProperties::GetFrameStateInputCount(node->op());
119 int effect_count = node->op()->EffectInputCount(); 119 int effect_count = node->op()->EffectInputCount();
120 int control_count = node->op()->ControlInputCount(); 120 int control_count = node->op()->ControlInputCount();
121 121
122 // Verify number of inputs matches up. 122 // Verify number of inputs matches up.
123 int input_count = value_count + context_count + frame_state_count + 123 int input_count = value_count + context_count + frame_state_count +
124 effect_count + control_count; 124 effect_count + control_count;
125 CHECK_EQ(input_count, node->InputCount()); 125 CHECK_EQ(input_count, node->InputCount());
126 126
127 // Verify that frame state has been inserted for the nodes that need it. 127 // Verify that frame state has been inserted for the nodes that need it.
128 if (OperatorProperties::HasFrameStateInput(node->op())) { 128 for (int i = 0; i < frame_state_count; i++) {
129 Node* frame_state = NodeProperties::GetFrameStateInput(node); 129 Node* frame_state = NodeProperties::GetFrameStateInput(node, i);
130 CHECK(frame_state->opcode() == IrOpcode::kFrameState || 130 CHECK(frame_state->opcode() == IrOpcode::kFrameState ||
131 // kFrameState uses undefined as a sentinel. 131 // kFrameState uses undefined as a sentinel.
132 (node->opcode() == IrOpcode::kFrameState && 132 (node->opcode() == IrOpcode::kFrameState &&
133 frame_state->opcode() == IrOpcode::kHeapConstant)); 133 frame_state->opcode() == IrOpcode::kHeapConstant));
134 CHECK(IsDefUseChainLinkPresent(frame_state, node)); 134 CHECK(IsDefUseChainLinkPresent(frame_state, node));
135 CHECK(IsUseDefChainLinkPresent(frame_state, node)); 135 CHECK(IsUseDefChainLinkPresent(frame_state, node));
136 } 136 }
137 137
138 // Verify all value inputs actually produce a value. 138 // Verify all value inputs actually produce a value.
139 for (int i = 0; i < value_count; ++i) { 139 for (int i = 0; i < value_count; ++i) {
(...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 // Check inputs for all nodes in the block. 1053 // Check inputs for all nodes in the block.
1054 for (size_t i = 0; i < block->NodeCount(); i++) { 1054 for (size_t i = 0; i < block->NodeCount(); i++) {
1055 Node* node = block->NodeAt(i); 1055 Node* node = block->NodeAt(i);
1056 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); 1056 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1);
1057 } 1057 }
1058 } 1058 }
1059 } 1059 }
1060 } 1060 }
1061 } 1061 }
1062 } // namespace v8::internal::compiler 1062 } // namespace v8::internal::compiler
OLDNEW
« no previous file with comments | « src/compiler/operator-properties.cc ('k') | test/cctest/compiler/simplified-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698