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

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

Issue 10116012: Add more timing information. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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/compiler_stats.cc ('k') | runtime/vm/flow_graph_compiler_arm.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) 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/flow_graph_builder.h" 5 #include "vm/flow_graph_builder.h"
6 6
7 #include "vm/ast_printer.h" 7 #include "vm/ast_printer.h"
8 #include "vm/code_descriptors.h" 8 #include "vm/code_descriptors.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 2620 matching lines...) Expand 10 before | Expand all | Expand 10 after
2631 reverse_index(instr->true_successor()->postorder_number()), 2631 reverse_index(instr->true_successor()->postorder_number()),
2632 reverse_index(instr->false_successor()->postorder_number())); 2632 reverse_index(instr->false_successor()->postorder_number()));
2633 } 2633 }
2634 2634
2635 2635
2636 void FlowGraphBuilder::BuildGraph() { 2636 void FlowGraphBuilder::BuildGraph() {
2637 if (FLAG_print_ast) { 2637 if (FLAG_print_ast) {
2638 // Print the function ast before IL generation. 2638 // Print the function ast before IL generation.
2639 AstPrinter::PrintFunctionNodes(parsed_function()); 2639 AstPrinter::PrintFunctionNodes(parsed_function());
2640 } 2640 }
2641 TimerScope timer(FLAG_compiler_stats, &CompilerStats::graphbuilder_timer);
2641 const Function& function = parsed_function().function(); 2642 const Function& function = parsed_function().function();
2642 EffectGraphVisitor for_effect(this, 0); 2643 EffectGraphVisitor for_effect(this, 0);
2643 for_effect.AddInstruction(new TargetEntryInstr()); 2644 for_effect.AddInstruction(new TargetEntryInstr());
2644 parsed_function().node_sequence()->Visit(&for_effect); 2645 parsed_function().node_sequence()->Visit(&for_effect);
2645 // Check that the graph is properly terminated. 2646 // Check that the graph is properly terminated.
2646 ASSERT(!for_effect.is_open()); 2647 ASSERT(!for_effect.is_open());
2647 GrowableArray<intptr_t> parent; 2648 GrowableArray<intptr_t> parent;
2648 for (intptr_t i = 0; i < catch_entries_.length(); i++) { 2649 for (intptr_t i = 0; i < catch_entries_.length(); i++) {
2649 Instruction* entry = catch_entries_[i]; 2650 Instruction* entry = catch_entries_[i];
2650 entry->DiscoverBlocks(NULL, // Entry block predecessor. 2651 entry->DiscoverBlocks(NULL, // Entry block predecessor.
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
2768 char* chars = reinterpret_cast<char*>( 2769 char* chars = reinterpret_cast<char*>(
2769 Isolate::Current()->current_zone()->Allocate(len)); 2770 Isolate::Current()->current_zone()->Allocate(len));
2770 OS::SNPrint(chars, len, kFormat, function_name, reason); 2771 OS::SNPrint(chars, len, kFormat, function_name, reason);
2771 const Error& error = Error::Handle( 2772 const Error& error = Error::Handle(
2772 LanguageError::New(String::Handle(String::New(chars)))); 2773 LanguageError::New(String::Handle(String::New(chars))));
2773 Isolate::Current()->long_jump_base()->Jump(1, error); 2774 Isolate::Current()->long_jump_base()->Jump(1, error);
2774 } 2775 }
2775 2776
2776 2777
2777 } // namespace dart 2778 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/compiler_stats.cc ('k') | runtime/vm/flow_graph_compiler_arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698