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

Unified Diff: runtime/vm/parser.cc

Issue 1127383008: Fix CompilerStats info (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 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
« no previous file with comments | « runtime/vm/parser.h ('k') | runtime/vm/timer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
===================================================================
--- runtime/vm/parser.cc (revision 45749)
+++ runtime/vm/parser.cc (working copy)
@@ -444,7 +444,7 @@
void Parser::SetPosition(intptr_t position) {
if (position < TokenPos() && position != 0) {
- CompilerStats::num_tokens_rewind += (TokenPos() - position);
+ INC_STAT(I, num_tokens_rewind, (TokenPos() - position));
}
tokens_iterator_.SetCurrentPosition(position);
token_kind_ = Token::kILLEGAL;
@@ -455,7 +455,7 @@
const Script& script) {
Isolate* isolate = Isolate::Current();
ASSERT(isolate->long_jump_base()->IsSafeToJump());
- TimerScope timer(FLAG_compiler_stats, &CompilerStats::parser_timer);
+ CSTAT_TIMER_SCOPE(isolate, parser_timer);
VMTagScope tagScope(isolate, VMTag::kCompileTopLevelTagId);
Parser parser(script, library, 0);
parser.ParseTopLevel();
@@ -472,8 +472,8 @@
Token::Kind Parser::LookaheadToken(int num_tokens) {
- CompilerStats::num_tokens_lookahead++;
- CompilerStats::num_token_checks++;
+ INC_STAT(I, num_tokens_lookahead, 1);
+ INC_STAT(I, num_token_checks, 1);
return tokens_iterator_.LookaheadTokenKind(num_tokens);
}
@@ -774,7 +774,7 @@
void Parser::ParseClass(const Class& cls) {
if (!cls.is_synthesized_class()) {
Isolate* isolate = Isolate::Current();
- TimerScope timer(FLAG_compiler_stats, &CompilerStats::parser_timer);
+ CSTAT_TIMER_SCOPE(isolate, parser_timer);
ASSERT(isolate->long_jump_base()->IsSafeToJump());
const Script& script = Script::Handle(isolate, cls.script());
const Library& lib = Library::Handle(isolate, cls.library());
@@ -782,7 +782,7 @@
parser.ParseClassDefinition(cls);
} else if (cls.is_enum_class()) {
Isolate* isolate = Isolate::Current();
- TimerScope timer(FLAG_compiler_stats, &CompilerStats::parser_timer);
+ CSTAT_TIMER_SCOPE(isolate, parser_timer);
ASSERT(isolate->long_jump_base()->IsSafeToJump());
const Script& script = Script::Handle(isolate, cls.script());
const Library& lib = Library::Handle(isolate, cls.library());
@@ -843,8 +843,8 @@
void Parser::ParseFunction(ParsedFunction* parsed_function) {
Isolate* isolate = parsed_function->isolate();
Zone* zone = parsed_function->zone();
- TimerScope timer(FLAG_compiler_stats, &CompilerStats::parser_timer);
- CompilerStats::num_functions_compiled++;
+ CSTAT_TIMER_SCOPE(isolate, parser_timer);
+ INC_STAT(isolate, num_functions_compiled, 1);
ASSERT(isolate->long_jump_base()->IsSafeToJump());
ASSERT(parsed_function != NULL);
const Function& func = parsed_function->function();
@@ -882,7 +882,7 @@
break;
case RawFunction::kImplicitStaticFinalGetter:
node_sequence = parser.ParseStaticFinalGetter(func);
- CompilerStats::num_implicit_final_getters++;
+ INC_STAT(isolate, num_implicit_final_getters, 1);
break;
case RawFunction::kMethodExtractor:
node_sequence = parser.ParseMethodExtractor(func);
@@ -4492,7 +4492,7 @@
void Parser::ParseClassDefinition(const Class& cls) {
TRACE_PARSER("ParseClassDefinition");
- CompilerStats::num_classes_compiled++;
+ INC_STAT(I, num_classes_compiled, 1);
set_current_class(cls);
is_top_level_ = true;
String& class_name = String::Handle(Z, cls.Name());
@@ -4552,7 +4552,7 @@
void Parser::ParseEnumDefinition(const Class& cls) {
TRACE_PARSER("ParseEnumDefinition");
- CompilerStats::num_classes_compiled++;
+ INC_STAT(I, num_classes_compiled, 1);
SkipMetadata();
ExpectToken(Token::kENUM);
« no previous file with comments | « runtime/vm/parser.h ('k') | runtime/vm/timer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698