Lines Matching defs:proxy

1117       // The proxy is bound to a lookup variable to force a dynamic declaration
1219 void Scope::AddUnresolved(VariableProxy* proxy) {
1221 DCHECK(!proxy->is_resolved());
1222 unresolved_list_.Add(proxy);
1606 for (VariableProxy* proxy : scope->unresolved_list_) {
1607 DCHECK(!proxy->is_resolved());
1609 Lookup<kParsedScope>(proxy, lookup, max_outer_scope->outer_scope());
1611 *non_locals = StringSet::Add(isolate, *non_locals, proxy->name());
1616 scope->ResolveTo(proxy, var);
1637 for (VariableProxy* proxy = scope->unresolved_list_.first();
1638 proxy != nullptr; proxy = proxy->next_unresolved()) {
1639 if (proxy->is_removed_from_unresolved()) continue;
1640 DCHECK(!proxy->is_resolved());
1642 Lookup<kParsedScope>(proxy, scope, max_outer_scope->outer_scope());
1649 VariableProxy* copy = ast_node_factory->CopyVariableProxy(proxy);
1654 if (proxy->is_assigned()) var->SetMaybeAssigned();
2066 Variable* Scope::Lookup(VariableProxy* proxy, Scope* scope,
2074 Variable* var = cache_scope->variables_.Lookup(proxy->raw_name());
2091 return cache_scope->NonLocal(proxy->raw_name(), VariableMode::kDynamic);
2097 var = scope->LookupLocal(proxy->raw_name());
2106 var = scope->variables_.Lookup(proxy->raw_name());
2109 var = scope->LookupInScopeInfo(proxy->raw_name(),
2118 // variable when the variable and proxy are in the same eval execution. The
2123 // TODO(leszeks): Maybe we want to restrict this to e.g. lookups of a proxy
2139 return LookupWith(proxy, scope, outer_scope_end, cache_scope,
2145 return LookupSloppyEval(proxy, scope, outer_scope_end, cache_scope,
2156 return Lookup<kDeserializedScope>(proxy, scope, outer_scope_end,
2170 proxy->raw_name(), NORMAL_VARIABLE,
2175 VariableProxy* proxy, Scope* scope, Scope* outer_scope_end,
2178 VariableProxy* proxy, Scope* scope, Scope* outer_scope_end,
2181 Variable* Scope::LookupWith(VariableProxy* proxy, Scope* scope,
2188 ? Lookup<kParsedScope>(proxy, scope->outer_scope_, outer_scope_end,
2190 : Lookup<kDeserializedScope>(proxy, scope->outer_scope_,
2205 if (proxy->is_assigned()) var->SetMaybeAssigned();
2216 target_scope->NonLocal(proxy->raw_name(), VariableMode::kDynamic);
2221 Variable* Scope::LookupSloppyEval(VariableProxy* proxy, Scope* scope,
2236 ? Lookup<kParsedScope>(proxy, scope->outer_scope_, outer_scope_end,
2238 : Lookup<kDeserializedScope>(proxy, scope->outer_scope_,
2259 var = target->NonLocal(proxy->raw_name(), VariableMode::kDynamicGlobal);
2268 var = target->NonLocal(proxy->raw_name(), VariableMode::kDynamicLocal);
2274 void Scope::ResolveVariable(VariableProxy* proxy) {
2275 DCHECK(!proxy->is_resolved());
2276 Variable* var = Lookup<kParsedScope>(proxy, this, nullptr);
2278 ResolveTo(proxy, var);
2283 void SetNeedsHoleCheck(Variable* var, VariableProxy* proxy) {
2284 proxy->set_needs_hole_check();
2288 void UpdateNeedsHoleCheck(Variable* var, VariableProxy* proxy, Scope* scope) {
2295 return UpdateNeedsHoleCheck(var->local_if_not_shadowed(), proxy, scope);
2304 return SetNeedsHoleCheck(var, proxy);
2326 return SetNeedsHoleCheck(var, proxy);
2331 DCHECK_NE(proxy->position(), kNoSourcePosition);
2334 var->initializer_position() >= proxy->position()) {
2335 return SetNeedsHoleCheck(var, proxy);
2341 void Scope::ResolveTo(VariableProxy* proxy, Variable* var) {
2343 UpdateNeedsHoleCheck(var, proxy, this);
2344 proxy->BindTo(var);
2347 void Scope::ResolvePreparsedVariable(VariableProxy* proxy, Scope* scope,
2351 Variable* var = scope->LookupLocal(proxy->raw_name());
2356 if (proxy->is_assigned()) var->SetMaybeAssigned();
2372 for (VariableProxy* proxy : unresolved_list_) {
2373 ResolvePreparsedVariable(proxy, outer_scope(), end);
2377 for (VariableProxy* proxy : unresolved_list_) {
2378 ResolveVariable(proxy);
2777 VariableProxy* proxy =
2779 AddUnresolved(proxy);
2780 return proxy;
2902 VariableProxy* proxy = *it;
2903 VariableProxy* copy = ast_node_factory->CopyVariableProxy(proxy);
2941 Variable* ClassScope::LookupPrivateName(VariableProxy* proxy) {
2942 DCHECK(!proxy->is_resolved());
2949 Variable* var = scope->LookupLocalPrivateName(proxy->raw_name());
2951 var = scope->LookupPrivateNameInScopeInfo(proxy->raw_name());
2967 for (VariableProxy* proxy : list) {
2968 Variable* var = LookupPrivateName(proxy);
2973 Scanner::Location loc = proxy->location();
2976 MessageTemplate::kInvalidPrivateFieldResolution, proxy->raw_name());
2979 proxy->BindTo(var);
3008 for (VariableProxy* proxy = unresolved.first(); proxy != nullptr;) {
3009 DCHECK(proxy->IsPrivateName());
3010 VariableProxy* next = proxy->next_unresolved();
3011 unresolved.Remove(proxy);
3017 var = LookupLocalPrivateName(proxy->raw_name());
3020 proxy->BindTo(var);
3036 return proxy;
3041 private_name_scope_iter.AddUnresolvedPrivateName(proxy);
3044 proxy = next;
3109 void PrivateNameScopeIterator::AddUnresolvedPrivateName(VariableProxy* proxy) {
3113 DCHECK(!proxy->is_resolved());
3114 DCHECK(proxy->IsPrivateName());
3115 GetScope()->EnsureRareData()->unresolved_private_names.Add(proxy);