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

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

Issue 2632123006: Reland: [Parse] ParseInfo owns the parsing Zone. (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
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 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 } else { 480 } else {
481 TRACE( 481 TRACE(
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 ParseInfo parse_info(shared_info);
491 ParseInfo parse_info(&zone, shared_info);
492 CompilationInfo info(&parse_info, Handle<JSFunction>::null()); 491 CompilationInfo info(&parse_info, Handle<JSFunction>::null());
493 if (info_->is_deoptimization_enabled()) info.MarkAsDeoptimizationEnabled(); 492 if (info_->is_deoptimization_enabled()) info.MarkAsDeoptimizationEnabled();
494 info.MarkAsOptimizeFromBytecode(); 493 info.MarkAsOptimizeFromBytecode();
495 494
496 if (!Compiler::EnsureBytecode(&info)) { 495 if (!Compiler::EnsureBytecode(&info)) {
497 TRACE("Not inlining %s into %s because bytecode generation failed\n", 496 TRACE("Not inlining %s into %s because bytecode generation failed\n",
498 shared_info->DebugName()->ToCString().get(), 497 shared_info->DebugName()->ToCString().get(),
499 info_->shared_info()->DebugName()->ToCString().get()); 498 info_->shared_info()->DebugName()->ToCString().get());
500 if (info_->isolate()->has_pending_exception()) { 499 if (info_->isolate()->has_pending_exception()) {
501 info_->isolate()->clear_pending_exception(); 500 info_->isolate()->clear_pending_exception();
(...skipping 18 matching lines...) Expand all
520 // If function was lazily compiled, its literals array may not yet be set up. 519 // If function was lazily compiled, its literals array may not yet be set up.
521 JSFunction::EnsureLiterals(function); 520 JSFunction::EnsureLiterals(function);
522 521
523 // Create the subgraph for the inlinee. 522 // Create the subgraph for the inlinee.
524 Node* start; 523 Node* start;
525 Node* end; 524 Node* end;
526 { 525 {
527 // Run the BytecodeGraphBuilder to create the subgraph. 526 // Run the BytecodeGraphBuilder to create the subgraph.
528 Graph::SubgraphScope scope(graph()); 527 Graph::SubgraphScope scope(graph());
529 BytecodeGraphBuilder graph_builder( 528 BytecodeGraphBuilder graph_builder(
530 &zone, shared_info, handle(function->feedback_vector()), 529 parse_info.zone(), shared_info, handle(function->feedback_vector()),
531 BailoutId::None(), jsgraph(), call.frequency(), source_positions_, 530 BailoutId::None(), jsgraph(), call.frequency(), source_positions_,
532 inlining_id); 531 inlining_id);
533 graph_builder.CreateGraph(false); 532 graph_builder.CreateGraph(false);
534 533
535 // Extract the inlinee start/end nodes. 534 // Extract the inlinee start/end nodes.
536 start = graph()->start(); 535 start = graph()->start();
537 end = graph()->end(); 536 end = graph()->end();
538 } 537 }
539 538
540 if (exception_target != nullptr) { 539 if (exception_target != nullptr) {
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 669
671 CommonOperatorBuilder* JSInliner::common() const { return jsgraph()->common(); } 670 CommonOperatorBuilder* JSInliner::common() const { return jsgraph()->common(); }
672 671
673 SimplifiedOperatorBuilder* JSInliner::simplified() const { 672 SimplifiedOperatorBuilder* JSInliner::simplified() const {
674 return jsgraph()->simplified(); 673 return jsgraph()->simplified();
675 } 674 }
676 675
677 } // namespace compiler 676 } // namespace compiler
678 } // namespace internal 677 } // namespace internal
679 } // namespace v8 678 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698