Lines Matching defs:scope

92 // Takes the scope of a parsed script, a function and a break location
93 // inside the function. The result is the innermost lexical scope around
95 // And the scope of the function that was passed in (called closure scope).
97 // The start scope is guaranteed to be either the closure scope itself,
98 // or a child of the closure scope.
101 ScopeChainRetriever(DeclarationScope* scope, Handle<JSFunction> function,
103 : scope_(scope),
109 DCHECK_NOT_NULL(scope);
128 // Even though the DefaultBaseConstructor is a child of a Class scope, the
129 // source positions are *not* nested. This means the actual scope for the
139 bool RetrieveScopeChainDefaultConstructor(Scope* scope) {
140 const int beg_pos = scope->start_position();
141 const int end_pos = scope->end_position();
143 DCHECK(scope->is_function_scope());
145 IsDefaultConstructor(scope->AsDeclarationScope()->function_kind()));
146 start_scope_ = scope;
147 closure_scope_ = scope->AsDeclarationScope();
151 for (Scope* inner_scope = scope->inner_scope(); inner_scope != nullptr;
177 bool SetClosureScopeIfFound(Scope* scope) {
178 const int start = scope->start_position();
179 const int end = scope->end_position();
181 closure_scope_ = scope->AsDeclarationScope();
187 bool ContainsPosition(Scope* scope) {
188 const int start = scope->start_position();
189 const int end = scope->end_position();
198 // matching scope we include start in the accepted range for class scopes.
200 scope->is_class_scope() ? start <= position_ : start < position_;
218 // Class fields initializer functions don't have any scope
231 // which is not consistent with the current scope chain. Therefore all
233 // inspect the function scope.
290 DeclarationScope* literal_scope = info_->literal()->scope();
298 // {closure_scope_} to be set to the scope of the function.
347 // Fill in scope details.
404 // Generally, if a scope needs a context, then we can assume that it has a
436 // scope, but until we hit the next scope that actually requires
454 // The global scope is always the last in the chain.
490 // Return the type of the current scope.
525 // If we are at the native context and have not yet seen script scope,
562 Handle<JSObject> scope = isolate_->factory()->NewSlowJSObjectWithNullProto();
566 // Reflect variables under TDZ as undefined in scope object.
568 JSReceiver::HasOwnProperty(isolate_, scope, name).FromMaybe(true)) {
575 // Overwrite properties. Sometimes names in the same scope can collide, e.g.
577 JSObject::SetPropertyOrElement(isolate_, scope, name, value,
584 return scope;
667 // Debug print of the content of the current scope.
912 // Create a plain JSObject which materializes the block scope for the specified
928 // Add |arguments| to the function scope even if it wasn't used.