| Index: src/scopes.h
|
| ===================================================================
|
| --- src/scopes.h (revision 1344)
|
| +++ src/scopes.h (working copy)
|
| @@ -170,6 +170,11 @@
|
| bool calls_eval() const { return scope_calls_eval_; }
|
| bool outer_scope_calls_eval() const { return outer_scope_calls_eval_; }
|
|
|
| + // Is this scope inside a with statement.
|
| + bool inside_with() const { return scope_inside_with_; }
|
| + // Does this scope contain a with statement.
|
| + bool contains_with() const { return scope_contains_with_; }
|
| +
|
| // The scope immediately surrounding this scope, or NULL.
|
| Scope* outer_scope() const { return outer_scope_; }
|
|
|
| @@ -216,10 +221,15 @@
|
| template<class Allocator>
|
| void CollectUsedVariables(List<Variable*, Allocator>* locals);
|
|
|
| - // Resolve and fill in the allocation information for all variables in
|
| - // this scopes. Must be called *after* all scopes have been processed
|
| - // (parsed) to ensure that unresolved variables can be resolved properly.
|
| - void AllocateVariables();
|
| + // Resolve and fill in the allocation information for all variables
|
| + // in this scopes. Must be called *after* all scopes have been
|
| + // processed (parsed) to ensure that unresolved variables can be
|
| + // resolved properly.
|
| + //
|
| + // In the case of code compiled and run using 'eval', the context
|
| + // parameter is the context in which eval was called. In all other
|
| + // cases the context parameter is an empty handle.
|
| + void AllocateVariables(Handle<Context> context);
|
|
|
| // Result of variable allocation.
|
| int num_stack_slots() const { return num_stack_slots_; }
|
| @@ -308,8 +318,11 @@
|
| Variable* LookupRecursive(Handle<String> name,
|
| bool inner_lookup,
|
| Variable** invalidated_local);
|
| - void ResolveVariable(Scope* global_scope, VariableProxy* proxy);
|
| - void ResolveVariablesRecursively(Scope* global_scope);
|
| + void ResolveVariable(Scope* global_scope,
|
| + Handle<Context> context,
|
| + VariableProxy* proxy);
|
| + void ResolveVariablesRecursively(Scope* global_scope,
|
| + Handle<Context> context);
|
|
|
| // Scope analysis.
|
| bool PropagateScopeInfo(bool outer_scope_calls_eval,
|
|
|