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

Unified Diff: src/objects.h

Issue 2460233003: [modules] Assign cell indices at validation time. (Closed)
Patch Set: Rebase 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/debug/debug-scopes.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 9e3c0372ce2e34c091dcda0510015f217c09b823..8eb2f9efaf6ec510199a15339b10a703ebd97ffc 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 MODULE variable
+ // 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)
« no previous file with comments | « src/debug/debug-scopes.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698