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

Unified Diff: test/cctest/test-parsing.cc

Issue 1002673002: Remove funky 2-stage initialization of ParserInfo and an adventurous memset. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Removed TODOs 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/compiler/test-loop-assignment-analysis.cc ('k') | tools/parser-shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-parsing.cc
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
index c91c7b062bc4698142e1c2a38ad409f946f95914..a4639ff0941b4d99c5bd5dac4bdd8f40ef6e0a23 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -1046,8 +1046,7 @@ TEST(ScopeUsesArgumentsSuperThis) {
.ToHandleChecked();
i::Handle<i::Script> script = factory->NewScript(source);
i::Zone zone;
- i::ParseInfo info(&zone);
- info.InitializeFromScript(script);
+ i::ParseInfo info(&zone, script);
i::Parser parser(&info);
parser.set_allow_harmony_arrow_functions(true);
parser.set_allow_harmony_classes(true);
@@ -1299,8 +1298,7 @@ TEST(ScopePositions) {
CHECK_EQ(source->length(), kProgramSize);
i::Handle<i::Script> script = factory->NewScript(source);
i::Zone zone;
- i::ParseInfo info(&zone);
- info.InitializeFromScript(script);
+ i::ParseInfo info(&zone, script);
i::Parser parser(&info);
parser.set_allow_lazy(true);
parser.set_allow_harmony_scoping(true);
@@ -1459,8 +1457,7 @@ void TestParserSyncWithFlags(i::Handle<i::String> source,
{
i::Handle<i::Script> script = factory->NewScript(source);
i::Zone zone;
- i::ParseInfo info(&zone);
- info.InitializeFromScript(script);
+ i::ParseInfo info(&zone, script);
i::Parser parser(&info);
SetParserFlags(&parser, flags);
info.set_global();
@@ -2548,8 +2545,7 @@ TEST(DontRegressPreParserDataSizes) {
factory->NewStringFromUtf8(i::CStrVector(program)).ToHandleChecked();
i::Handle<i::Script> script = factory->NewScript(source);
i::Zone zone;
- i::ParseInfo info(&zone);
- info.InitializeFromScript(script);
+ i::ParseInfo info(&zone, script);
i::ScriptData* sd = NULL;
info.set_cached_data(&sd);
info.set_compile_options(v8::ScriptCompiler::kProduceParserCache);
@@ -3375,8 +3371,7 @@ TEST(InnerAssignment) {
i::Handle<i::Script> script = factory->NewScript(source);
i::Zone zone;
- i::ParseInfo info(&zone);
- info.InitializeFromScript(script);
+ i::ParseInfo info(&zone, script);
i::Parser parser(&info);
parser.set_allow_harmony_scoping(true);
CHECK(parser.Parse(&info));
@@ -5086,8 +5081,7 @@ TEST(BasicImportExportParsing) {
{
i::Handle<i::Script> script = factory->NewScript(source);
i::Zone zone;
- i::ParseInfo info(&zone);
- info.InitializeFromScript(script);
+ i::ParseInfo info(&zone, script);
i::Parser parser(&info);
parser.set_allow_harmony_classes(true);
parser.set_allow_harmony_modules(true);
@@ -5115,8 +5109,7 @@ TEST(BasicImportExportParsing) {
{
i::Handle<i::Script> script = factory->NewScript(source);
i::Zone zone;
- i::ParseInfo info(&zone);
- info.InitializeFromScript(script);
+ i::ParseInfo info(&zone, script);
i::Parser parser(&info);
parser.set_allow_harmony_classes(true);
parser.set_allow_harmony_modules(true);
@@ -5207,8 +5200,7 @@ TEST(ImportExportParsingErrors) {
i::Handle<i::Script> script = factory->NewScript(source);
i::Zone zone;
- i::ParseInfo info(&zone);
- info.InitializeFromScript(script);
+ i::ParseInfo info(&zone, script);
i::Parser parser(&info);
parser.set_allow_harmony_classes(true);
parser.set_allow_harmony_modules(true);
@@ -5238,8 +5230,7 @@ TEST(ModuleParsingInternals) {
i::Handle<i::String> source = factory->NewStringFromAsciiChecked(kSource);
i::Handle<i::Script> script = factory->NewScript(source);
i::Zone zone;
- i::ParseInfo info(&zone);
- info.InitializeFromScript(script);
+ i::ParseInfo info(&zone, script);
i::AstValueFactory avf(&zone, isolate->heap()->HashSeed());
i::Parser parser(&info);
parser.set_allow_harmony_modules(true);
@@ -5364,8 +5355,7 @@ void TestLanguageMode(const char* source,
i::Handle<i::Script> script =
factory->NewScript(factory->NewStringFromAsciiChecked(source));
i::Zone zone;
- i::ParseInfo info(&zone);
- info.InitializeFromScript(script);
+ i::ParseInfo info(&zone, script);
i::Parser parser(&info);
parser.set_allow_strong_mode(true);
info.set_global();
« no previous file with comments | « test/cctest/compiler/test-loop-assignment-analysis.cc ('k') | tools/parser-shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698