| Index: src/scopes.h
|
| diff --git a/src/scopes.h b/src/scopes.h
|
| index af0449e93c7dea6895f06d42cf7a95ca7624071c..ef3122e0a31a95453cf6b6b824cc737202863786 100644
|
| --- a/src/scopes.h
|
| +++ b/src/scopes.h
|
| @@ -1,4 +1,4 @@
|
| -// Copyright 2011 the V8 project authors. All rights reserved.
|
| +// Copyright 2012 the V8 project authors. All rights reserved.
|
| // Redistribution and use in source and binary forms, with or without
|
| // modification, are permitted provided that the following conditions are
|
| // met:
|
| @@ -115,7 +115,7 @@ class Scope: public ZoneObject {
|
| // between this scope and the outer scope. (ECMA-262, 3rd., requires that
|
| // the name of named function literal is kept in an intermediate scope
|
| // in between this scope and the next outer scope.)
|
| - Variable* LookupFunctionVar(Handle<String> name);
|
| + Variable* LookupFunctionVar(Handle<String> name, AstNodeFactory* factory);
|
|
|
| // Lookup a variable in this scope or outer scopes.
|
| // Returns the variable or NULL if not found.
|
| @@ -124,7 +124,9 @@ class Scope: public ZoneObject {
|
| // Declare the function variable for a function literal. This variable
|
| // is in an intermediate scope between this function scope and the the
|
| // outer scope. Only possible for function scopes; at most one variable.
|
| - Variable* DeclareFunctionVar(Handle<String> name, VariableMode mode);
|
| + Variable* DeclareFunctionVar(Handle<String> name,
|
| + VariableMode mode,
|
| + AstNodeFactory* factory);
|
|
|
| // Declare a parameter in this scope. When there are duplicated
|
| // parameters the rightmost one 'wins'. However, the implementation
|
| @@ -144,7 +146,8 @@ class Scope: public ZoneObject {
|
| Variable* DeclareGlobal(Handle<String> name);
|
|
|
| // Create a new unresolved variable.
|
| - VariableProxy* NewUnresolved(Handle<String> name,
|
| + VariableProxy* NewUnresolved(AstNodeFactory* factory,
|
| + Handle<String> name,
|
| int position = RelocInfo::kNoPosition);
|
|
|
| // Remove a unresolved variable. During parsing, an unresolved variable
|
| @@ -332,7 +335,7 @@ class Scope: public ZoneObject {
|
| // 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(Scope* global_scope);
|
| + void AllocateVariables(Scope* global_scope, AstNodeFactory* factory);
|
|
|
| // Current number of var or const locals.
|
| int num_var_or_const() { return num_var_or_const_; }
|
| @@ -519,10 +522,13 @@ class Scope: public ZoneObject {
|
| // scope. If the code is executed because of a call to 'eval', the context
|
| // parameter should be set to the calling context of 'eval'.
|
| Variable* LookupRecursive(Handle<String> name,
|
| - BindingKind* binding_kind);
|
| + BindingKind* binding_kind,
|
| + AstNodeFactory* factory);
|
| void ResolveVariable(Scope* global_scope,
|
| - VariableProxy* proxy);
|
| - void ResolveVariablesRecursively(Scope* global_scope);
|
| + VariableProxy* proxy,
|
| + AstNodeFactory* factory);
|
| + void ResolveVariablesRecursively(Scope* global_scope,
|
| + AstNodeFactory* factory);
|
|
|
| // Scope analysis.
|
| bool PropagateScopeInfo(bool outer_scope_calls_non_strict_eval);
|
|
|