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

Unified Diff: src/preparser.cc

Issue 198903002: Only call to LogSymbol when needed. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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 | « src/preparse-data.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.cc
diff --git a/src/preparser.cc b/src/preparser.cc
index bd10db3d016749653d7b88faefe4f7593e3d051f..652c1ba75d79f6430b0c292b06ea5a3978f9399b 100644
--- a/src/preparser.cc
+++ b/src/preparser.cc
@@ -1232,9 +1232,10 @@ PreParser::Expression PreParser::ParseFunctionLiteral(
void PreParser::ParseLazyFunctionLiteralBody(bool* ok) {
int body_start = position();
- log_->PauseRecording();
+ bool is_logging = log_->ShouldLogSymbols();
+ if (is_logging) log_->PauseRecording();
ParseSourceElements(Token::RBRACE, ok);
- log_->ResumeRecording();
+ if (is_logging) log_->ResumeRecording();
if (!*ok) return;
// Position right after terminal '}'.
@@ -1266,7 +1267,9 @@ PreParser::Expression PreParser::ParseV8Intrinsic(bool* ok) {
void PreParser::LogSymbol() {
- scanner()->LogSymbol(log_, position());
+ if (log_->ShouldLogSymbols()) {
+ scanner()->LogSymbol(log_, position());
+ }
}
« no previous file with comments | « src/preparse-data.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698