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

Side by Side Diff: src/compiler/js-graph.cc

Issue 2014473003: [turbofan] Remove the EmptyFrameState caching on JSGraph. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@JSInliner_Zone
Patch Set: Created 4 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-graph.h ('k') | src/compiler/js-typed-lowering.h » ('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/code-stubs.h" 5 #include "src/code-stubs.h"
6 #include "src/compiler/js-graph.h" 6 #include "src/compiler/js-graph.h"
7 #include "src/compiler/node-properties.h" 7 #include "src/compiler/node-properties.h"
8 #include "src/compiler/typer.h" 8 #include "src/compiler/typer.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 *loc = graph()->NewNode(common()->ExternalConstant(reference)); 211 *loc = graph()->NewNode(common()->ExternalConstant(reference));
212 } 212 }
213 return *loc; 213 return *loc;
214 } 214 }
215 215
216 216
217 Node* JSGraph::ExternalConstant(Runtime::FunctionId function_id) { 217 Node* JSGraph::ExternalConstant(Runtime::FunctionId function_id) {
218 return ExternalConstant(ExternalReference(function_id, isolate())); 218 return ExternalConstant(ExternalReference(function_id, isolate()));
219 } 219 }
220 220
221
222 Node* JSGraph::EmptyFrameState() {
223 Node* empty_frame_state = cached_nodes_[kEmptyFrameState];
224 if (!empty_frame_state || empty_frame_state->IsDead()) {
225 empty_frame_state = graph()->NewNode(
226 common()->FrameState(BailoutId::None(),
227 OutputFrameStateCombine::Ignore(), nullptr),
228 EmptyStateValues(), EmptyStateValues(), EmptyStateValues(),
229 NoContextConstant(), UndefinedConstant(), graph()->start());
230 cached_nodes_[kEmptyFrameState] = empty_frame_state;
231 }
232 return empty_frame_state;
233 }
234
235 Node* JSGraph::EmptyStateValues() { 221 Node* JSGraph::EmptyStateValues() {
236 return CACHED(kEmptyStateValues, graph()->NewNode(common()->StateValues(0))); 222 return CACHED(kEmptyStateValues, graph()->NewNode(common()->StateValues(0)));
237 } 223 }
238 224
239 Node* JSGraph::Dead() { 225 Node* JSGraph::Dead() {
240 return CACHED(kDead, graph()->NewNode(common()->Dead())); 226 return CACHED(kDead, graph()->NewNode(common()->Dead()));
241 } 227 }
242 228
243 229
244 void JSGraph::GetCachedNodes(NodeVector* nodes) { 230 void JSGraph::GetCachedNodes(NodeVector* nodes) {
245 cache_.GetCachedNodes(nodes); 231 cache_.GetCachedNodes(nodes);
246 for (size_t i = 0; i < arraysize(cached_nodes_); i++) { 232 for (size_t i = 0; i < arraysize(cached_nodes_); i++) {
247 if (Node* node = cached_nodes_[i]) { 233 if (Node* node = cached_nodes_[i]) {
248 if (!node->IsDead()) nodes->push_back(node); 234 if (!node->IsDead()) nodes->push_back(node);
249 } 235 }
250 } 236 }
251 } 237 }
252 238
253 } // namespace compiler 239 } // namespace compiler
254 } // namespace internal 240 } // namespace internal
255 } // namespace v8 241 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-graph.h ('k') | src/compiler/js-typed-lowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698