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

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

Issue 2210533002: [modules] Mark namespace variables as kCreatedInitialized. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@modules-VariableLocation
Patch Set: Rebase. Created 4 years, 4 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/parsing/parser.cc ('k') | no next file » | 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 c489c69c969978d9f168982e0871d0dc931f3ef8..a6edbe0b550e234f9e7b24bd35bec8acf1f04a42 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -5958,67 +5958,80 @@ TEST(ModuleParsingInternals) {
CHECK(declarations->at(0)->proxy()->raw_name()->IsOneByteEqualTo("x"));
CHECK(declarations->at(0)->proxy()->var()->mode() == i::LET);
+ CHECK(declarations->at(0)->proxy()->var()->binding_needs_init());
CHECK(declarations->at(0)->proxy()->var()->location() ==
i::VariableLocation::MODULE);
CHECK(declarations->at(1)->proxy()->raw_name()->IsOneByteEqualTo("z"));
CHECK(declarations->at(1)->proxy()->var()->mode() == i::CONST);
+ CHECK(declarations->at(1)->proxy()->var()->binding_needs_init());
CHECK(declarations->at(1)->proxy()->var()->location() ==
i::VariableLocation::MODULE);
CHECK(declarations->at(2)->proxy()->raw_name()->IsOneByteEqualTo("n"));
CHECK(declarations->at(2)->proxy()->var()->mode() == i::CONST);
+ CHECK(declarations->at(2)->proxy()->var()->binding_needs_init());
CHECK(declarations->at(2)->proxy()->var()->location() ==
i::VariableLocation::MODULE);
CHECK(declarations->at(3)->proxy()->raw_name()->IsOneByteEqualTo("foo"));
CHECK(declarations->at(3)->proxy()->var()->mode() == i::VAR);
+ CHECK(!declarations->at(3)->proxy()->var()->binding_needs_init());
CHECK(declarations->at(3)->proxy()->var()->location() ==
i::VariableLocation::MODULE);
CHECK(declarations->at(4)->proxy()->raw_name()->IsOneByteEqualTo("goo"));
CHECK(declarations->at(4)->proxy()->var()->mode() == i::LET);
+ CHECK(!declarations->at(4)->proxy()->var()->binding_needs_init());
CHECK(declarations->at(4)->proxy()->var()->location() ==
i::VariableLocation::MODULE);
CHECK(declarations->at(5)->proxy()->raw_name()->IsOneByteEqualTo("hoo"));
CHECK(declarations->at(5)->proxy()->var()->mode() == i::LET);
+ CHECK(declarations->at(5)->proxy()->var()->binding_needs_init());
CHECK(declarations->at(5)->proxy()->var()->location() ==
i::VariableLocation::MODULE);
CHECK(declarations->at(6)->proxy()->raw_name()->IsOneByteEqualTo("joo"));
CHECK(declarations->at(6)->proxy()->var()->mode() == i::CONST);
+ CHECK(declarations->at(6)->proxy()->var()->binding_needs_init());
CHECK(declarations->at(6)->proxy()->var()->location() ==
i::VariableLocation::MODULE);
CHECK(
declarations->at(7)->proxy()->raw_name()->IsOneByteEqualTo("*default*"));
CHECK(declarations->at(7)->proxy()->var()->mode() == i::CONST);
+ CHECK(declarations->at(7)->proxy()->var()->binding_needs_init());
CHECK(declarations->at(7)->proxy()->var()->location() ==
i::VariableLocation::MODULE);
CHECK(
declarations->at(8)->proxy()->raw_name()->IsOneByteEqualTo("nonexport"));
+ CHECK(declarations->at(8)->proxy()->var()->binding_needs_init());
CHECK(declarations->at(8)->proxy()->var()->location() !=
i::VariableLocation::MODULE);
CHECK(declarations->at(9)->proxy()->raw_name()->IsOneByteEqualTo("mm"));
CHECK(declarations->at(9)->proxy()->var()->mode() == i::CONST);
+ CHECK(declarations->at(9)->proxy()->var()->binding_needs_init());
CHECK(declarations->at(9)->proxy()->var()->location() ==
i::VariableLocation::MODULE);
CHECK(declarations->at(10)->proxy()->raw_name()->IsOneByteEqualTo("aa"));
CHECK(declarations->at(10)->proxy()->var()->mode() == i::CONST);
+ CHECK(declarations->at(10)->proxy()->var()->binding_needs_init());
CHECK(declarations->at(10)->proxy()->var()->location() ==
i::VariableLocation::MODULE);
CHECK(declarations->at(11)->proxy()->raw_name()->IsOneByteEqualTo("loo"));
CHECK(declarations->at(11)->proxy()->var()->mode() == i::CONST);
+ CHECK(!declarations->at(11)->proxy()->var()->binding_needs_init());
CHECK(declarations->at(11)->proxy()->var()->location() !=
i::VariableLocation::MODULE);
CHECK(declarations->at(12)->proxy()->raw_name()->IsOneByteEqualTo("foob"));
CHECK(declarations->at(12)->proxy()->var()->mode() == i::CONST);
+ CHECK(!declarations->at(12)->proxy()->var()->binding_needs_init());
CHECK(declarations->at(12)->proxy()->var()->location() ==
i::VariableLocation::MODULE);
« no previous file with comments | « src/parsing/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698