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

Side by Side Diff: src/compiler/js-typed-lowering.cc

Issue 2083503002: [turbofan] The speculative number operations don't produce control. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@JSNativeContextSpecialization_Check_Operators
Patch Set: Created 4 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 | « no previous file | src/compiler/simplified-operator.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/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/compilation-dependencies.h" 6 #include "src/compilation-dependencies.h"
7 #include "src/compiler/access-builder.h" 7 #include "src/compiler/access-builder.h"
8 #include "src/compiler/js-graph.h" 8 #include "src/compiler/js-graph.h"
9 #include "src/compiler/js-typed-lowering.h" 9 #include "src/compiler/js-typed-lowering.h"
10 #include "src/compiler/linkage.h" 10 #include "src/compiler/linkage.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 return lowering_->Replace(value); 140 return lowering_->Replace(value);
141 } 141 }
142 return lowering_->Changed(node_); 142 return lowering_->Changed(node_);
143 } 143 }
144 144
145 Reduction ChangeToSpeculativeOperator(const Operator* op, Type* upper_bound) { 145 Reduction ChangeToSpeculativeOperator(const Operator* op, Type* upper_bound) {
146 DCHECK_EQ(1, op->EffectInputCount()); 146 DCHECK_EQ(1, op->EffectInputCount());
147 DCHECK_EQ(1, op->EffectOutputCount()); 147 DCHECK_EQ(1, op->EffectOutputCount());
148 DCHECK_EQ(false, OperatorProperties::HasContextInput(op)); 148 DCHECK_EQ(false, OperatorProperties::HasContextInput(op));
149 DCHECK_EQ(1, op->ControlInputCount()); 149 DCHECK_EQ(1, op->ControlInputCount());
150 DCHECK_EQ(1, op->ControlOutputCount()); 150 DCHECK_EQ(0, op->ControlOutputCount());
151 DCHECK_EQ(0, OperatorProperties::GetFrameStateInputCount(op)); 151 DCHECK_EQ(0, OperatorProperties::GetFrameStateInputCount(op));
152 DCHECK_EQ(2, op->ValueInputCount()); 152 DCHECK_EQ(2, op->ValueInputCount());
153 153
154 DCHECK_EQ(1, node_->op()->EffectInputCount()); 154 DCHECK_EQ(1, node_->op()->EffectInputCount());
155 DCHECK_EQ(1, node_->op()->EffectOutputCount()); 155 DCHECK_EQ(1, node_->op()->EffectOutputCount());
156 DCHECK_EQ(1, node_->op()->ControlInputCount()); 156 DCHECK_EQ(1, node_->op()->ControlInputCount());
157 DCHECK_LT(1, node_->op()->ControlOutputCount()); 157 DCHECK_LT(1, node_->op()->ControlOutputCount());
158 DCHECK_EQ(2, OperatorProperties::GetFrameStateInputCount(node_->op())); 158 DCHECK_EQ(2, OperatorProperties::GetFrameStateInputCount(node_->op()));
159 DCHECK_EQ(2, node_->op()->ValueInputCount()); 159 DCHECK_EQ(2, node_->op()->ValueInputCount());
160 160
161 // Reconnect the control output to bypass the IfSuccess node and 161 // Reconnect the control output to bypass the IfSuccess node and
162 // possibly disconnect from the IfException node. 162 // possibly disconnect from the IfException node.
163 for (Edge edge : node_->use_edges()) { 163 for (Edge edge : node_->use_edges()) {
164 Node* const user = edge.from(); 164 Node* const user = edge.from();
165 DCHECK(!user->IsDead()); 165 DCHECK(!user->IsDead());
166 if (NodeProperties::IsControlEdge(edge)) { 166 if (NodeProperties::IsControlEdge(edge)) {
167 if (user->opcode() == IrOpcode::kIfSuccess) { 167 if (user->opcode() == IrOpcode::kIfSuccess) {
168 user->ReplaceUses(node_); 168 user->ReplaceUses(NodeProperties::GetControlInput(node_));
169 user->Kill(); 169 user->Kill();
170 } else { 170 } else {
171 DCHECK_EQ(user->opcode(), IrOpcode::kIfException); 171 DCHECK_EQ(user->opcode(), IrOpcode::kIfException);
172 edge.UpdateTo(jsgraph()->Dead()); 172 edge.UpdateTo(jsgraph()->Dead());
173 } 173 }
174 } 174 }
175 } 175 }
176 176
177 // Remove both bailout frame states and the context. 177 // Remove both bailout frame states and the context.
178 node_->RemoveInput(NodeProperties::FirstFrameStateIndex(node_) + 1); 178 node_->RemoveInput(NodeProperties::FirstFrameStateIndex(node_) + 1);
(...skipping 1831 matching lines...) Expand 10 before | Expand all | Expand 10 after
2010 } 2010 }
2011 2011
2012 2012
2013 CompilationDependencies* JSTypedLowering::dependencies() const { 2013 CompilationDependencies* JSTypedLowering::dependencies() const {
2014 return dependencies_; 2014 return dependencies_;
2015 } 2015 }
2016 2016
2017 } // namespace compiler 2017 } // namespace compiler
2018 } // namespace internal 2018 } // namespace internal
2019 } // namespace v8 2019 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/simplified-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698