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

Side by Side Diff: src/compiler/simplified-lowering.cc

Issue 1410003002: [turbofan] Remove locally constructed simplified builders. (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 | « src/compiler/js-typed-lowering.cc ('k') | src/compiler/simplified-operator-reducer.h » ('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/simplified-lowering.h" 5 #include "src/compiler/simplified-lowering.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after
1156 1156
1157 SimplifiedLowering::SimplifiedLowering(JSGraph* jsgraph, Zone* zone, 1157 SimplifiedLowering::SimplifiedLowering(JSGraph* jsgraph, Zone* zone,
1158 SourcePositionTable* source_positions) 1158 SourcePositionTable* source_positions)
1159 : jsgraph_(jsgraph), 1159 : jsgraph_(jsgraph),
1160 zone_(zone), 1160 zone_(zone),
1161 zero_thirtyone_range_(Type::Range(0, 31, zone)), 1161 zero_thirtyone_range_(Type::Range(0, 31, zone)),
1162 source_positions_(source_positions) {} 1162 source_positions_(source_positions) {}
1163 1163
1164 1164
1165 void SimplifiedLowering::LowerAllNodes() { 1165 void SimplifiedLowering::LowerAllNodes() {
1166 SimplifiedOperatorBuilder simplified(graph()->zone()); 1166 RepresentationChanger changer(jsgraph(), jsgraph()->simplified(),
1167 RepresentationChanger changer(jsgraph(), &simplified, jsgraph()->isolate()); 1167 jsgraph()->isolate());
1168 RepresentationSelector selector(jsgraph(), zone_, &changer, 1168 RepresentationSelector selector(jsgraph(), zone_, &changer,
1169 source_positions_); 1169 source_positions_);
1170 selector.Run(this); 1170 selector.Run(this);
1171 } 1171 }
1172 1172
1173 1173
1174 Node* SimplifiedLowering::Untag(Node* node) { 1174 Node* SimplifiedLowering::Untag(Node* node) {
1175 // TODO(titzer): factor this out to a TaggingScheme abstraction. 1175 // TODO(titzer): factor this out to a TaggingScheme abstraction.
1176 Node* shift_amount = jsgraph()->Int32Constant(kSmiTagSize + kSmiShiftSize); 1176 Node* shift_amount = jsgraph()->Int32Constant(kSmiTagSize + kSmiShiftSize);
1177 return graph()->NewNode(machine()->WordSar(), node, shift_amount); 1177 return graph()->NewNode(machine()->WordSar(), node, shift_amount);
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
1685 ReplaceEffectUses(node, comparison); 1685 ReplaceEffectUses(node, comparison);
1686 node->ReplaceInput(0, comparison); 1686 node->ReplaceInput(0, comparison);
1687 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); 1687 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL));
1688 node->TrimInputCount(2); 1688 node->TrimInputCount(2);
1689 NodeProperties::ChangeOp(node, machine()->IntLessThanOrEqual()); 1689 NodeProperties::ChangeOp(node, machine()->IntLessThanOrEqual());
1690 } 1690 }
1691 1691
1692 } // namespace compiler 1692 } // namespace compiler
1693 } // namespace internal 1693 } // namespace internal
1694 } // namespace v8 1694 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | src/compiler/simplified-operator-reducer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698