Lines Matching defs:isolate
12 #include "src/execution/isolate-inl.h"
177 MaybeHandle<Object> ThrowArrayLengthRangeError(Isolate* isolate) {
178 THROW_NEW_ERROR(isolate, NewRangeError(MessageTemplate::kInvalidArrayLength),
195 void CopyObjectToObjectElements(Isolate* isolate, FixedArrayBase from_base,
199 ReadOnlyRoots roots(isolate);
226 to.CopyElements(isolate, to_start, from, from_start, copy_size,
230 void CopyDictionaryToObjectElements(Isolate* isolate, FixedArrayBase from_base,
244 ReadOnlyRoots(isolate).the_hole_value(), length);
257 InternalIndex entry = from.FindEntry(isolate, i + from_start);
260 DCHECK(!value.IsTheHole(isolate));
263 to.set_the_hole(isolate, i + to_start);
271 void CopyDoubleToObjectElements(Isolate* isolate, FixedArrayBase from_base,
287 ReadOnlyRoots(isolate).the_hole_value(), length);
297 Handle<FixedDoubleArray> from(FixedDoubleArray::cast(from_base), isolate);
298 Handle<FixedArray> to(FixedArray::cast(to_base), isolate);
305 HandleScope scope(isolate);
309 FixedDoubleArray::get(*from, i + from_start, isolate);
441 void CopyDictionaryToDoubleElements(Isolate* isolate, FixedArrayBase from_base,
461 InternalIndex entry = from.FindEntry(isolate, i + from_start);
470 void SortIndices(Isolate* isolate, Handle<FixedArray> indices,
478 std::sort(start, end, [isolate](Tagged_t elementA, Tagged_t elementB) {
480 Object a(DecompressTaggedAny(isolate, elementA));
481 Object b(DecompressTaggedAny(isolate, elementB));
486 if (a.IsSmi() || !a.IsUndefined(isolate)) {
487 if (!b.IsSmi() && b.IsUndefined(isolate)) {
492 return !b.IsSmi() && b.IsUndefined(isolate);
494 isolate->heap()->WriteBarrierForRange(*indices, ObjectSlot(start),
498 Maybe<bool> IncludesValueSlowPath(Isolate* isolate, Handle<JSObject> receiver,
501 bool search_for_hole = value->IsUndefined(isolate);
503 LookupIterator it(isolate, receiver, k);
509 ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, element_k,
518 Maybe<int64_t> IndexOfValueSlowPath(Isolate* isolate, Handle<JSObject> receiver,
522 LookupIterator it(isolate, receiver, k);
528 isolate, element_k, Object::GetProperty(&it), Nothing<int64_t>());
541 InternalIndex GetEntryForIndex(Isolate* isolate, JSObject holder,
609 static bool HasElementImpl(Isolate* isolate, JSObject holder, size_t index,
612 return Subclass::GetEntryForIndexImpl(isolate, holder, backing_store, index,
622 static bool HasEntryImpl(Isolate* isolate, FixedArrayBase backing_store,
644 static Handle<Object> GetImpl(Isolate* isolate, FixedArrayBase backing_store,
647 isolate);
722 static Maybe<bool> SetLengthImpl(Isolate* isolate, Handle<JSArray> array,
747 backing_store = handle(array->elements(), isolate);
758 isolate->heap()->RightTrimFixedArray(*backing_store, elements_to_trim);
813 Isolate* isolate = object->GetIsolate();
816 // and remove the check isolate->context().is_null().
818 if (!isolate->context().is_null() &&
820 return isolate->Throw<FixedArrayBase>(isolate->factory()->NewRangeError(
823 new_elements = isolate->factory()->NewFixedDoubleArray(capacity);
825 if (!isolate->context().is_null() &&
827 return isolate->Throw<FixedArrayBase>(isolate->factory()->NewRangeError(
830 new_elements = isolate->factory()->NewFixedArray(capacity);
838 Subclass::CopyElementsImpl(isolate, *old_elements, src_index, *new_elements,
847 Isolate* isolate = object->GetIsolate();
848 Handle<Map> from_map = handle(object->map(), isolate);
860 Handle<FixedArrayBase> from_elements(object->elements(), isolate);
861 if (object->elements() == ReadOnlyRoots(isolate).empty_fixed_array() ||
865 JSObject::MigrateToMap(isolate, object, to_map);
882 handle(object->elements(), isolate));
975 static void CopyElementsImpl(Isolate* isolate, FixedArrayBase from,
1008 void CopyElements(Isolate* isolate, Handle<FixedArrayBase> source,
1011 Subclass::CopyElementsImpl(isolate, *source, 0, *destination, source_kind,
1049 Maybe<bool> CollectValuesOrEntries(Isolate* isolate, Handle<JSObject> object,
1054 isolate, object, values_or_entries, get_entries, nof_items, filter);
1058 Isolate* isolate, Handle<JSObject> object,
1062 KeyAccumulator accumulator(isolate, KeyCollectionMode::kOwnOnly,
1065 object, handle(object->elements(), isolate), &accumulator));
1073 Handle<Object> key(keys->get(i), isolate);
1079 isolate, *object, object->elements(), index, filter);
1088 LookupIterator it(isolate, object, index, LookupIterator::OWN);
1090 isolate, value, Object::GetProperty(&it), Nothing<bool>());
1092 if (get_entries) value = MakeEntryPair(isolate, index, value);
1099 Handle<Object> key(keys->get(i), isolate);
1108 isolate, *object, object->elements(), index);
1115 LookupIterator it(isolate, object, index, LookupIterator::OWN);
1116 ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, value, Object::GetProperty(&it),
1119 if (get_entries) value = MakeEntryPair(isolate, index, value);
1141 Isolate* isolate = keys->isolate();
1142 Factory* factory = isolate->factory();
1144 if (Subclass::HasElementImpl(isolate, *object, i, *backing_store,
1154 Isolate* isolate, Handle<JSObject> object,
1160 isolate->heap()->MaxNumberToStringCacheSize();
1162 if (Subclass::HasElementImpl(isolate, *object, i, *backing_store,
1167 isolate->factory()->SizeToString(i, use_cache);
1170 Handle<Object> number = isolate->factory()->NewNumberFromSize(i);
1192 Isolate* isolate = object->GetIsolate();
1198 return isolate->Throw<FixedArray>(isolate->factory()->NewRangeError(
1205 MaybeHandle<FixedArray> raw_array = isolate->factory()->TryNewFixedArray(
1223 combined_keys = isolate->factory()->NewFixedArray(
1231 isolate, object, backing_store,
1236 SortIndices(isolate, combined_keys, nof_indices);
1241 Handle<Object> index_string = isolate->factory()->Uint32ToString(
1249 CopyObjectToObjectElements(isolate, *keys, PACKED_ELEMENTS, 0,
1260 return FixedArray::ShrinkOrEmpty(isolate, combined_keys, final_size);
1293 static Maybe<bool> IncludesValueImpl(Isolate* isolate,
1297 return IncludesValueSlowPath(isolate, receiver, value, start_from, length);
1300 Maybe<bool> IncludesValue(Isolate* isolate, Handle<JSObject> receiver,
1303 return Subclass::IncludesValueImpl(isolate, receiver, value, start_from,
1307 static Maybe<int64_t> IndexOfValueImpl(Isolate* isolate,
1311 return IndexOfValueSlowPath(isolate, receiver, value, start_from, length);
1314 Maybe<int64_t> IndexOfValue(Isolate* isolate, Handle<JSObject> receiver,
1317 return Subclass::IndexOfValueImpl(isolate, receiver, value, start_from,
1337 static InternalIndex GetEntryForIndexImpl(Isolate* isolate, JSObject holder,
1350 .is_the_hole(isolate, static_cast<int>(index))
1358 InternalIndex GetEntryForIndex(Isolate* isolate, JSObject holder,
1361 return Subclass::GetEntryForIndexImpl(isolate, holder, backing_store, index,
1380 Handle<FixedArray> CreateListFromArrayLike(Isolate* isolate,
1383 return Subclass::CreateListFromArrayLikeImpl(isolate, object, length);
1386 static Handle<FixedArray> CreateListFromArrayLikeImpl(Isolate* isolate,
1413 static Maybe<bool> SetLengthImpl(Isolate* isolate, Handle<JSArray> array,
1422 ReadOnlyRoots roots(isolate);
1428 Object index = dict->KeyAt(isolate, entry);
1446 Object index = dict->KeyAt(isolate, entry);
1464 Handle<Object> length_obj = isolate->factory()->NewNumberFromUint(length);
1469 static void CopyElementsImpl(Isolate* isolate, FixedArrayBase from,
1503 static Handle<Object> GetImpl(Isolate* isolate, FixedArrayBase backing_store,
1505 return handle(GetRaw(backing_store, entry), isolate);
1553 static bool HasEntryImpl(Isolate* isolate, FixedArrayBase store,
1557 Object index = dict.KeyAt(isolate, entry);
1558 return !index.IsTheHole(isolate);
1561 static InternalIndex GetEntryForIndexImpl(Isolate* isolate, JSObject holder,
1568 dictionary.FindEntry(isolate, static_cast<uint32_t>(index));
1599 static uint32_t GetKeyForEntryImpl(Isolate* isolate,
1604 Object raw_key = dictionary->KeyAt(isolate, entry);
1605 if (!dictionary->IsKey(ReadOnlyRoots(isolate), raw_key)) return kMaxUInt32;
1613 Isolate* isolate = keys->isolate();
1616 Handle<FixedArray> elements = isolate->factory()->NewFixedArray(
1620 ReadOnlyRoots roots(isolate);
1623 Object raw_key = dictionary->KeyAt(isolate, i);
1634 SortIndices(isolate, elements, insertion_index);
1642 Isolate* isolate, Handle<JSObject> object,
1652 uint32_t key = GetKeyForEntryImpl(isolate, dictionary, i, filter);
1654 Handle<Object> index = isolate->factory()->NewNumberFromUint(key);
1665 Isolate* isolate = accumulator->isolate();
1667 NumberDictionary::cast(receiver->elements()), isolate);
1668 ReadOnlyRoots roots(isolate);
1670 Object k = dictionary->KeyAt(isolate, i);
1672 Object value = dictionary->ValueAt(isolate, i);
1673 DCHECK(!value.IsTheHole(isolate));
1681 static bool IncludesValueFastPath(Isolate* isolate, Handle<JSObject> receiver,
1686 Object the_hole = ReadOnlyRoots(isolate).the_hole_value();
1687 Object undefined = ReadOnlyRoots(isolate).undefined_value();
1693 Object k = dictionary.KeyAt(isolate, i);
1707 Object element_k = dictionary.ValueAt(isolate, i);
1716 static Maybe<bool> IncludesValueImpl(Isolate* isolate,
1720 DCHECK(JSObject::PrototypeHasNoElements(isolate, *receiver));
1721 bool search_for_hole = value->IsUndefined(isolate);
1726 isolate, receiver, value, start_from, length, &result)) {
1733 NumberDictionary::cast(receiver->elements()), isolate);
1739 dictionary->FindEntry(isolate, static_cast<uint32_t>(k));
1753 LookupIterator it(isolate, receiver, k,
1759 ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, element_k,
1766 if (!JSObject::PrototypeHasNoElements(isolate, *receiver)) {
1767 return IncludesValueSlowPath(isolate, receiver, value, k + 1,
1785 return accessor->IncludesValue(isolate, receiver, value, k + 1,
1789 handle(NumberDictionary::cast(receiver->elements()), isolate);
1797 static Maybe<int64_t> IndexOfValueImpl(Isolate* isolate,
1801 DCHECK(JSObject::PrototypeHasNoElements(isolate, *receiver));
1806 NumberDictionary::cast(receiver->elements()), isolate);
1813 dictionary->FindEntry(isolate, static_cast<uint32_t>(k));
1827 LookupIterator it(isolate, receiver, k,
1833 ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, element_k,
1840 if (!JSObject::PrototypeHasNoElements(isolate, *receiver)) {
1841 return IndexOfValueSlowPath(isolate, receiver, value, k + 1,
1851 return IndexOfValueSlowPath(isolate, receiver, value, k + 1,
1855 handle(NumberDictionary::cast(receiver->elements()), isolate);
1900 Isolate* isolate = object->GetIsolate();
1907 isolate->UpdateNoElementsProtectorOnNormalizeElements(object);
1912 NumberDictionary::New(isolate, capacity);
1919 if (BackingStore::cast(*store).is_the_hole(isolate, i)) continue;
1923 Subclass::GetImpl(isolate, *store, InternalIndex(i));
1925 NumberDictionary::Add(isolate, dictionary, i, value, details);
1939 Isolate* isolate = obj->GetIsolate();
1941 if (!backing_store->is_the_hole(isolate, entry - 1)) break;
1944 FixedArray empty = ReadOnlyRoots(isolate).empty_fixed_array();
1955 isolate->heap()->RightTrimFixedArray(*backing_store, length - entry);
1970 Isolate* isolate = obj->GetIsolate();
1971 backing_store->set_the_hole(isolate, entry);
1994 size_t current_counter = isolate->elements_deletion_counter();
1996 isolate->set_elements_deletion_counter(current_counter + 1);
2000 isolate->set_elements_deletion_counter(0);
2005 if (!backing_store->is_the_hole(isolate, i)) break;
2014 if (!backing_store->is_the_hole(isolate, i)) {
2079 static bool HasEntryImpl(Isolate* isolate, FixedArrayBase backing_store,
2082 .is_the_hole(isolate, entry.as_int());
2092 Isolate* isolate = receiver.GetIsolate();
2095 if (Subclass::HasEntryImpl(isolate, backing_store, InternalIndex(i))) {
2105 Isolate* isolate = accumulator->isolate();
2106 Handle<FixedArrayBase> elements(receiver->elements(), isolate);
2110 HasEntryImpl(isolate, *elements, InternalIndex(i))) {
2112 Subclass::GetImpl(isolate, *elements, InternalIndex(i)), convert));
2120 Isolate* isolate = holder.GetIsolate();
2121 Heap* heap = isolate->heap();
2139 HandleScope scope(isolate);
2141 DCHECK(BackingStore::get(backing_store, i, isolate)->IsSmi() ||
2143 backing_store.is_the_hole(isolate, i)));
2148 DCHECK(!backing_store.is_the_hole(isolate, i));
2182 static void MoveElements(Isolate* isolate, Handle<JSArray> receiver,
2189 isolate->heap()->CanMoveObjectStart(dst_elms)) {
2191 isolate->heap()->LeftTrimFixedArray(dst_elms, src_index));
2202 dst_elms.MoveElements(isolate, dst_index, src_index, len, mode);
2236 static Maybe<bool> IncludesValueImpl(Isolate* isolate,
2240 DCHECK(JSObject::PrototypeHasNoElements(isolate, *receiver));
2243 Object the_hole = ReadOnlyRoots(isolate).the_hole_value();
2244 Object undefined = ReadOnlyRoots(isolate).undefined_value();
2377 static Handle<FixedArray> CreateListFromArrayLikeImpl(Isolate* isolate,
2380 Handle<FixedArray> result = isolate->factory()->NewFixedArray(length);
2381 Handle<FixedArrayBase> elements(object->elements(), isolate);
2384 if (!Subclass::HasEntryImpl(isolate, *elements, entry)) continue;
2386 value = Subclass::GetImpl(isolate, *elements, entry);
2388 value = isolate->factory()->InternalizeName(Handle<Name>::cast(value));
2397 Isolate* isolate = receiver->GetIsolate();
2400 HandleScope scope(isolate);
2403 Handle<FixedArrayBase> backing_store(receiver->elements(), isolate);
2409 Subclass::GetImpl(isolate, *backing_store, InternalIndex(remove_index));
2411 Subclass::MoveElements(isolate, receiver, backing_store, 0, 1, new_length,
2415 Subclass::SetLengthImpl(isolate, receiver, new_length, backing_store));
2417 if (IsHoleyElementsKind(kind) && result->IsTheHole(isolate)) {
2418 return isolate->factory()->undefined_value();
2433 Isolate* isolate = receiver->GetIsolate();
2442 isolate, backing_store,
2451 Subclass::MoveElements(isolate, receiver, backing_store, add_size, 0,
2508 static void CopyElementsImpl(Isolate* isolate, FixedArrayBase from,
2525 CopyObjectToObjectElements(isolate, from, from_kind, from_start, to,
2532 CopyDoubleToObjectElements(isolate, from, from_start, to, to_start,
2537 CopyDictionaryToObjectElements(isolate, from, from_start, to, to_kind,
2558 Isolate* isolate, Handle<JSObject> object,
2565 isolate);
2569 if (!Subclass::HasEntryImpl(isolate, *elements, entry)) continue;
2570 Handle<Object> value = Subclass::GetImpl(isolate, *elements, entry);
2571 value = MakeEntryPair(isolate, index, value);
2581 if (!Subclass::HasEntryImpl(isolate, elements, entry)) continue;
2590 static Maybe<int64_t> IndexOfValueImpl(Isolate* isolate,
2594 DCHECK(JSObject::PrototypeHasNoElements(isolate, *receiver));
2663 static Maybe<bool> SetLengthImpl(Isolate* isolate, Handle<JSArray> array,
2676 old_length == 0 ? isolate->factory()->empty_slow_element_dictionary()
2680 Handle<Map> new_map = Map::Copy(isolate, handle(array->map(), isolate),
2684 JSObject::MigrateToMap(isolate, array, new_map);
2691 ReadOnlyRoots(isolate).empty_slow_element_dictionary()) {
2692 Handle<NumberDictionary> dictionary(array->element_dictionary(), isolate);
2695 JSObject::ApplyAttributesToDictionary(isolate, ReadOnlyRoots(isolate),
2701 Handle<FixedArrayBase> new_backing_store(array->elements(), isolate);
2702 return DictionaryElementsAccessor::SetLengthImpl(isolate, array, length,
2761 static Maybe<bool> SetLengthImpl(Isolate* isolate, Handle<JSArray> array,
2774 old_length == 0 ? isolate->factory()->empty_slow_element_dictionary()
2778 Handle<Map> new_map = Map::Copy(isolate, handle(array->map(), isolate),
2782 JSObject::MigrateToMap(isolate, array, new_map);
2789 ReadOnlyRoots(isolate).empty_slow_element_dictionary()) {
2790 Handle<NumberDictionary> dictionary(array->element_dictionary(), isolate);
2793 JSObject::ApplyAttributesToDictionary(isolate, ReadOnlyRoots(isolate),
2799 Handle<FixedArrayBase> new_backing_store(array->elements(), isolate);
2800 return DictionaryElementsAccessor::SetLengthImpl(isolate, array, length,
2871 static Maybe<bool> SetLengthImpl(Isolate* isolate, Handle<JSArray> array,
2904 static Handle<Object> GetImpl(Isolate* isolate, FixedArrayBase backing_store,
2907 entry.as_int(), isolate);
2925 static void CopyElementsImpl(Isolate* isolate, FixedArrayBase from,
2953 CopyDictionaryToDoubleElements(isolate, from, from_start, to, to_start,
2973 Isolate* isolate, Handle<JSObject> object,
2977 FixedDoubleArray::cast(object->elements()), isolate);
2982 if (!Subclass::HasEntryImpl(isolate, *elements, entry)) continue;
2983 Handle<Object> value = Subclass::GetImpl(isolate, *elements, entry);
2985 value = MakeEntryPair(isolate, index, value);
2993 static Maybe<int64_t> IndexOfValueImpl(Isolate* isolate,
2997 DCHECK(JSObject::PrototypeHasNoElements(isolate, *receiver));
3083 static Handle<Object> ToHandle(Isolate* isolate, ElementType value);
3145 Isolate* isolate = typed_array->GetIsolate();
3152 return ToHandle(isolate, elem);
3155 static Handle<Object> GetImpl(Isolate* isolate, FixedArrayBase backing_store,
3221 static bool HasElementImpl(Isolate* isolate, JSObject holder, size_t index,
3231 static Maybe<bool> SetLengthImpl(Isolate* isolate, Handle<JSArray> array,
3245 static InternalIndex GetEntryForIndexImpl(Isolate* isolate, JSObject holder,
3267 Isolate* isolate = receiver->GetIsolate();
3268 Handle<FixedArrayBase> elements(receiver->elements(), isolate);
3279 Isolate* isolate, Handle<JSObject> object,
3284 Handle<FixedArrayBase> elements(object->elements(), isolate);
3290 value = MakeEntryPair(isolate, index, value);
3329 static Maybe<bool> IncludesValueImpl(Isolate* isolate,
3337 return Just(value->IsUndefined(isolate) && length > start_from);
3343 return Just(value->IsUndefined(isolate) && length > start_from);
3346 if (value->IsUndefined(isolate) && length > new_length) {
3403 static Maybe<int64_t> IndexOfValueImpl(Isolate* isolate,
3554 static Handle<FixedArray> CreateListFromArrayLikeImpl(Isolate* isolate,
3558 Handle<FixedArray> result = isolate->factory()->NewFixedArray(length);
3713 static bool HoleyPrototypeLookupRequired(Isolate* isolate, Context context,
3716 DisallowJavascriptExecution no_js(isolate);
3719 if (isolate->force_slow_path()) return true;
3726 if (source_proto.IsNull(isolate)) return false;
3733 return !Protectors::IsNoElementsIntact(isolate);
3740 Isolate* isolate = source.GetIsolate();
3742 DisallowJavascriptExecution no_js(isolate);
3769 if (HoleyPrototypeLookupRequired(isolate, context, source)) return false;
3771 Oddball undefined = ReadOnlyRoots(isolate).undefined_value();
3788 if (source_store.is_the_hole(isolate, static_cast<int>(i))) {
3828 Isolate* isolate = destination->GetIsolate();
3835 LookupIterator it(isolate, source, i);
3836 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, elem,
3844 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, elem,
3845 BigInt::FromObject(isolate, elem));
3848 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, elem,
3849 Object::ToNumber(isolate, elem));
3870 return *isolate->factory()->undefined_value();
3879 Isolate* isolate = destination->GetIsolate();
3880 if (length == 0) return *isolate->factory()->undefined_value();
3903 return *isolate->factory()->undefined_value();
3918 if (TryCopyElementsFastNumber(isolate->context(), *source_array,
3920 return *isolate->factory()->undefined_value();
3934 Isolate* isolate, int8_t value) {
3935 return handle(Smi::FromInt(value), isolate);
3941 Isolate* isolate, uint8_t value) {
3942 return handle(Smi::FromInt(value), isolate);
3948 Isolate* isolate, int16_t value) {
3949 return handle(Smi::FromInt(value), isolate);
3955 Isolate* isolate, uint16_t value) {
3956 return handle(Smi::FromInt(value), isolate);
3962 Isolate* isolate, int32_t value) {
3963 return isolate->factory()->NewNumberFromInt(value);
3969 Isolate* isolate, uint32_t value) {
3970 return isolate->factory()->NewNumberFromUint(value);
3982 Isolate* isolate, float value) {
3983 return isolate->factory()->NewNumber(value);
3996 Isolate* isolate, double value) {
3997 return isolate->factory()->NewNumber(value);
4032 Isolate* isolate, uint8_t value) {
4033 return handle(Smi::FromInt(value), isolate);
4081 Isolate* isolate, int64_t value) {
4082 return BigInt::FromInt64(isolate, value);
4130 Isolate* isolate, uint64_t value) {
4131 return BigInt::FromUint64(isolate, value);
4137 Isolate* isolate, int8_t value) {
4138 return handle(Smi::FromInt(value), isolate);
4144 uint8_t>::ToHandle(Isolate* isolate,
4146 return handle(Smi::FromInt(value), isolate);
4152 int16_t>::ToHandle(Isolate* isolate,
4154 return handle(Smi::FromInt(value), isolate);
4160 uint16_t>::ToHandle(Isolate* isolate,
4162 return handle(Smi::FromInt(value), isolate);
4168 int32_t>::ToHandle(Isolate* isolate,
4170 return isolate->factory()->NewNumberFromInt(value);
4176 uint32_t>::ToHandle(Isolate* isolate,
4178 return isolate->factory()->NewNumberFromUint(value);
4191 float>::ToHandle(Isolate* isolate,
4193 return isolate->factory()->NewNumber(value);
4206 double>::ToHandle(Isolate* isolate,
4208 return isolate->factory()->NewNumber(value);
4243 uint8_t>::ToHandle(Isolate* isolate,
4245 return handle(Smi::FromInt(value), isolate);
4293 int64_t>::ToHandle(Isolate* isolate,
4295 return BigInt::FromInt64(isolate, value);
4344 uint64_t>::ToHandle(Isolate* isolate,
4346 return BigInt::FromUint64(isolate, value);
4364 static Handle<Object> GetImpl(Isolate* isolate, FixedArrayBase parameters,
4367 SloppyArgumentsElements::cast(parameters), isolate);
4373 DCHECK(!probe.IsTheHole(isolate));
4376 DCHECK(!context.get(context_entry).IsTheHole(isolate));
4377 return handle(context.get(context_entry), isolate);
4381 isolate, elements->arguments(), entry.adjust_down(length));
4382 return Subclass::ConvertArgumentsStoreResult(isolate, elements, result);
4431 static Maybe<bool> SetLengthImpl(Isolate* isolate, Handle<JSArray> array,
4458 Isolate* isolate = receiver.GetIsolate();
4465 if (HasParameterMapArg(isolate, elements, index)) nof_elements++;
4474 Isolate* isolate = accumulator->isolate();
4475 Handle<FixedArrayBase> elements(receiver->elements(), isolate);
4479 if (!HasEntryImpl(isolate, *elements, entry)) continue;
4480 Handle<Object> value = GetImpl(isolate, *elements, entry);
4486 static bool HasEntryImpl(Isolate* isolate, FixedArrayBase parameters,
4492 return HasParameterMapArg(isolate, elements, entry.raw_value());
4495 return ArgumentsAccessor::HasEntryImpl(isolate, arguments,
4506 static InternalIndex GetEntryForIndexImpl(Isolate* isolate, JSObject holder,
4512 if (HasParameterMapArg(isolate, elements, index)) {
4517 isolate, holder, arguments, index, filter);
4537 static bool HasParameterMapArg(Isolate* isolate,
4543 .IsTheHole(isolate);
4573 Isolate* isolate = keys->isolate();
4575 Handle<FixedArray> indices = isolate->factory()->NewFixedArray(
4577 DirectCollectElementIndicesImpl(isolate, object, backing_store,
4580 SortIndices(isolate, indices, nof_indices);
4588 Isolate* isolate, Handle<JSObject> object,
4597 if (elements->mapped_entries(i, kRelaxedLoad).IsTheHole(isolate))
4600 Handle<String> index_string = isolate->factory()->Uint32ToString(i);
4608 Handle<FixedArray> store(elements->arguments(), isolate);
4610 isolate, object, store, convert, filter, list, nof_indices,
4614 static Maybe<bool> IncludesValueImpl(Isolate* isolate,
4618 DCHECK(JSObject::PrototypeHasNoElements(isolate, *object));
4619 Handle<Map> original_map(object->map(), isolate);
4621 SloppyArgumentsElements::cast(object->elements()), isolate);
4622 bool search_for_hole = value->IsUndefined(isolate);
4627 GetEntryForIndexImpl(isolate, *object, *elements, k, ALL_PROPERTIES);
4633 Handle<Object> element_k = Subclass::GetImpl(isolate, *elements, entry);
4636 LookupIterator it(isolate, object, k, LookupIterator::OWN);
4639 ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, element_k,
4647 return IncludesValueSlowPath(isolate, object, value, k + 1, length);
4656 static Maybe<int64_t> IndexOfValueImpl(Isolate* isolate,
4660 DCHECK(JSObject::PrototypeHasNoElements(isolate, *object));
4661 Handle<Map> original_map(object->map(), isolate);
4663 SloppyArgumentsElements::cast(object->elements()), isolate);
4668 GetEntryForIndexImpl(isolate, *object, *elements, k, ALL_PROPERTIES);
4673 Handle<Object> element_k = Subclass::GetImpl(isolate, *elements, entry);
4676 LookupIterator it(isolate, object, k, LookupIterator::OWN);
4679 ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, element_k,
4689 return IndexOfValueSlowPath(isolate, object, value, k + 1, length);
4705 Isolate* isolate, Handle<SloppyArgumentsElements> elements,
4713 DCHECK(!context.get(context_entry).IsTheHole(isolate));
4714 return handle(context.get(context_entry), isolate);
4723 Isolate* isolate = obj->GetIsolate();
4725 isolate);
4728 NumberDictionary::DeleteEntry(isolate, dict, entry.adjust_down(length));
4735 Isolate* isolate = object->GetIsolate();
4737 SloppyArgumentsElements::cast(object->elements()), isolate);
4739 FixedArrayBase::cast(elements->arguments()), isolate);
4747 NumberDictionary::Add(isolate, dictionary, index, value, details);
4759 Isolate* isolate = object->GetIsolate();
4765 DCHECK(!probe.IsTheHole(isolate));
4768 DCHECK(!context.get(context_entry).IsTheHole(isolate));
4773 ReadOnlyRoots(isolate).the_hole_value());
4776 value = isolate->factory()->NewAliasedArgumentsEntry(context_entry);
4782 NumberDictionary::cast(elements->arguments()), isolate);
4783 arguments = NumberDictionary::Add(isolate, arguments, entry.as_uint32(),
4791 Handle<FixedArrayBase> arguments(elements->arguments(), isolate);
4804 Isolate* isolate, Handle<SloppyArgumentsElements> paramtere_map,
4810 static Handle<FixedArray> GetArguments(Isolate* isolate,
4813 return Handle<FixedArray>(elements.arguments(), isolate);
4854 Isolate* isolate = object->GetIsolate();
4856 SloppyArgumentsElements::cast(object->elements()), isolate);
4857 Handle<FixedArray> old_arguments(elements->arguments(), isolate);
4886 static void CopyElementsImpl(Isolate* isolate, FixedArrayBase from,
4892 CopyDictionaryToObjectElements(isolate, from, from_start, to,
4896 CopyObjectToObjectElements(isolate, from, HOLEY_ELEMENTS, from_start, to,
4903 Isolate* isolate = object->GetIsolate();
4905 SloppyArgumentsElements::cast(object->elements()), isolate);
4907 isolate);
4915 isolate, arguments,
4920 JSObject::MigrateToMap(isolate, object, new_map);
4937 Isolate* isolate = holder->GetIsolate();
4938 Handle<String> string(GetString(*holder), isolate);
4941 return isolate->factory()->LookupSingleCharacterStringFromCode(
4942 String::Flatten(isolate, string)->Get(entry.as_int()));
4944 return BackingStoreAccessor::GetImpl(isolate, holder->elements(),
4948 static Handle<Object> GetImpl(Isolate* isolate, FixedArrayBase elements,
4965 static InternalIndex GetEntryForIndexImpl(Isolate* isolate, JSObject holder,
4973 isolate, holder, backing_store, index, filter);
5030 Isolate* isolate = receiver->GetIsolate();
5031 Handle<String> string(GetString(*receiver), isolate);
5032 string = String::Flatten(isolate, string);
5036 isolate->factory()->LookupSingleCharacterStringFromCode(
5048 Factory* factory = keys->isolate()->factory();
5078 static void CopyElementsImpl(Isolate* isolate, FixedArrayBase from,
5084 CopyDictionaryToObjectElements(isolate, from, from_start, to,
5088 CopyObjectToObjectElements(isolate, from, HOLEY_ELEMENTS, from_start, to,
5294 Handle<JSArray> ElementsAccessor::Concat(Isolate* isolate,
5324 Handle<JSArray> result_array = isolate->factory()->NewJSArray(
5329 Handle<FixedArrayBase> storage(result_array->elements(), isolate);