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

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

Issue 1374683002: [turbofan] Make Strict(Not)Equal, TypeOf, ToBoolean, UnaryNot effectful. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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/js-operator.cc » ('j') | src/compiler/js-operator.cc » ('J')
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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 inputs.push_back(jsgraph()->HeapConstant(callable.code())); 148 inputs.push_back(jsgraph()->HeapConstant(callable.code()));
149 inputs.push_back(NodeProperties::GetValueInput(node, 0)); 149 inputs.push_back(NodeProperties::GetValueInput(node, 0));
150 inputs.push_back(NodeProperties::GetValueInput(node, 1)); 150 inputs.push_back(NodeProperties::GetValueInput(node, 1));
151 inputs.push_back(NodeProperties::GetContextInput(node)); 151 inputs.push_back(NodeProperties::GetContextInput(node));
152 if (node->op()->HasProperty(Operator::kPure)) { 152 if (node->op()->HasProperty(Operator::kPure)) {
153 // A pure (strict) comparison doesn't have an effect, control or frame 153 // A pure (strict) comparison doesn't have an effect, control or frame
154 // state. But for the graph, we need to add control and effect inputs. 154 // state. But for the graph, we need to add control and effect inputs.
155 DCHECK(OperatorProperties::GetFrameStateInputCount(node->op()) == 0); 155 DCHECK(OperatorProperties::GetFrameStateInputCount(node->op()) == 0);
156 inputs.push_back(graph()->start()); 156 inputs.push_back(graph()->start());
157 inputs.push_back(graph()->start()); 157 inputs.push_back(graph()->start());
158 } else if (node->op()->HasProperty(Operator::kEliminatable)) {
159 DCHECK(OperatorProperties::GetFrameStateInputCount(node->op()) == 0);
160 DCHECK(node->op()->ControlInputCount() == 0);
161 inputs.push_back(NodeProperties::GetEffectInput(node));
162 inputs.push_back(graph()->start());
158 } else { 163 } else {
159 inputs.push_back(NodeProperties::GetFrameStateInput(node, 0)); 164 inputs.push_back(NodeProperties::GetFrameStateInput(node, 0));
160 inputs.push_back(NodeProperties::GetEffectInput(node)); 165 inputs.push_back(NodeProperties::GetEffectInput(node));
161 inputs.push_back(NodeProperties::GetControlInput(node)); 166 inputs.push_back(NodeProperties::GetControlInput(node));
162 } 167 }
163 CallDescriptor* desc_compare = Linkage::GetStubCallDescriptor( 168 CallDescriptor* desc_compare = Linkage::GetStubCallDescriptor(
164 isolate(), zone(), callable.descriptor(), 0, 169 isolate(), zone(), callable.descriptor(), 0,
165 CallDescriptor::kPatchableCallSiteWithNop | FlagsForNode(node), 170 CallDescriptor::kPatchableCallSiteWithNop | FlagsForNode(node),
166 Operator::kNoProperties, kMachIntPtr); 171 Operator::kNoProperties, kMachIntPtr);
167 Node* compare = 172 Node* compare =
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
841 } 846 }
842 847
843 848
844 MachineOperatorBuilder* JSGenericLowering::machine() const { 849 MachineOperatorBuilder* JSGenericLowering::machine() const {
845 return jsgraph()->machine(); 850 return jsgraph()->machine();
846 } 851 }
847 852
848 } // namespace compiler 853 } // namespace compiler
849 } // namespace internal 854 } // namespace internal
850 } // namespace v8 855 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/js-operator.cc » ('j') | src/compiler/js-operator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698