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

Unified Diff: src/objects.h

Issue 2460233003: [modules] Assign cell indices at validation time. (Closed)
Patch Set: 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
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index c10056f56b3ae6acc2273d19afe260e872095565..e446df5a1ace63e9e73c1158c365399c77c41bfd 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -4546,8 +4546,9 @@ class ScopeInfo : public FixedArray {
VariableMode* mode, InitializationFlag* init_flag,
MaybeAssignedFlag* maybe_assigned_flag);
- // Lookup metadata of a MODULE-allocated variable. Return a negative value if
- // there is no module variable with the given name.
+ // Lookup metadata of a MODULE-allocated variable. Return 0 if there is no
+ // module variable with the given name (the index value of a MODUULE variable
adamk 2016/10/31 18:25:04 Typo: s/MODUULE/MODULE/
neis 2016/11/03 10:43:48 Done.
+ // is never 0).
int ModuleIndex(Handle<String> name, VariableMode* mode,
InitializationFlag* init_flag,
MaybeAssignedFlag* maybe_assigned_flag);
@@ -4740,12 +4741,13 @@ class ModuleInfoEntry : public FixedArray {
Handle<Object> export_name,
Handle<Object> local_name,
Handle<Object> import_name,
- Handle<Object> module_request, int beg_pos,
- int end_pos);
+ int module_request, int cell_index,
+ int beg_pos, int end_pos);
inline Object* export_name() const;
inline Object* local_name() const;
inline Object* import_name() const;
- inline Object* module_request() const;
+ inline int module_request() const;
+ inline int cell_index() const;
inline int beg_pos() const;
inline int end_pos() const;
@@ -4756,6 +4758,7 @@ class ModuleInfoEntry : public FixedArray {
kLocalNameIndex,
kImportNameIndex,
kModuleRequestIndex,
+ kCellIndexIndex,
kBegPosIndex,
kEndPosIndex,
kLength
@@ -4763,6 +4766,7 @@ class ModuleInfoEntry : public FixedArray {
};
// ModuleInfo is to ModuleDescriptor what ScopeInfo is to Scope.
+// TODO(neis): Use Struct instead of FixedArray.
class ModuleInfo : public FixedArray {
public:
DECLARE_CAST(ModuleInfo)

Powered by Google App Engine
This is Rietveld 408576698