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

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

Issue 1106613003: [turbofan] Unify frame state inputs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comment. Created 5 years, 8 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-generic-lowering.cc ('k') | src/compiler/js-intrinsic-lowering.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-inlining.h" 5 #include "src/compiler/js-inlining.h"
6 6
7 #include "src/ast.h" 7 #include "src/ast.h"
8 #include "src/ast-numbering.h" 8 #include "src/ast-numbering.h"
9 #include "src/compiler/all-nodes.h" 9 #include "src/compiler/all-nodes.h"
10 #include "src/compiler/ast-graph-builder.h" 10 #include "src/compiler/ast-graph-builder.h"
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 GraphReducer graph_reducer(&graph, local_zone_); 353 GraphReducer graph_reducer(&graph, local_zone_);
354 graph_reducer.AddReducer(&context_specializer); 354 graph_reducer.AddReducer(&context_specializer);
355 graph_reducer.ReduceGraph(); 355 graph_reducer.ReduceGraph();
356 Inlinee::UnifyReturn(&jsgraph); 356 Inlinee::UnifyReturn(&jsgraph);
357 357
358 CopyVisitor visitor(&graph, jsgraph_->graph(), info.zone()); 358 CopyVisitor visitor(&graph, jsgraph_->graph(), info.zone());
359 visitor.CopyGraph(); 359 visitor.CopyGraph();
360 360
361 Inlinee inlinee(visitor.GetCopy(graph.start()), visitor.GetCopy(graph.end())); 361 Inlinee inlinee(visitor.GetCopy(graph.start()), visitor.GetCopy(graph.end()));
362 362
363 if (FLAG_turbo_deoptimization) { 363 Node* outer_frame_state = call.frame_state();
364 Node* outer_frame_state = call.frame_state(); 364 // Insert argument adaptor frame if required.
365 // Insert argument adaptor frame if required. 365 if (call.formal_arguments() != inlinee.formal_parameters()) {
366 if (call.formal_arguments() != inlinee.formal_parameters()) { 366 outer_frame_state =
367 outer_frame_state = 367 CreateArgumentsAdaptorFrameState(&call, function, info.zone());
368 CreateArgumentsAdaptorFrameState(&call, function, info.zone()); 368 }
369 }
370 369
371 for (Node* node : visitor.copies()) { 370 for (Node* node : visitor.copies()) {
372 if (node && node->opcode() == IrOpcode::kFrameState) { 371 if (node && node->opcode() == IrOpcode::kFrameState) {
373 DCHECK_EQ(1, OperatorProperties::GetFrameStateInputCount(node->op())); 372 DCHECK_EQ(1, OperatorProperties::GetFrameStateInputCount(node->op()));
374 AddClosureToFrameState(node, function); 373 AddClosureToFrameState(node, function);
375 NodeProperties::ReplaceFrameStateInput(node, 0, outer_frame_state); 374 NodeProperties::ReplaceFrameStateInput(node, 0, outer_frame_state);
376 }
377 } 375 }
378 } 376 }
379 377
380 return inlinee.InlineAtCall(jsgraph_, node); 378 return inlinee.InlineAtCall(jsgraph_, node);
381 } 379 }
382 380
383 } // namespace compiler 381 } // namespace compiler
384 } // namespace internal 382 } // namespace internal
385 } // namespace v8 383 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-generic-lowering.cc ('k') | src/compiler/js-intrinsic-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698