Lines Matching refs:index

27   for (int index = 0; index < length(); ++index) {
28 Object entry = get(index);
29 Object other_entry = other.get(index);
68 // slot index indicates at which offset a particular scope starts in the
194 int index = kVariablePartIndex;
256 // Context locals are added using their index.
257 int context_local_base = index;
268 int local_index = var->index() - scope->ContextHeaderLength();
299 Smi::FromInt(var->index()));
330 int param_index = parameter->index() - scope->ContextHeaderLength();
339 index += local_names_container_size + context_local_count;
341 DCHECK_EQ(index, scope_info.SavedClassVariableInfoIndex());
343 // the context slot index of the class variable.
344 // Store the class variable index.
350 local_index = class_variable->index();
356 scope_info.set(index++, Smi::FromInt(local_index));
359 // If present, add the function variable name and its index.
360 DCHECK_EQ(index, scope_info.FunctionVariableInfoIndex());
366 var_index = var->index();
369 scope_info.set(index++, name, mode);
370 scope_info.set(index++, Smi::FromInt(var_index));
375 DCHECK_EQ(index, scope_info.InferredFunctionNameIndex());
378 index++;
381 DCHECK_EQ(index, scope_info.PositionInfoIndex());
383 scope_info.set(index++, Smi::FromInt(scope->start_position()));
384 scope_info.set(index++, Smi::FromInt(scope->end_position()));
388 DCHECK(index == scope_info.OuterScopeInfoIndex());
390 scope_info.set(index++, *outer_scope.ToHandleChecked(), mode);
395 DCHECK_EQ(index, scope_info.ModuleInfoIndex());
396 scope_info.set(index++, *module_info);
397 DCHECK_EQ(index, scope_info.ModuleVariableCountIndex());
399 index++;
400 DCHECK_EQ(index, scope_info.ModuleVariablesIndex());
402 index += kModuleVariableEntryLength * module_vars_count;
406 DCHECK_EQ(index, scope_info_handle->length());
454 int index = kVariablePartIndex;
455 DCHECK_EQ(index, scope_info->FunctionVariableInfoIndex());
456 DCHECK_EQ(index, scope_info->InferredFunctionNameIndex());
457 DCHECK_EQ(index, scope_info->PositionInfoIndex());
458 DCHECK(index == scope_info->OuterScopeInfoIndex());
460 scope_info->set(index++, *outer_scope.ToHandleChecked());
462 DCHECK_EQ(index, scope_info->length());
531 int index = kVariablePartIndex;
534 DCHECK_EQ(index, scope_info->ContextLocalNamesIndex());
536 scope_info->set(index++, ReadOnlyRoots(isolate).this_string());
538 DCHECK_EQ(index, scope_info->ContextLocalInfosIndex());
546 scope_info->set(index++, Smi::FromInt(value));
549 DCHECK_EQ(index, scope_info->FunctionVariableInfoIndex());
551 scope_info->set(index++, *isolate->factory()->empty_string());
552 scope_info->set(index++, Smi::zero());
554 DCHECK_EQ(index, scope_info->InferredFunctionNameIndex());
556 scope_info->set(index++, *isolate->factory()->empty_string());
558 DCHECK_EQ(index, scope_info->PositionInfoIndex());
560 scope_info->set(index++, Smi::zero());
561 scope_info->set(index++, Smi::zero());
562 DCHECK_EQ(index, scope_info->OuterScopeInfoIndex());
563 DCHECK_EQ(index, scope_info->length());
575 Object ScopeInfo::get(int index) const {
577 return get(cage_base, index);
580 Object ScopeInfo::get(PtrComprCageBase cage_base, int index) const {
581 DCHECK_LT(static_cast<unsigned>(index), static_cast<unsigned>(length()));
583 OffsetOfElementAt(index));
586 void ScopeInfo::set(int index, Smi value) {
587 DCHECK_LT(static_cast<unsigned>(index), static_cast<unsigned>(length()));
589 int offset = OffsetOfElementAt(index);
593 void ScopeInfo::set(int index, Object value, WriteBarrierMode mode) {
594 DCHECK_LT(static_cast<unsigned>(index), static_cast<unsigned>(length()));
595 int offset = OffsetOfElementAt(index);
611 ObjectSlot ScopeInfo::RawFieldOfElementAt(int index) {
612 return RawField(OffsetOfElementAt(index));
639 // 1) copy all the fields up to the blocklist index
930 int index;
931 ModuleVariable(i, nullptr, &index, mode, init_flag, maybe_assigned_flag);
932 return index;
959 int index = HasInlinedLocalNames()
963 if (index != -1) {
964 lookup_result->mode = ContextLocalMode(index);
965 lookup_result->is_static_flag = ContextLocalIsStaticFlag(index);
966 lookup_result->init_flag = ContextLocalInitFlag(index);
967 lookup_result->maybe_assigned_flag = ContextLocalMaybeAssignedFlag(index);
969 int context_slot = ContextHeaderLength() + index;
985 // The saved class variable info corresponds to the context slot index.
986 int index = saved_class_variable_info() - Context::MIN_CONTEXT_SLOTS;
987 DCHECK_GE(index, 0);
988 DCHECK_LT(index, ContextLocalCount());
989 String name = ContextInlinedLocalName(index);
990 return std::make_pair(name, index);
1077 void ScopeInfo::ModuleVariable(int i, String* name, int* index,
1086 if (index != nullptr) {
1087 *index = module_variables_index(i);
1088 DCHECK_NE(*index, 0);
1174 module_requests->set(elem->index(), *serialized_module_request);