• Home
  • Raw
  • Download

Lines Matching full:variable

28 // A hash map to support fast variable declaration and lookup.
33 Variable* Declare(
41 // Variable. Useful for preparsing.
42 Variable* DeclareName(Zone* zone, const AstRawString* name,
45 Variable* Lookup(const AstRawString* name);
46 void Remove(Variable* var);
47 void Add(Zone* zone, Variable* var);
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.
122 ThreadedList<Variable>::Iterator top_local_; in NON_EXPORTED_BASE()
158 // Lookup a variable in this scope. Returns the variable or NULL if not found. in NON_EXPORTED_BASE()
159 Variable* LookupLocal(const AstRawString* name) { in NON_EXPORTED_BASE()
160 Variable* result = variables_.Lookup(name); in NON_EXPORTED_BASE()
165 Variable* LookupInScopeInfo(const AstRawString* name); in NON_EXPORTED_BASE()
167 // Lookup a variable in this scope or outer scopes. in NON_EXPORTED_BASE()
168 // Returns the variable or NULL if not found. in NON_EXPORTED_BASE()
169 Variable* Lookup(const AstRawString* name); in NON_EXPORTED_BASE()
171 // Declare a local variable in this scope. If the variable has been in NON_EXPORTED_BASE()
172 // declared before, the previously declared variable is returned. in NON_EXPORTED_BASE()
173 Variable* DeclareLocal(const AstRawString* name, VariableMode mode, in NON_EXPORTED_BASE()
178 Variable* DeclareVariable(Declaration* declaration, VariableMode mode, in NON_EXPORTED_BASE()
185 Variable* DeclareVariableName(const AstRawString* name, VariableMode mode); in NON_EXPORTED_BASE()
190 ThreadedList<Variable>* locals() { return &locals_; } in NON_EXPORTED_BASE()
192 // Create a new unresolved variable. in NON_EXPORTED_BASE()
200 // Remove a unresolved variable. During parsing, an unresolved variable in NON_EXPORTED_BASE()
201 // may have been added optimistically, but then only the variable name in NON_EXPORTED_BASE()
202 // was used (typically for labels). If the variable was not declared, the in NON_EXPORTED_BASE()
203 // addition introduced a new unresolved variable which may end up being in NON_EXPORTED_BASE()
204 // allocated globally as a "ghost" variable. RemoveUnresolved removes in NON_EXPORTED_BASE()
205 // such a variable again if it was added; otherwise this is a no-op. in NON_EXPORTED_BASE()
208 // Creates a new temporary variable in this scope's TemporaryScope. The in NON_EXPORTED_BASE()
209 // name is only used for printing and cannot be used to find the variable. in NON_EXPORTED_BASE()
211 // Variable* around. The name should not clash with a legitimate variable in NON_EXPORTED_BASE()
214 Variable* NewTemporary(const AstRawString* name); in NON_EXPORTED_BASE()
258 // the three compilers will perform hole check elimination on a variable in NON_EXPORTED_BASE()
367 // Variable allocation. in NON_EXPORTED_BASE()
369 // Result of variable allocation. in NON_EXPORTED_BASE()
474 Variable* Declare( in NON_EXPORTED_BASE()
486 Variable* NewTemporary(const AstRawString* name, in NON_EXPORTED_BASE()
503 ThreadedList<Variable> locals_; in NON_EXPORTED_BASE()
555 // Create a non-local variable with a given name. in NON_EXPORTED_BASE()
557 Variable* NonLocal(const AstRawString* name, VariableMode mode); in NON_EXPORTED_BASE()
559 // Variable resolution. in NON_EXPORTED_BASE()
560 // Lookup a variable reference given by name recursively starting with this in NON_EXPORTED_BASE()
564 Variable* LookupRecursive(VariableProxy* proxy, Scope* outer_scope_end); in NON_EXPORTED_BASE()
565 void ResolveTo(ParseInfo* info, VariableProxy* proxy, Variable* var); in NON_EXPORTED_BASE()
577 bool MustAllocate(Variable* var); in NON_EXPORTED_BASE()
578 bool MustAllocateInContext(Variable* var); in NON_EXPORTED_BASE()
580 // Variable allocation. in NON_EXPORTED_BASE()
581 void AllocateStackSlot(Variable* var); in NON_EXPORTED_BASE()
582 void AllocateHeapSlot(Variable* var); in NON_EXPORTED_BASE()
583 void AllocateNonParameterLocal(Variable* var); in NON_EXPORTED_BASE()
584 void AllocateDeclaredGlobal(Variable* var); in NON_EXPORTED_BASE()
675 // Declare the function variable for a function literal. This variable
677 // outer scope. Only possible for function scopes; at most one variable.
680 // declared in the scope. It will add a variable for {name} to {variables_};
681 // either the function variable itself, or a non-local in case the function
683 Variable* DeclareFunctionVar(const AstRawString* name);
687 Variable* DeclareGeneratorObjectVar(const AstRawString* name);
688 Variable* DeclarePromiseVar(const AstRawString* name);
693 Variable* DeclareParameter(const AstRawString* name, VariableMode mode,
697 // Declares that a parameter with the name exists. Creates a Variable and
699 Variable* DeclareParameterName(const AstRawString* name, bool is_rest,
702 // Declare an implicit global variable in this scope which must be a
703 // script scope. The variable was introduced (possibly from an inner
704 // scope) by a reference to an unresolved variable with no intervening
706 Variable* DeclareDynamicGlobal(const AstRawString* name,
709 // The variable corresponding to the 'this' value.
710 Variable* receiver() { in receiver()
717 // "this" (and no other variable) on the native context. Script scopes then
723 // The variable corresponding to the 'new.target' value.
724 Variable* new_target_var() { return new_target_; } in new_target_var()
726 // The variable holding the function literal for named function
728 Variable* function_var() const { in function_var()
733 Variable* generator_object_var() const { in generator_object_var()
738 Variable* promise_var() const { in promise_var()
746 Variable* parameter(int index) const { in parameter()
761 Variable* rest_parameter() const { in rest_parameter()
777 // The local variable 'arguments' if we need to allocate it; NULL otherwise.
778 Variable* arguments() const { in arguments()
783 Variable* this_function_var() const { in this_function_var()
784 Variable* this_function = GetRareVariable(RareVariable::kThisFunction); in this_function_var()
794 // Adds a local variable in this scope's locals list. This is for adjusting
797 void AddLocal(Variable* var);
852 void AllocateParameter(Variable* var, int index);
889 ZoneList<Variable*> params_;
892 // Convenience variable.
893 Variable* receiver_;
894 // Function variable, if any; function scopes only.
895 Variable* function_;
896 // new.target variable, function scopes only.
897 Variable* new_target_;
898 // Convenience variable; function scopes only.
899 Variable* arguments_;
902 // Convenience variable; Subclass constructor only
903 Variable* this_function = nullptr;
907 Variable* generator_object = nullptr;
909 Variable* promise = nullptr;
925 V8_INLINE Variable* GetRareVariable(RareVariable id) const { in GetRareVariable()
927 return *reinterpret_cast<Variable**>( in GetRareVariable()
931 // Set `var` to null if it's non-null and Predicate (Variable*) -> bool
936 Variable** var = reinterpret_cast<Variable**>( in NullifyRareVariableIf()