Lines Matching refs:Variable
33 Variable* VariableMap::Declare(Scope* scope, const AstRawString* name, in Declare()
35 Variable::Kind kind, in Declare()
48 Variable(scope, name, mode, is_valid_lhs, kind, initialization_flag, in Declare()
51 return reinterpret_cast<Variable*>(p->value); in Declare()
55 Variable* VariableMap::Lookup(const AstRawString* name) { in Lookup()
61 return reinterpret_cast<Variable*>(p->value); in Lookup()
139 Variable* variable = variables_.Declare(this, in Scope()
143 Variable::NORMAL, in Scope()
317 Variable* var = in Initialize()
322 Variable::THIS, in Initialize()
324 var->AllocateTo(Variable::PARAMETER, -1); in Initialize()
339 Variable::ARGUMENTS, in Initialize()
375 Variable* Scope::LookupLocal(const AstRawString* name) { in LookupLocal()
376 Variable* result = variables_.Lookup(name); in LookupLocal()
390 Variable::Location location = Variable::CONTEXT; in LookupLocal()
401 location = Variable::LOOKUP; in LookupLocal()
409 Variable* var = variables_.Declare(this, name, mode, true, Variable::NORMAL, in LookupLocal()
416 Variable* Scope::LookupFunctionVar(const AstRawString* name, in LookupFunctionVar()
425 Variable* var = new(zone()) Variable( in LookupFunctionVar()
427 Variable::NORMAL, kCreatedInitialized); in LookupFunctionVar()
432 var->AllocateTo(Variable::CONTEXT, index); in LookupFunctionVar()
440 Variable* Scope::Lookup(const AstRawString* name) { in Lookup()
444 Variable* var = scope->LookupLocal(name); in Lookup()
451 Variable* Scope::DeclareParameter(const AstRawString* name, VariableMode mode) { in DeclareParameter()
454 Variable* var = variables_.Declare(this, name, mode, true, Variable::NORMAL, in DeclareParameter()
461 Variable* Scope::DeclareLocal(const AstRawString* name, VariableMode mode, in DeclareLocal()
471 return variables_.Declare(this, name, mode, true, Variable::NORMAL, init_flag, in DeclareLocal()
476 Variable* Scope::DeclareDynamicGlobal(const AstRawString* name) { in DeclareDynamicGlobal()
482 Variable::NORMAL, in DeclareDynamicGlobal()
499 Variable* Scope::NewInternal(const AstRawString* name) { in NewInternal()
501 Variable* var = new(zone()) Variable(this, in NewInternal()
505 Variable::NORMAL, in NewInternal()
512 Variable* Scope::NewTemporary(const AstRawString* name) { in NewTemporary()
514 Variable* var = new(zone()) Variable(this, in NewTemporary()
518 Variable::NORMAL, in NewTemporary()
557 Variable* other_var = current->variables_.Lookup(name); in CheckConflictingVarDeclarations()
571 VarAndOrder(Variable* var, int order) : var_(var), order_(order) { } in VarAndOrder()
572 Variable* var() const { return var_; } in var()
579 Variable* var_;
584 void Scope::CollectStackAndContextLocals(ZoneList<Variable*>* stack_locals, in CollectStackAndContextLocals()
585 ZoneList<Variable*>* context_locals) { in CollectStackAndContextLocals()
591 Variable* var = internals_[i]; in CollectStackAndContextLocals()
601 Variable* var = temps_[i]; in CollectStackAndContextLocals()
618 Variable* var = reinterpret_cast<Variable*>(p->value); in CollectStackAndContextLocals()
626 Variable* var = vars[i].var(); in CollectStackAndContextLocals()
798 static void PrintLocation(Variable* var) { in PrintLocation()
800 case Variable::UNALLOCATED: in PrintLocation()
802 case Variable::PARAMETER: in PrintLocation()
805 case Variable::LOCAL: in PrintLocation()
808 case Variable::CONTEXT: in PrintLocation()
811 case Variable::LOOKUP: in PrintLocation()
818 static void PrintVar(int indent, Variable* var) { in PrintVar()
820 Indent(indent, Variable::Mode2String(var->mode())); in PrintVar()
842 Variable* var = reinterpret_cast<Variable*>(p->value); in PrintMap()
942 Variable* Scope::NonLocal(const AstRawString* name, VariableMode mode) { in NonLocal()
945 Variable* var = map->Lookup(name); in NonLocal()
954 Variable::NORMAL, in NonLocal()
957 var->AllocateTo(Variable::LOOKUP, -1); in NonLocal()
963 Variable* Scope::LookupRecursive(VariableProxy* proxy, in LookupRecursive()
975 Variable* var = LookupLocal(proxy->raw_name()); in LookupRecursive()
1038 Variable* var = LookupRecursive(proxy, &binding_kind, factory); in ResolveVariable()
1054 Variable* invalidated = var; in ResolveVariable()
1179 bool Scope::MustAllocate(Variable* var) { in MustAllocate()
1200 bool Scope::MustAllocateInContext(Variable* var) { in MustAllocateInContext()
1233 void Scope::AllocateStackSlot(Variable* var) { in AllocateStackSlot()
1234 var->AllocateTo(Variable::LOCAL, num_stack_slots_++); in AllocateStackSlot()
1238 void Scope::AllocateHeapSlot(Variable* var) { in AllocateHeapSlot()
1239 var->AllocateTo(Variable::CONTEXT, num_heap_slots_++); in AllocateHeapSlot()
1245 Variable* arguments = LookupLocal(ast_value_factory_->arguments_string()); in AllocateParameterLocals()
1275 Variable* var = params_[i]; in AllocateParameterLocals()
1291 var->AllocateTo(Variable::PARAMETER, i); in AllocateParameterLocals()
1299 void Scope::AllocateNonParameterLocal(Variable* var) { in AllocateNonParameterLocal()
1327 Variable* var = reinterpret_cast<Variable*>(p->value); in AllocateNonParameterLocals()