37 fully_spec_compliant_(this, {&
k_, &
a_}) {}
42 const char* method_name =
"%TypedArray%.prototype.map";
45 context(), method_name, original_array,
len());
49 Label detached_or_out_of_bounds(
this), done(
this);
52 a, &detached_or_out_of_bounds)));
54 BIND(&detached_or_out_of_bounds);
122 if (
argc_ ==
nullptr) {
160 Label distinguish_types(
this);
163 &throw_not_callable);
165 BIND(&throw_not_typed_array);
168 BIND(&throw_not_callable);
171 BIND(&throw_detached);
174 Label unexpected_instance_type(
this);
175 BIND(&unexpected_instance_type);
178 std::vector<int32_t> elements_kinds = {
179#define ELEMENTS_KIND(Type, type, TYPE, ctype) TYPE##_ELEMENTS,
183 std::list<Label> labels;
184 for (
size_t i = 0;
i < elements_kinds.size(); ++
i) {
185 labels.emplace_back(
this);
187 std::vector<Label*> label_ptrs;
189 label_ptrs.push_back(&
label);
192 BIND(&distinguish_types);
198 Switch(elements_kind, &unexpected_instance_type, elements_kinds.data(),
199 label_ptrs.data(), labels.size());
202 for (
auto it = labels.begin(); it != labels.end(); ++
i, ++it) {
233 effective_elements_kind =
246 GotoIf(IsDetachedBuffer(array_buffer), &detached);
251 effective_elements_kind);
257 value = UndefinedConstant();
264 a_ = processor(
this, value.value(), index);
271 auto argc = UncheckedParameter<Int32T>(Descriptor::kJSActualArgumentsCount);
272 auto context = Parameter<Context>(Descriptor::kContext);
273 CSA_DCHECK(
this, IsUndefined(Parameter<Object>(Descriptor::kJSNewTarget)));
278 Label runtime(
this, Label::kDeferred);
288 BranchIfFastJSArray(
receiver, context, &fast, &runtime);
293 CSA_DCHECK(
this, TaggedIsPositiveSmi(LoadJSArrayLength(array_receiver)));
295 LoadAndUntagToWord32ObjectField(array_receiver, JSArray::kLengthOffset);
296 Label return_undefined(
this), fast_elements(
this);
299 EnsureArrayLengthWritable(context, LoadMap(array_receiver), &runtime);
301 GotoIf(Word32Equal(length, Int32Constant(0)), &return_undefined);
305 GotoIf(TaggedEqual(LoadMap(elements), FixedCOWArrayMapConstant()),
312 TNode<Int32T> capacity = SmiToInt32(LoadFixedArrayBaseLength(elements));
313 GotoIf(Int32LessThan(
320 StoreObjectFieldNoWriteBarrier(array_receiver, JSArray::kLengthOffset,
321 SmiTag(new_length_intptr));
323 TNode<Int32T> elements_kind = LoadElementsKind(array_receiver);
324 GotoIf(Int32LessThanOrEqual(elements_kind,
330 ReinterpretCast<FixedDoubleArray>(elements);
332 elements_known_double_array, new_length_intptr, &return_undefined);
334 StoreFixedDoubleArrayHole(elements_known_double_array, new_length_intptr);
335 args.PopAndReturn(AllocateHeapNumberWithValue(value));
338 BIND(&fast_elements);
342 LoadFixedArrayElement(elements_known_fixed_array, new_length_intptr);
343 StoreFixedArrayElement(elements_known_fixed_array, new_length_intptr,
345 GotoIf(TaggedEqual(value, TheHoleConstant()), &return_undefined);
349 BIND(&return_undefined);
350 {
args.PopAndReturn(UndefinedConstant()); }
359 TailCallJSBuiltin(Builtin::kArrayPop, context, target, UndefinedConstant(),
360 argc, InvalidDispatchHandleConstant());
366 Label default_label(
this, &arg_index);
367 Label smi_transition(
this);
368 Label object_push_pre(
this);
369 Label object_push(
this, &arg_index);
370 Label double_push(
this, &arg_index);
371 Label double_transition(
this);
372 Label runtime(
this, Label::kDeferred);
374 auto argc = UncheckedParameter<Int32T>(Descriptor::kJSActualArgumentsCount);
375 auto context = Parameter<Context>(Descriptor::kContext);
376 CSA_DCHECK(
this, IsUndefined(Parameter<Object>(Descriptor::kJSNewTarget)));
384 BranchIfFastJSArray(
receiver, context, &fast, &runtime);
389 arg_index = IntPtrConstant(0);
390 kind = EnsureArrayPushable(context, LoadMap(array_receiver), &runtime);
396 &arg_index, &smi_transition);
404 BIND(&smi_transition);
407 GotoIf(TaggedIsSmi(arg), &default_label);
411 SetPropertyStrict(context, array_receiver, length, arg);
412 Increment(&arg_index);
415 TNode<Int32T> elements_kind = LoadElementsKind(array_receiver);
419 GotoIfNotNumber(arg, &object_push);
423 BIND(&object_push_pre);
440 &arg_index, &double_transition);
448 BIND(&double_transition);
451 GotoIfNumber(arg, &default_label);
455 SetPropertyStrict(context, array_receiver, length, arg);
456 Increment(&arg_index);
459 TNode<Int32T> elements_kind = LoadElementsKind(array_receiver);
467 BIND(&default_label);
472 SetPropertyStrict(context, array_receiver, length, arg);
475 args.PopAndReturn(LoadJSArrayLength(array_receiver));
484 TailCallJSBuiltin(Builtin::kArrayPush, context, target, UndefinedConstant(),
485 argc, InvalidDispatchHandleConstant());
490 auto context = Parameter<Context>(Descriptor::kContext);
491 auto array = Parameter<JSArray>(Descriptor::kSource);
492 TNode<BInt> begin = SmiToBInt(Parameter<Smi>(Descriptor::kBegin));
495 CSA_DCHECK(
this, Word32BinaryNot(IsNoElementsProtectorCellInvalid()));
497 Return(ExtractFastJSArray(context, array, begin,
count));
501 auto context = Parameter<Context>(Descriptor::kContext);
502 auto array = Parameter<JSArray>(Descriptor::kSource);
505 Word32Or(Word32BinaryNot(IsHoleyFastElementsKindForRead(
506 LoadElementsKind(array))),
507 Word32BinaryNot(IsNoElementsProtectorCellInvalid())));
509 Return(CloneFastJSArray(context, array));
520 auto context = Parameter<Context>(Descriptor::kContext);
521 auto array = Parameter<JSArray>(Descriptor::kSource);
524 Word32Or(Word32BinaryNot(IsHoleyFastElementsKindForRead(
525 LoadElementsKind(array))),
526 Word32BinaryNot(IsNoElementsProtectorCellInvalid())));
528 Return(CloneFastJSArray(context, array, std::nullopt,
529 HoleConversionMode::kConvertToUndefined));
550 BIND(&is_not_constructor);
552 Label allocate_js_array(
this);
555 context, Context::JS_ARRAY_PACKED_SMI_ELEMENTS_MAP_INDEX));
564 return array.value();
582 BIND(&is_not_constructor);
589 return array.value();
595 UncheckedParameter<Int32T>(Descriptor::kJSActualArgumentsCount));
597 auto context = Parameter<Context>(Descriptor::kContext);
602 InitIteratingArrayBuiltinBody(context,
receiver, callbackfn,
this_arg, argc);
604 GenerateIteratingTypedArrayBuiltinBody(
605 "%TypedArray%.prototype.map",
652#if defined(__SSE3__) || defined(V8_HOST_ARCH_ARM64)
662 const int kSearchElementArg = 0;
663 const int kFromIndexArg = 1;
669 args.GetOptionalArgumentValue(kSearchElementArg);
673 Label init_index(
this), return_not_found(
this), call_runtime(
this);
677 BranchIfFastJSArrayForRead(
receiver, context, &init_index, &call_runtime);
690 Label is_smi(
this), is_nonsmi(
this), done(
this);
693 GotoIf(IntPtrLessThanOrEqual(
args.GetLengthWithoutReceiver(),
706 GotoIfNot(IsUndefined(start_from), &call_runtime);
712 index_var = intptr_start_from;
716 index_var =
IntPtrAdd(array_length_untagged, index_var.value());
719 index_var = intptr_zero;
729 Label if_smi(
this), if_smiorobjects(
this), if_packed_doubles(
this),
730 if_holey_doubles(
this);
750 Goto(&return_not_found);
755 : Builtin::kArrayIndexOfSmi;
758 array_length,
SmiTag(index_var.value()));
762 BIND(&if_smiorobjects);
765 ? Builtin::kArrayIncludesSmiOrObject
766 : Builtin::kArrayIndexOfSmiOrObject;
769 array_length,
SmiTag(index_var.value()));
773 BIND(&if_packed_doubles);
776 ? Builtin::kArrayIncludesPackedDoubles
777 : Builtin::kArrayIndexOfPackedDoubles;
780 array_length,
SmiTag(index_var.value()));
784 BIND(&if_holey_doubles);
787 ? Builtin::kArrayIncludesHoleyDoubles
788 : Builtin::kArrayIndexOfHoleyDoubles;
791 array_length,
SmiTag(index_var.value()));
795 BIND(&return_not_found);
797 args.PopAndReturn(FalseConstant());
806 ? Runtime::kArrayIncludes_Slow
807 : Runtime::kArrayIndexOf;
809 search_element, start_from));
821 Label ident_loop(
this, &index_var), heap_num_loop(
this, &search_num),
822 string_loop(
this), bigint_loop(
this, &index_var),
823 undef_loop(
this, &index_var), not_smi(
this), not_heap_num(
this),
824 return_found(
this), return_not_found(
this);
828 Goto(&heap_num_loop);
832 GotoIf(IsUndefined(search_element), &undef_loop);
835 GotoIfNot(IsHeapNumberMap(map), ¬_heap_num);
837 Goto(&heap_num_loop);
849 Label simd_call(
this);
852 &ident_loop, &simd_call);
855 ExternalReference::array_indexof_includes_smi_or_object());
864 &return_not_found, &return_found);
869 GotoIfNot(UintPtrLessThan(index_var.value(), array_length_untagged),
882 GotoIfNot(UintPtrLessThan(index_var.value(), array_length_untagged),
886 GotoIf(IsUndefined(element_k), &return_found);
887 GotoIf(IsTheHole(element_k), &return_found);
893 BIND(&heap_num_loop);
895 Label nan_loop(
this, &index_var), not_nan_loop(
this, &index_var);
896 Label* nan_handling = variant ==
kIncludes ? &nan_loop : &return_not_found;
897 GotoIfNot(Float64Equal(search_num.value(), search_num.value()),
907 Label smi_check(
this), simd_call(
this);
908 Branch(UintPtrLessThan(array_length_untagged,
910 ¬_nan_loop, &smi_check);
915 ExternalReference::array_indexof_includes_smi_or_object());
924 &return_not_found, &return_found);
929 Label continue_loop(
this), element_k_not_smi(
this);
930 GotoIfNot(UintPtrLessThan(index_var.value(), array_length_untagged),
936 &return_found, &continue_loop);
938 BIND(&element_k_not_smi);
940 Branch(Float64Equal(search_num.value(),
942 &return_found, &continue_loop);
944 BIND(&continue_loop);
952 Label continue_loop(
this);
953 GotoIfNot(UintPtrLessThan(index_var.value(), array_length_untagged),
962 BIND(&continue_loop);
971 Label continue_loop(
this), next_iteration(
this, &index_var),
975 Goto(&next_iteration);
976 BIND(&next_iteration);
977 GotoIfNot(UintPtrLessThan(index_var.value(), array_length_untagged),
986 &slow_compare, &continue_loop);
992 &return_found, &continue_loop, &runtime);
995 search_element_string, element_k);
998 BIND(&continue_loop);
1000 Goto(&next_iteration);
1005 GotoIfNot(UintPtrLessThan(index_var.value(), array_length_untagged),
1010 Label continue_loop(
this);
1014 search_element, element_k);
1017 BIND(&continue_loop);
1021 BIND(&return_found);
1028 BIND(&return_not_found);
1043 Label nan_loop(
this, &index_var), not_nan_case(
this),
1044 not_nan_loop(
this, &index_var), hole_loop(
this, &index_var),
1045 search_notnan(
this), return_found(
this), return_not_found(
this);
1051 Goto(¬_nan_case);
1053 BIND(&search_notnan);
1054 GotoIfNot(IsHeapNumber(
CAST(search_element)), &return_not_found);
1058 Label* nan_handling = variant ==
kIncludes ? &nan_loop : &return_not_found;
1061 BIND(¬_nan_case);
1067 Label simd_call(
this);
1070 ¬_nan_loop, &simd_call);
1082 &return_not_found, &return_found);
1085 BIND(¬_nan_loop);
1087 Label continue_loop(
this);
1088 GotoIfNot(UintPtrLessThan(index_var.value(), array_length_untagged),
1092 Branch(Float64Equal(element_k, search_num.value()), &return_found,
1094 BIND(&continue_loop);
1096 Goto(¬_nan_loop);
1102 Label continue_loop(
this);
1103 GotoIfNot(UintPtrLessThan(index_var.value(), array_length_untagged),
1108 BIND(&continue_loop);
1113 BIND(&return_found);
1120 BIND(&return_not_found);
1135 Label nan_loop(
this, &index_var), not_nan_case(
this),
1136 not_nan_loop(
this, &index_var), hole_loop(
this, &index_var),
1137 search_notnan(
this), return_found(
this), return_not_found(
this);
1143 Goto(¬_nan_case);
1145 BIND(&search_notnan);
1147 GotoIf(IsUndefined(search_element), &hole_loop);
1149 GotoIfNot(IsHeapNumber(
CAST(search_element)), &return_not_found);
1153 Label* nan_handling = variant ==
kIncludes ? &nan_loop : &return_not_found;
1156 BIND(¬_nan_case);
1162 Label simd_call(
this);
1165 ¬_nan_loop, &simd_call);
1177 &return_not_found, &return_found);
1180 BIND(¬_nan_loop);
1182 Label continue_loop(
this);
1183 GotoIfNot(UintPtrLessThan(index_var.value(), array_length_untagged),
1191 Branch(Float64Equal(element_k, search_num.value()), &return_found,
1193 BIND(&continue_loop);
1195 Goto(¬_nan_loop);
1201 Label continue_loop(
this);
1202 GotoIfNot(UintPtrLessThan(index_var.value(), array_length_untagged),
1207 elements, index_var.value(), &continue_loop);
1210 BIND(&continue_loop);
1218 GotoIfNot(UintPtrLessThan(index_var.value(), array_length_untagged),
1225#ifdef V8_ENABLE_EXPERIMENTAL_UNDEFINED_DOUBLE
1226 LoadFixedDoubleArrayElementWithUndefinedCheck(
1227 elements, index_var.value(), &return_found,
1238 BIND(&return_found);
1245 BIND(&return_not_found);
1255 UncheckedParameter<Int32T>(Descriptor::kJSActualArgumentsCount));
1256 auto context = Parameter<Context>(Descriptor::kContext);
1258 Generate(kIncludes, argc, context);
1262 auto context = Parameter<Context>(Descriptor::kContext);
1263 auto elements = Parameter<FixedArray>(Descriptor::kElements);
1264 auto search_element = Parameter<Object>(Descriptor::kSearchElement);
1265 auto array_length = Parameter<Smi>(Descriptor::kLength);
1266 auto from_index = Parameter<Smi>(Descriptor::kFromIndex);
1268 GenerateSmiOrObject(kIncludes, context, elements, search_element,
1269 array_length, from_index, SimpleElementKind::kSmiOrHole);
1273 auto context = Parameter<Context>(Descriptor::kContext);
1274 auto elements = Parameter<FixedArray>(Descriptor::kElements);
1275 auto search_element = Parameter<Object>(Descriptor::kSearchElement);
1276 auto array_length = Parameter<Smi>(Descriptor::kLength);
1277 auto from_index = Parameter<Smi>(Descriptor::kFromIndex);
1279 GenerateSmiOrObject(kIncludes, context, elements, search_element,
1280 array_length, from_index, SimpleElementKind::kAny);
1284 auto elements = Parameter<FixedArrayBase>(Descriptor::kElements);
1285 auto search_element = Parameter<Object>(Descriptor::kSearchElement);
1286 auto array_length = Parameter<Smi>(Descriptor::kLength);
1287 auto from_index = Parameter<Smi>(Descriptor::kFromIndex);
1289 ReturnIfEmpty(array_length, FalseConstant());
1290 GeneratePackedDoubles(kIncludes,
CAST(elements), search_element, array_length,
1295 auto elements = Parameter<FixedArrayBase>(Descriptor::kElements);
1296 auto search_element = Parameter<Object>(Descriptor::kSearchElement);
1297 auto array_length = Parameter<Smi>(Descriptor::kLength);
1298 auto from_index = Parameter<Smi>(Descriptor::kFromIndex);
1300 ReturnIfEmpty(array_length, FalseConstant());
1301 GenerateHoleyDoubles(kIncludes,
CAST(elements), search_element, array_length,
1307 UncheckedParameter<Int32T>(Descriptor::kJSActualArgumentsCount));
1308 auto context = Parameter<Context>(Descriptor::kContext);
1310 Generate(kIndexOf, argc, context);
1314 auto context = Parameter<Context>(Descriptor::kContext);
1315 auto elements = Parameter<FixedArray>(Descriptor::kElements);
1316 auto search_element = Parameter<Object>(Descriptor::kSearchElement);
1317 auto array_length = Parameter<Smi>(Descriptor::kLength);
1318 auto from_index = Parameter<Smi>(Descriptor::kFromIndex);
1320 GenerateSmiOrObject(kIndexOf, context, elements, search_element, array_length,
1321 from_index, SimpleElementKind::kSmiOrHole);
1325 auto context = Parameter<Context>(Descriptor::kContext);
1326 auto elements = Parameter<FixedArray>(Descriptor::kElements);
1327 auto search_element = Parameter<Object>(Descriptor::kSearchElement);
1328 auto array_length = Parameter<Smi>(Descriptor::kLength);
1329 auto from_index = Parameter<Smi>(Descriptor::kFromIndex);
1331 GenerateSmiOrObject(kIndexOf, context, elements, search_element, array_length,
1332 from_index, SimpleElementKind::kAny);
1336 auto elements = Parameter<FixedArrayBase>(Descriptor::kElements);
1337 auto search_element = Parameter<Object>(Descriptor::kSearchElement);
1338 auto array_length = Parameter<Smi>(Descriptor::kLength);
1339 auto from_index = Parameter<Smi>(Descriptor::kFromIndex);
1341 ReturnIfEmpty(array_length, NumberConstant(-1));
1342 GeneratePackedDoubles(kIndexOf,
CAST(elements), search_element, array_length,
1347 auto elements = Parameter<FixedArrayBase>(Descriptor::kElements);
1348 auto search_element = Parameter<Object>(Descriptor::kSearchElement);
1349 auto array_length = Parameter<Smi>(Descriptor::kLength);
1350 auto from_index = Parameter<Smi>(Descriptor::kFromIndex);
1352 ReturnIfEmpty(array_length, NumberConstant(-1));
1353 GenerateHoleyDoubles(kIndexOf,
CAST(elements), search_element, array_length,
1359 auto context = Parameter<NativeContext>(Descriptor::kContext);
1360 auto receiver = Parameter<Object>(Descriptor::kReceiver);
1361 Return(CreateArrayIterator(context, ToObject_Inline(context,
receiver),
1367 auto context = Parameter<NativeContext>(Descriptor::kContext);
1368 auto receiver = Parameter<Object>(Descriptor::kReceiver);
1369 Return(CreateArrayIterator(context, ToObject_Inline(context,
receiver),
1375 auto context = Parameter<NativeContext>(Descriptor::kContext);
1376 auto receiver = Parameter<Object>(Descriptor::kReceiver);
1377 Return(CreateArrayIterator(context, ToObject_Inline(context,
receiver),
1383 const char* method_name =
"Array Iterator.prototype.next";
1385 auto context = Parameter<Context>(Descriptor::kContext);
1386 auto maybe_iterator = Parameter<Object>(Descriptor::kReceiver);
1391 Label allocate_entry_if_needed(
this);
1392 Label allocate_iterator_result(
this);
1393 Label if_typedarray(
this), if_other(
this, Label::kDeferred), if_array(
this),
1394 if_generic(
this, Label::kDeferred);
1395 Label set_done(
this, Label::kDeferred);
1399 ThrowIfNotInstanceType(context, maybe_iterator, JS_ARRAY_ITERATOR_TYPE,
1408 TNode<Number> index = LoadJSArrayIteratorNextIndex(iterator);
1409 CSA_DCHECK(
this, IsNumberNonNegativeSafeInteger(index));
1414 GotoIf(InstanceTypeEqual(array_type, JS_ARRAY_TYPE), &if_array);
1415 Branch(InstanceTypeEqual(array_type, JS_TYPED_ARRAY_TYPE), &if_typedarray,
1427 ChangeNonNegativeNumberToUint32(LoadJSArrayLength(
CAST(array)));
1428 GotoIfNot(Uint32LessThan(index32, length32), &set_done);
1429 StoreJSArrayIteratorNextIndex(
1430 iterator, ChangeUint32ToTagged(Uint32Add(index32, Uint32Constant(1))));
1432 var_done = FalseConstant();
1435 GotoIf(Word32Equal(LoadAndUntagToWord32ObjectField(
1436 iterator, JSArrayIterator::kKindOffset),
1438 &allocate_iterator_result);
1440 Label if_hole(
this, Label::kDeferred);
1441 TNode<Int32T> elements_kind = LoadMapElementsKind(array_map);
1443 GotoIfForceSlowPath(&if_generic);
1444 var_value = LoadFixedArrayBaseElementAsTagged(
1445 elements, Signed(ChangeUint32ToWord(index32)), elements_kind,
1446 &if_generic, &if_hole);
1447 Goto(&allocate_entry_if_needed);
1451 GotoIf(IsNoElementsProtectorCellInvalid(), &if_generic);
1452 GotoIfNot(IsPrototypeInitialArrayPrototype(context, array_map),
1454 var_value = UndefinedConstant();
1455 Goto(&allocate_entry_if_needed);
1462 CSA_DCHECK(
this, Word32BinaryNot(IsJSArray(array)));
1463 CSA_DCHECK(
this, Word32BinaryNot(IsJSTypedArray(array)));
1467 CallBuiltin(Builtin::kToLength, context,
1468 GetProperty(context, array, factory()->length_string())));
1469 GotoIfNumberGreaterThanOrEqual(index, length, &set_done);
1470 StoreJSArrayIteratorNextIndex(iterator, NumberInc(index));
1472 var_done = FalseConstant();
1475 Branch(Word32Equal(LoadAndUntagToWord32ObjectField(
1476 iterator, JSArrayIterator::kKindOffset),
1478 &allocate_iterator_result, &if_generic);
1499 CSA_DCHECK(
this, Word32BinaryNot(IsJSTypedArray(array)));
1501 SelectConstant(IsJSArray(array), NumberConstant(
kMaxUInt32),
1503 StoreJSArrayIteratorNextIndex(iterator, max_length);
1504 Goto(&allocate_iterator_result);
1509 var_value = GetProperty(context, array, index);
1510 Goto(&allocate_entry_if_needed);
1513 BIND(&if_typedarray);
1517 ChangeSafeIntegerNumberToUintPtr(index, &allocate_iterator_result);
1523 Label detached(
this);
1525 LoadJSTypedArrayLengthAndCheckDetached(
CAST(array), &detached);
1526 GotoIfNot(UintPtrLessThan(index_uintptr, length),
1527 &allocate_iterator_result);
1530 StoreJSArrayIteratorNextIndex(
1532 ChangeUintPtrToTagged(UintPtrAdd(index_uintptr, UintPtrConstant(1))));
1534 var_done = FalseConstant();
1537 GotoIf(Word32Equal(LoadAndUntagToWord32ObjectField(
1538 iterator, JSArrayIterator::kKindOffset),
1540 &allocate_iterator_result);
1542 TNode<Int32T> elements_kind = LoadMapElementsKind(array_map);
1544 var_value = LoadFixedTypedArrayElementAsTagged(data_ptr, index_uintptr,
1546 Goto(&allocate_entry_if_needed);
1549 ThrowTypeError(context, MessageTemplate::kDetachedOperation, method_name);
1552 BIND(&allocate_entry_if_needed);
1554 GotoIf(Word32Equal(LoadAndUntagToWord32ObjectField(
1555 iterator, JSArrayIterator::kKindOffset),
1557 &allocate_iterator_result);
1560 AllocateJSIteratorResultForEntry(context, index, var_value.value());
1564 BIND(&allocate_iterator_result);
1567 AllocateJSIteratorResult(context, var_value.value(), var_done.value());
1575 auto context = Parameter<Context>(Descriptor::kContext);
1576 auto function = Parameter<JSFunction>(Descriptor::kTarget);
1577 auto new_target = Parameter<Object>(Descriptor::kNewTarget);
1578 auto argc = UncheckedParameter<Int32T>(Descriptor::kActualArgumentsCount);
1587 TailCallBuiltin(Builtin::kArrayConstructorImpl, context, function,
new_target,
1611 allocation_site_or_undefined,
argc);
1633 for (
int i = 0;
i <= last_index; ++
i) {
1648 Abort(AbortReason::kUnexpectedElementsKindInArrayConstructor);
1660 isolate(), holey_initial, mode);
1677 Label normal_sequence(
this);
1682 int fast_elements_kind_holey_mask =
1692 SmiOr(transition_info,
SmiConstant(fast_elements_kind_holey_mask)));
1693 Goto(&normal_sequence);
1695 BIND(&normal_sequence);
1703 for (
int i = 0;
i <= last_index; ++
i) {
1719 Abort(AbortReason::kUnexpectedElementsKindInArrayConstructor);
1728 Label check_one_case(
this), fallthrough(
this);
1733 BIND(&check_one_case);
1743 auto target = Parameter<JSFunction>(Descriptor::kTarget);
1744 auto new_target = Parameter<Object>(Descriptor::kNewTarget);
1745 auto argc = UncheckedParameter<Int32T>(Descriptor::kActualArgumentsCount);
1746 auto maybe_allocation_site =
1747 Parameter<HeapObject>(Descriptor::kAllocationSite);
1751 target, JSFunction::kPrototypeOrInitialMapOffset))));
1754 CSA_DCHECK(
this, Word32Or(IsUndefined(maybe_allocation_site),
1755 IsAllocationSite(maybe_allocation_site)));
1759 CAST(LoadObjectField(target, JSFunction::kContextOffset));
1761 Label runtime(
this, Label::kDeferred);
1762 GotoIf(TaggedNotEqual(target,
new_target), &runtime);
1764 Label no_info(
this);
1767 GotoIf(IsUndefined(maybe_allocation_site), &no_info);
1769 GenerateDispatchToArrayStub(context, target, argc,
DONT_OVERRIDE,
1770 CAST(maybe_allocation_site));
1778 GenerateArrayNArgumentsConstructor(context, target,
new_target, argc,
1779 maybe_allocation_site);
1788 Label smi_size(
this);
1789 Label small_smi_size(
this);
1804 SmiConstant(AbortReason::kAllocatingNonEmptyPackedArray);
1807 Branch(SmiAboveOrEqual(array_size_smi,
1809 &call_runtime, &small_smi_size);
1812 BIND(&small_smi_size);
1815 elements_kind, array_map, array_size_smi, array_size_smi,
1818 :
CAST(allocation_site));
1823 BIND(&call_runtime);
1835 bool track_allocation_site =
1837 std::optional<TNode<AllocationSite>> allocation_site =
1838 track_allocation_site
1840 : std::optional<TNode<AllocationSite>>(std::nullopt);
1869 kind, allocation_site_mode);
1879 args.SetReceiver(target);
1886 maybe_allocation_site);
1890 auto context = Parameter<Context>(Descriptor::kContext);
1891 auto target = Parameter<JSFunction>(Descriptor::kFunction);
1892 auto argc = UncheckedParameter<Int32T>(Descriptor::kActualArgumentsCount);
1893 auto maybe_allocation_site =
1894 Parameter<HeapObject>(Descriptor::kAllocationSite);
1896 GenerateArrayNArgumentsConstructor(context, target, target, argc,
1897 maybe_allocation_site);
1900#define GENERATE_ARRAY_CTOR(name, kind_camel, kind_caps, mode_camel, \
1902 TF_BUILTIN(Array##name##Constructor_##kind_camel##_##mode_camel, \
1903 ArrayBuiltinsAssembler) { \
1904 GenerateArray##name##Constructor(kind_caps, mode_caps); \
1943#undef GENERATE_ARRAY_CTOR
1955 Label is_object(
this, ¤t_allocation_site),
1956 is_array(
this, ¤t_allocation_site);
1971 current_allocation_site =
1982 Builtin::kCreateArrayFromSlowBoilerplateHelper,
context,
1983 current_allocation_site.
value(), item);
1986 GotoIf(IsUndefined(clone.value()), bailout);
1987 current_allocation_site =
Projection<1>(clone_and_next_allocation_site);
1994 Builtin::kCreateObjectFromSlowBoilerplateHelper,
context,
1995 current_allocation_site.
value(), item);
1997 GotoIf(IsUndefined(clone.value()), bailout);
1998 current_allocation_site =
Projection<1>(clone_and_next_allocation_site);
2012 Label cloned(
this, &clone),
2013 done_with_element(
this, ¤t_allocation_site);
2017 &cloned, &done_with_element, bailout);
2022 Goto(&done_with_element);
2025 BIND(&done_with_element);
2036 auto context = Parameter<Context>(Descriptor::kContext);
2037 auto feedback_vector = Parameter<FeedbackVector>(Descriptor::kFeedbackVector);
2038 auto slot = Parameter<TaggedIndex>(Descriptor::kSlot);
2040 Label call_runtime(
this);
2043 CAST(LoadFeedbackVectorSlot(feedback_vector, slot));
2044 GotoIfNot(HasBoilerplate(maybe_allocation_site), &call_runtime);
2050 auto clone_and_next_allocation_site = CallBuiltin<PairT<Object, Object>>(
2051 Builtin::kCreateArrayFromSlowBoilerplateHelper,
context,
2052 allocation_site, boilerplate);
2055 GotoIf(IsUndefined(
result), &call_runtime);
2059 BIND(&call_runtime);
2061 auto boilerplate_descriptor = Parameter<ArrayBoilerplateDescription>(
2062 Descriptor::kBoilerplateDescriptor);
2063 auto flags = Parameter<Smi>(Descriptor::kFlags);
2065 CallRuntime(Runtime::kCreateArrayLiteral, context, feedback_vector,
2066 slot, boilerplate_descriptor, flags);
2072 auto context = Parameter<Context>(Descriptor::kContext);
2073 auto feedback_vector = Parameter<FeedbackVector>(Descriptor::kFeedbackVector);
2074 auto slot = Parameter<TaggedIndex>(Descriptor::kSlot);
2076 Label call_runtime(
this);
2079 CAST(LoadFeedbackVectorSlot(feedback_vector, slot));
2080 GotoIfNot(HasBoilerplate(maybe_allocation_site), &call_runtime);
2086 auto clone_and_next_allocation_site = CallBuiltin<PairT<Object, Object>>(
2087 Builtin::kCreateObjectFromSlowBoilerplateHelper,
context,
2088 allocation_site, boilerplate);
2091 GotoIf(IsUndefined(
result), &call_runtime);
2095 BIND(&call_runtime);
2097 auto boilerplate_descriptor = Parameter<ObjectBoilerplateDescription>(
2098 Descriptor::kBoilerplateDescriptor);
2099 auto flags = Parameter<Smi>(Descriptor::kFlags);
2101 CallRuntime(Runtime::kCreateObjectLiteral, context, feedback_vector,
2102 slot, boilerplate_descriptor, flags);
2109 auto context = Parameter<Context>(Descriptor::kContext);
2110 auto allocation_site = Parameter<AllocationSite>(Descriptor::kAllocationSite);
2111 auto boilerplate = Parameter<JSArray>(Descriptor::kBoilerplate);
2113 PerformStackCheck(context);
2116 TNode<Smi> length = LoadFixedArrayBaseLength(boilerplate_elements);
2122 current_allocation_site = allocation_site;
2124 Label done(
this, ¤t_allocation_site),
2125 bailout(
this, ¤t_allocation_site, Label::kDeferred);
2138 array = CloneFastJSArray(context, boilerplate, allocation_site);
2140 array = CloneFastJSArray(context, boilerplate);
2147 GotoIf(TaggedEqual(LoadMap(elements), FixedCOWArrayMapConstant()), &done);
2151 TNode<Int32T> elements_kind = LoadElementsKind(boilerplate);
2152 GotoIf(Uint32GreaterThan(
2157 GotoIf(SmiEqual(length, SmiConstant(0)), &done);
2158 CloneElementsOfFixedArray(elements, length, elements_kind,
2159 current_allocation_site, context, &done, &bailout);
2161 { Return(array, current_allocation_site.value()); }
2164 { Return(UndefinedConstant(), UndefinedConstant()); }
2169 auto context = Parameter<Context>(Descriptor::kContext);
2170 auto allocation_site = Parameter<AllocationSite>(Descriptor::kAllocationSite);
2171 auto boilerplate = Parameter<JSObject>(Descriptor::kBoilerplate);
2173 PerformStackCheck(context);
2176 current_allocation_site = allocation_site;
2178 Label bailout(
this, ¤t_allocation_site);
2186 TNode<Int32T> elements_kind = LoadElementsKind(boilerplate);
2191 constexpr bool kBailoutIfDictionaryPropertiesTrue =
true;
2195 allocation_site, boilerplate, &bailout,
2196 kBailoutIfDictionaryPropertiesTrue));
2204 CSA_DCHECK(
this, IsEmptyFixedArray(LoadFastProperties(boilerplate)));
2210 Label cloned(
this, &clone),
2211 done_with_field(
this, ¤t_allocation_site);
2214 CloneIfObjectOrArray(field, clone, current_allocation_site, context,
2215 &cloned, &done_with_field, &bailout);
2219 StoreObjectField(
object,
offset, clone.value());
2220 Goto(&done_with_field);
2223 BIND(&done_with_field);
2226 TNode<Map> boilerplate_map = LoadMap(boilerplate);
2228 TimesTaggedSize(LoadMapInstanceSizeInWords(boilerplate_map));
2229 VariableList loop_vars({¤t_allocation_site}, zone());
2230 BuildFastLoop<IntPtrT>(loop_vars, IntPtrConstant(JSObject::kHeaderSize),
2232 LoopUnrollingMode::kYes, IndexAdvanceMode::kPost);
2237 Label done_with_elements(
this);
2239 GotoIf(IsEmptyFixedArray(elements), &done_with_elements);
2242 CloneElementsOfFixedArray(elements, LoadFixedArrayBaseLength(elements),
2243 LoadElementsKind(
object), current_allocation_site,
2244 context, &done_with_elements, &bailout);
2245 BIND(&done_with_elements);
2248 Return(
object, current_allocation_site.value());
2255 Return(UndefinedConstant(), UndefinedConstant());
#define GENERATE_ARRAY_CTOR(name, kind_camel, kind_caps, mode_camel, mode_caps)
#define ELEMENTS_KIND(Type, type, TYPE, ctype)
#define CSA_DCHECK(csa,...)
#define TF_BUILTIN(Name, AssemblerBase)
static constexpr U encode(T value)
static bool ShouldTrack(ElementsKind boilerplate_elements_kind)
void GenerateArrayNArgumentsConstructor(TNode< Context > context, TNode< JSFunction > target, TNode< Object > new_target, TNode< Int32T > argc, TNode< HeapObject > maybe_allocation_site)
void ReturnFromBuiltin(TNode< Object > value)
std::function< void(ArrayBuiltinsAssembler *masm)> BuiltinResultGenerator
ArrayBuiltinsAssembler(compiler::CodeAssemblerState *state)
TNode< Context > context()
TNode< BoolT > fast_typed_array_target_
ElementsKind source_elements_kind_
TNode< JSAny > TypedArrayMapProcessor(TNode< Object > k_value, TNode< UintPtrT > k)
TNode< Object > callbackfn()
void InitIteratingArrayBuiltinBody(TNode< Context > context, TNode< JSAny > receiver, TNode< Object > callbackfn, TNode< JSAny > this_arg, TNode< IntPtrT > argc)
void TypedArrayMapResultGenerator()
void GenerateIteratingTypedArrayBuiltinBody(const char *name, const BuiltinResultGenerator &generator, const CallResultProcessor &processor, ForEachDirection direction=ForEachDirection::kForward)
TNode< JSAny > receiver()
TNode< Object > callbackfn_
void GenerateDispatchToArrayStub(TNode< Context > context, TNode< JSFunction > target, TNode< Int32T > argc, AllocationSiteOverrideMode mode, std::optional< TNode< AllocationSite > > allocation_site=std::nullopt)
void GenerateConstructor(TNode< Context > context, TNode< JSAnyNotSmi > array_function, TNode< Map > array_map, TNode< Object > array_size, TNode< HeapObject > allocation_site, ElementsKind elements_kind, AllocationSiteMode mode)
TNode< Context > context_
void CreateArrayDispatchSingleArgument(TNode< Context > context, TNode< JSFunction > target, TNode< Int32T > argc, AllocationSiteOverrideMode mode, std::optional< TNode< AllocationSite > > allocation_site)
void GenerateArraySingleArgumentConstructor(ElementsKind kind, AllocationSiteOverrideMode mode)
void TailCallArrayConstructorStub(const Callable &callable, TNode< Context > context, TNode< JSFunction > target, TNode< HeapObject > allocation_site_or_undefined, TNode< Int32T > argc)
std::function< TNode< JSAny >( ArrayBuiltinsAssembler *masm, TNode< Object > k_value, TNode< UintPtrT > k)> CallResultProcessor
TNode< JSAny > this_arg()
void GenerateArrayNoArgumentConstructor(ElementsKind kind, AllocationSiteOverrideMode mode)
void CreateArrayDispatchNoArgument(TNode< Context > context, TNode< JSFunction > target, TNode< Int32T > argc, AllocationSiteOverrideMode mode, std::optional< TNode< AllocationSite > > allocation_site)
void VisitAllTypedArrayElements(TNode< JSArrayBuffer > array_buffer, const CallResultProcessor &processor, ForEachDirection direction, TNode< JSTypedArray > typed_array)
void GenerateSmiOrObject(SearchVariant variant, TNode< Context > context, TNode< FixedArray > elements, TNode< Object > search_element, TNode< Smi > array_length, TNode< Smi > from_index, SimpleElementKind array_kind)
void Generate(SearchVariant variant, TNode< IntPtrT > argc, TNode< Context > context)
void GeneratePackedDoubles(SearchVariant variant, TNode< FixedDoubleArray > elements, TNode< Object > search_element, TNode< Smi > array_length, TNode< Smi > from_index)
ArrayIncludesIndexofAssembler(compiler::CodeAssemblerState *state)
void GenerateHoleyDoubles(SearchVariant variant, TNode< FixedDoubleArray > elements, TNode< Object > search_element, TNode< Smi > array_length, TNode< Smi > from_index)
void ReturnIfEmpty(TNode< Smi > length, TNode< Object > value)
TNode< Object > ConstructArrayLike(TNode< Context > context, TNode< Object > receiver, TNode< Number > length)
TNode< Object > ConstructArrayLike(TNode< Context > context, TNode< Object > receiver)
ArrayPopulatorAssembler(compiler::CodeAssemblerState *state)
Handle< Code > code() const
static Callable ArrayNoArgumentConstructor(Isolate *isolate, ElementsKind kind, AllocationSiteOverrideMode override_mode)
static Callable ArraySingleArgumentConstructor(Isolate *isolate, ElementsKind kind, AllocationSiteOverrideMode override_mode)
TNode< BoolT > IsJSObject(TNode< HeapObject > object)
TNode< JSArray > AllocateJSArray(ElementsKind kind, TNode< Map > array_map, TNode< IntPtrT > capacity, TNode< Smi > length, std::optional< TNode< AllocationSite > > allocation_site, AllocationFlags allocation_flags=AllocationFlag::kNone)
TNode< Smi > LoadTransitionInfo(TNode< AllocationSite > allocation_site)
TNode< BoolT > IsJSTypedArrayMap(TNode< Map > map)
TNode< BoolT > IsConstructor(TNode< HeapObject > object)
TNode< Number > ChangeUintPtrToTagged(TNode< UintPtrT > value)
TNode< BoolT > IsCallableMap(TNode< Map > map)
TNode< UintPtrT > LoadJSTypedArrayLengthAndCheckDetached(TNode< JSTypedArray > typed_array, Label *detached)
TNode< Numeric > LoadFixedTypedArrayElementAsTagged(TNode< RawPtrT > data_pointer, TNode< UintPtrT > index, ElementsKind elements_kind)
TNode< Int32T > TruncateIntPtrToInt32(TNode< IntPtrT > value)
TNode< JSArrayBuffer > LoadJSArrayBufferViewBuffer(TNode< JSArrayBufferView > array_buffer_view)
void StoreFixedArrayElement(TNode< FixedArray > object, int index, TNode< Object > value, WriteBarrierMode barrier_mode=UPDATE_WRITE_BARRIER, CheckBounds check_bounds=CheckBounds::kAlways)
TNode< Object > UnsafeLoadFixedArrayElement(TNode< FixedArray > object, TNode< IntPtrT > index, int additional_offset=0)
TNode< JSReceiver > Construct(TNode< Context > context, TNode< JSReceiver > new_target, TArgs... args)
void ThrowTypeError(TNode< Context > context, MessageTemplate message, char const *arg0=nullptr, char const *arg1=nullptr)
TNode< Smi > SmiTag(TNode< IntPtrT > value)
void Increment(TVariable< TIndex > *variable, int value=1)
TNode< BoolT > TaggedEqual(TNode< AnyTaggedT > a, TNode< AnyTaggedT > b)
TNode< FixedArrayBase > LoadElements(TNode< JSObject > object)
TNode< T > LoadObjectField(TNode< HeapObject > object, int offset)
TNode< JSObject > LoadBoilerplate(TNode< AllocationSite > allocation_site)
TNode< BoolT > TaggedIsPositiveSmi(TNode< Object > a)
TNode< BoolT > ElementsKindEqual(TNode< Int32T > a, TNode< Int32T > b)
TNode< Number > ToNumber_Inline(TNode< Context > context, TNode< Object > input)
void EmitElementStore(TNode< JSObject > object, TNode< Object > key, TNode< Object > value, ElementsKind elements_kind, KeyedAccessStoreMode store_mode, Label *bailout, TNode< Context > context, TVariable< Object > *maybe_converted_value=nullptr)
TNode< BoolT > IsFastPackedElementsKind(TNode< Int32T > elements_kind)
TNode< IntPtrT > SmiUntag(TNode< Smi > value)
TNode< Map > LoadJSArrayElementsMap(ElementsKind kind, TNode< NativeContext > native_context)
TNode< Object > LoadNestedAllocationSite(TNode< AllocationSite > allocation_site)
void TailCallRuntimeNewArray(TNode< Context > context, TNode< JSAny > receiver, TNode< Object > length, TNode< Object > new_target, TNode< Object > allocation_site)
TNode< RawPtrT > LoadJSTypedArrayDataPtr(TNode< JSTypedArray > typed_array)
TNode< BoolT > IsSetSmi(TNode< Smi > smi, int untagged_mask)
TNode< BoolT > IsElementsKindLessThanOrEqual(TNode< Int32T > target_kind, ElementsKind reference_kind)
TNode< BoolT > IsJSArray(TNode< HeapObject > object)
TNode< Uint32T > DecodeWord32(TNode< Word32T > word32)
TNode< JSArray > ArrayCreate(TNode< Context > context, TNode< Number > length)
TNode< BoolT > IsNumberNormalized(TNode< Number > number)
void BuildFastLoop(const VariableList &vars, TVariable< TIndex > &var_index, TNode< TIndex > start_index, TNode< TIndex > end_index, const FastLoopBody< TIndex > &body, TNode< TIndex > increment, LoopUnrollingMode unrolling_mode, IndexAdvanceMode advance_mode, IndexAdvanceDirection advance_direction)
TNode< Float64T > SmiToFloat64(TNode< Smi > value)
TNode< Int32T > LoadElementsKind(TNode< HeapObject > object)
TNode< BoolT > IsBigIntInstanceType(TNode< Int32T > instance_type)
void StoreObjectFieldNoWriteBarrier(TNode< HeapObject > object, TNode< IntPtrT > offset, TNode< T > value)
TNode< Object > LoadFixedArrayElement(TNode< FixedArray > object, TNode< TIndex > index, int additional_offset=0, CheckBounds check_bounds=CheckBounds::kAlways)
TNode< JSAny > Call(TNode< Context > context, TNode< TCallable > callable, ConvertReceiverMode mode, TNode< JSAny > receiver, TArgs... args)
TNode< Uint16T > LoadMapInstanceType(TNode< Map > map)
TNode< IntPtrT > LoadStringLengthAsWord(TNode< String > string)
TNode< Uint16T > LoadInstanceType(TNode< HeapObject > object)
void CheckJSTypedArrayIndex(TNode< JSTypedArray > typed_array, TNode< UintPtrT > index, Label *detached_or_out_of_bounds)
TNode< BoolT > TaggedIsSmi(TNode< MaybeObject > a)
TNode< Smi > LoadFastJSArrayLength(TNode< JSArray > array)
TNode< Float64T > LoadHeapNumberValue(TNode< HeapObject > object)
TNode< BigInt > ToBigInt(TNode< Context > context, TNode< Object > input)
TNode< Object > SetPropertyStrict(TNode< Context > context, TNode< JSAny > receiver, TNode< Object > key, TNode< Object > value)
TNode< Float64T > LoadFixedDoubleArrayElement(TNode< FixedDoubleArray > object, TNode< IntPtrT > index, Label *if_hole=nullptr, MachineType machine_type=MachineType::Float64())
TNode< Map > LoadMap(TNode< HeapObject > object)
TNode< Int32T > SmiToInt32(TNode< Smi > value)
TNode< Int32T > LoadMapElementsKind(TNode< Map > map)
void Abort(AbortReason reason)
Uint32LessThanOrEqual IntPtrGreaterThanOrEqual
TNode< BoolT > IsStringInstanceType(TNode< Int32T > instance_type)
TNode< IntPtrT > PositiveSmiUntag(TNode< Smi > value)
TNode< BoolT > IsBigInt(TNode< HeapObject > object)
void BranchIfFloat64IsNaN(TNode< Float64T > value, Label *if_true, Label *if_false)
TNode< HeapObject > CreateShallowObjectLiteral(TNode< FeedbackVector > feedback_vector, TNode< TaggedIndex > slot, Label *call_runtime)
static const int kMaximumClonedShallowArrayElements
static const int kInitialMaxFastElementArray
static const int kPreallocatedArrayElements
static const uint32_t kMinAddedElementsCapacity
static constexpr MachineType None()
static constexpr MachineType TaggedPointer()
static constexpr MachineType UintPtr()
void CloneElementsOfFixedArray(TNode< FixedArrayBase > elements, TNode< Smi > length, TNode< Int32T > elements_kind, TVariable< Object > ¤t_allocation_site, TNode< Context > context, Label *done, Label *bailout)
void CloneIfObjectOrArray(TNode< Object > item, TVariable< Object > &clone, TVariable< Object > ¤t_allocation_site, TNode< Context > context, Label *cloned, Label *not_cloned, Label *bailout)
SlowBoilerplateCloneAssembler(compiler::CodeAssemblerState *state)
void StringEqual_Core(TNode< String > lhs, TNode< Word32T > lhs_instance_type, TNode< String > rhs, TNode< Word32T > rhs_instance_type, TNode< IntPtrT > length, Label *if_equal, Label *if_not_equal, Label *if_indirect)
CodeAssemblerState * state()
TNode< IntPtrT > IntPtrAdd(TNode< IntPtrT > left, TNode< IntPtrT > right)
TNode< Int32T > Signed(TNode< Word32T > x)
TNode< IntPtrT > IntPtrConstant(intptr_t value)
TNode< T > UncheckedCast(Node *value)
void GotoIfNot(TNode< IntegralT > condition, Label *false_label, GotoHint goto_hint=GotoHint::kNone)
void Return(TNode< Object > value)
void PopAndReturn(Node *pop, Node *value)
Isolate * isolate() const
TNode< Int32T > UniqueInt32Constant(int32_t value)
TNode< T > ReinterpretCast(Node *value)
TNode< Int32T > Int32Add(TNode< Int32T > left, TNode< Int32T > right)
void TailCallRuntime(Runtime::FunctionId function, TNode< Object > context, TArgs... args)
TNode< Smi > SmiConstant(Tagged< Smi > value)
void GotoIf(TNode< IntegralT > condition, Label *true_label, GotoHint goto_hint=GotoHint::kNone)
TNode< Int32T > Word32Or(TNode< Int32T > left, TNode< Int32T > right)
TNode< BoolT > IntPtrEqual(TNode< WordT > left, TNode< WordT > right)
void Switch(Node *index, Label *default_label, const int32_t *case_values, Label **case_labels, size_t case_count)
TNode< typename std::tuple_element< index, std::tuple< T1, T2 > >::type > Projection(TNode< PairT< T1, T2 > > value)
TNode< Float64T > Float64Constant(double value)
TNode< ExternalReference > ExternalConstant(ExternalReference address)
TNode< Int32T > Int32Constant(int32_t value)
Node * CallCFunction(Node *function, std::optional< MachineType > return_type, CArgs... cargs)
TNode< Type > HeapConstantNoHole(Handle< Type > object)
TNode< BoolT > Word32Equal(TNode< Word32T > left, TNode< Word32T > right)
TNode< T > CallRuntime(Runtime::FunctionId function, TNode< Object > context, TArgs... args)
TNode< UintPtrT > UintPtrConstant(uintptr_t value)
void TailCallStub(const CallInterfaceDescriptor &descriptor, TNode< Code > target, TNode< Object > context, TArgs... args)
TNode< Number > NumberConstant(double value)
TNode< T > CallBuiltin(Builtin id, TNode< Object > context, TArgs... args)
void Branch(TNode< IntegralT > condition, Label *true_label, Label *false_label, BranchHint branch_hint=BranchHint::kNone)
TNode< T > Parameter(int value, const SourceLocation &loc=SourceLocation::Current())
#define V8_EXPERIMENTAL_UNDEFINED_DOUBLE_BOOL
#define RAB_GSAB_TYPED_ARRAYS(V)
base::Vector< const DirectHandle< Object > > args
DirectHandle< Object > new_target
#define V8_ALLOCATION_SITE_TRACKING_BOOL
ArrayReduceDirection direction
ZoneVector< RpoNumber > & result
LiftoffAssembler::CacheState state
constexpr int kTaggedSize
constexpr double kMaxSafeInteger
ElementsKind GetFastElementsKindFromSequenceIndex(int sequence_number)
@ DONT_TRACK_ALLOCATION_SITE
DONT_OVERRIDE DISABLE_ALLOCATION_SITES Holey
bool IsRabGsabTypedArrayElementsKind(ElementsKind kind)
DONT_OVERRIDE DISABLE_ALLOCATION_SITES DISABLE_ALLOCATION_SITES HoleyDouble
@ LAST_FAST_ELEMENTS_KIND
@ LAST_ANY_NONEXTENSIBLE_ELEMENTS_KIND
@ TERMINAL_FAST_ELEMENTS_KIND
too high values may cause the compiler to set high thresholds for inlining to as much as possible avoid inlined allocation of objects that cannot escape trace load stores from virtual maglev objects use TurboFan fast string builder analyze liveness of environment slots and zap dead values trace TurboFan load elimination emit data about basic block usage in builtins to this enable builtin reordering when run mksnapshot flag for emit warnings when applying builtin profile data verify register allocation in TurboFan randomly schedule instructions to stress dependency tracking enable store store elimination in TurboFan rewrite far to near simulate GC compiler thread race related to allow float parameters to be passed in simulator mode JS Wasm Run additional turbo_optimize_inlined_js_wasm_wrappers enable experimental feedback collection in generic lowering enable Turboshaft s WasmLoadElimination enable Turboshaft s low level load elimination for JS enable Turboshaft s escape analysis for string concatenation use enable Turbolev features that we want to ship in the not too far future trace individual Turboshaft reduction steps trace intermediate Turboshaft reduction steps invocation count threshold for early optimization Enables optimizations which favor memory size over execution speed Enables sampling allocation profiler with X as a sample interval min size of a semi the new space consists of two semi spaces max size of the Collect garbage after Collect garbage after keeps maps alive for< n > old space garbage collections print one detailed trace line in name
ElementsKind GetCorrespondingNonRabGsabElementsKind(ElementsKind typed_array_kind)
int GetSequenceIndexFromFastElementsKind(ElementsKind elements_kind)
ElementsKind GetHoleyElementsKind(ElementsKind packed_kind)
AllocationSiteOverrideMode
@ DISABLE_ALLOCATION_SITES
DONT_OVERRIDE DISABLE_ALLOCATION_SITES HOLEY_ELEMENTS
bool IsBigIntTypedArrayElementsKind(ElementsKind kind)
DONT_OVERRIDE DISABLE_ALLOCATION_SITES DISABLE_ALLOCATION_SITES HOLEY_DOUBLE_ELEMENTS
ElementsKind GetInitialFastElementsKind()
constexpr uint32_t kMaxUInt32
DONT_OVERRIDE DisableAllocationSites
BUILTIN_FP_CALL BUILTIN_FP_CALL BUILTIN_FP_CALL BUILTIN_FP_CALL BUILTIN_FP_CALL BUILTIN_FP_CALL BUILTIN_FP_CALL BUILTIN_FP_CALL BUILTIN_FP_CALL BUILTIN_FP_CALL int size_t search_length
!IsContextMap !IsContextMap native_context
#define DCHECK(condition)
#define DCHECK_EQ(v1, v2)