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

Unified Diff: runtime/vm/parser.cc

Issue 1678203002: Remove more feature in product mode (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/os_thread.cc ('k') | runtime/vm/parser_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 9ebd0ce6acaf07aa110963d69ace3d25c3960663..de7b405449f97bb5377455e0b994ebaf5a276d90 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -490,6 +490,7 @@ void Parser::ParseCompilationUnit(const Library& library,
ASSERT(thread->long_jump_base()->IsSafeToJump());
CSTAT_TIMER_SCOPE(thread, parser_timer);
VMTagScope tagScope(thread, VMTag::kCompileTopLevelTagId);
+#ifndef PRODUCT
TimelineDurationScope tds(thread,
thread->isolate()->GetCompilerStream(),
"CompileTopLevel");
@@ -497,6 +498,7 @@ void Parser::ParseCompilationUnit(const Library& library,
tds.SetNumArguments(1);
tds.CopyArgument(0, "script", String::Handle(script.url()).ToCString());
}
+#endif
Parser parser(script, library, TokenPosition::kMinSource);
parser.ParseTopLevel();
@@ -854,6 +856,7 @@ void Parser::ParseClass(const Class& cls) {
Thread* thread = Thread::Current();
Zone* zone = thread->zone();
const int64_t num_tokes_before = STAT_VALUE(thread, num_tokens_consumed);
+#ifndef PRODUCT
TimelineDurationScope tds(thread,
thread->isolate()->GetCompilerStream(),
"ParseClass");
@@ -861,6 +864,7 @@ void Parser::ParseClass(const Class& cls) {
tds.SetNumArguments(1);
tds.CopyArgument(0, "class", String::Handle(cls.Name()).ToCString());
}
+#endif
if (!cls.is_synthesized_class()) {
ASSERT(thread->long_jump_base()->IsSafeToJump());
CSTAT_TIMER_SCOPE(thread, parser_timer);
@@ -969,18 +973,22 @@ void Parser::ParseFunction(ParsedFunction* parsed_function) {
INC_STAT(thread, num_functions_parsed, 1);
VMTagScope tagScope(thread, VMTag::kCompileParseFunctionTagId,
FLAG_profile_vm);
+#ifndef PRODUCT
TimelineDurationScope tds(thread,
thread->isolate()->GetCompilerStream(),
"ParseFunction");
+#endif // !PRODUCT
ASSERT(thread->long_jump_base()->IsSafeToJump());
ASSERT(parsed_function != NULL);
const Function& func = parsed_function->function();
const Script& script = Script::Handle(zone, func.script());
Parser parser(script, parsed_function, func.token_pos());
+#ifndef PRODUCT
if (tds.enabled()) {
tds.SetNumArguments(1);
tds.CopyArgument(0, "function", String::Handle(func.name()).ToCString());
}
+#endif // !PRODUCT
SequenceNode* node_sequence = NULL;
switch (func.kind()) {
case RawFunction::kClosureFunction:
« no previous file with comments | « runtime/vm/os_thread.cc ('k') | runtime/vm/parser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698