Lines Matching full:scope_info
84 Handle<ScopeInfo> scope_info = factory->NewScopeInfo(length);
102 scope_info->SetFlags(flags);
103 scope_info->SetParameterCount(parameter_count);
104 scope_info->SetStackLocalCount(stack_local_count);
105 scope_info->SetContextLocalCount(context_local_count);
106 scope_info->SetContextGlobalCount(context_global_count);
107 scope_info->SetStrongModeFreeVariableCount(strong_mode_free_variable_count);
111 DCHECK(index == scope_info->ParameterEntriesIndex());
113 scope_info->set(index++, *scope->parameter(i)->name());
125 DCHECK(index == scope_info->StackLocalFirstSlotIndex());
126 scope_info->set(index++, Smi::FromInt(first_slot_index));
127 DCHECK(index == scope_info->StackLocalEntriesIndex());
130 scope_info->set(index++, *stack_locals[i]->name());
142 DCHECK(index == scope_info->ContextLocalNameEntriesIndex());
144 scope_info->set(index++, *context_locals[i]->name());
148 DCHECK(index == scope_info->ContextGlobalNameEntriesIndex());
150 scope_info->set(index++, *context_globals[i]->name());
154 DCHECK(index == scope_info->ContextLocalInfoEntriesIndex());
161 scope_info->set(index++, Smi::FromInt(value));
165 DCHECK(index == scope_info->ContextGlobalInfoEntriesIndex());
173 scope_info->set(index++, Smi::FromInt(value));
176 DCHECK(index == scope_info->StrongModeFreeVariableNameEntriesIndex());
178 scope_info->set(index++, *strong_mode_free_variables[i]->name());
181 DCHECK(index == scope_info->StrongModeFreeVariablePositionEntriesIndex());
188 scope_info->set(index++, *start_position);
192 scope_info->set(index++, *end_position);
196 DCHECK(index == scope_info->ReceiverEntryIndex());
199 scope_info->set(index++, Smi::FromInt(var_index));
201 // scope_info->ContextLength() - 1);
205 DCHECK(index == scope_info->FunctionNameEntryIndex());
208 scope_info->set(index++, *scope->function()->proxy()->name());
209 scope_info->set(index++, Smi::FromInt(var_index));
211 var_index == scope_info->ContextLength() - 1);
214 DCHECK(index == scope_info->length());
215 DCHECK(scope->num_parameters() == scope_info->ParameterCount());
216 DCHECK(scope->num_heap_slots() == scope_info->ContextLength() ||
218 scope_info->ContextLength() == 0));
219 return scope_info;
244 Handle<ScopeInfo> scope_info = factory->NewScopeInfo(length);
257 scope_info->SetFlags(flags);
258 scope_info->SetParameterCount(parameter_count);
259 scope_info->SetStackLocalCount(stack_local_count);
260 scope_info->SetContextLocalCount(context_local_count);
261 scope_info->SetContextGlobalCount(context_global_count);
262 scope_info->SetStrongModeFreeVariableCount(strong_mode_free_variable_count);
266 DCHECK(index == scope_info->StackLocalFirstSlotIndex());
267 scope_info->set(index++, Smi::FromInt(first_slot_index));
268 DCHECK(index == scope_info->StackLocalEntriesIndex());
271 DCHECK(index == scope_info->ContextLocalNameEntriesIndex());
272 scope_info->set(index++, *isolate->factory()->this_string());
273 DCHECK(index == scope_info->ContextLocalInfoEntriesIndex());
277 scope_info->set(index++, Smi::FromInt(value));
279 DCHECK(index == scope_info->StrongModeFreeVariableNameEntriesIndex());
280 DCHECK(index == scope_info->StrongModeFreeVariablePositionEntriesIndex());
283 DCHECK(index == scope_info->ReceiverEntryIndex());
285 scope_info->set(index++, Smi::FromInt(receiver_index));
287 DCHECK(index == scope_info->FunctionNameEntryIndex());
289 DCHECK_EQ(index, scope_info->length());
290 DCHECK_EQ(scope_info->ParameterCount(), 0);
291 DCHECK_EQ(scope_info->ContextLength(), Context::MIN_CONTEXT_SLOTS + 1);
293 return scope_info;
530 int ScopeInfo::ContextSlotIndex(Handle<ScopeInfo> scope_info,
537 if (scope_info->length() > 0) {
539 scope_info->GetIsolate()->context_slot_cache();
540 int result = context_slot_cache->Lookup(*scope_info, *name, mode, init_flag,
543 DCHECK(result < scope_info->ContextLength());
547 int start = scope_info->ContextLocalNameEntriesIndex();
548 int end = scope_info->ContextLocalNameEntriesIndex() +
549 scope_info->ContextLocalCount();
551 if (*name == scope_info->get(i)) {
553 *mode = scope_info->ContextLocalMode(var);
554 *init_flag = scope_info->ContextLocalInitFlag(var);
555 *maybe_assigned_flag = scope_info->ContextLocalMaybeAssignedFlag(var);
558 context_slot_cache->Update(scope_info, name, *mode, *init_flag,
560 DCHECK(result < scope_info->ContextLength());
565 context_slot_cache->Update(scope_info, name, TEMPORARY,
572 int ScopeInfo::ContextGlobalSlotIndex(Handle<ScopeInfo> scope_info,
579 if (scope_info->length() > 0) {
581 DCHECK_EQ(scope_info->ContextGlobalNameEntriesIndex(),
582 scope_info->ContextLocalNameEntriesIndex() +
583 scope_info->ContextLocalCount());
584 int base = scope_info->ContextLocalNameEntriesIndex();
585 int start = scope_info->ContextGlobalNameEntriesIndex();
586 int end = scope_info->ContextGlobalNameEntriesIndex() +
587 scope_info->ContextGlobalCount();
589 if (*name == scope_info->get(i)) {
591 *mode = scope_info->ContextLocalMode(var);
592 *init_flag = scope_info->ContextLocalInitFlag(var);
593 *maybe_assigned_flag = scope_info->ContextLocalMaybeAssignedFlag(var);
595 DCHECK(result < scope_info->ContextLength());
797 ScopeInfo* scope_info) {
805 String::cast(scope_info->get(start))->ShortPrint();