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

Side by Side Diff: runtime/vm/flow_graph_inliner.cc

Issue 333403002: Cleanup: use a ZoneGrowableArray instead of Array for ICData map. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/intermediate_language.h » ('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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/flow_graph_inliner.h" 5 #include "vm/flow_graph_inliner.h"
6 6
7 #include "vm/block_scheduler.h" 7 #include "vm/block_scheduler.h"
8 #include "vm/compiler.h" 8 #include "vm/compiler.h"
9 #include "vm/flags.h" 9 #include "vm/flags.h"
10 #include "vm/flow_graph.h" 10 #include "vm/flow_graph.h"
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 bool in_cache; 632 bool in_cache;
633 ParsedFunction* parsed_function; 633 ParsedFunction* parsed_function;
634 { 634 {
635 TimerScope timer(FLAG_compiler_stats, 635 TimerScope timer(FLAG_compiler_stats,
636 &CompilerStats::graphinliner_parse_timer, 636 &CompilerStats::graphinliner_parse_timer,
637 isolate()); 637 isolate());
638 parsed_function = GetParsedFunction(function, &in_cache); 638 parsed_function = GetParsedFunction(function, &in_cache);
639 } 639 }
640 640
641 // Load IC data for the callee. 641 // Load IC data for the callee.
642 Array& ic_data_array = Array::Handle(); 642 ZoneGrowableArray<const ICData*>* ic_data_array =
643 643 new(isolate()) ZoneGrowableArray<const ICData*>();
644 // IsInlineable above checked HasCode. Creating a Handle for the code 644 function.RestoreICDataMap(ic_data_array);
645 // should have kept GC from detaching, but let's assert just to make sure.
646 ASSERT(function.HasCode());
647 ic_data_array = unoptimized_code.ExtractTypeFeedbackArray();
648 645
649 // Build the callee graph. 646 // Build the callee graph.
650 InlineExitCollector* exit_collector = 647 InlineExitCollector* exit_collector =
651 new(isolate()) InlineExitCollector(caller_graph_, call); 648 new(isolate()) InlineExitCollector(caller_graph_, call);
652 FlowGraphBuilder builder(parsed_function, 649 FlowGraphBuilder builder(parsed_function,
653 ic_data_array, 650 *ic_data_array,
654 exit_collector, 651 exit_collector,
655 Isolate::kNoDeoptId, 652 Isolate::kNoDeoptId,
656 true); 653 true);
657 builder.SetInitialBlockId(caller_graph_->max_block_id()); 654 builder.SetInitialBlockId(caller_graph_->max_block_id());
658 FlowGraph* callee_graph; 655 FlowGraph* callee_graph;
659 { 656 {
660 TimerScope timer(FLAG_compiler_stats, 657 TimerScope timer(FLAG_compiler_stats,
661 &CompilerStats::graphinliner_build_timer, 658 &CompilerStats::graphinliner_build_timer,
662 isolate()); 659 isolate());
663 callee_graph = builder.BuildGraph(); 660 callee_graph = builder.BuildGraph();
(...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after
1721 OS::Print("After Inlining of %s\n", flow_graph_-> 1718 OS::Print("After Inlining of %s\n", flow_graph_->
1722 parsed_function().function().ToFullyQualifiedCString()); 1719 parsed_function().function().ToFullyQualifiedCString());
1723 FlowGraphPrinter printer(*flow_graph_); 1720 FlowGraphPrinter printer(*flow_graph_);
1724 printer.PrintBlocks(); 1721 printer.PrintBlocks();
1725 } 1722 }
1726 } 1723 }
1727 } 1724 }
1728 } 1725 }
1729 1726
1730 } // namespace dart 1727 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698