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

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

Issue 10084014: Measure code generation time as well. (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 | « no previous file | runtime/vm/compiler_stats.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/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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 const char* function_fullname = function.ToFullyQualifiedCString(); 121 const char* function_fullname = function.ToFullyQualifiedCString();
122 if (FLAG_trace_compiler) { 122 if (FLAG_trace_compiler) {
123 OS::Print("Compiling %sfunction: '%s' @ token %d\n", 123 OS::Print("Compiling %sfunction: '%s' @ token %d\n",
124 (optimized ? "optimized " : ""), 124 (optimized ? "optimized " : ""),
125 function_fullname, 125 function_fullname,
126 function.token_index()); 126 function.token_index());
127 } 127 }
128 Parser::ParseFunction(&parsed_function); 128 Parser::ParseFunction(&parsed_function);
129 parsed_function.AllocateVariables(); 129 parsed_function.AllocateVariables();
130 130
131 TimerScope timer(FLAG_compiler_stats, &CompilerStats::codegen_timer);
hausner 2012/04/13 17:36:02 I don't know when exactly the constructor of varia
srdjan 2012/04/13 17:38:59 Per C++ spec it cannot be called before the instru
132
131 bool is_compiled = false; 133 bool is_compiled = false;
132 if (FLAG_use_new_compiler) { 134 if (FLAG_use_new_compiler) {
133 ASSERT(!optimized); 135 ASSERT(!optimized);
134 LongJump* old_base = isolate->long_jump_base(); 136 LongJump* old_base = isolate->long_jump_base();
135 LongJump bailout_jump; 137 LongJump bailout_jump;
136 isolate->set_long_jump_base(&bailout_jump); 138 isolate->set_long_jump_base(&bailout_jump);
137 if (setjmp(*bailout_jump.Set()) == 0) { 139 if (setjmp(*bailout_jump.Set()) == 0) {
138 FlowGraphBuilder graph_builder(parsed_function); 140 FlowGraphBuilder graph_builder(parsed_function);
139 graph_builder.BuildGraph(); 141 graph_builder.BuildGraph();
140 142
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 } else { 386 } else {
385 result = isolate->object_store()->sticky_error(); 387 result = isolate->object_store()->sticky_error();
386 isolate->object_store()->clear_sticky_error(); 388 isolate->object_store()->clear_sticky_error();
387 } 389 }
388 isolate->set_long_jump_base(base); 390 isolate->set_long_jump_base(base);
389 return result.raw(); 391 return result.raw();
390 } 392 }
391 393
392 394
393 } // namespace dart 395 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/compiler_stats.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698