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

Unified Diff: src/parser.cc

Issue 693803004: Parser & internalizing: efficiency fixes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: . Created 6 years, 1 month 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/ast-value-factory.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index c5bf0d977708df914299099f36f197a0e5b55eca..7a88c5270da7ddc02f0564b2cfb91e1085cbe7fd 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -935,6 +935,11 @@ FunctionLiteral* Parser::ParseLazy() {
}
Handle<SharedFunctionInfo> shared_info = info()->shared_info();
+ // Lazy parsing is only done during runtime, when we're already using the
+ // heap. So make the AstValueFactory also internalize all values when it
+ // creates them (this is more efficient).
+ ast_value_factory()->Internalize(isolate());
+
// Initialize parser state.
source = String::Flatten(source);
FunctionLiteral* result;
« no previous file with comments | « src/ast-value-factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698