Lines Matching defs:context

83   Context context = get_context(index);
84 DCHECK(context.IsScriptContext());
85 int slot_index = context.scope_info().ContextSlotIndex(name, result);
197 Handle<Object> Context::Lookup(Handle<Context> context, Handle<String> name,
203 Isolate* isolate = context->GetIsolate();
222 PrintF(" - looking in context %p",
223 reinterpret_cast<void*>(context->ptr()));
224 if (context->IsScriptContext()) PrintF(" (script context)");
225 if (context->IsNativeContext()) PrintF(" (native context)");
230 DCHECK_IMPLIES(context->IsEvalContext() && context->has_extension(),
231 context->extension().IsTheHole(isolate));
232 if ((context->IsNativeContext() || context->IsWithContext() ||
233 context->IsFunctionContext() || context->IsBlockContext()) &&
234 context->has_extension() && !context->extension_receiver().is_null()) {
235 Handle<JSReceiver> object(context->extension_receiver(), isolate);
237 if (context->IsNativeContext()) {
244 context->global_object().native_context().script_context_table();
249 PrintF("=> found property in script context %d: %p\n",
263 // to only do a local lookup for context extension objects.
269 // A with context will never bind "this", but debug-eval may look into
270 // a with context when resolving "this". Other synthetic variables such
277 DCHECK(context->IsWithContext());
281 Maybe<bool> found = UnscopableLookup(&it, context->IsWithContext());
299 PrintF("=> found property in context object %p\n",
306 // 2. Check the context proper if it has slots.
307 if (context->IsFunctionContext() || context->IsBlockContext() ||
308 context->IsScriptContext() || context->IsEvalContext() ||
309 context->IsModuleContext() || context->IsCatchContext()) {
312 // for the context index.
313 ScopeInfo scope_info = context->scope_info();
319 // a REPL script context. REPL scripts allow re-declaration of
321 // context of the first script that declared a variable, all other
324 context->get(slot_index).IsTheHole(isolate)) {
325 context = Handle<Context>(context->previous(), isolate);
330 PrintF("=> found local in context slot %d (mode = %hhu)\n",
337 return context;
340 // Check the slot corresponding to the intermediate context holding
343 if (follow_context_chain && context->IsFunctionContext()) {
347 PrintF("=> found intermediate function in context slot %d\n",
358 return context;
363 if (context->IsModuleContext()) {
380 return handle(context->module(), isolate);
383 } else if (context->IsDebugEvaluateContext()) {
385 Object ext = context->get(EXTENSION_INDEX);
397 ScopeInfo scope_info = context->scope_info();
406 // Check the original context, but do not follow its context chain.
407 Object obj = context->get(WRAPPED_CONTEXT_INDEX);
417 // 3. Prepare to continue with the previous (next outermost) context.
418 if (context->IsNativeContext()) break;
420 context = Handle<Context>(context->previous(), isolate);
441 "Code generation from strings disallowed for this context");
472 // TODO(v8:12298): Fix js-context-specialization cctests to set up full
497 // Host-defined options can be stored on the context for classic scripts.
519 Context context = Context::cast(object);
520 return context.IsNativeContext() || context.IsScriptContext() ||
521 context.IsModuleContext() || !child.IsModuleContext();