| Index: src/scopes.h
|
| diff --git a/src/scopes.h b/src/scopes.h
|
| index 1b43f8e393399e152cb389fb737c56f74f150560..40863800e492da1c8983ed4015e0cc3b2339b0a1 100644
|
| --- a/src/scopes.h
|
| +++ b/src/scopes.h
|
| @@ -442,6 +442,7 @@ class Scope: public ZoneObject {
|
| // handled separately.
|
| void CollectStackAndContextLocals(
|
| ZoneList<Variable*>* stack_locals, ZoneList<Variable*>* context_locals,
|
| + ZoneList<Variable*>* context_globals,
|
| ZoneList<Variable*>* strong_mode_free_variables = nullptr);
|
|
|
| // Current number of var or const locals.
|
| @@ -450,9 +451,11 @@ class Scope: public ZoneObject {
|
| // Result of variable allocation.
|
| int num_stack_slots() const { return num_stack_slots_; }
|
| int num_heap_slots() const { return num_heap_slots_; }
|
| + int num_global_slots() const { return num_global_slots_; }
|
|
|
| int StackLocalCount() const;
|
| int ContextLocalCount() const;
|
| + int ContextGlobalCount() const;
|
|
|
| // For script scopes, the number of module literals (including nested ones).
|
| int num_modules() const { return num_modules_; }
|
| @@ -617,6 +620,7 @@ class Scope: public ZoneObject {
|
| // Computed via AllocateVariables; function, block and catch scopes only.
|
| int num_stack_slots_;
|
| int num_heap_slots_;
|
| + int num_global_slots_;
|
|
|
| // The number of modules (including nested ones).
|
| int num_modules_;
|
| @@ -713,7 +717,8 @@ class Scope: public ZoneObject {
|
| void AllocateHeapSlot(Variable* var);
|
| void AllocateParameterLocals(Isolate* isolate);
|
| void AllocateNonParameterLocal(Isolate* isolate, Variable* var);
|
| - void AllocateNonParameterLocals(Isolate* isolate);
|
| + void AllocateDeclaredGlobal(Isolate* isolate, Variable* var);
|
| + void AllocateNonParameterLocalsAndDeclaredGlobals(Isolate* isolate);
|
| void AllocateVariablesRecursively(Isolate* isolate);
|
| void AllocateParameter(Variable* var, int index);
|
| void AllocateReceiver();
|
|
|