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

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

Issue 10916228: Inline monomorphic calls. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporated review comments. Created 8 years, 3 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 | « no previous file | runtime/vm/flow_graph.h » ('j') | runtime/vm/flow_graph_inliner.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/compiler.h" 5 #include "vm/compiler.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/ast_printer.h" 8 #include "vm/ast_printer.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/code_patcher.h" 10 #include "vm/code_patcher.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 FLAG_deoptimization_counter_threshold) { 156 FLAG_deoptimization_counter_threshold) {
157 const Code& unoptimized_code = 157 const Code& unoptimized_code =
158 Code::Handle(parsed_function.function().unoptimized_code()); 158 Code::Handle(parsed_function.function().unoptimized_code());
159 isolate->set_ic_data_array( 159 isolate->set_ic_data_array(
160 ExtractTypeFeedbackArray(unoptimized_code)); 160 ExtractTypeFeedbackArray(unoptimized_code));
161 } 161 }
162 } 162 }
163 163
164 // Build the flow graph. 164 // Build the flow graph.
165 FlowGraphBuilder builder(parsed_function); 165 FlowGraphBuilder builder(parsed_function);
166 flow_graph = builder.BuildGraph(); 166 flow_graph = builder.BuildGraph(FlowGraphBuilder::kNotInlining);
167 167
168 // Transform to SSA. 168 // Transform to SSA.
169 if (optimized) flow_graph->ComputeSSA(); 169 if (optimized) flow_graph->ComputeSSA(0); // Start at virtual register 0.
170 170
171 if (FLAG_print_flow_graph) { 171 if (FLAG_print_flow_graph) {
172 OS::Print("Before Optimizations\n"); 172 OS::Print("Before Optimizations\n");
173 FlowGraphPrinter printer(*flow_graph); 173 FlowGraphPrinter printer(*flow_graph);
174 printer.PrintBlocks(); 174 printer.PrintBlocks();
175 } 175 }
176 if (Dart::flow_graph_writer() != NULL) { 176 if (Dart::flow_graph_writer() != NULL) {
177 // Write flow graph to file. 177 // Write flow graph to file.
178 FlowGraphVisualizer printer(*flow_graph); 178 FlowGraphVisualizer printer(*flow_graph);
179 printer.PrintFunction(); 179 printer.PrintFunction();
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 result = isolate->object_store()->sticky_error(); 576 result = isolate->object_store()->sticky_error();
577 isolate->object_store()->clear_sticky_error(); 577 isolate->object_store()->clear_sticky_error();
578 isolate->set_long_jump_base(base); 578 isolate->set_long_jump_base(base);
579 return result.raw(); 579 return result.raw();
580 } 580 }
581 UNREACHABLE(); 581 UNREACHABLE();
582 return Object::null(); 582 return Object::null();
583 } 583 }
584 584
585 } // namespace dart 585 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph.h » ('j') | runtime/vm/flow_graph_inliner.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698