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

Unified Diff: src/objects.h

Issue 2277253003: [modules] Partial scope info support of modules (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@modules-refactor
Patch Set: 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
« src/handles.h ('K') | « src/handles.h ('k') | src/parsing/parser.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 7ad59a1050b297ef76860197bb11d53d3c1b4ba7..61c99256303fde74ffa2d811cc3d781eebe30dd3 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -879,6 +879,7 @@ class LayoutDescriptor;
class LiteralsArray;
class LookupIterator;
class FieldType;
+class ModuleInfo;
class ObjectHashTable;
class ObjectVisitor;
class PropertyCell;
@@ -4313,6 +4314,8 @@ class ScopeInfo : public FixedArray {
// Return the function_name if present.
String* FunctionName();
+ ModuleInfo* ModuleDescriptorInfo();
+
// Return the name of the given parameter.
String* ParameterName(int var);
@@ -4366,6 +4369,12 @@ class ScopeInfo : public FixedArray {
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.
+ static int ModuleIndex(Handle<ScopeInfo> scope_info, Handle<String> name,
+ VariableMode* mode, InitializationFlag* init_flag,
+ MaybeAssignedFlag* maybe_assigned_flag);
+
// Lookup the name of a certain context slot by its index.
String* ContextSlotName(int slot_index);
@@ -4405,6 +4414,7 @@ class ScopeInfo : public FixedArray {
// 3. The number of non-parameter variables allocated on the stack.
// 4. The number of non-parameter and parameter variables allocated in the
// context.
+// XXX
#define FOR_EACH_SCOPE_INFO_NUMERIC_FIELD(V) \
V(Flags) \
V(ParameterCount) \
@@ -4469,6 +4479,7 @@ class ScopeInfo : public FixedArray {
int ContextGlobalInfoEntriesIndex();
int ReceiverEntryIndex();
int FunctionNameEntryIndex();
+ int ModuleInfoEntryIndex();
int Lookup(Handle<String> name, int start, int end, VariableMode* mode,
VariableLocation* location, InitializationFlag* init_flag,
« src/handles.h ('K') | « src/handles.h ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698