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

Unified Diff: tools/parser-shell.cc

Issue 974213002: Extract ParseInfo from CompilationInfo. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | « test/cctest/test-serialize.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/parser-shell.cc
diff --git a/tools/parser-shell.cc b/tools/parser-shell.cc
index 3e41bf94bb2a04dd03e70288cf43693983b795fc..5f2a8034e80fa024ee39eb5c6b5afaf6d24b164a 100644
--- a/tools/parser-shell.cc
+++ b/tools/parser-shell.cc
@@ -88,14 +88,17 @@ std::pair<v8::base::TimeDelta, v8::base::TimeDelta> RunBaselineParser(
i::ScriptData* cached_data_impl = NULL;
// First round of parsing (produce data to cache).
{
- CompilationInfoWithZone info(script);
- info.MarkAsGlobal();
- info.SetCachedData(&cached_data_impl,
- v8::ScriptCompiler::kProduceParserCache);
+ Zone zone;
+ ParseInfo info(&zone);
+ info.InitializeFromScript(script);
+ info.set_global();
+ info.set_cached_data(&cached_data_impl);
+ info.set_compile_options(v8::ScriptCompiler::kProduceParserCache);
v8::base::ElapsedTimer timer;
timer.Start();
// Allow lazy parsing; otherwise we won't produce cached data.
- bool success = Parser::ParseStatic(&info, true);
+ info.set_allow_lazy_parsing();
+ bool success = Parser::ParseStatic(&info);
parse_time1 = timer.Elapsed();
if (!success) {
fprintf(stderr, "Parsing failed\n");
@@ -104,14 +107,17 @@ std::pair<v8::base::TimeDelta, v8::base::TimeDelta> RunBaselineParser(
}
// Second round of parsing (consume cached data).
{
- CompilationInfoWithZone info(script);
- info.MarkAsGlobal();
- info.SetCachedData(&cached_data_impl,
- v8::ScriptCompiler::kConsumeParserCache);
+ Zone zone;
+ ParseInfo info(&zone);
+ info.InitializeFromScript(script);
+ info.set_global();
+ info.set_cached_data(&cached_data_impl);
+ info.set_compile_options(v8::ScriptCompiler::kConsumeParserCache);
v8::base::ElapsedTimer timer;
timer.Start();
// Allow lazy parsing; otherwise cached data won't help.
- bool success = Parser::ParseStatic(&info, true);
+ info.set_allow_lazy_parsing();
+ bool success = Parser::ParseStatic(&info);
parse_time2 = timer.Elapsed();
if (!success) {
fprintf(stderr, "Parsing failed\n");
« no previous file with comments | « test/cctest/test-serialize.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698