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

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

Issue 2626623002: [turbofan] Graph building is independent of closure. (Closed)
Patch Set: Created 3 years, 11 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/bytecode-graph-builder.cc ('k') | src/compiler/pipeline.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/ast.h" 7 #include "src/ast/ast.h"
8 #include "src/compilation-info.h" 8 #include "src/compilation-info.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/compiler/all-nodes.h" 10 #include "src/compiler/all-nodes.h"
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 "Inlining %s into %s regardless of surrounding try-block to catcher " 482 "Inlining %s into %s regardless of surrounding try-block to catcher "
483 "#%d:%s\n", 483 "#%d:%s\n",
484 shared_info->DebugName()->ToCString().get(), 484 shared_info->DebugName()->ToCString().get(),
485 info_->shared_info()->DebugName()->ToCString().get(), 485 info_->shared_info()->DebugName()->ToCString().get(),
486 exception_target->id(), exception_target->op()->mnemonic()); 486 exception_target->id(), exception_target->op()->mnemonic());
487 } 487 }
488 } 488 }
489 489
490 Zone zone(info_->isolate()->allocator(), ZONE_NAME); 490 Zone zone(info_->isolate()->allocator(), ZONE_NAME);
491 ParseInfo parse_info(&zone, shared_info); 491 ParseInfo parse_info(&zone, shared_info);
492 CompilationInfo info(&parse_info, function); 492 CompilationInfo info(&parse_info, Handle<JSFunction>::null());
493 if (info_->is_deoptimization_enabled()) info.MarkAsDeoptimizationEnabled(); 493 if (info_->is_deoptimization_enabled()) info.MarkAsDeoptimizationEnabled();
494 info.MarkAsOptimizeFromBytecode(); 494 info.MarkAsOptimizeFromBytecode();
495 495
496 if (!Compiler::EnsureBytecode(&info)) { 496 if (!Compiler::EnsureBytecode(&info)) {
497 TRACE("Not inlining %s into %s because bytecode generation failed\n", 497 TRACE("Not inlining %s into %s because bytecode generation failed\n",
498 shared_info->DebugName()->ToCString().get(), 498 shared_info->DebugName()->ToCString().get(),
499 info_->shared_info()->DebugName()->ToCString().get()); 499 info_->shared_info()->DebugName()->ToCString().get());
500 if (info_->isolate()->has_pending_exception()) { 500 if (info_->isolate()->has_pending_exception()) {
501 info_->isolate()->clear_pending_exception(); 501 info_->isolate()->clear_pending_exception();
502 } 502 }
(...skipping 16 matching lines...) Expand all
519 519
520 // If function was lazily compiled, its literals array may not yet be set up. 520 // If function was lazily compiled, its literals array may not yet be set up.
521 JSFunction::EnsureLiterals(function); 521 JSFunction::EnsureLiterals(function);
522 522
523 // Create the subgraph for the inlinee. 523 // Create the subgraph for the inlinee.
524 Node* start; 524 Node* start;
525 Node* end; 525 Node* end;
526 { 526 {
527 // Run the BytecodeGraphBuilder to create the subgraph. 527 // Run the BytecodeGraphBuilder to create the subgraph.
528 Graph::SubgraphScope scope(graph()); 528 Graph::SubgraphScope scope(graph());
529 BytecodeGraphBuilder graph_builder(&zone, &info, jsgraph(), 529 BytecodeGraphBuilder graph_builder(
530 call.frequency(), source_positions_, 530 &zone, shared_info, handle(function->feedback_vector()),
531 inlining_id); 531 BailoutId::None(), jsgraph(), call.frequency(), source_positions_,
532 inlining_id);
532 graph_builder.CreateGraph(false); 533 graph_builder.CreateGraph(false);
533 534
534 // Extract the inlinee start/end nodes. 535 // Extract the inlinee start/end nodes.
535 start = graph()->start(); 536 start = graph()->start();
536 end = graph()->end(); 537 end = graph()->end();
537 } 538 }
538 539
539 if (exception_target != nullptr) { 540 if (exception_target != nullptr) {
540 // Find all uncaught 'calls' in the inlinee. 541 // Find all uncaught 'calls' in the inlinee.
541 AllNodes inlined_nodes(local_zone_, end, graph()); 542 AllNodes inlined_nodes(local_zone_, end, graph());
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 670
670 CommonOperatorBuilder* JSInliner::common() const { return jsgraph()->common(); } 671 CommonOperatorBuilder* JSInliner::common() const { return jsgraph()->common(); }
671 672
672 SimplifiedOperatorBuilder* JSInliner::simplified() const { 673 SimplifiedOperatorBuilder* JSInliner::simplified() const {
673 return jsgraph()->simplified(); 674 return jsgraph()->simplified();
674 } 675 }
675 676
676 } // namespace compiler 677 } // namespace compiler
677 } // namespace internal 678 } // namespace internal
678 } // namespace v8 679 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698