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

Unified Diff: test/unittests/compiler/control-flow-optimizer-unittest.cc

Issue 1160863003: [turbofan] Remove the JSGraph dependency from the ControlFlowOptimizer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/pipeline.cc ('k') | test/unittests/compiler/graph-unittest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/compiler/control-flow-optimizer-unittest.cc
diff --git a/test/unittests/compiler/control-flow-optimizer-unittest.cc b/test/unittests/compiler/control-flow-optimizer-unittest.cc
index e4d5b87eee4004ae4697c6ca86e2dd73194ef6f6..444f5f5feeb38593d9857834ea2979967d81c9bd 100644
--- a/test/unittests/compiler/control-flow-optimizer-unittest.cc
+++ b/test/unittests/compiler/control-flow-optimizer-unittest.cc
@@ -3,7 +3,6 @@
// found in the LICENSE file.
#include "src/compiler/control-flow-optimizer.h"
-#include "src/compiler/js-graph.h"
#include "src/compiler/js-operator.h"
#include "src/compiler/machine-operator.h"
#include "test/unittests/compiler/graph-unittest.h"
@@ -21,28 +20,21 @@ namespace compiler {
class ControlFlowOptimizerTest : public GraphTest {
public:
explicit ControlFlowOptimizerTest(int num_parameters = 3)
- : GraphTest(num_parameters),
- machine_(zone()),
- javascript_(zone()),
- jsgraph_(isolate(), graph(), common(), javascript(), machine()) {}
+ : GraphTest(num_parameters), machine_(zone()), javascript_(zone()) {}
~ControlFlowOptimizerTest() override {}
protected:
void Optimize() {
- ControlFlowOptimizer optimizer(jsgraph(), zone());
+ ControlFlowOptimizer optimizer(graph(), common(), machine(), zone());
optimizer.Optimize();
}
- Node* EmptyFrameState() { return jsgraph()->EmptyFrameState(); }
-
- JSGraph* jsgraph() { return &jsgraph_; }
JSOperatorBuilder* javascript() { return &javascript_; }
MachineOperatorBuilder* machine() { return &machine_; }
private:
MachineOperatorBuilder machine_;
JSOperatorBuilder javascript_;
- JSGraph jsgraph_;
};
@@ -77,7 +69,7 @@ TEST_F(ControlFlowOptimizerTest, BuildSwitch2) {
Node* input = Parameter(0);
Node* context = Parameter(1);
Node* index = graph()->NewNode(javascript()->ToNumber(), input, context,
- EmptyFrameState(), start(), start());
+ start(), start(), start());
Node* if_success = graph()->NewNode(common()->IfSuccess(), index);
Node* branch0 = graph()->NewNode(
common()->Branch(),
« no previous file with comments | « src/compiler/pipeline.cc ('k') | test/unittests/compiler/graph-unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698