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

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

Issue 2683733002: Revert of Reland: [Parse] ParseInfo owns the parsing Zone. (Closed)
Patch Set: Created 3 years, 10 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-dispatcher/compiler-dispatcher-job.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 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 } else { 542 } else {
543 TRACE( 543 TRACE(
544 "Inlining %s into %s regardless of surrounding try-block to catcher " 544 "Inlining %s into %s regardless of surrounding try-block to catcher "
545 "#%d:%s\n", 545 "#%d:%s\n",
546 shared_info->DebugName()->ToCString().get(), 546 shared_info->DebugName()->ToCString().get(),
547 info_->shared_info()->DebugName()->ToCString().get(), 547 info_->shared_info()->DebugName()->ToCString().get(),
548 exception_target->id(), exception_target->op()->mnemonic()); 548 exception_target->id(), exception_target->op()->mnemonic());
549 } 549 }
550 } 550 }
551 551
552 ParseInfo parse_info(shared_info); 552 Zone zone(info_->isolate()->allocator(), ZONE_NAME);
553 ParseInfo parse_info(&zone, shared_info);
553 CompilationInfo info(&parse_info, Handle<JSFunction>::null()); 554 CompilationInfo info(&parse_info, Handle<JSFunction>::null());
554 if (info_->is_deoptimization_enabled()) info.MarkAsDeoptimizationEnabled(); 555 if (info_->is_deoptimization_enabled()) info.MarkAsDeoptimizationEnabled();
555 info.MarkAsOptimizeFromBytecode(); 556 info.MarkAsOptimizeFromBytecode();
556 557
557 if (!Compiler::EnsureBytecode(&info)) { 558 if (!Compiler::EnsureBytecode(&info)) {
558 TRACE("Not inlining %s into %s because bytecode generation failed\n", 559 TRACE("Not inlining %s into %s because bytecode generation failed\n",
559 shared_info->DebugName()->ToCString().get(), 560 shared_info->DebugName()->ToCString().get(),
560 info_->shared_info()->DebugName()->ToCString().get()); 561 info_->shared_info()->DebugName()->ToCString().get());
561 if (info_->isolate()->has_pending_exception()) { 562 if (info_->isolate()->has_pending_exception()) {
562 info_->isolate()->clear_pending_exception(); 563 info_->isolate()->clear_pending_exception();
(...skipping 20 matching lines...) Expand all
583 Handle<TypeFeedbackVector> feedback_vector; 584 Handle<TypeFeedbackVector> feedback_vector;
584 DetermineCallContext(node, context, feedback_vector); 585 DetermineCallContext(node, context, feedback_vector);
585 586
586 // Create the subgraph for the inlinee. 587 // Create the subgraph for the inlinee.
587 Node* start; 588 Node* start;
588 Node* end; 589 Node* end;
589 { 590 {
590 // Run the BytecodeGraphBuilder to create the subgraph. 591 // Run the BytecodeGraphBuilder to create the subgraph.
591 Graph::SubgraphScope scope(graph()); 592 Graph::SubgraphScope scope(graph());
592 BytecodeGraphBuilder graph_builder( 593 BytecodeGraphBuilder graph_builder(
593 parse_info.zone(), shared_info, feedback_vector, BailoutId::None(), 594 &zone, shared_info, feedback_vector, BailoutId::None(), jsgraph(),
594 jsgraph(), call.frequency(), source_positions_, inlining_id); 595 call.frequency(), source_positions_, inlining_id);
595 graph_builder.CreateGraph(false); 596 graph_builder.CreateGraph(false);
596 597
597 // Extract the inlinee start/end nodes. 598 // Extract the inlinee start/end nodes.
598 start = graph()->start(); 599 start = graph()->start();
599 end = graph()->end(); 600 end = graph()->end();
600 } 601 }
601 602
602 if (exception_target != nullptr) { 603 if (exception_target != nullptr) {
603 // Find all uncaught 'calls' in the inlinee. 604 // Find all uncaught 'calls' in the inlinee.
604 AllNodes inlined_nodes(local_zone_, end, graph()); 605 AllNodes inlined_nodes(local_zone_, end, graph());
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 726
726 CommonOperatorBuilder* JSInliner::common() const { return jsgraph()->common(); } 727 CommonOperatorBuilder* JSInliner::common() const { return jsgraph()->common(); }
727 728
728 SimplifiedOperatorBuilder* JSInliner::simplified() const { 729 SimplifiedOperatorBuilder* JSInliner::simplified() const {
729 return jsgraph()->simplified(); 730 return jsgraph()->simplified();
730 } 731 }
731 732
732 } // namespace compiler 733 } // namespace compiler
733 } // namespace internal 734 } // namespace internal
734 } // namespace v8 735 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler-dispatcher/compiler-dispatcher-job.cc ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698