Home | History | Annotate | Download | only in src

Lines Matching refs:Variable

40 // A hash map to support fast variable declaration and lookup.
47 Variable* Declare(Scope* scope,
51 Variable::Kind kind,
55 Variable* Lookup(Handle<String> name);
77 // to a JavaScript variable (including global properties) is represented by a
78 // VariableProxy node. Immediately after AST construction and before variable
80 // corresponding variable (though some are bound during parse time). Variable
81 // allocation binds each unresolved VariableProxy to one Variable and assigns
83 // Script variable.
112 // Lookup a variable in this scope. Returns the variable or NULL if not found.
113 Variable* LocalLookup(Handle<String> name);
119 Variable* LookupFunctionVar(Handle<String> name,
122 // Lookup a variable in this scope or outer scopes.
123 // Returns the variable or NULL if not found.
124 Variable* Lookup(Handle<String> name);
126 // Declare the function variable for a function literal. This variable
128 // outer scope. Only possible for function scopes; at most one variable.
130 Variable* DeclareFunctionVar(Handle<String> name,
134 Variable* function_var = new Variable(
135 this, name, mode, true, Variable::NORMAL, kCreatedInitialized);
145 // Declare a local variable in this scope. If the variable has been
146 // declared before, the previously declared variable is returned.
147 Variable* DeclareLocal(Handle<String> name,
152 // Declare an implicit global variable in this scope which must be a
153 // global scope. The variable was introduced (possibly from an inner
154 // scope) by a reference to an unresolved variable with no intervening
156 Variable* DeclareGlobal(Handle<String> name);
158 // Create a new unresolved variable.
174 // Remove a unresolved variable. During parsing, an unresolved variable
175 // may have been added optimistically, but then only the variable name
176 // was used (typically for labels). If the variable was not declared, the
177 // addition introduced a new unresolved variable which may end up being
178 // allocated globally as a "ghost" variable. RemoveUnresolved removes
179 // such a variable again if it was added; otherwise this is a no-op.
182 // Creates a new temporary variable in this scope. The name is only used
183 // for printing and cannot be used to find the variable. In particular,
184 // the only way to get hold of the temporary is by keeping the Variable*
186 Variable* NewTemporary(Handle<String> name);
214 // For harmony block scoping mode: Check if the scope has variable proxies
311 // The variable corresponding the 'this' value.
312 Variable* receiver() { return receiver_; }
314 // The variable holding the function literal for named function
324 Variable* parameter(int index) const {
331 // The local variable 'arguments' if we need to allocate it; NULL otherwise.
332 Variable* arguments() const { return arguments_; }
347 // Variable allocation.
350 // that the function variable - if present - is not collected and should be
352 void CollectStackAndContextLocals(ZoneList<Variable*>* stack_locals,
353 ZoneList<Variable*>* context_locals);
358 // Result of variable allocation.
440 ZoneList<Variable*> temps_;
442 ZoneList<Variable*> params_;
449 // Convenience variable.
450 Variable* receiver_;
451 // Function variable, if any; function scopes only.
453 // Convenience variable; function scopes only.
454 Variable* arguments_;
496 // Create a non-local variable with a given name.
498 Variable* NonLocal(Handle<String> name, VariableMode mode);
500 // Variable resolution.
501 // Possible results of a recursive variable lookup telling if and how a
502 // variable is bound. These are returned in the output parameter *binding_kind
505 // The variable reference could be statically resolved to a variable binding
511 // The variable reference could be statically resolved to a variable binding
515 // possibly introduce variable bindings shadowing the found one. Thus the
516 // found variable binding is just a guess.
519 // The variable reference could not be statically resolved to any binding
520 // and thus should be considered referencing a global variable. NULL is
521 // returned. The variable reference is not inside any 'with' statement and
526 // The variable reference could not be statically resolved to any binding
527 // NULL is returned. The variable reference is not inside any 'with'
530 // possibly introduce a variable binding. Thus the reference should be
531 // considered referencing a global variable unless it is shadowed by an
535 // The variable could not be statically resolved and needs to be looked up
537 // * A 'with' statement has been encountered and there is no variable
538 // binding for the name between the variable reference and the 'with'.
539 // The variable potentially references a property of the 'with' object.
541 // context chain contains either a variable binding for the name or it
546 // Lookup a variable reference given by name recursively starting with this
549 Variable* LookupRecursive(Handle<String> name,
565 bool MustAllocate(Variable* var);
566 bool MustAllocateInContext(Variable* var);
569 // Variable allocation.
570 void AllocateStackSlot(Variable* var);
571 void AllocateHeapSlot(Variable* var);
573 void AllocateNonParameterLocal(Variable* var);