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

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

Issue 1191243003: [turbofan] Factor out the function specific part from the frame state operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tweaks 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
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | test/unittests/compiler/graph-unittest.cc » ('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/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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 Unique<HeapObject> unique = 72 Unique<HeapObject> unique =
73 Unique<HeapObject>::CreateUninitialized(constant); 73 Unique<HeapObject>::CreateUninitialized(constant);
74 return graph.NewNode(common.HeapConstant(unique)); 74 return graph.NewNode(common.HeapConstant(unique));
75 } 75 }
76 76
77 Node* EmptyFrameState(Node* context) { 77 Node* EmptyFrameState(Node* context) {
78 Node* parameters = graph.NewNode(common.StateValues(0)); 78 Node* parameters = graph.NewNode(common.StateValues(0));
79 Node* locals = graph.NewNode(common.StateValues(0)); 79 Node* locals = graph.NewNode(common.StateValues(0));
80 Node* stack = graph.NewNode(common.StateValues(0)); 80 Node* stack = graph.NewNode(common.StateValues(0));
81 81
82 Node* state_node = 82 Node* state_node = graph.NewNode(
83 graph.NewNode(common.FrameState(JS_FRAME, BailoutId::None(), 83 common.FrameState(BailoutId::None(), OutputFrameStateCombine::Ignore(),
84 OutputFrameStateCombine::Ignore()), 84 nullptr),
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(main_zone(), &graph); 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);
(...skipping 1162 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 | « src/compiler/js-typed-lowering.cc ('k') | test/unittests/compiler/graph-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698