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

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

Issue 1168693002: [turbofan] Allow ReplaceWithValue to kill control. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments. Created 5 years, 6 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
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/js-graph.h" 5 #include "src/compiler/js-graph.h"
6 #include "src/compiler/js-typed-lowering.h" 6 #include "src/compiler/js-typed-lowering.h"
7 #include "src/compiler/machine-operator.h" 7 #include "src/compiler/machine-operator.h"
8 #include "src/compiler/node-properties.h" 8 #include "src/compiler/node-properties.h"
9 #include "src/compiler/opcodes.h" 9 #include "src/compiler/opcodes.h"
10 #include "src/compiler/operator-properties.h" 10 #include "src/compiler/operator-properties.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 graph.NewNode(common.FrameState(JS_FRAME, BailoutId::None(), 83 graph.NewNode(common.FrameState(JS_FRAME, BailoutId::None(),
84 OutputFrameStateCombine::Ignore()), 84 OutputFrameStateCombine::Ignore()),
85 parameters, locals, stack, context, UndefinedConstant()); 85 parameters, locals, stack, context, UndefinedConstant());
86 86
87 return state_node; 87 return state_node;
88 } 88 }
89 89
90 Node* reduce(Node* node) { 90 Node* reduce(Node* node) {
91 JSGraph jsgraph(main_isolate(), &graph, &common, &javascript, &machine); 91 JSGraph jsgraph(main_isolate(), &graph, &common, &javascript, &machine);
92 // TODO(titzer): mock the GraphReducer here for better unit testing. 92 // TODO(titzer): mock the GraphReducer here for better unit testing.
93 GraphReducer graph_reducer(&graph, main_zone()); 93 GraphReducer graph_reducer(main_zone(), &graph);
94 JSTypedLowering reducer(&graph_reducer, &jsgraph, main_zone()); 94 JSTypedLowering reducer(&graph_reducer, &jsgraph, main_zone());
95 Reduction reduction = reducer.Reduce(node); 95 Reduction reduction = reducer.Reduce(node);
96 if (reduction.Changed()) return reduction.replacement(); 96 if (reduction.Changed()) return reduction.replacement();
97 return node; 97 return node;
98 } 98 }
99 99
100 Node* start() { return graph.start(); } 100 Node* start() { return graph.start(); }
101 101
102 Node* context() { 102 Node* context() {
103 if (context_node == NULL) { 103 if (context_node == NULL) {
(...skipping 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1258 CHECK_EQ(p1, r->InputAt(0)); 1258 CHECK_EQ(p1, r->InputAt(0));
1259 CHECK_EQ(p0, r->InputAt(1)); 1259 CHECK_EQ(p0, r->InputAt(1));
1260 } else { 1260 } else {
1261 CHECK_EQ(p0, r->InputAt(0)); 1261 CHECK_EQ(p0, r->InputAt(0));
1262 CHECK_EQ(p1, r->InputAt(1)); 1262 CHECK_EQ(p1, r->InputAt(1));
1263 } 1263 }
1264 } 1264 }
1265 } 1265 }
1266 } 1266 }
1267 } 1267 }
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-js-context-specialization.cc ('k') | test/cctest/compiler/test-run-jsexceptions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698