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

Unified Diff: src/objects-debug.cc

Issue 2460353002: [modules] Make ModuleInfoEntry a Struct rather than FixedArray. (Closed)
Patch Set: Remove extra semicolons after macro use. Created 4 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/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-debug.cc
diff --git a/src/objects-debug.cc b/src/objects-debug.cc
index 362fa4074c199f55a3fbac6b414802a0289327dd..1fde5b8789b2619eb35d3309d1ced3e818ec9d64 100644
--- a/src/objects-debug.cc
+++ b/src/objects-debug.cc
@@ -1000,6 +1000,24 @@ void JSFixedArrayIterator::JSFixedArrayIteratorVerify() {
CHECK_LE(index(), array()->length());
}
+void ModuleInfoEntry::ModuleInfoEntryVerify() {
+ Isolate* isolate = GetIsolate();
+ CHECK(IsModuleInfoEntry());
+
+ CHECK(export_name()->IsUndefined(isolate) || export_name()->IsString());
+ CHECK(local_name()->IsUndefined(isolate) || local_name()->IsString());
+ CHECK(import_name()->IsUndefined(isolate) || import_name()->IsString());
+
+ VerifySmiField(kModuleRequestOffset);
+ VerifySmiField(kCellIndexOffset);
+ VerifySmiField(kBegPosOffset);
+ VerifySmiField(kEndPosOffset);
+
+ CHECK_IMPLIES(import_name()->IsString(), module_request() >= 0);
+ CHECK_IMPLIES(export_name()->IsString() && import_name()->IsString(),
+ local_name()->IsUndefined(isolate));
+}
+
void Module::ModuleVerify() {
CHECK(IsModule());
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698