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

Unified Diff: src/objects.h

Issue 1218783005: Support for global var shortcuts in script contexts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 70e219390964376ad583cc952b9d61d87fe6a58b..c0915757c132904c052ad7a0e44c96ba8dd805a9 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -4004,7 +4004,9 @@ class ScopeInfo : public FixedArray {
// If the slot is present and mode != NULL, sets *mode to the corresponding
// mode for that variable.
static int ContextSlotIndex(Handle<ScopeInfo> scope_info, Handle<String> name,
- VariableMode* mode, InitializationFlag* init_flag,
+ VariableMode* mode,
+ ContextSlotKindFlag* context_slot_kind,
+ InitializationFlag* init_flag,
MaybeAssignedFlag* maybe_assigned_flag);
// Lookup support for serialized scope info. Returns the
@@ -4055,6 +4057,7 @@ class ScopeInfo : public FixedArray {
V(ParameterCount) \
V(StackLocalCount) \
V(ContextLocalCount) \
+ V(ContextGlobalCount) \
V(StrongModeFreeVariableCount)
#define FIELD_ACCESSORS(name) \
@@ -4123,12 +4126,19 @@ class ScopeInfo : public FixedArray {
int StackLocalFirstSlotIndex();
int StackLocalEntriesIndex();
int ContextLocalNameEntriesIndex();
+ int ContextGlobalNameEntriesIndex();
int ContextLocalInfoEntriesIndex();
+ int ContextGlobalInfoEntriesIndex();
int StrongModeFreeVariableNameEntriesIndex();
int StrongModeFreeVariablePositionEntriesIndex();
int ReceiverEntryIndex();
int FunctionNameEntryIndex();
+ int Lookup(Handle<String> name, int start, int end, VariableMode* mode,
+ ContextSlotKindFlag* context_slot_kind,
+ InitializationFlag* init_flag,
+ MaybeAssignedFlag* maybe_assigned_flag);
+
// Used for the function name variable for named function expressions, and for
// the receiver.
enum VariableAllocationInfo { NONE, STACK, CONTEXT, UNUSED };

Powered by Google App Engine
This is Rietveld 408576698