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

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

Issue 1106613003: [turbofan] Unify frame state inputs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comment. Created 5 years, 8 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/instruction-selector.cc ('k') | src/compiler/js-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/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/code-stubs.h" 6 #include "src/code-stubs.h"
7 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/js-generic-lowering.h" 8 #include "src/compiler/js-generic-lowering.h"
9 #include "src/compiler/js-graph.h" 9 #include "src/compiler/js-graph.h"
10 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 inputs.push_back(NodeProperties::GetValueInput(node, 0)); 131 inputs.push_back(NodeProperties::GetValueInput(node, 0));
132 inputs.push_back(NodeProperties::GetValueInput(node, 1)); 132 inputs.push_back(NodeProperties::GetValueInput(node, 1));
133 inputs.push_back(NodeProperties::GetContextInput(node)); 133 inputs.push_back(NodeProperties::GetContextInput(node));
134 if (node->op()->HasProperty(Operator::kPure)) { 134 if (node->op()->HasProperty(Operator::kPure)) {
135 // A pure (strict) comparison doesn't have an effect, control or frame 135 // A pure (strict) comparison doesn't have an effect, control or frame
136 // state. But for the graph, we need to add control and effect inputs. 136 // state. But for the graph, we need to add control and effect inputs.
137 DCHECK(OperatorProperties::GetFrameStateInputCount(node->op()) == 0); 137 DCHECK(OperatorProperties::GetFrameStateInputCount(node->op()) == 0);
138 inputs.push_back(graph()->start()); 138 inputs.push_back(graph()->start());
139 inputs.push_back(graph()->start()); 139 inputs.push_back(graph()->start());
140 } else { 140 } else {
141 DCHECK((OperatorProperties::GetFrameStateInputCount(node->op()) == 1) == 141 inputs.push_back(NodeProperties::GetFrameStateInput(node, 0));
142 FLAG_turbo_deoptimization);
143 if (FLAG_turbo_deoptimization) {
144 inputs.push_back(NodeProperties::GetFrameStateInput(node, 0));
145 }
146 inputs.push_back(NodeProperties::GetEffectInput(node)); 142 inputs.push_back(NodeProperties::GetEffectInput(node));
147 inputs.push_back(NodeProperties::GetControlInput(node)); 143 inputs.push_back(NodeProperties::GetControlInput(node));
148 } 144 }
149 Node* compare = 145 Node* compare =
150 graph()->NewNode(common()->Call(desc_compare), 146 graph()->NewNode(common()->Call(desc_compare),
151 static_cast<int>(inputs.size()), &inputs.front()); 147 static_cast<int>(inputs.size()), &inputs.front());
152 148
153 // Decide how the return value from the above CompareIC can be converted into 149 // Decide how the return value from the above CompareIC can be converted into
154 // a JavaScript boolean oddball depending on the given token. 150 // a JavaScript boolean oddball depending on the given token.
155 Node* false_value = jsgraph()->FalseConstant(); 151 Node* false_value = jsgraph()->FalseConstant();
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 } 547 }
552 548
553 549
554 MachineOperatorBuilder* JSGenericLowering::machine() const { 550 MachineOperatorBuilder* JSGenericLowering::machine() const {
555 return jsgraph()->machine(); 551 return jsgraph()->machine();
556 } 552 }
557 553
558 } // namespace compiler 554 } // namespace compiler
559 } // namespace internal 555 } // namespace internal
560 } // namespace v8 556 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/js-inlining.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698