Home | History | Annotate | Download | only in ast

Lines Matching refs:CONTEXT

122   // Ensure at least MIN_CONTEXT_SLOTS to indicate a materialized context.
124 static_cast<int>(Context::MIN_CONTEXT_SLOTS));
145 num_heap_slots_ = Context::MIN_CONTEXT_SLOTS;
210 Context* context, Scope* script_scope) {
211 // Reconstruct the outer scope chain from a closure's context chain.
214 while (!context->IsNativeContext()) {
215 if (context->IsWithContext() || context->IsDebugEvaluateContext()) {
225 } else if (context->IsScriptContext()) {
226 ScopeInfo* scope_info = context->scope_info();
230 } else if (context->IsModuleContext()) {
231 ScopeInfo* scope_info = context->module()->scope_info();
235 } else if (context->IsFunctionContext()) {
236 ScopeInfo* scope_info = context->closure()->shared()->scope_info();
242 } else if (context->IsBlockContext()) {
243 ScopeInfo* scope_info = context->scope_info();
248 DCHECK(context->IsCatchContext());
249 String* name = context->catch_name();
256 context = context->previous();
406 // Check context slot lookup.
408 VariableLocation location = VariableLocation::CONTEXT;
437 if (location == VariableLocation::CONTEXT &&
466 var->AllocateTo(VariableLocation::CONTEXT, index);
642 // context as a whole has forced context allocation.
704 // A function scope has a trivial context if it always is the global
705 // context. We iteratively scan out the context chain to see if
721 // Note that the outer context may be trivial in general, but the current
722 // scope may be inside a 'with' statement in which case the outer context
866 case VariableLocation::CONTEXT:
867 PrintF("context[%d]", var->index());
892 PrintF("forced context allocation");
952 Indent(n1, "// scope has trivial outer context\n");
965 Indent(n1, "// outer scope calls 'eval' in sloppy context\n");
1151 location == VariableLocation::CONTEXT ||
1164 // scope which was not promoted to a context, this can happen if we use
1264 // context.
1266 // Exceptions: If the scope as a whole has forced context allocation, all
1267 // variables will have context allocation, even temporaries. Otherwise
1269 // always context-allocated.
1300 var->AllocateTo(VariableLocation::CONTEXT, num_heap_slots_++);
1316 // the context assuming they will be captured by the arguments object.
1340 // If it does, and if it is not copied into the context object, it must
1349 // Force context allocation of the parameter.
1381 // Force context allocation of the receiver.
1447 // allocated in the context, it must be the last slot in the context,
1485 num_heap_slots_ = Context::MIN_CONTEXT_SLOTS;
1493 // Force allocation of a context for this scope if necessary. For a 'with'
1494 // scope and for a function scope that makes an 'eval' call we need a context,
1502 // If we didn't allocate any locals in the local context, then we only
1503 // need the minimal number of slots if we must have a context.
1504 if (num_heap_slots_ == Context::MIN_CONTEXT_SLOTS && !must_have_context) {
1509 DCHECK(num_heap_slots_ == 0 || num_heap_slots_ >= Context::MIN_CONTEXT_SLOTS);
1523 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS - num_global_slots() -