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

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

Issue 726823002: Make TurboFan inlining work without deoptimization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years, 1 month 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.cc ('k') | no next file » | 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/ast.h" 5 #include "src/ast.h"
6 #include "src/ast-numbering.h" 6 #include "src/ast-numbering.h"
7 #include "src/compiler/access-builder.h" 7 #include "src/compiler/access-builder.h"
8 #include "src/compiler/ast-graph-builder.h" 8 #include "src/compiler/ast-graph-builder.h"
9 #include "src/compiler/common-operator.h" 9 #include "src/compiler/common-operator.h"
10 #include "src/compiler/generic-node-inl.h" 10 #include "src/compiler/generic-node-inl.h"
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 398
399 AstGraphBuilder graph_builder(local_zone_, &info, &jsgraph); 399 AstGraphBuilder graph_builder(local_zone_, &info, &jsgraph);
400 graph_builder.CreateGraph(); 400 graph_builder.CreateGraph();
401 Inlinee::UnifyReturn(&jsgraph); 401 Inlinee::UnifyReturn(&jsgraph);
402 402
403 CopyVisitor visitor(&graph, jsgraph_->graph(), info.zone()); 403 CopyVisitor visitor(&graph, jsgraph_->graph(), info.zone());
404 visitor.CopyGraph(); 404 visitor.CopyGraph();
405 405
406 Inlinee inlinee(visitor.GetCopy(graph.start()), visitor.GetCopy(graph.end())); 406 Inlinee inlinee(visitor.GetCopy(graph.start()), visitor.GetCopy(graph.end()));
407 407
408 Node* outer_frame_state = call.frame_state(); 408 if (FLAG_turbo_deoptimization) {
409 // Insert argument adaptor frame if required. 409 Node* outer_frame_state = call.frame_state();
410 if (call.formal_arguments() != inlinee.formal_parameters()) { 410 // Insert argument adaptor frame if required.
411 outer_frame_state = 411 if (call.formal_arguments() != inlinee.formal_parameters()) {
412 CreateArgumentsAdaptorFrameState(&call, function, info.zone()); 412 outer_frame_state =
413 } 413 CreateArgumentsAdaptorFrameState(&call, function, info.zone());
414 }
414 415
415 for (NodeVectorConstIter it = visitor.copies().begin(); 416 for (NodeVectorConstIter it = visitor.copies().begin();
416 it != visitor.copies().end(); ++it) { 417 it != visitor.copies().end(); ++it) {
417 Node* node = *it; 418 Node* node = *it;
418 if (node != NULL && node->opcode() == IrOpcode::kFrameState) { 419 if (node != NULL && node->opcode() == IrOpcode::kFrameState) {
419 AddClosureToFrameState(node, function); 420 AddClosureToFrameState(node, function);
420 NodeProperties::ReplaceFrameStateInput(node, outer_frame_state); 421 NodeProperties::ReplaceFrameStateInput(node, outer_frame_state);
422 }
421 } 423 }
422 } 424 }
423 425
424 inlinee.InlineAtCall(jsgraph_, call_node); 426 inlinee.InlineAtCall(jsgraph_, call_node);
425 } 427 }
426 428
427 429
428 class JSCallRuntimeAccessor { 430 class JSCallRuntimeAccessor {
429 public: 431 public:
430 explicit JSCallRuntimeAccessor(Node* call) : call_(call) { 432 explicit JSCallRuntimeAccessor(Node* call) : call_(call) {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 info_->shared_info()->DebugName()->ToCString().get()); 487 info_->shared_info()->DebugName()->ToCString().get());
486 } 488 }
487 NodeProperties::ReplaceWithValue(call_node, r.first, r.second); 489 NodeProperties::ReplaceWithValue(call_node, r.first, r.second);
488 call_node->RemoveAllInputs(); 490 call_node->RemoveAllInputs();
489 DCHECK_EQ(0, call_node->UseCount()); 491 DCHECK_EQ(0, call_node->UseCount());
490 } 492 }
491 } 493 }
492 } 494 }
493 } 495 }
494 } // namespace v8::internal::compiler 496 } // namespace v8::internal::compiler
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698