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

Unified Diff: test/cctest/compiler/test-js-typed-lowering.cc

Issue 437183002: Make start node a value input to parameter nodes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add start node as input to parameter nodes. Created 6 years, 4 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
Index: test/cctest/compiler/test-js-typed-lowering.cc
diff --git a/test/cctest/compiler/test-js-typed-lowering.cc b/test/cctest/compiler/test-js-typed-lowering.cc
index cfecf4d7e892231ece1c40f901dbb1eadc5b442d..80f7089a945f421ebcf94e179c501286b1197757 100644
--- a/test/cctest/compiler/test-js-typed-lowering.cc
+++ b/test/cctest/compiler/test-js-typed-lowering.cc
@@ -16,7 +16,7 @@ using namespace v8::internal::compiler;
class JSTypedLoweringTester : public HandleAndZoneScope {
public:
- JSTypedLoweringTester()
+ explicit JSTypedLoweringTester(int num_parameters = 0)
: isolate(main_isolate()),
binop(NULL),
unop(NULL),
@@ -29,6 +29,8 @@ class JSTypedLoweringTester : public HandleAndZoneScope {
source_positions(&graph),
context_node(NULL) {
typer.DecorateGraph(&graph);
+ Node* s = graph.NewNode(common.Start(num_parameters));
+ graph.SetStart(s);
}
Isolate* isolate;
@@ -44,7 +46,7 @@ class JSTypedLoweringTester : public HandleAndZoneScope {
Node* context_node;
Node* Parameter(Type* t, int32_t index = 0) {
- Node* n = graph.NewNode(common.Parameter(index));
+ Node* n = graph.NewNode(common.Parameter(index), graph.start());
NodeProperties::SetBounds(n, Bounds(Type::None(), t));
return n;
}
@@ -57,18 +59,11 @@ class JSTypedLoweringTester : public HandleAndZoneScope {
return node;
}
- Node* start() {
- Node* s = graph.start();
- if (s == NULL) {
- s = graph.NewNode(common.Start());
- graph.SetStart(s);
- }
- return s;
- }
+ Node* start() { return graph.start(); }
Node* context() {
if (context_node == NULL) {
- context_node = graph.NewNode(common.Parameter(-1));
+ context_node = graph.NewNode(common.Parameter(-1), graph.start());
}
return context_node;
}
« no previous file with comments | « test/cctest/compiler/test-js-context-specialization.cc ('k') | test/cctest/compiler/test-machine-operator-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698