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

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

Issue 2645613008: Revert of [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
« 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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 } else { 467 } else {
468 TRACE( 468 TRACE(
469 "Inlining %s into %s regardless of surrounding try-block to catcher " 469 "Inlining %s into %s regardless of surrounding try-block to catcher "
470 "#%d:%s\n", 470 "#%d:%s\n",
471 shared_info->DebugName()->ToCString().get(), 471 shared_info->DebugName()->ToCString().get(),
472 info_->shared_info()->DebugName()->ToCString().get(), 472 info_->shared_info()->DebugName()->ToCString().get(),
473 exception_target->id(), exception_target->op()->mnemonic()); 473 exception_target->id(), exception_target->op()->mnemonic());
474 } 474 }
475 } 475 }
476 476
477 ParseInfo parse_info(shared_info); 477 Zone zone(info_->isolate()->allocator(), ZONE_NAME);
478 ParseInfo parse_info(&zone, shared_info);
478 CompilationInfo info(&parse_info, Handle<JSFunction>::null()); 479 CompilationInfo info(&parse_info, Handle<JSFunction>::null());
479 if (info_->is_deoptimization_enabled()) info.MarkAsDeoptimizationEnabled(); 480 if (info_->is_deoptimization_enabled()) info.MarkAsDeoptimizationEnabled();
480 info.MarkAsOptimizeFromBytecode(); 481 info.MarkAsOptimizeFromBytecode();
481 482
482 if (!Compiler::EnsureBytecode(&info)) { 483 if (!Compiler::EnsureBytecode(&info)) {
483 TRACE("Not inlining %s into %s because bytecode generation failed\n", 484 TRACE("Not inlining %s into %s because bytecode generation failed\n",
484 shared_info->DebugName()->ToCString().get(), 485 shared_info->DebugName()->ToCString().get(),
485 info_->shared_info()->DebugName()->ToCString().get()); 486 info_->shared_info()->DebugName()->ToCString().get());
486 if (info_->isolate()->has_pending_exception()) { 487 if (info_->isolate()->has_pending_exception()) {
487 info_->isolate()->clear_pending_exception(); 488 info_->isolate()->clear_pending_exception();
(...skipping 18 matching lines...) Expand all
506 // If function was lazily compiled, its literals array may not yet be set up. 507 // If function was lazily compiled, its literals array may not yet be set up.
507 JSFunction::EnsureLiterals(function); 508 JSFunction::EnsureLiterals(function);
508 509
509 // Create the subgraph for the inlinee. 510 // Create the subgraph for the inlinee.
510 Node* start; 511 Node* start;
511 Node* end; 512 Node* end;
512 { 513 {
513 // Run the BytecodeGraphBuilder to create the subgraph. 514 // Run the BytecodeGraphBuilder to create the subgraph.
514 Graph::SubgraphScope scope(graph()); 515 Graph::SubgraphScope scope(graph());
515 BytecodeGraphBuilder graph_builder( 516 BytecodeGraphBuilder graph_builder(
516 parse_info.zone(), shared_info, handle(function->feedback_vector()), 517 &zone, shared_info, handle(function->feedback_vector()),
517 BailoutId::None(), jsgraph(), call.frequency(), source_positions_, 518 BailoutId::None(), jsgraph(), call.frequency(), source_positions_,
518 inlining_id); 519 inlining_id);
519 graph_builder.CreateGraph(false); 520 graph_builder.CreateGraph(false);
520 521
521 // Extract the inlinee start/end nodes. 522 // Extract the inlinee start/end nodes.
522 start = graph()->start(); 523 start = graph()->start();
523 end = graph()->end(); 524 end = graph()->end();
524 } 525 }
525 526
526 if (exception_target != nullptr) { 527 if (exception_target != nullptr) {
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 657
657 CommonOperatorBuilder* JSInliner::common() const { return jsgraph()->common(); } 658 CommonOperatorBuilder* JSInliner::common() const { return jsgraph()->common(); }
658 659
659 SimplifiedOperatorBuilder* JSInliner::simplified() const { 660 SimplifiedOperatorBuilder* JSInliner::simplified() const {
660 return jsgraph()->simplified(); 661 return jsgraph()->simplified();
661 } 662 }
662 663
663 } // namespace compiler 664 } // namespace compiler
664 } // namespace internal 665 } // namespace internal
665 } // namespace v8 666 } // 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