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

Unified Diff: runtime/vm/flow_graph_compiler_x64.cc

Issue 10389023: Fixed compilation time measurement, restructure some code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/flow_graph_compiler_x64.cc
===================================================================
--- runtime/vm/flow_graph_compiler_x64.cc (revision 7420)
+++ runtime/vm/flow_graph_compiler_x64.cc (working copy)
@@ -40,10 +40,17 @@
parsed_function_(parsed_function),
block_info_(block_order.length()),
current_block_(NULL),
- pc_descriptors_list_(new DescriptorList()),
- exception_handlers_list_(new ExceptionHandlerList()),
+ pc_descriptors_list_(NULL),
+ exception_handlers_list_(NULL),
is_optimizing_(is_optimizing) {
- for (int i = 0; i < block_order.length(); ++i) {
+}
+
+
+void FlowGraphCompiler::InitCompiler() {
+ pc_descriptors_list_ = new DescriptorList();
+ exception_handlers_list_ = new ExceptionHandlerList();
+ block_info_.Clear();
+ for (int i = 0; i < block_order_.length(); ++i) {
block_info_.Add(new BlockInfo());
}
}
@@ -1581,7 +1588,7 @@
// TODO(srdjan): Investigate where to put the argument type checks for
// checked mode.
void FlowGraphCompiler::CompileGraph() {
- TimerScope timer(FLAG_compiler_stats, &CompilerStats::graphcompiler_timer);
+ InitCompiler();
if (TryIntrinsify()) {
// Make it patchable: code must have a minimum code size, nop(2) increases
// the minimum code size appropriately.

Powered by Google App Engine
This is Rietveld 408576698