Commit 4c0d4b71 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[turbofan] Remove RepresentationChanger::simplified field.

R=mvstanton@chromium.org

Review URL: https://codereview.chromium.org/1425643002

Cr-Commit-Position: refs/heads/master@{#31569}
parent 16053273
......@@ -21,10 +21,8 @@ namespace compiler {
// Eagerly folds any representation changes for constants.
class RepresentationChanger {
public:
RepresentationChanger(JSGraph* jsgraph, SimplifiedOperatorBuilder* simplified,
Isolate* isolate)
RepresentationChanger(JSGraph* jsgraph, Isolate* isolate)
: jsgraph_(jsgraph),
simplified_(simplified),
isolate_(isolate),
testing_type_errors_(false),
type_error_(false) {}
......@@ -413,7 +411,6 @@ class RepresentationChanger {
private:
JSGraph* jsgraph_;
SimplifiedOperatorBuilder* simplified_;
Isolate* isolate_;
friend class RepresentationChangerTester; // accesses the below fields.
......@@ -453,7 +450,7 @@ class RepresentationChanger {
JSGraph* jsgraph() const { return jsgraph_; }
Isolate* isolate() const { return isolate_; }
Factory* factory() const { return isolate()->factory(); }
SimplifiedOperatorBuilder* simplified() { return simplified_; }
SimplifiedOperatorBuilder* simplified() { return jsgraph()->simplified(); }
MachineOperatorBuilder* machine() { return jsgraph()->machine(); }
};
......
......@@ -1163,8 +1163,7 @@ SimplifiedLowering::SimplifiedLowering(JSGraph* jsgraph, Zone* zone,
void SimplifiedLowering::LowerAllNodes() {
RepresentationChanger changer(jsgraph(), jsgraph()->simplified(),
jsgraph()->isolate());
RepresentationChanger changer(jsgraph(), jsgraph()->isolate());
RepresentationSelector selector(jsgraph(), zone_, &changer,
source_positions_);
selector.Run(this);
......
......@@ -27,8 +27,8 @@ class RepresentationChangerTester : public HandleAndZoneScope,
: GraphAndBuilders(main_zone()),
javascript_(main_zone()),
jsgraph_(main_isolate(), main_graph_, &main_common_, &javascript_,
nullptr, &main_machine_),
changer_(&jsgraph_, &main_simplified_, main_isolate()) {
&main_simplified_, &main_machine_),
changer_(&jsgraph_, main_isolate()) {
Node* s = graph()->NewNode(common()->Start(num_parameters));
graph()->SetStart(s);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment