Lines Matching refs:TNode

93 void CodeStubAssembler::Dcheck(TNode<Word32T> condition_node,
130 TNode<BoolT> condition = condition_body();
137 void CodeStubAssembler::Check(TNode<Word32T> condition_node,
148 TNode<FeedbackVector> feedback_vector, TNode<UintPtrT> slot_id) {
150 TNode<Smi> call_count =
155 TNode<Smi> new_count = SmiAdd(
162 void CodeStubAssembler::FastCheck(TNode<BoolT> condition) {
191 TNode<String> message_node = StringConstant(message);
205 TNode<Int32T> CodeStubAssembler::SelectInt32Constant(TNode<BoolT> condition,
212 TNode<IntPtrT> CodeStubAssembler::SelectIntPtrConstant(TNode<BoolT> condition,
219 TNode<Oddball> CodeStubAssembler::SelectBooleanConstant(
220 TNode<BoolT> condition) {
224 TNode<Smi> CodeStubAssembler::SelectSmiConstant(TNode<BoolT> condition,
231 TNode<Smi> CodeStubAssembler::NoContextConstant() {
236 TNode<std::remove_pointer<std::remove_reference<decltype( \
247 TNode<std::remove_pointer<std::remove_reference<decltype( \
258 TNode<BoolT> CodeStubAssembler::Is##name(TNode<Object> value) { \
261 TNode<BoolT> CodeStubAssembler::IsNot##name(TNode<Object> value) { \
267 TNode<BInt> CodeStubAssembler::BIntConstant(int value) {
278 TNode<Smi> CodeStubAssembler::IntPtrOrSmiConstant<Smi>(int value) {
283 TNode<IntPtrT> CodeStubAssembler::IntPtrOrSmiConstant<IntPtrT>(int value) {
288 TNode<UintPtrT> CodeStubAssembler::IntPtrOrSmiConstant<UintPtrT>(int value) {
293 TNode<RawPtrT> CodeStubAssembler::IntPtrOrSmiConstant<RawPtrT>(int value) {
298 TNode<Smi> maybe_constant, int* value) {
308 TNode<IntPtrT> maybe_constant, int* value) {
317 TNode<IntPtrT> CodeStubAssembler::IntPtrRoundUpToPowerOfTwo32(
318 TNode<IntPtrT> value) {
328 TNode<BoolT> CodeStubAssembler::WordIsPowerOfTwo(TNode<IntPtrT> value) {
342 TNode<Float64T> CodeStubAssembler::Float64Round(TNode<Float64T> x) {
343 TNode<Float64T> one = Float64Constant(1.0);
344 TNode<Float64T> one_half = Float64Constant(0.5);
360 TNode<Float64T> CodeStubAssembler::Float64Ceil(TNode<Float64T> x) {
365 TNode<Float64T> one = Float64Constant(1.0);
366 TNode<Float64T> zero = Float64Constant(0.0);
367 TNode<Float64T> two_52 = Float64Constant(4503599627370496.0E0);
368 TNode<Float64T> minus_two_52 = Float64Constant(-4503599627370496.0E0);
397 TNode<Float64T> minus_x = Float64Neg(x);
412 TNode<Float64T> CodeStubAssembler::Float64Floor(TNode<Float64T> x) {
417 TNode<Float64T> one = Float64Constant(1.0);
418 TNode<Float64T> zero = Float64Constant(0.0);
419 TNode<Float64T> two_52 = Float64Constant(4503599627370496.0E0);
420 TNode<Float64T> minus_two_52 = Float64Constant(-4503599627370496.0E0);
449 TNode<Float64T> minus_x = Float64Neg(x);
464 TNode<Float64T> CodeStubAssembler::Float64RoundToEven(TNode<Float64T> x) {
469 TNode<Float64T> f = Float64Floor(x);
470 TNode<Float64T> f_and_half = Float64Add(f, Float64Constant(0.5));
478 TNode<Float64T> f_mod_2 = Float64Mod(f, Float64Constant(2.0));
495 TNode<Float64T> CodeStubAssembler::Float64Trunc(TNode<Float64T> x) {
500 TNode<Float64T> one = Float64Constant(1.0);
501 TNode<Float64T> zero = Float64Constant(0.0);
502 TNode<Float64T> two_52 = Float64Constant(4503599627370496.0E0);
503 TNode<Float64T> minus_two_52 = Float64Constant(-4503599627370496.0E0);
540 TNode<Float64T> minus_x = Float64Neg(x);
556 TNode<IntPtrT> CodeStubAssembler::PopulationCountFallback(
557 TNode<UintPtrT> value) {
566 // TNode<UintPtrT> value = Unsigned(value_word);
567 TNode<UintPtrT> lhs, rhs;
613 TNode<Int64T> CodeStubAssembler::PopulationCount64(TNode<Word64T> value) {
627 TNode<Int32T> CodeStubAssembler::PopulationCount32(TNode<Word32T> value) {
633 TNode<IntPtrT> res =
637 TNode<IntPtrT> res = PopulationCountFallback(
643 TNode<Int64T> CodeStubAssembler::CountTrailingZeros64(TNode<Word64T> value) {
657 TNode<Word64T> lhs = Word64Not(value);
658 TNode<Word64T> rhs = Uint64Sub(Unsigned(value), Uint64Constant(1));
662 TNode<Int32T> CodeStubAssembler::CountTrailingZeros32(TNode<Word32T> value) {
669 TNode<Word32T> lhs = Word32BitwiseNot(value);
670 TNode<Word32T> rhs = Int32Sub(Signed(value), Int32Constant(1));
673 TNode<Int64T> res64 = CountTrailingZeros64(ChangeUint32ToUint64(value));
678 TNode<Int64T> CodeStubAssembler::CountLeadingZeros64(TNode<Word64T> value) {
682 TNode<Int32T> CodeStubAssembler::CountLeadingZeros32(TNode<Word32T> value) {
687 TNode<Smi> CodeStubAssembler::TaggedToParameter(TNode<Smi> value) {
692 TNode<IntPtrT> CodeStubAssembler::TaggedToParameter(TNode<Smi> value) {
696 TNode<IntPtrT> CodeStubAssembler::TaggedIndexToIntPtr(
697 TNode<TaggedIndex> value) {
702 TNode<TaggedIndex> CodeStubAssembler::IntPtrToTaggedIndex(
703 TNode<IntPtrT> value) {
708 TNode<Smi> CodeStubAssembler::TaggedIndexToSmi(TNode<TaggedIndex> value) {
720 TNode<TaggedIndex> CodeStubAssembler::SmiToTaggedIndex(TNode<Smi> value) {
733 TNode<Int32T> raw =
739 TNode<Smi> CodeStubAssembler::NormalizeSmiIndex(TNode<Smi> smi_index) {
741 TNode<Int32T> raw =
748 TNode<Smi> CodeStubAssembler::SmiFromInt32(TNode<Int32T> value) {
758 TNode<Smi> CodeStubAssembler::SmiFromUint32(TNode<Uint32T> value) {
764 TNode<BoolT> CodeStubAssembler::IsValidPositiveSmi(TNode<IntPtrT> value) {
776 TNode<Smi> CodeStubAssembler::SmiTag(TNode<IntPtrT> value) {
785 TNode<Smi> smi =
790 TNode<IntPtrT> CodeStubAssembler::SmiUntag(TNode<Smi> value) {
795 TNode<IntPtrT> raw_bits = BitcastTaggedToWordForTagAndSmiBits(value);
803 TNode<Int32T> CodeStubAssembler::SmiToInt32(TNode<Smi> value) {
809 TNode<IntPtrT> result = SmiUntag(value);
813 TNode<Float64T> CodeStubAssembler::SmiToFloat64(TNode<Smi> value) {
817 TNode<Smi> CodeStubAssembler::SmiMax(TNode<Smi> a, TNode<Smi> b) {
821 TNode<Smi> CodeStubAssembler::SmiMin(TNode<Smi> a, TNode<Smi> b) {
825 TNode<IntPtrT> CodeStubAssembler::TryIntPtrAdd(TNode<IntPtrT> a,
826 TNode<IntPtrT> b,
828 TNode<PairT<IntPtrT, BoolT>> pair = IntPtrAddWithOverflow(a, b);
829 TNode<BoolT> overflow = Projection<1>(pair);
834 TNode<IntPtrT> CodeStubAssembler::TryIntPtrSub(TNode<IntPtrT> a,
835 TNode<IntPtrT> b,
837 TNode<PairT<IntPtrT, BoolT>> pair = IntPtrSubWithOverflow(a, b);
838 TNode<BoolT> overflow = Projection<1>(pair);
843 TNode<Int32T> CodeStubAssembler::TryInt32Mul(TNode<Int32T> a, TNode<Int32T> b,
845 TNode<PairT<Int32T, BoolT>> pair = Int32MulWithOverflow(a, b);
846 TNode<BoolT> overflow = Projection<1>(pair);
851 TNode<Smi> CodeStubAssembler::TrySmiAdd(TNode<Smi> lhs, TNode<Smi> rhs,
859 TNode<PairT<Int32T, BoolT>> pair = Int32AddWithOverflow(
862 TNode<BoolT> overflow = Projection<1>(pair);
864 TNode<Int32T> result = Projection<0>(pair);
869 TNode<Smi> CodeStubAssembler::TrySmiSub(TNode<Smi> lhs, TNode<Smi> rhs,
872 TNode<PairT<IntPtrT, BoolT>> pair =
875 TNode<BoolT> overflow = Projection<1>(pair);
877 TNode<IntPtrT> result = Projection<0>(pair);
881 TNode<PairT<Int32T, BoolT>> pair = Int32SubWithOverflow(
884 TNode<BoolT> overflow = Projection<1>(pair);
886 TNode<Int32T> result = Projection<0>(pair);
891 TNode<Smi> CodeStubAssembler::TrySmiAbs(TNode<Smi> a, Label* if_overflow) {
893 TNode<PairT<IntPtrT, BoolT>> pair =
895 TNode<BoolT> overflow = Projection<1>(pair);
897 TNode<IntPtrT> result = Projection<0>(pair);
902 TNode<PairT<Int32T, BoolT>> pair = Int32AbsWithOverflow(
904 TNode<BoolT> overflow = Projection<1>(pair);
906 TNode<Int32T> result = Projection<0>(pair);
911 TNode<Number> CodeStubAssembler::NumberMax(TNode<Number> a, TNode<Number> b) {
929 TNode<Number> CodeStubAssembler::NumberMin(TNode<Number> a, TNode<Number> b) {
947 TNode<Number> CodeStubAssembler::SmiMod(TNode<Smi> a, TNode<Smi> b) {
954 TNode<Int32T> int_a = SmiToInt32(a);
955 TNode<Int32T> int_b = SmiToInt32(b);
968 TNode<Int32T> r = Int32Mod(int_a, int_b);
986 TNode<Int32T> r = Int32Mod(int_a, int_b);
1010 TNode<Number> CodeStubAssembler::SmiMul(TNode<Smi> a, TNode<Smi> b) {
1017 TNode<Int32T> lhs32 = SmiToInt32(a);
1018 TNode<Int32T> rhs32 = SmiToInt32(b);
1021 TNode<BoolT> overflow = Projection<1>(pair);
1031 TNode<Int32T> answer = Projection<0>(pair);
1032 TNode<Int32T> zero = Int32Constant(0);
1041 TNode<Int32T> or_result = Word32Or(lhs32, rhs32);
1061 TNode<Float64T> value =
1071 TNode<Smi> CodeStubAssembler::TrySmiDiv(TNode<Smi> dividend, TNode<Smi> divisor,
1090 TNode<Int32T> untagged_divisor = SmiToInt32(divisor);
1091 TNode<Int32T> untagged_dividend = SmiToInt32(dividend);
1109 TNode<Int32T> untagged_result = Int32Div(untagged_dividend, untagged_divisor);
1110 TNode<Int32T> truncated = Int32Mul(untagged_result, untagged_divisor);
1118 TNode<Smi> CodeStubAssembler::SmiLexicographicCompare(TNode<Smi> x,
1119 TNode<Smi> y) {
1120 TNode<ExternalReference> smi_lexicographic_compare =
1122 TNode<ExternalReference> isolate_ptr =
1130 TNode<Int32T> CodeStubAssembler::TruncateWordToInt32(TNode<WordT> value) {
1137 TNode<Int32T> CodeStubAssembler::TruncateIntPtrToInt32(TNode<IntPtrT> value) {
1144 TNode<BoolT> CodeStubAssembler::TaggedIsSmi(TNode<MaybeObject> a) {
1152 TNode<BoolT> CodeStubAssembler::TaggedIsNotSmi(TNode<MaybeObject> a) {
1156 TNode<BoolT> CodeStubAssembler::TaggedIsPositiveSmi(TNode<Object> a) {
1170 TNode<BoolT> CodeStubAssembler::WordIsAligned(TNode<WordT> word,
1188 TNode<Float64T> CodeStubAssembler::LoadDoubleWithHoleCheck(
1189 TNode<FixedDoubleArray> array, TNode<IntPtrT> index, Label* if_hole) {
1193 void CodeStubAssembler::BranchIfJSReceiver(TNode<Object> object, Label* if_true,
1202 const TNode<ExternalReference> force_slow_path_addr =
1204 const TNode<Uint8T> force_slow = Load<Uint8T>(force_slow_path_addr);
1210 TNode<HeapObject> CodeStubAssembler::AllocateRaw(TNode<IntPtrT> size_in_bytes,
1212 TNode<RawPtrT> top_address,
1213 TNode<RawPtrT> limit_address) {
1232 TNode<RawPtrT> top = Load<RawPtrT>(top_address);
1233 TNode<RawPtrT> limit = Load<RawPtrT>(limit_address);
1247 TNode<Smi> runtime_flags = SmiConstant(Smi::FromInt(
1270 TNode<IntPtrT> new_top =
1278 TNode<Smi> runtime_flags = SmiConstant(Smi::FromInt(
1330 TNode<HeapObject> CodeStubAssembler::AllocateRawUnaligned(
1331 TNode<IntPtrT> size_in_bytes, AllocationFlags flags,
1332 TNode<RawPtrT> top_address, TNode<RawPtrT> limit_address) {
1337 TNode<HeapObject> CodeStubAssembler::AllocateRawDoubleAligned(
1338 TNode<IntPtrT> size_in_bytes, AllocationFlags flags,
1339 TNode<RawPtrT> top_address, TNode<RawPtrT> limit_address) {
1358 TNode<HeapObject> CodeStubAssembler::AllocateInNewSpace(
1359 TNode<IntPtrT> size_in_bytes, AllocationFlags flags) {
1366 TNode<HeapObject> CodeStubAssembler::Allocate(TNode<IntPtrT> size_in_bytes,
1388 TNode<ExternalReference> top_address = ExternalConstant(
1415 TNode<IntPtrT> limit_address =
1430 TNode<HeapObject> CodeStubAssembler::AllocateInNewSpace(int size_in_bytes,
1438 TNode<HeapObject> CodeStubAssembler::Allocate(int size_in_bytes,
1443 TNode<BoolT> CodeStubAssembler::IsRegularHeapObjectSize(TNode<IntPtrT> size) {
1449 TNode<HeapObject> CodeStubAssembler::AllocateWasmArray(
1450 TNode<IntPtrT> size_in_bytes, int initialization) {
1451 TNode<HeapObject> array =
1455 TNode<IntPtrT> array_address = BitcastTaggedToWord(array);
1456 TNode<IntPtrT> start = IntPtrAdd(
1458 TNode<IntPtrT> limit = IntPtrAdd(
1461 TNode<Object> value;
1476 void CodeStubAssembler::BranchIfToBooleanIsTrue(TNode<Object> value,
1495 TNode<HeapObject> value_heapobject = CAST(value);
1501 TNode<Map> value_map = LoadMap(value_heapobject);
1515 TNode<Float64T> value_value =
1525 TNode<BigInt> bigint = CAST(value);
1526 TNode<Word32T> bitfield = LoadBigIntBitfield(bigint);
1527 TNode<Uint32T> length = DecodeWord32<BigIntBase::LengthBits>(bitfield);
1533 TNode<RawPtrT> CodeStubAssembler::LoadSandboxedPointerFromObject(
1534 TNode<HeapObject> object, TNode<IntPtrT> field_offset) {
1543 void CodeStubAssembler::StoreSandboxedPointerToObject(TNode<HeapObject> object,
1544 TNode<IntPtrT> offset,
1545 TNode<RawPtrT> pointer) {
1547 TNode<SandboxedPtrT> sbx_ptr = ReinterpretCast<SandboxedPtrT>(pointer);
1550 TNode<ExternalReference> sandbox_base_address =
1552 TNode<ExternalReference> sandbox_end_address =
1554 TNode<UintPtrT> sandbox_base = Load<UintPtrT>(sandbox_base_address);
1555 TNode<UintPtrT> sandbox_end = Load<UintPtrT>(sandbox_end_address);
1565 TNode<RawPtrT> CodeStubAssembler::EmptyBackingStoreBufferConstant() {
1569 TNode<ExternalReference> empty_backing_store_buffer =
1578 TNode<ExternalPointerT> CodeStubAssembler::ChangeIndexToExternalPointer(
1579 TNode<Uint32T> index) {
1581 TNode<Uint32T> shifted_index =
1586 TNode<Uint32T> CodeStubAssembler::ChangeExternalPointerToIndex(
1587 TNode<ExternalPointerT> external_pointer) {
1589 TNode<Uint32T> shifted_index = ReinterpretCast<Uint32T>(external_pointer);
1594 void CodeStubAssembler::InitializeExternalPointerField(TNode<HeapObject> object,
1595 TNode<IntPtrT> offset) {
1597 TNode<ExternalReference> external_pointer_table_address = ExternalConstant(
1603 TNode<ExternalReference> table_allocate_function = ExternalConstant(
1605 TNode<Uint32T> index = UncheckedCast<Uint32T>(CallCFunction(
1615 TNode<ExternalPointerT> pointer = ChangeIndexToExternalPointer(index);
1620 TNode<RawPtrT> CodeStubAssembler::LoadExternalPointerFromObject(
1621 TNode<HeapObject> object, TNode<IntPtrT> offset,
1624 TNode<ExternalReference> external_pointer_table_address = ExternalConstant(
1626 TNode<RawPtrT> table = UncheckedCast<RawPtrT>(
1630 TNode<ExternalPointerT> encoded =
1632 TNode<Uint32T> index = ChangeExternalPointerToIndex(encoded);
1635 TNode<IntPtrT> table_offset = ElementOffsetFromIndex(
1638 TNode<UintPtrT> entry = Load<UintPtrT>(table, table_offset);
1640 TNode<UintPtrT> tag = UintPtrConstant(~external_pointer_tag);
1650 TNode<HeapObject> object, TNode<IntPtrT> offset, TNode<RawPtrT> pointer,
1653 TNode<ExternalReference> external_pointer_table_address = ExternalConstant(
1655 TNode<RawPtrT> table = UncheckedCast<RawPtrT>(
1659 TNode<ExternalPointerT> encoded =
1661 TNode<Uint32T> index = ChangeExternalPointerToIndex(encoded);
1664 TNode<IntPtrT> table_offset = ElementOffsetFromIndex(
1667 TNode<UintPtrT> value = UncheckedCast<UintPtrT>(pointer);
1669 TNode<UintPtrT> tag = UintPtrConstant(external_pointer_tag);
1679 TNode<Object> CodeStubAssembler::LoadFromParentFrame(int offset) {
1680 TNode<RawPtrT> frame_pointer = LoadParentFramePointer();
1684 TNode<Uint8T> CodeStubAssembler::LoadUint8Ptr(TNode<RawPtrT> ptr,
1685 TNode<IntPtrT> offset) {
1689 TNode<IntPtrT> CodeStubAssembler::LoadAndUntagObjectField(
1690 TNode<HeapObject> object, int offset) {
1703 TNode<Int32T> CodeStubAssembler::LoadAndUntagToWord32ObjectField(
1704 TNode<HeapObject> object, int offset) {
1717 TNode<Float64T> CodeStubAssembler::LoadHeapNumberValue(
1718 TNode<HeapObject> object) {
1724 TNode<Map> CodeStubAssembler::GetInstanceTypeMap(InstanceType instance_type) {
1731 TNode<Map> CodeStubAssembler::LoadMap(TNode<HeapObject> object) {
1732 TNode<Map> map = LoadObjectField<Map>(object, HeapObject::kMapOffset);
1743 TNode<Uint16T> CodeStubAssembler::LoadInstanceType(TNode<HeapObject> object) {
1747 TNode<BoolT> CodeStubAssembler::HasInstanceType(TNode<HeapObject> object,
1752 TNode<BoolT> CodeStubAssembler::DoesntHaveInstanceType(
1753 TNode<HeapObject> object, InstanceType instance_type) {
1757 TNode<BoolT> CodeStubAssembler::TaggedDoesntHaveInstanceType(
1758 TNode<HeapObject> any_tagged, InstanceType type) {
1760 TNode<BoolT> tagged_is_smi = TaggedIsSmi(any_tagged);
1766 TNode<BoolT> CodeStubAssembler::IsSpecialReceiverMap(TNode<Map> map) {
1767 TNode<BoolT> is_special =
1779 TNode<Word32T> CodeStubAssembler::IsStringWrapperElementsKind(TNode<Map> map) {
1780 TNode<Int32T> kind = LoadMapElementsKind(map);
1786 void CodeStubAssembler::GotoIfMapHasSlowProperties(TNode<Map> map,
1793 TNode<HeapObject> CodeStubAssembler::LoadFastProperties(
1794 TNode<JSReceiver> object) {
1796 TNode<Object> properties = LoadJSReceiverPropertiesOrHash(object);
1802 TNode<HeapObject> CodeStubAssembler::LoadSlowProperties(
1803 TNode<JSReceiver> object) {
1805 TNode<Object> properties = LoadJSReceiverPropertiesOrHash(object);
1806 NodeGenerator<HeapObject> make_empty = [=]() -> TNode<HeapObject> {
1814 TNode<HeapObject> dict = CAST(properties);
1828 TNode<Object> CodeStubAssembler::LoadJSArgumentsObjectLength(
1829 TNode<Context> context, TNode<JSArgumentsObject> array) {
1836 TNode<Smi> CodeStubAssembler::LoadFastJSArrayLength(TNode<JSArray> array) {
1837 TNode<Number> length = LoadJSArrayLength(array);
1848 TNode<Smi> CodeStubAssembler::LoadFixedArrayBaseLength(
1849 TNode<FixedArrayBase> array) {
1854 TNode<IntPtrT> CodeStubAssembler::LoadAndUntagFixedArrayBaseLength(
1855 TNode<FixedArrayBase> array) {
1859 TNode<IntPtrT> CodeStubAssembler::LoadFeedbackVectorLength(
1860 TNode<FeedbackVector> vector) {
1865 TNode<Smi> CodeStubAssembler::LoadWeakFixedArrayLength(
1866 TNode<WeakFixedArray> array) {
1870 TNode<IntPtrT> CodeStubAssembler::LoadAndUntagWeakFixedArrayLength(
1871 TNode<WeakFixedArray> array) {
1875 TNode<Int32T> CodeStubAssembler::LoadNumberOfDescriptors(
1876 TNode<DescriptorArray> array) {
1881 TNode<Int32T> CodeStubAssembler::LoadNumberOfOwnDescriptors(TNode<Map> map) {
1882 TNode<Uint32T> bit_field3 = LoadMapBitField3(map);
1887 TNode<Int32T> CodeStubAssembler::LoadMapBitField(TNode<Map> map) {
1892 TNode<Int32T> CodeStubAssembler::LoadMapBitField2(TNode<Map> map) {
1897 TNode<Uint32T> CodeStubAssembler::LoadMapBitField3(TNode<Map> map) {
1901 TNode<Uint16T> CodeStubAssembler::LoadMapInstanceType(TNode<Map> map) {
1905 TNode<Int32T> CodeStubAssembler::LoadMapElementsKind(TNode<Map> map) {
1906 TNode<Int32T> bit_field2 = LoadMapBitField2(map);
1910 TNode<Int32T> CodeStubAssembler::LoadElementsKind(TNode<HeapObject> object) {
1914 TNode<DescriptorArray> CodeStubAssembler::LoadMapDescriptors(TNode<Map> map) {
1918 TNode<HeapObject> CodeStubAssembler::LoadMapPrototype(TNode<Map> map) {
1922 TNode<IntPtrT> CodeStubAssembler::LoadMapInstanceSizeInWords(TNode<Map> map) {
1927 TNode<IntPtrT> CodeStubAssembler::LoadMapInobjectPropertiesStartInWords(
1928 TNode<Map> map) {
1935 TNode<IntPtrT> CodeStubAssembler::LoadMapConstructorFunctionIndex(
1936 TNode<Map> map) {
1943 TNode<Object> CodeStubAssembler::LoadMapConstructor(TNode<Map> map) {
1953 TNode<BoolT> is_map_type =
1965 TNode<WordT> CodeStubAssembler::LoadMapEnumLength(TNode<Map> map) {
1966 TNode<Uint32T> bit_field3 = LoadMapBitField3(map);
1970 TNode<Object> CodeStubAssembler::LoadMapBackPointer(TNode<Map> map) {
1971 TNode<HeapObject> object = CAST(LoadObjectField(
1978 TNode<Uint32T> CodeStubAssembler::EnsureOnlyHasSimpleProperties(
1979 TNode<Map> map, TNode<Int32T> instance_type, Label* bailout) {
1984 TNode<Uint32T> bit_field3 = LoadMapBitField3(map);
1991 TNode<IntPtrT> CodeStubAssembler::LoadJSReceiverIdentityHash(
1992 TNode<JSReceiver> receiver, Label* if_no_hash) {
1998 TNode<Object> properties_or_hash =
2002 TNode<HeapObject> properties = CAST(properties_or_hash);
2003 TNode<Uint16T> properties_instance_type = LoadInstanceType(properties);
2029 TNode<IntPtrT> length_and_hash = LoadAndUntagObjectField(
2059 TNode<Uint32T> CodeStubAssembler::LoadNameHashAssumeComputed(TNode<Name> name) {
2060 TNode<Uint32T> hash_field = LoadNameRawHashField(name);
2065 TNode<Uint32T> CodeStubAssembler::LoadNameHash(TNode<Name> name,
2067 TNode<Uint32T> raw_hash_field = LoadNameRawHashField(name);
2075 TNode<Smi> CodeStubAssembler::LoadStringLengthAsSmi(TNode<String> string) {
2079 TNode<IntPtrT> CodeStubAssembler::LoadStringLengthAsWord(TNode<String> string) {
2083 TNode<Uint32T> CodeStubAssembler::LoadStringLengthAsWord32(
2084 TNode<String> string) {
2088 TNode<Object> CodeStubAssembler::LoadJSPrimitiveWrapperValue(
2089 TNode<JSPrimitiveWrapper> object) {
2093 void CodeStubAssembler::DispatchMaybeObject(TNode<MaybeObject> maybe_object,
2117 void CodeStubAssembler::DcheckHasValidMap(TNode<HeapObject> object) {
2124 TNode<BoolT> CodeStubAssembler::IsStrong(TNode<MaybeObject> value) {
2131 TNode<HeapObject> CodeStubAssembler::GetHeapObjectIfStrong(
2132 TNode<MaybeObject> value, Label* if_not_strong) {
2137 TNode<BoolT> CodeStubAssembler::IsWeakOrCleared(TNode<MaybeObject> value) {
2144 TNode<BoolT> CodeStubAssembler::IsCleared(TNode<MaybeObject> value) {
2149 TNode<HeapObject> CodeStubAssembler::GetHeapObjectAssumeWeak(
2150 TNode<MaybeObject> value) {
2157 TNode<HeapObject> CodeStubAssembler::GetHeapObjectAssumeWeak(
2158 TNode<MaybeObject> value, Label* if_cleared) {
2167 TNode<BoolT> CodeStubAssembler::IsWeakReferenceToObject(
2168 TNode<MaybeObject> maybe_object, TNode<Object> value) {
2186 TNode<BoolT> CodeStubAssembler::IsWeakReferenceTo(
2187 TNode<MaybeObject> maybe_object, TNode<HeapObject> heap_object) {
2200 TNode<MaybeObject> CodeStubAssembler::MakeWeak(TNode<HeapObject> value) {
2206 TNode<IntPtrT> CodeStubAssembler::LoadArrayLength(TNode<FixedArray> array) {
2211 TNode<IntPtrT> CodeStubAssembler::LoadArrayLength(TNode<WeakFixedArray> array) {
2216 TNode<IntPtrT> CodeStubAssembler::LoadArrayLength(TNode<PropertyArray> array) {
2221 TNode<IntPtrT> CodeStubAssembler::LoadArrayLength(
2222 TNode<DescriptorArray> array) {
2228 TNode<IntPtrT> CodeStubAssembler::LoadArrayLength(
2229 TNode<TransitionArray> array) {
2234 TNode<TValue> CodeStubAssembler::LoadArrayElement(TNode<Array> array,
2236 TNode<TIndex> index_node,
2247 TNode<IntPtrT> offset =
2255 template V8_EXPORT_PRIVATE TNode<MaybeObject>
2257 TNode<TransitionArray>, int, TNode<IntPtrT>, int);
2260 TNode<Object> CodeStubAssembler::LoadFixedArrayElement(
2261 TNode<FixedArray> object, TNode<TIndex> index, int additional_offset,
2274 TNode<MaybeObject> element = LoadArrayElement(object, FixedArray::kHeaderSize,
2279 template V8_EXPORT_PRIVATE TNode<Object>
2280 CodeStubAssembler::LoadFixedArrayElement<Smi>(TNode<FixedArray>, TNode<Smi>,
2282 template V8_EXPORT_PRIVATE TNode<Object>
2283 CodeStubAssembler::LoadFixedArrayElement<UintPtrT>(TNode<FixedArray>,
2284 TNode<UintPtrT>, int,
2286 template V8_EXPORT_PRIVATE TNode<Object>
2287 CodeStubAssembler::LoadFixedArrayElement<IntPtrT>(TNode<FixedArray>,
2288 TNode<IntPtrT>, int,
2291 void CodeStubAssembler::FixedArrayBoundsCheck(TNode<FixedArrayBase> array,
2292 TNode<Smi> index,
2296 TNode<Smi> effective_index;
2309 void CodeStubAssembler::FixedArrayBoundsCheck(TNode<FixedArrayBase> array,
2310 TNode<IntPtrT> index,
2315 TNode<IntPtrT> effective_index =
2321 TNode<Object> CodeStubAssembler::LoadPropertyArrayElement(
2322 TNode<PropertyArray> object, TNode<IntPtrT> index) {
2328 TNode<IntPtrT> CodeStubAssembler::LoadPropertyArrayLength(
2329 TNode<PropertyArray> object) {
2330 TNode<IntPtrT> value =
2335 TNode<RawPtrT> CodeStubAssembler::LoadJSTypedArrayDataPtr(
2336 TNode<JSTypedArray> typed_array) {
2338 TNode<RawPtrT> external_pointer =
2341 TNode<IntPtrT> base_pointer;
2343 TNode<Int32T> compressed_base =
2358 TNode<BigInt> CodeStubAssembler::LoadFixedBigInt64ArrayElementAsTagged(
2359 TNode<RawPtrT> data_pointer, TNode<IntPtrT> offset) {
2361 TNode<IntPtrT> value = Load<IntPtrT>(data_pointer, offset);
2366 TNode<IntPtrT> high = Load<IntPtrT>(data_pointer, offset);
2367 TNode<IntPtrT> low = Load<IntPtrT>(
2370 TNode<IntPtrT> low = Load<IntPtrT>(data_pointer, offset);
2371 TNode<IntPtrT> high = Load<IntPtrT>(
2378 TNode<BigInt> CodeStubAssembler::BigIntFromInt32Pair(TNode<IntPtrT> low,
2379 TNode<IntPtrT> high) {
2445 TNode<BigInt> CodeStubAssembler::BigIntFromInt64(TNode<IntPtrT> value) {
2483 TNode<BigInt> CodeStubAssembler::LoadFixedBigUint64ArrayElementAsTagged(
2484 TNode<RawPtrT> data_pointer, TNode<IntPtrT> offset) {
2487 TNode<UintPtrT> value = Load<UintPtrT>(data_pointer, offset);
2492 TNode<UintPtrT> high = Load<UintPtrT>(data_pointer, offset);
2493 TNode<UintPtrT> low = Load<UintPtrT>(
2496 TNode<UintPtrT> low = Load<UintPtrT>(data_pointer, offset);
2497 TNode<UintPtrT> high = Load<UintPtrT>(
2504 TNode<BigInt> CodeStubAssembler::BigIntFromUint32Pair(TNode<UintPtrT> low,
2505 TNode<UintPtrT> high) {
2530 TNode<BigInt> CodeStubAssembler::BigIntFromUint64(TNode<UintPtrT> value) {
2546 TNode<Numeric> CodeStubAssembler::LoadFixedTypedArrayElementAsTagged(
2547 TNode<RawPtrT> data_pointer, TNode<UintPtrT> index,
2549 TNode<IntPtrT> offset =
2579 TNode<Numeric> CodeStubAssembler::LoadFixedTypedArrayElementAsTagged(
2580 TNode<RawPtrT> data_pointer, TNode<UintPtrT> index,
2581 TNode<Int32T> elements_kind) {
2625 TNode<MaybeObject> CodeStubAssembler::LoadFeedbackVectorSlot(
2626 TNode<FeedbackVector> feedback_vector, TNode<TIndex> slot,
2630 TNode<IntPtrT> offset =
2638 template TNode<MaybeObject> CodeStubAssembler::LoadFeedbackVectorSlot(
2639 TNode<FeedbackVector> feedback_vector, TNode<TaggedIndex> slot,
2641 template TNode<MaybeObject> CodeStubAssembler::LoadFeedbackVectorSlot(
2642 TNode<FeedbackVector> feedback_vector, TNode<IntPtrT> slot,
2644 template TNode<MaybeObject> CodeStubAssembler::LoadFeedbackVectorSlot(
2645 TNode<FeedbackVector> feedback_vector, TNode<UintPtrT> slot,
2649 TNode<Int32T> CodeStubAssembler::LoadAndUntagToWord32ArrayElement(
2650 TNode<Array> object, int array_header_size, TNode<IntPtrT> index,
2659 TNode<IntPtrT> offset =
2670 TNode<Int32T> CodeStubAssembler::LoadAndUntagToWord32FixedArrayElement(
2671 TNode<FixedArray> object, TNode<IntPtrT> index, int additional_offset) {
2677 TNode<MaybeObject> CodeStubAssembler::LoadWeakFixedArrayElement(
2678 TNode<WeakFixedArray> object, TNode<IntPtrT> index, int additional_offset) {
2683 TNode<Float64T> CodeStubAssembler::LoadFixedDoubleArrayElement(
2684 TNode<FixedDoubleArray> object, TNode<IntPtrT> index, Label* if_hole,
2687 TNode<IntPtrT> offset =
2695 TNode<Object> CodeStubAssembler::LoadFixedArrayBaseElementAsTagged(
2696 TNode<FixedArrayBase> elements, TNode<IntPtrT> index,
2697 TNode<Int32T> elements_kind, Label* if_accessor, Label* if_hole) {
2761 TNode<BoolT> CodeStubAssembler::IsDoubleHole(TNode<Object> base,
2762 TNode<IntPtrT> offset) {
2767 TNode<Uint64T> element = Load<Uint64T>(base, offset);
2770 TNode<Uint32T> element_upper = Load<Uint32T>(
2776 TNode<Float64T> CodeStubAssembler::LoadDoubleWithHoleCheck(
2777 TNode<Object> base, TNode<IntPtrT> offset, Label* if_hole,
2784 return TNode<Float64T>();
2789 TNode<ScopeInfo> CodeStubAssembler::LoadScopeInfo(TNode<Context> context) {
2793 TNode<BoolT> CodeStubAssembler::LoadScopeInfoHasExtensionField(
2794 TNode<ScopeInfo> scope_info) {
2795 TNode<IntPtrT> value =
2801 TNode<Context> context, int slot_index, TNode<Object> value) {
2807 TNode<NativeContext> CodeStubAssembler::LoadNativeContext(
2808 TNode<Context> context) {
2809 TNode<Map> map = LoadMap(context);
2814 TNode<Context> CodeStubAssembler::LoadModuleContext(TNode<Context> context) {
2815 TNode<NativeContext> native_context = LoadNativeContext(context);
2816 TNode<Map> module_map = CAST(
2842 TNode<Object> CodeStubAssembler::GetImportMetaObject(TNode<Context> context) {
2843 const TNode<Context> module_context = LoadModuleContext(context);
2844 const TNode<HeapObject> module =
2846 const TNode<Object> import_meta =
2861 TNode<Map> CodeStubAssembler::LoadObjectFunctionInitialMap(
2862 TNode<NativeContext> native_context) {
2863 TNode<JSFunction> object_function =
2868 TNode<Map> CodeStubAssembler::LoadSlowObjectWithNullPrototypeMap(
2869 TNode<NativeContext> native_context) {
2870 TNode<Map> map = CAST(LoadContextElement(
2875 TNode<Map> CodeStubAssembler::LoadJSArrayElementsMap(
2876 TNode<Int32T> kind, TNode<NativeContext> native_context) {
2878 TNode<IntPtrT> offset =
2884 TNode<Map> CodeStubAssembler::LoadJSArrayElementsMap(
2885 ElementsKind kind, TNode<NativeContext> native_context) {
2890 TNode<BoolT> CodeStubAssembler::IsGeneratorFunction(
2891 TNode<JSFunction> function) {
2892 const TNode<SharedFunctionInfo> shared_function_info =
2896 const TNode<Uint32T> function_kind =
2908 TNode<BoolT> CodeStubAssembler::IsJSFunctionWithPrototypeSlot(
2909 TNode<HeapObject> object) {
2916 TNode<JSFunction> function, TNode<Int32T> function_map_bit_field,
2928 TNode<JSFunction> function, TNode<Map> map, Label* runtime) {
2930 TNode<Int32T> map_bit_field = LoadMapBitField(map);
2938 TNode<HeapObject> CodeStubAssembler::LoadJSFunctionPrototype(
2939 TNode<JSFunction> function, Label* if_bailout) {
2943 TNode<HeapObject> proto_or_map = LoadObjectField<HeapObject>(
2958 TNode<BytecodeArray> CodeStubAssembler::LoadSharedFunctionInfoBytecodeArray(
2959 TNode<SharedFunctionInfo> shared) {
2960 TNode<HeapObject> function_data = LoadObjectField<HeapObject>(
2971 TNode<CodeT> code = CAST(var_result.value());
2973 TNode<Int32T> code_flags =
2979 TNode<HeapObject> baseline_data = LoadObjectField<HeapObject>(
2988 TNode<BytecodeArray> bytecode_array = LoadObjectField<BytecodeArray>(
2997 void CodeStubAssembler::StoreObjectByteNoWriteBarrier(TNode<HeapObject> object,
2999 TNode<Word32T> value) {
3004 void CodeStubAssembler::StoreHeapNumberValue(TNode<HeapNumber> object,
3005 TNode<Float64T> value) {
3009 void CodeStubAssembler::StoreObjectField(TNode<HeapObject> object, int offset,
3010 TNode<Smi> value) {
3014 void CodeStubAssembler::StoreObjectField(TNode<HeapObject> object,
3015 TNode<IntPtrT> offset,
3016 TNode<Smi> value) {
3020 void CodeStubAssembler::StoreObjectField(TNode<HeapObject> object, int offset,
3021 TNode<Object> value) {
3027 void CodeStubAssembler::StoreObjectField(TNode<HeapObject> object,
3028 TNode<IntPtrT> offset,
3029 TNode<Object> value) {
3039 TNode<HeapObject> object, int offset, TNode<Object> value) {
3046 TNode<HeapObject> object, TNode<IntPtrT> offset, TNode<Object> value) {
3064 void CodeStubAssembler::StoreMap(TNode<HeapObject> object, TNode<Map> map) {
3069 void CodeStubAssembler::StoreMapNoWriteBarrier(TNode<HeapObject> object,
3074 void CodeStubAssembler::StoreMapNoWriteBarrier(TNode<HeapObject> object,
3075 TNode<Map> map) {
3080 void CodeStubAssembler::StoreObjectFieldRoot(TNode<HeapObject> object,
3082 TNode<Object> root = LoadRoot(root_index);
3094 TNode<UnionT<FixedArray, PropertyArray>> object, TNode<TIndex> index_node,
3095 TNode<Object> value, WriteBarrierMode barrier_mode, int additional_offset) {
3110 TNode<IntPtrT> offset =
3125 TNode<IntPtrT> length_and_hash = LoadAndUntagObjectField(
3149 TNode<UnionT<FixedArray, PropertyArray>>, TNode<Smi>, TNode<Object>,
3154 TNode<UnionT<FixedArray, PropertyArray>>, TNode<IntPtrT>, TNode<Object>,
3159 TNode<UnionT<FixedArray, PropertyArray>>, TNode<UintPtrT>, TNode<Object>,
3164 TNode<FixedDoubleArray> object, TNode<TIndex> index, TNode<Float64T> value,
3174 TNode<IntPtrT> offset = ElementOffsetFromIndex(
3178 TNode<Float64T> value_silenced = Float64SilenceNaN(value);
3184 Smi>(TNode<FixedDoubleArray>, TNode<Smi>, TNode<Float64T>, CheckBounds);
3187 TNode<FeedbackVector> feedback_vector, TNode<UintPtrT> slot,
3188 TNode<AnyTaggedT> value, WriteBarrierMode barrier_mode,
3196 TNode<IntPtrT> offset =
3214 TNode<Int32T> CodeStubAssembler::EnsureArrayPushable(TNode<Context> context,
3215 TNode<Map> map,
3224 TNode<Uint32T> kind =
3230 ElementsKind kind, TNode<HeapObject> array, TNode<BInt> length,
3231 TVariable<FixedArrayBase>* var_elements, TNode<BInt> growth,
3234 TNode<BInt> capacity =
3237 TNode<BInt> new_length = IntPtrOrSmiAdd(growth, length);
3239 TNode<BInt> new_capacity = CalculateNewElementsCapacity(new_length);
3246 TNode<Smi> CodeStubAssembler::BuildAppendJSArray(ElementsKind kind,
3247 TNode<JSArray> array,
3259 TNode<IntPtrT> first = arg_index->value();
3260 TNode<BInt> growth =
3268 TNode<FixedArrayBase> elements = var_elements.value();
3271 [&](TNode<Object> arg) {
3278 TNode<Smi> length = BIntToSmi(var_length.value());
3286 TNode<Smi> length = ParameterToTagged(var_length.value());
3288 TNode<Smi> diff = SmiSub(length, LoadFastJSArrayLength(array));
3299 TNode<FixedArrayBase> elements,
3300 TNode<BInt> index,
3301 TNode<Object> value) {
3316 TNode<JSArray> array,
3317 TNode<Object> value,
3324 TNode<BInt> growth = IntPtrOrSmiConstant<BInt>(1);
3334 TNode<Smi> length = BIntToSmi(var_length.value());
3338 TNode<Cell> CodeStubAssembler::AllocateCellWithValue(TNode<Object> value,
3340 TNode<HeapObject> result = Allocate(Cell::kSize, AllocationFlag::kNone);
3342 TNode<Cell> cell = CAST(result);
3347 TNode<Object> CodeStubAssembler::LoadCellValue(TNode<Cell> cell) {
3351 void CodeStubAssembler::StoreCellValue(TNode<Cell> cell, TNode<Object> value,
3362 TNode<HeapNumber> CodeStubAssembler::AllocateHeapNumber() {
3363 TNode<HeapObject> result = Allocate(HeapNumber::kSize, AllocationFlag::kNone);
3369 TNode<HeapNumber> CodeStubAssembler::AllocateHeapNumberWithValue(
3370 TNode<Float64T> value) {
3371 TNode<HeapNumber> result = AllocateHeapNumber();
3376 TNode<Object> CodeStubAssembler::CloneIfMutablePrimitive(TNode<Object> object) {
3386 TNode<Float64T> value =
3396 TNode<BigInt> CodeStubAssembler::AllocateBigInt(TNode<IntPtrT> length) {
3397 TNode<BigInt> result = AllocateRawBigInt(length);
3404 TNode<BigInt> CodeStubAssembler::AllocateRawBigInt(TNode<IntPtrT> length) {
3405 TNode<IntPtrT> size =
3408 TNode<HeapObject> raw_result =
3419 void CodeStubAssembler::StoreBigIntBitfield(TNode<BigInt> bigint,
3420 TNode<Word32T> bitfield) {
3424 void CodeStubAssembler::StoreBigIntDigit(TNode<BigInt> bigint,
3426 TNode<UintPtrT> digit) {
3436 void CodeStubAssembler::StoreBigIntDigit(TNode<BigInt> bigint,
3437 TNode<IntPtrT> digit_index,
3438 TNode<UintPtrT> digit) {
3439 TNode<IntPtrT> offset =
3445 TNode<Word32T> CodeStubAssembler::LoadBigIntBitfield(TNode<BigInt> bigint) {
3450 TNode<UintPtrT> CodeStubAssembler::LoadBigIntDigit(TNode<BigInt> bigint,
3459 TNode<UintPtrT> CodeStubAssembler::LoadBigIntDigit(TNode<BigInt> bigint,
3460 TNode<IntPtrT> digit_index) {
3461 TNode<IntPtrT> offset =
3467 TNode<ByteArray> CodeStubAssembler::AllocateNonEmptyByteArray(
3468 TNode<UintPtrT> length, AllocationFlags flags) {
3474 TNode<IntPtrT> raw_size =
3477 TNode<IntPtrT> size =
3480 TNode<HeapObject> result = Allocate(size, flags);
3490 TNode<ByteArray> CodeStubAssembler::AllocateByteArray(TNode<UintPtrT> length,
3502 TNode<IntPtrT> raw_size =
3505 TNode<IntPtrT> size =
3513 TNode<HeapObject> result =
3526 TNode<Object> result =
3543 TNode<String> CodeStubAssembler::AllocateSeqOneByteString(
3549 TNode<HeapObject> result = Allocate(SeqOneByteString::SizeFor(length), flags);
3559 TNode<BoolT> CodeStubAssembler::IsZeroOrContext(TNode<Object> object) {
3565 TNode<String> CodeStubAssembler::AllocateSeqTwoByteString(
3571 TNode<HeapObject> result = Allocate(SeqTwoByteString::SizeFor(length), flags);
3581 TNode<String> CodeStubAssembler::AllocateSlicedString(RootIndex map_root_index,
3582 TNode<Uint32T> length,
3583 TNode<String> parent,
3584 TNode<Smi> offset) {
3587 TNode<HeapObject> result = Allocate(SlicedString::kSize);
3598 TNode<String> CodeStubAssembler::AllocateSlicedOneByteString(
3599 TNode<Uint32T> length, TNode<String> parent, TNode<Smi> offset) {
3604 TNode<String> CodeStubAssembler::AllocateSlicedTwoByteString(
3605 TNode<Uint32T> length, TNode<String> parent, TNode<Smi> offset) {
3610 TNode<NameDictionary> CodeStubAssembler::AllocateNameDictionary(
3615 TNode<NameDictionary> CodeStubAssembler::AllocateNameDictionary(
3616 TNode<IntPtrT> at_least_space_for, AllocationFlags flags) {
3620 TNode<IntPtrT> capacity = HashTableComputeCapacity(at_least_space_for);
3624 TNode<NameDictionary> CodeStubAssembler::AllocateNameDictionaryWithCapacity(
3625 TNode<IntPtrT> capacity, AllocationFlags flags) {
3628 TNode<IntPtrT> length = EntryToIndex<NameDictionary>(capacity);
3629 TNode<IntPtrT> store_size = IntPtrAdd(
3632 TNode<NameDictionary> result =
3645 TNode<Smi> zero = SmiConstant(0);
3664 TNode<IntPtrT> result_word = BitcastTaggedToWord(result);
3665 TNode<IntPtrT> start_address = IntPtrAdd(
3669 TNode<IntPtrT> end_address = IntPtrAdd(
3672 TNode<Oddball> filler = UndefinedConstant();
3681 TNode<NameDictionary> CodeStubAssembler::CopyNameDictionary(
3682 TNode<NameDictionary> dictionary, Label* large_object_fallback) {
3684 TNode<IntPtrT> capacity = SmiUntag(GetCapacity<NameDictionary>(dictionary));
3689 TNode<NameDictionary> properties =
3691 TNode<IntPtrT> length = SmiUntag(LoadFixedArrayBaseLength(dictionary));
3698 TNode<CollectionType> CodeStubAssembler::AllocateOrderedHashTable(
3699 TNode<IntPtrT> capacity) {
3707 TNode<CollectionType> CodeStubAssembler::AllocateOrderedHashTableWithCapacity(
3708 TNode<IntPtrT> capacity) {
3718 TNode<IntPtrT> bucket_count = Signed(WordShr(capacity, IntPtrConstant(1)));
3719 TNode<IntPtrT> data_table_length =
3722 TNode<IntPtrT> data_table_start_index = IntPtrAdd(
3724 TNode<IntPtrT> fixed_array_length =
3729 TNode<Map> fixed_array_map =
3731 TNode<CollectionType> table = CAST(AllocateFixedArray(
3745 TNode<IntPtrT> object_address = BitcastTaggedToWord(table);
3750 TNode<Smi> not_found_sentinel = SmiConstant(CollectionType::kNotFound);
3776 TNode<IntPtrT> buckets_start_address =
3781 TNode<IntPtrT> buckets_end_address =
3788 TNode<IntPtrT> data_start_address = buckets_end_address;
3789 TNode<IntPtrT> data_end_address = IntPtrAdd(
3798 TNode<IntPtrT> ptr_diff =
3800 TNode<IntPtrT> array_length = LoadAndUntagFixedArrayBaseLength(table);
3801 TNode<IntPtrT> array_data_fields = IntPtrSub(
3803 TNode<IntPtrT> expected_end =
3816 TNode<OrderedNameDictionary> CodeStubAssembler::AllocateOrderedNameDictionary(
3817 TNode<IntPtrT> capacity) {
3818 TNode<OrderedNameDictionary> table =
3826 TNode<OrderedNameDictionary> CodeStubAssembler::AllocateOrderedNameDictionary(
3831 TNode<OrderedHashSet> CodeStubAssembler::AllocateOrderedHashSet() {
3836 TNode<OrderedHashMap> CodeStubAssembler::AllocateOrderedHashMap() {
3841 TNode<JSObject> CodeStubAssembler::AllocateJSObjectFromMap(
3842 TNode<Map> map, base::Optional<TNode<HeapObject>> properties,
3843 base::Optional<TNode<FixedArray>> elements, AllocationFlags flags,
3848 TNode<IntPtrT> instance_size =
3850 TNode<HeapObject> object = AllocateInNewSpace(instance_size, flags);
3858 TNode<HeapObject> object, TNode<Map> map, TNode<IntPtrT> instance_size,
3859 base::Optional<TNode<HeapObject>> properties,
3860 base::Optional<TNode<FixedArray>> elements,
3892 TNode<HeapObject> object, TNode<Map> map, TNode<IntPtrT> instance_size,
3902 TNode<HeapObject> object, TNode<Map> map, TNode<IntPtrT> instance_size) {
3907 TNode<Uint32T> bit_field3 = LoadMapBitField3(map);
3922 TNode<Word32T> new_bit_field3 = Int32Sub(
3930 TNode<IntPtrT> used_size =
3961 void CodeStubAssembler::StoreFieldsNoWriteBarrier(TNode<IntPtrT> start_address,
3962 TNode<IntPtrT> end_address,
3963 TNode<Object> value) {
3969 [=](TNode<IntPtrT> current) {
3976 void CodeStubAssembler::MakeFixedArrayCOW(TNode<FixedArray> array) {
3987 TNode<BoolT> CodeStubAssembler::IsValidFastJSArrayCapacity(
3988 TNode<IntPtrT> capacity) {
3993 TNode<JSArray> CodeStubAssembler::AllocateJSArray(
3994 TNode<Map> array_map, TNode<FixedArrayBase> elements, TNode<Smi> length,
3995 base::Optional<TNode<AllocationSite>> allocation_site,
4006 TNode<IntPtrT> size = IntPtrConstant(base_size);
4007 TNode<JSArray> result =
4017 TNode<FixedArrayBase> InnerAllocateElements(CodeStubAssembler* csa,
4018 TNode<JSArray> js_array,
4027 std::pair<TNode<JSArray>, TNode<FixedArrayBase>>
4029 ElementsKind kind, TNode<Map> array_map, TNode<Smi> length,
4030 base::Optional<TNode<AllocationSite>> allocation_site,
4031 TNode<IntPtrT> capacity, AllocationFlags allocation_flags,
4045 TNode<FixedArray> empty_array = EmptyFixedArrayConstant();
4057 TNode<FixedArray> empty_array = EmptyFixedArrayConstant();
4077 TNode<IntPtrT> size = ElementOffsetFromIndex(capacity, kind, base_size);
4127 TNode<Smi> capacity_smi = SmiTag(capacity);
4137 TNode<JSArray> CodeStubAssembler::AllocateUninitializedJSArray(
4138 TNode<Map> array_map, TNode<Smi> length,
4139 base::Optional<TNode<AllocationSite>> allocation_site,
4140 TNode<IntPtrT> size_in_bytes) {
4144 TNode<HeapObject> array = AllocateInNewSpace(size_in_bytes);
4160 TNode<JSArray> CodeStubAssembler::AllocateJSArray(
4161 ElementsKind kind, TNode<Map> array_map, TNode<IntPtrT> capacity,
4162 TNode<Smi> length, base::Optional<TNode<AllocationSite>> allocation_site,
4166 TNode<JSArray> array;
4167 TNode<FixedArrayBase> elements;
4187 TNode<JSArray> CodeStubAssembler::ExtractFastJSArray(TNode<Context> context,
4188 TNode<JSArray> array,
4189 TNode<BInt> begin,
4190 TNode<BInt> count) {
4191 TNode<Map> original_array_map = LoadMap(array);
4192 TNode<Int32T> elements_kind = LoadMapElementsKind(original_array_map);
4195 TNode<NativeContext> native_context = LoadNativeContext(context);
4196 TNode<Map> array_map = LoadJSArrayElementsMap(elements_kind, native_context);
4198 TNode<FixedArrayBase> new_elements = ExtractFixedArray(
4199 LoadElements(array), base::Optional<TNode<BInt>>(begin),
4200 base::Optional<TNode<BInt>>(count),
4201 base::Optional<TNode<BInt>>(base::nullopt),
4204 TNode<JSArray> result = AllocateJSArray(
4209 TNode<JSArray> CodeStubAssembler::CloneFastJSArray(
4210 TNode<Context> context, TNode<JSArray> array,
4211 base::Optional<TNode<AllocationSite>> allocation_site,
4217 TNode<Number> length = LoadJSArrayLength(array);
4218 TNode<FixedArrayBase> new_elements;
4236 base::Optional<TNode<BInt>>(IntPtrOrSmiConstant<BInt>(0)),
4237 base::Optional<TNode<BInt>>(TaggedToParameter<BInt>(CAST(length))),
4238 base::Optional<TNode<BInt>>(base::nullopt),
4256 base::Optional<TNode<BInt>>(IntPtrOrSmiConstant<BInt>(0)),
4257 base::Optional<TNode<BInt>>(TaggedToParameter<BInt>(CAST(length))),
4258 base::Optional<TNode<BInt>>(base::nullopt),
4282 TNode<NativeContext> native_context = LoadNativeContext(context);
4283 TNode<Map> array_map =
4286 TNode<JSArray> result = AllocateJSArray(array_map, var_new_elements.value(),
4292 TNode<FixedArrayBase> CodeStubAssembler::AllocateFixedArray(
4293 ElementsKind kind, TNode<TIndex> capacity, AllocationFlags flags,
4294 base::Optional<TNode<Map>> fixed_array_map) {
4322 TNode<IntPtrT> total_size = GetFixedArrayAllocationSize(capacity, kind);
4326 TNode<HeapObject> array = Allocate(total_size, flags);
4353 template V8_EXPORT_PRIVATE TNode<FixedArrayBase>
4354 CodeStubAssembler::AllocateFixedArray<IntPtrT>(ElementsKind, TNode<IntPtrT>,
4356 base::Optional<TNode<Map>>);
4359 TNode<FixedArray> CodeStubAssembler::ExtractToFixedArray(
4360 TNode<FixedArrayBase> source, TNode<TIndex> first, TNode<TIndex> count,
4361 TNode<TIndex> capacity, TNode<Map> source_map, ElementsKind from_kind,
4364 base::Optional<TNode<Int32T>> source_elements_kind) {
4417 TNode<FixedArrayBase> to_elements = AllocateFixedArray(
4423 TNode<IntPtrT> object_word = BitcastTaggedToWord(to_elements);
4424 TNode<IntPtrT> object_page = PageFromAddress(object_word);
4425 TNode<IntPtrT> page_flags =
4459 TNode<FixedArrayBase> CodeStubAssembler::ExtractFixedDoubleArrayFillingHoles(
4460 TNode<FixedArrayBase> from_array, TNode<TIndex> first, TNode<TIndex> count,
4461 TNode<TIndex> capacity, TNode<Map> fixed_array_map,
4473 TNode<FixedArrayBase> to_elements =
4492 TNode<IntPtrT> first_from_element_offset =
4494 TNode<IntPtrT> limit_offset = IntPtrAdd(first_from_element_offset,
4501 TNode<IntPtrT> to_array_adjusted =
4508 TNode<IntPtrT> from_offset =
4512 TNode<IntPtrT> to_offset = from_offset;
4516 TNode<Float64T> value = LoadDoubleWithHoleCheck(
4522 TNode<BoolT> compare = WordNotEqual(from_offset, limit_offset);
4545 TNode<FixedArrayBase> CodeStubAssembler::ExtractFixedArray(
4546 TNode<FixedArrayBase> source, base::Optional<TNode<TIndex>> first,
4547 base::Optional<TNode<TIndex>> count, base::Optional<TNode<TIndex>> capacity,
4549 base::Optional<TNode<Int32T>> source_elements_kind) {
4582 TNode<Map> source_map = LoadMap(source);
4596 TNode<FixedArray> to_elements = ExtractToFixedArray(
4609 TNode<FixedArrayBase> to_elements = ExtractFixedDoubleArrayFillingHoles(
4618 TNode<FixedArrayBase> to_elements =
4642 template V8_EXPORT_PRIVATE TNode<FixedArrayBase>
4644 TNode<FixedArrayBase>, base::Optional<TNode<Smi>>,
4645 base::Optional<TNode<Smi>>, base::Optional<TNode<Smi>>,
4646 ExtractFixedArrayFlags, TVariable<BoolT>*, base::Optional<TNode<Int32T>>);
4648 template V8_EXPORT_PRIVATE TNode<FixedArrayBase>
4650 TNode<FixedArrayBase>, base::Optional<TNode<IntPtrT>>,
4651 base::Optional<TNode<IntPtrT>>, base::Optional<TNode<IntPtrT>>,
4652 ExtractFixedArrayFlags, TVariable<BoolT>*, base::Optional<TNode<Int32T>>);
4655 TNode<PropertyArray> property_array, TNode<IntPtrT> length) {
4664 TNode<PropertyArray> CodeStubAssembler::AllocatePropertyArray(
4665 TNode<IntPtrT> capacity) {
4667 TNode<IntPtrT> total_size = GetPropertyArrayAllocationSize(capacity);
4669 TNode<HeapObject> array = Allocate(total_size, AllocationFlag::kNone);
4673 TNode<PropertyArray> property_array = CAST(array);
4679 TNode<PropertyArray> array, TNode<IntPtrT> from_index,
4680 TNode<IntPtrT> to_index) {
4682 TNode<Oddball> value = UndefinedConstant();
4685 [this, value](TNode<HeapObject> array, TNode<IntPtrT> offset) {
4693 TNode<FixedArrayBase> array,
4694 TNode<TIndex> from_index,
4695 TNode<TIndex> to_index,
4706 TNode<Object> value = LoadRoot(value_root_index);
4707 TNode<Float64T> float_value;
4714 [this, value, float_value, kind](TNode<HeapObject> array,
4715 TNode<IntPtrT> offset) {
4728 TNode<FixedArrayBase>,
4729 TNode<IntPtrT>,
4730 TNode<IntPtrT>,
4733 ElementsKind, TNode<FixedArrayBase>, TNode<Smi>, TNode<Smi>, RootIndex);
4735 void CodeStubAssembler::StoreDoubleHole(TNode<HeapObject> object,
4736 TNode<IntPtrT> offset) {
4737 TNode<UintPtrT> double_hole =
4755 void CodeStubAssembler::StoreFixedDoubleArrayHole(TNode<FixedDoubleArray> array,
4756 TNode<IntPtrT> index) {
4757 TNode<IntPtrT> offset = ElementOffsetFromIndex(
4765 void CodeStubAssembler::FillFixedArrayWithSmiZero(TNode<FixedArray> array,
4766 TNode<IntPtrT> length) {
4769 TNode<IntPtrT> byte_length = TimesTaggedSize(length);
4774 TNode<IntPtrT> backing_store = IntPtrAdd(BitcastTaggedToWord(array),
4778 TNode<ExternalReference> memset =
4788 TNode<FixedDoubleArray> array, TNode<IntPtrT> length) {
4791 TNode<IntPtrT> byte_length = TimesDoubleSize(length);
4796 TNode<IntPtrT> backing_store = IntPtrAdd(BitcastTaggedToWord(array),
4800 TNode<ExternalReference> memset =
4810 TNode<Object> object, Label* interesting) {
4812 TNode<IntPtrT> object_word = BitcastTaggedToWord(object);
4813 TNode<IntPtrT> object_page = PageFromAddress(object_word);
4814 TNode<IntPtrT> page_flags = UncheckedCast<IntPtrT>(Load(
4826 TNode<FixedArrayBase> elements,
4827 TNode<IntPtrT> dst_index,
4828 TNode<IntPtrT> src_index,
4829 TNode<IntPtrT> length) {
4853 const TNode<IntPtrT> source_byte_length =
4857 TNode<IntPtrT> elements_intptr = BitcastTaggedToWord(elements);
4858 TNode<IntPtrT> target_data_ptr =
4861 TNode<IntPtrT> source_data_ptr =
4864 TNode<ExternalReference> memmove =
4876 const TNode<IntPtrT> begin = src_index;
4877 const TNode<IntPtrT> end = IntPtrAdd(begin, length);
4880 const TNode<IntPtrT> delta =
4883 auto loop_body = [&](TNode<HeapObject> array, TNode<IntPtrT> offset) {
4884 const TNode<AnyTaggedT> element = Load<AnyTaggedT>(array, offset);
4885 const TNode<WordT> delta_offset = IntPtrAdd(offset, delta);
4913 TNode<FixedArrayBase> dst_elements,
4914 TNode<IntPtrT> dst_index,
4915 TNode<FixedArrayBase> src_elements,
4916 TNode<IntPtrT> src_index,
4917 TNode<IntPtrT> length,
4945 TNode<IntPtrT> source_byte_length =
4949 TNode<IntPtrT> src_offset_start =
4951 TNode<IntPtrT> dst_offset_start =
4953 TNode<IntPtrT> src_elements_intptr = BitcastTaggedToWord(src_elements);
4954 TNode<IntPtrT> source_data_ptr =
4956 TNode<IntPtrT> dst_elements_intptr = BitcastTaggedToWord(dst_elements);
4957 TNode<IntPtrT> dst_data_ptr =
4959 TNode<ExternalReference> memcpy =
4971 const TNode<IntPtrT> begin = src_index;
4972 const TNode<IntPtrT> end = IntPtrAdd(begin, length);
4973 const TNode<IntPtrT> delta =
4978 [&](TNode<HeapObject> array, TNode<IntPtrT> offset) {
4979 const TNode<AnyTaggedT> element = Load<AnyTaggedT>(array, offset);
4980 const TNode<WordT> delta_offset = IntPtrAdd(offset, delta);
4997 ElementsKind from_kind, TNode<FixedArrayBase> from_array,
4998 ElementsKind to_kind, TNode<FixedArrayBase> to_array,
4999 TNode<TIndex> first_element, TNode<TIndex> element_count,
5000 TNode<TIndex> capacity, WriteBarrierMode barrier_mode,
5030 TNode<UintPtrT> double_hole =
5055 TNode<IntPtrT> first_from_element_offset =
5057 TNode<IntPtrT> limit_offset = Signed(IntPtrAdd(
5076 TNode<IntPtrT> to_array_adjusted =
5085 TNode<IntPtrT> from_offset = Signed(IntPtrSub(
5090 TNode<IntPtrT> to_offset;
5119 TNode<Float64T> value = LoadElementAndPrepareForStore<Float64T>(
5124 TNode<Object> value = LoadElementAndPrepareForStore<Object>(
5168 TNode<BoolT> compare = WordNotEqual(from_offset, limit_offset);
5176 TNode<FixedArray> CodeStubAssembler::HeapObjectToFixedArray(
5177 TNode<HeapObject> base, Label* cast_fail) {
5179 TNode<Map> map = LoadMap(base);
5187 void CodeStubAssembler::CopyPropertyArrayValues(TNode<HeapObject> from_array,
5188 TNode<PropertyArray> to_array,
5189 TNode<IntPtrT> property_count,
5204 TNode<IntPtrT> start = IntPtrConstant(0);
5209 TNode<HeapObject> array, TNode<IntPtrT> offset) {
5210 TNode<AnyTaggedT> value = Load<AnyTaggedT>(array, offset);
5238 TNode<FixedArrayBase> CodeStubAssembler::CloneFixedArray(
5239 TNode<FixedArrayBase> source, ExtractFixedArrayFlags flags) {
5241 source, base::Optional<TNode<BInt>>(IntPtrOrSmiConstant<BInt>(0)),
5242 base::Optional<TNode<BInt>>(base::nullopt),
5243 base::Optional<TNode<BInt>>(base::nullopt), flags);
5247 TNode<Object> CodeStubAssembler::LoadElementAndPrepareForStore(
5248 TNode<FixedArrayBase> array, TNode<IntPtrT> offset, ElementsKind from_kind,
5253 TNode<Float64T> value =
5257 TNode<Object> value = Load<Object>(array, offset);
5266 TNode<Float64T> CodeStubAssembler::LoadElementAndPrepareForStore(
5267 TNode<FixedArrayBase> array, TNode<IntPtrT> offset, ElementsKind from_kind,
5275 TNode<Object> value = Load<Object>(array, offset);
5287 TNode<TIndex> CodeStubAssembler::CalculateNewElementsCapacity(
5288 TNode<TIndex> old_capacity) {
5293 TNode<TIndex> half_old_capacity = WordOrSmiShr(old_capacity, 1);
5294 TNode<TIndex> new_capacity = IntPtrOrSmiAdd(half_old_capacity, old_capacity);
5295 TNode<TIndex> padding =
5300 template V8_EXPORT_PRIVATE TNode<IntPtrT>
5301 CodeStubAssembler::CalculateNewElementsCapacity<IntPtrT>(TNode<IntPtrT>);
5302 template V8_EXPORT_PRIVATE TNode<Smi>
5303 CodeStubAssembler::CalculateNewElementsCapacity<Smi>(TNode<Smi>);
5305 TNode<FixedArrayBase> CodeStubAssembler::TryGrowElementsCapacity(
5306 TNode<HeapObject> object, TNode<FixedArrayBase> elements, ElementsKind kind,
5307 TNode<Smi> key, Label* bailout) {
5309 TNode<Smi> capacity = LoadFixedArrayBaseLength(elements);
5317 TNode<FixedArrayBase> CodeStubAssembler::TryGrowElementsCapacity(
5318 TNode<HeapObject> object, TNode<FixedArrayBase> elements, ElementsKind kind,
5319 TNode<TIndex> key, TNode<TIndex> capacity, Label* bailout) {
5327 TNode<TIndex> max_gap = IntPtrOrSmiConstant<TIndex>(JSObject::kMaxGap);
5328 TNode<TIndex> max_capacity = IntPtrOrSmiAdd(capacity, max_gap);
5332 TNode<TIndex> new_capacity = CalculateNewElementsCapacity(
5340 TNode<FixedArrayBase> CodeStubAssembler::GrowElementsCapacity(
5341 TNode<HeapObject> object, TNode<FixedArrayBase> elements,
5342 ElementsKind from_kind, ElementsKind to_kind, TNode<TIndex> capacity,
5343 TNode<TIndex> new_capacity, Label* bailout) {
5358 TNode<FixedArrayBase> new_elements =
5372 template TNode<FixedArrayBase> CodeStubAssembler::GrowElementsCapacity<IntPtrT>(
5373 TNode<HeapObject>, TNode<FixedArrayBase>, ElementsKind, ElementsKind,
5374 TNode<IntPtrT>, TNode<IntPtrT>, compiler::CodeAssemblerLabel*);
5382 TNode<HeapObject> InnerAllocateMemento(CodeStubAssembler* csa,
5383 TNode<HeapObject> previous,
5384 TNode<IntPtrT> offset) {
5392 TNode<HeapObject> base, TNode<IntPtrT> base_allocation_size,
5393 TNode<AllocationSite> allocation_site) {
5396 TNode<HeapObject> memento =
5402 TNode<Int32T> count = LoadObjectField<Int32T>(
5405 TNode<Int32T> incremented_count = Int32Add(count, Int32Constant(1));
5413 TNode<IntPtrT> CodeStubAssembler::TryTaggedToInt32AsIntPtr(
5414 TNode<Object> acc, Label* if_not_possible) {
5424 TNode<Float64T> value = LoadHeapNumberValue(CAST(acc));
5425 TNode<Int32T> value32 = RoundFloat64ToInt32(value);
5426 TNode<Float64T> value64 = ChangeInt32ToFloat64(value32);
5435 TNode<Float64T> CodeStubAssembler::TryTaggedToFloat64(
5436 TNode<Object> value, Label* if_valueisnotnumber) {
5445 TNode<Float64T> CodeStubAssembler::TruncateTaggedToFloat64(
5446 TNode<Context> context, TNode<Object> value) {
5475 TNode<Word32T> CodeStubAssembler::TruncateTaggedToWord32(TNode<Context> context,
5476 TNode<Object> value) {
5488 TNode<Context> context, TNode<Object> value, Label* if_number,
5500 TNode<Context> context, TNode<Object> value, Label* if_number,
5512 TNode<Context> context, TNode<HeapObject> pointer, Label* if_number,
5522 TNode<Context> context, TNode<Object> value, Label* if_number,
5548 TNode<HeapObject> value_heap_object = CAST(value);
5549 TNode<Map> map = LoadMap(value_heap_object);
5551 TNode<Uint16T> instance_type = LoadMapInstanceType(map);
5604 TNode<Int32T> CodeStubAssembler::TruncateNumberToWord32(TNode<Number> number) {
5612 TNode<Float64T> value = LoadHeapNumberValue(CAST(number));
5620 TNode<Int32T> CodeStubAssembler::TruncateHeapNumberValueToWord32(
5621 TNode<HeapNumber> object) {
5622 TNode<Float64T> value = LoadHeapNumberValue(object);
5626 void CodeStubAssembler::TryHeapNumberToSmi(TNode<HeapNumber> number,
5629 TNode<Float64T> value = LoadHeapNumberValue(number);
5633 void CodeStubAssembler::TryFloat32ToSmi(TNode<Float32T> value,
5636 TNode<Int32T> ivalue = TruncateFloat32ToInt32(value);
5637 TNode<Float32T> fvalue = RoundInt32ToFloat32(ivalue);
5654 TNode<PairT<Int32T, BoolT>> pair = Int32AddWithOverflow(ivalue, ivalue);
5655 TNode<BoolT> overflow = Projection<1>(pair);
5665 void CodeStubAssembler::TryFloat64ToSmi(TNode<Float64T> value,
5668 TNode<Int32T> value32 = RoundFloat64ToInt32(value);
5669 TNode<Float64T> value64 = ChangeInt32ToFloat64(value32);
5686 TNode<PairT<Int32T, BoolT>> pair = Int32AddWithOverflow(value32, value32);
5687 TNode<BoolT> overflow = Projection<1>(pair);
5697 TNode<Number> CodeStubAssembler::ChangeFloat32ToTagged(TNode<Float32T> value) {
5715 TNode<Number> CodeStubAssembler::ChangeFloat64ToTagged(TNode<Float64T> value) {
5733 TNode<Number> CodeStubAssembler::ChangeInt32ToTagged(TNode<Int32T> value) {
5739 TNode<PairT<Int32T, BoolT>> pair = Int32AddWithOverflow(value, value);
5740 TNode<BoolT> overflow = Projection<1>(pair);
5746 TNode<Float64T> value64 = ChangeInt32ToFloat64(value);
5747 TNode<HeapNumber> result = AllocateHeapNumberWithValue(value64);
5753 TNode<IntPtrT> almost_tagged_value =
5755 TNode<Smi> result = BitcastWordToTaggedSigned(almost_tagged_value);
5763 TNode<Number> CodeStubAssembler::ChangeInt32ToTaggedNoOverflow(
5764 TNode<Int32T> value) {
5769 TNode<Int32T> result_int32 = Int32Add(value, value);
5770 TNode<IntPtrT> almost_tagged_value = ChangeInt32ToIntPtr(result_int32);
5771 TNode<Smi> result = BitcastWordToTaggedSigned(almost_tagged_value);
5775 TNode<Number> CodeStubAssembler::ChangeUint32ToTagged(TNode<Uint32T> value) {
5792 TNode<Float64T> float64_value = ChangeUint32ToFloat64(value);
5801 TNode<Number> CodeStubAssembler::ChangeUintPtrToTagged(TNode<UintPtrT> value) {
5818 TNode<Float64T> float64_value = ChangeUintPtrToFloat64(value);
5827 TNode<Int32T> CodeStubAssembler::ChangeBoolToInt32(TNode<BoolT> b) {
5831 TNode<String> CodeStubAssembler::ToThisString(TNode<Context> context,
5832 TNode<Object> value,
5833 TNode<String> method_name) {
5843 TNode<Uint16T> value_instance_type = LoadInstanceType(CAST(value));
5876 TNode<Uint32T> CodeStubAssembler::ChangeNumberToUint32(TNode<Number> value) {
5894 TNode<Float64T> CodeStubAssembler::ChangeNumberToFloat64(TNode<Number> value) {
5912 TNode<Int32T> CodeStubAssembler::ChangeTaggedNonSmiToInt32(
5913 TNode<Context> context, TNode<HeapObject> input) {
5925 TNode<Float64T> CodeStubAssembler::ChangeTaggedToFloat64(TNode<Context> context,
5926 TNode<Object> input) {
5948 TNode<WordT> CodeStubAssembler::TimesSystemPointerSize(TNode<WordT> value) {
5952 TNode<WordT> CodeStubAssembler::TimesTaggedSize(TNode<WordT> value) {
5956 TNode<WordT> CodeStubAssembler::TimesDoubleSize(TNode<WordT> value) {
5960 TNode<Object> CodeStubAssembler::ToThisValue(TNode<Context> context,
5961 TNode<Object> input_value,
5976 TNode<HeapObject> value = CAST(var_value.value());
5979 TNode<Map> value_map = LoadMap(value);
5982 TNode<Uint16T> value_instance_type = LoadMapInstanceType(value_map);
6044 void CodeStubAssembler::ThrowIfNotInstanceType(TNode<Context> context,
6045 TNode<Object> value,
6053 TNode<Map> map = LoadMap(CAST(value));
6054 const TNode<Uint16T> value_instance_type = LoadMapInstanceType(map);
6067 void CodeStubAssembler::ThrowIfNotJSReceiver(TNode<Context> context,
6068 TNode<Object> value,
6076 TNode<Map> value_map = LoadMap(CAST(value));
6077 const TNode<Uint16T> value_instance_type = LoadMapInstanceType(value_map);
6089 void CodeStubAssembler::ThrowIfNotCallable(TNode<Context> context,
6090 TNode<Object> value,
6104 void CodeStubAssembler::ThrowRangeError(TNode<Context> context,
6106 base::Optional<TNode<Object>> arg0,
6107 base::Optional<TNode<Object>> arg1,
6108 base::Optional<TNode<Object>> arg2) {
6109 TNode<Smi> template_index = SmiConstant(static_cast<int>(message));
6124 void CodeStubAssembler::ThrowTypeError(TNode<Context> context,
6127 base::Optional<TNode<Object>> arg0_node;
6129 base::Optional<TNode<Object>> arg1_node;
6134 void CodeStubAssembler::ThrowTypeError(TNode<Context> context,
6136 base::Optional<TNode<Object>> arg0,
6137 base::Optional<TNode<Object>> arg1,
6138 base::Optional<TNode<Object>> arg2) {
6139 TNode<Smi> template_index = SmiConstant(static_cast<int>(message));
6154 TNode<HeapObject> CodeStubAssembler::GetPendingMessage() {
6155 TNode<ExternalReference> pending_message = ExternalConstant(
6159 void CodeStubAssembler::SetPendingMessage(TNode<HeapObject> message) {
6163 TNode<ExternalReference> pending_message = ExternalConstant(
6168 TNode<BoolT> CodeStubAssembler::InstanceTypeEqual(TNode<Int32T> instance_type,
6173 TNode<BoolT> CodeStubAssembler::IsDictionaryMap(TNode<Map> map) {
6177 TNode<BoolT> CodeStubAssembler::IsExtensibleMap(TNode<Map> map) {
6181 TNode<BoolT> CodeStubAssembler::IsExtensibleNonPrototypeMap(TNode<Map> map) {
6189 TNode<BoolT> CodeStubAssembler::IsCallableMap(TNode<Map> map) {
6193 TNode<BoolT> CodeStubAssembler::IsDeprecatedMap(TNode<Map> map) {
6197 TNode<BoolT> CodeStubAssembler::IsUndetectableMap(TNode<Map> map) {
6201 TNode<BoolT> CodeStubAssembler::IsNoElementsProtectorCellInvalid() {
6202 TNode<Smi> invalid = SmiConstant(Protectors::kProtectorInvalid);
6203 TNode<PropertyCell> cell = NoElementsProtectorConstant();
6204 TNode<Object> cell_value = LoadObjectField(cell, PropertyCell::kValueOffset);
6208 TNode<BoolT> CodeStubAssembler::IsMegaDOMProtectorCellInvalid() {
6209 TNode<Smi> invalid = SmiConstant(Protectors::kProtectorInvalid);
6210 TNode<PropertyCell> cell = MegaDOMProtectorConstant();
6211 TNode<Object> cell_value = LoadObjectField(cell, PropertyCell::kValueOffset);
6215 TNode<BoolT> CodeStubAssembler::IsArrayIteratorProtectorCellInvalid() {
6216 TNode<Smi> invalid = SmiConstant(Protectors::kProtectorInvalid);
6217 TNode<PropertyCell> cell = ArrayIteratorProtectorConstant();
6218 TNode<Object> cell_value = LoadObjectField(cell, PropertyCell::kValueOffset);
6222 TNode<BoolT> CodeStubAssembler::IsPromiseResolveProtectorCellInvalid() {
6223 TNode<Smi> invalid = SmiConstant(Protectors::kProtectorInvalid);
6224 TNode<PropertyCell> cell = PromiseResolveProtectorConstant();
6225 TNode<Object> cell_value = LoadObjectField(cell, PropertyCell::kValueOffset);
6229 TNode<BoolT> CodeStubAssembler::IsPromiseThenProtectorCellInvalid() {
6230 TNode<Smi> invalid = SmiConstant(Protectors::kProtectorInvalid);
6231 TNode<PropertyCell> cell = PromiseThenProtectorConstant();
6232 TNode<Object> cell_value = LoadObjectField(cell, PropertyCell::kValueOffset);
6236 TNode<BoolT> CodeStubAssembler::IsArraySpeciesProtectorCellInvalid() {
6237 TNode<Smi> invalid = SmiConstant(Protectors::kProtectorInvalid);
6238 TNode<PropertyCell> cell = ArraySpeciesProtectorConstant();
6239 TNode<Object> cell_value = LoadObjectField(cell, PropertyCell::kValueOffset);
6243 TNode<BoolT> CodeStubAssembler::IsIsConcatSpreadableProtectorCellInvalid() {
6244 TNode<Smi> invalid = SmiConstant(Protectors::kProtectorInvalid);
6245 TNode<PropertyCell> cell = IsConcatSpreadableProtectorConstant();
6246 TNode<Object> cell_value = LoadObjectField(cell, PropertyCell::kValueOffset);
6250 TNode<BoolT> CodeStubAssembler::IsTypedArraySpeciesProtectorCellInvalid() {
6251 TNode<Smi> invalid = SmiConstant(Protectors::kProtectorInvalid);
6252 TNode<PropertyCell> cell = TypedArraySpeciesProtectorConstant();
6253 TNode<Object> cell_value = LoadObjectField(cell, PropertyCell::kValueOffset);
6257 TNode<BoolT> CodeStubAssembler::IsRegExpSpeciesProtectorCellInvalid() {
6258 TNode<Smi> invalid = SmiConstant(Protectors::kProtectorInvalid);
6259 TNode<PropertyCell> cell = RegExpSpeciesProtectorConstant();
6260 TNode<Object> cell_value = LoadObjectField(cell, PropertyCell::kValueOffset);
6264 TNode<BoolT> CodeStubAssembler::IsPromiseSpeciesProtectorCellInvalid() {
6265 TNode<Smi> invalid = SmiConstant(Protectors::kProtectorInvalid);
6266 TNode<PropertyCell> cell = PromiseSpeciesProtectorConstant();
6267 TNode<Object> cell_value = LoadObjectField(cell, PropertyCell::kValueOffset);
6271 TNode<BoolT> CodeStubAssembler::IsPrototypeInitialArrayPrototype(
6272 TNode<Context> context, TNode<Map> map) {
6273 const TNode<NativeContext> native_context = LoadNativeContext(context);
6274 const TNode<Object> initial_array_prototype = LoadContextElement(
6276 TNode<HeapObject> proto = LoadMapPrototype(map);
6280 TNode<BoolT> CodeStubAssembler::IsPrototypeTypedArrayPrototype(
6281 TNode<Context> context, TNode<Map> map) {
6282 const TNode<NativeContext> native_context = LoadNativeContext(context);
6283 const TNode<Object> typed_array_prototype =
6285 TNode<HeapObject> proto = LoadMapPrototype(map);
6286 TNode<HeapObject> proto_of_proto = Select<HeapObject>(
6292 TNode<BoolT> CodeStubAssembler::IsFastAliasedArgumentsMap(
6293 TNode<Context> context, TNode<Map> map) {
6294 const TNode<NativeContext> native_context = LoadNativeContext(context);
6295 const TNode<Object> arguments_map = LoadContextElement(
6300 TNode<BoolT> CodeStubAssembler::IsSlowAliasedArgumentsMap(
6301 TNode<Context> context, TNode<Map> map) {
6302 const TNode<NativeContext> native_context = LoadNativeContext(context);
6303 const TNode<Object> arguments_map = LoadContextElement(
6308 TNode<BoolT> CodeStubAssembler::IsSloppyArgumentsMap(TNode<Context> context,
6309 TNode<Map> map) {
6310 const TNode<NativeContext> native_context = LoadNativeContext(context);
6311 const TNode<Object> arguments_map =
6316 TNode<BoolT> CodeStubAssembler::IsStrictArgumentsMap(TNode<Context> context,
6317 TNode<Map> map) {
6318 const TNode<NativeContext> native_context = LoadNativeContext(context);
6319 const TNode<Object> arguments_map =
6324 TNode<BoolT> CodeStubAssembler::TaggedIsCallable(TNode<Object> object) {
6332 TNode<BoolT> CodeStubAssembler::IsCallable(TNode<HeapObject> object) {
6336 TNode<BoolT> CodeStubAssembler::IsConstructorMap(TNode<Map> map) {
6340 TNode<BoolT> CodeStubAssembler::IsConstructor(TNode<HeapObject> object) {
6344 TNode<BoolT> CodeStubAssembler::IsFunctionWithPrototypeSlotMap(TNode<Map> map) {
6348 TNode<BoolT> CodeStubAssembler::IsSpecialReceiverInstanceType(
6349 TNode<Int32T> instance_type) {
6355 TNode<BoolT> CodeStubAssembler::IsCustomElementsReceiverInstanceType(
6356 TNode<Int32T> instance_type) {
6361 TNode<BoolT> CodeStubAssembler::IsStringInstanceType(
6362 TNode<Int32T> instance_type) {
6367 TNode<BoolT> CodeStubAssembler::IsTemporalInstantInstanceType(
6368 TNode<Int32T> instance_type) {
6372 TNode<BoolT> CodeStubAssembler::IsOneByteStringInstanceType(
6373 TNode<Int32T> instance_type) {
6380 TNode<BoolT> CodeStubAssembler::IsSequentialStringInstanceType(
6381 TNode<Int32T> instance_type) {
6388 TNode<BoolT> CodeStubAssembler::IsSeqOneByteStringInstanceType(
6389 TNode<Int32T> instance_type) {
6397 TNode<BoolT> CodeStubAssembler::IsConsStringInstanceType(
6398 TNode<Int32T> instance_type) {
6405 TNode<BoolT> CodeStubAssembler::IsIndirectStringInstanceType(
6406 TNode<Int32T> instance_type) {
6414 TNode<BoolT> CodeStubAssembler::IsExternalStringInstanceType(
6415 TNode<Int32T> instance_type) {
6422 TNode<BoolT> CodeStubAssembler::IsUncachedExternalStringInstanceType(
6423 TNode<Int32T> instance_type) {
6429 TNode<BoolT> CodeStubAssembler::IsJSReceiverInstanceType(
6430 TNode<Int32T> instance_type) {
6436 TNode<BoolT> CodeStubAssembler::IsJSReceiverMap(TNode<Map> map) {
6440 TNode<BoolT> CodeStubAssembler::IsJSReceiver(TNode<HeapObject> object) {
6444 TNode<BoolT> CodeStubAssembler::IsNullOrJSReceiver(TNode<HeapObject> object) {
6448 TNode<BoolT> CodeStubAssembler::IsNullOrUndefined(TNode<Object> value) {
6452 TNode<BoolT> CodeStubAssembler::IsJSGlobalProxyInstanceType(
6453 TNode<Int32T> instance_type) {
6457 TNode<BoolT> CodeStubAssembler::IsJSGlobalProxyMap(TNode<Map> map) {
6461 TNode<BoolT> CodeStubAssembler::IsJSGlobalProxy(TNode<HeapObject> object) {
6465 TNode<BoolT> CodeStubAssembler::IsJSGeneratorMap(TNode<Map> map) {
6469 TNode<BoolT> CodeStubAssembler::IsJSObjectInstanceType(
6470 TNode<Int32T> instance_type) {
6476 TNode<BoolT> CodeStubAssembler::IsJSApiObjectInstanceType(
6477 TNode<Int32T> instance_type) {
6481 TNode<BoolT> CodeStubAssembler::IsJSObjectMap(TNode<Map> map) {
6485 TNode<BoolT> CodeStubAssembler::IsJSApiObjectMap(TNode<Map> map) {
6489 TNode<BoolT> CodeStubAssembler::IsJSObject(TNode<HeapObject> object) {
6493 TNode<BoolT> CodeStubAssembler::IsJSApiObject(TNode<HeapObject> object) {
6497 TNode<BoolT> CodeStubAssembler::IsJSFinalizationRegistryMap(TNode<Map> map) {
6502 TNode<BoolT> CodeStubAssembler::IsJSFinalizationRegistry(
6503 TNode<HeapObject> object) {
6507 TNode<BoolT> CodeStubAssembler::IsJSPromiseMap(TNode<Map> map) {
6511 TNode<BoolT> CodeStubAssembler::IsJSPromise(TNode<HeapObject> object) {
6515 TNode<BoolT> CodeStubAssembler::IsJSProxy(TNode<HeapObject> object) {
6519 TNode<BoolT> CodeStubAssembler::IsJSStringIterator(TNode<HeapObject> object) {
6523 TNode<BoolT> CodeStubAssembler::IsJSRegExpStringIterator(
6524 TNode<HeapObject> object) {
6528 TNode<BoolT> CodeStubAssembler::IsMap(TNode<HeapObject> map) {
6532 TNode<BoolT> CodeStubAssembler::IsJSPrimitiveWrapperInstanceType(
6533 TNode<Int32T> instance_type) {
6537 TNode<BoolT> CodeStubAssembler::IsJSPrimitiveWrapper(TNode<HeapObject> object) {
6541 TNode<BoolT> CodeStubAssembler::IsJSPrimitiveWrapperMap(TNode<Map> map) {
6545 TNode<BoolT> CodeStubAssembler::IsJSWrappedFunction(TNode<HeapObject> object) {
6549 TNode<BoolT> CodeStubAssembler::IsJSArrayInstanceType(
6550 TNode<Int32T> instance_type) {
6554 TNode<BoolT> CodeStubAssembler::IsJSArray(TNode<HeapObject> object) {
6558 TNode<BoolT> CodeStubAssembler::IsJSArrayMap(TNode<Map> map) {
6562 TNode<BoolT> CodeStubAssembler::IsJSArrayIterator(TNode<HeapObject> object) {
6566 TNode<BoolT> CodeStubAssembler::IsJSSharedStructInstanceType(
6567 TNode<Int32T> instance_type) {
6571 TNode<BoolT> CodeStubAssembler::IsJSSharedStructMap(TNode<Map> map) {
6575 TNode<BoolT> CodeStubAssembler::IsJSSharedStruct(TNode<HeapObject> object) {
6579 TNode<BoolT> CodeStubAssembler::IsJSSharedStruct(TNode<Object> object) {
6583 TNode<HeapObject> heap_object = CAST(object);
6588 TNode<BoolT> CodeStubAssembler::IsJSAsyncGeneratorObject(
6589 TNode<HeapObject> object) {
6593 TNode<BoolT> CodeStubAssembler::IsFixedArray(TNode<HeapObject> object) {
6597 TNode<BoolT> CodeStubAssembler::IsFixedArraySubclass(TNode<HeapObject> object) {
6598 TNode<Uint16T> instance_type = LoadInstanceType(object);
6606 TNode<BoolT> CodeStubAssembler::IsNotWeakFixedArraySubclass(
6607 TNode<HeapObject> object) {
6608 TNode<Uint16T> instance_type = LoadInstanceType(object);
6615 TNode<BoolT> CodeStubAssembler::IsPropertyArray(TNode<HeapObject> object) {
6619 TNode<BoolT> CodeStubAssembler::IsPromiseReactionJobTask(
6620 TNode<HeapObject> object) {
6621 TNode<Uint16T> instance_type = LoadInstanceType(object);
6635 TNode<BoolT> CodeStubAssembler::IsFixedArrayWithKindOrEmpty(
6636 TNode<FixedArrayBase> object, ElementsKind kind) {
6642 const TNode<Smi> length = LoadFixedArrayBaseLength(object);
6652 TNode<BoolT> CodeStubAssembler::IsFixedArrayWithKind(TNode<HeapObject> object,
6663 TNode<BoolT> CodeStubAssembler::IsBoolean(TNode<HeapObject> object) {
6667 TNode<BoolT> CodeStubAssembler::IsPropertyCell(TNode<HeapObject> object) {
6671 TNode<BoolT> CodeStubAssembler::IsHeapNumberInstanceType(
6672 TNode<Int32T> instance_type) {
6676 TNode<BoolT> CodeStubAssembler::IsOddball(TNode<HeapObject> object) {
6680 TNode<BoolT> CodeStubAssembler::IsOddballInstanceType(
6681 TNode<Int32T> instance_type) {
6685 TNode<BoolT> CodeStubAssembler::IsName(TNode<HeapObject> object) {
6689 TNode<BoolT> CodeStubAssembler::IsNameInstanceType(
6690 TNode<Int32T> instance_type) {
6694 TNode<BoolT> CodeStubAssembler::IsString(TNode<HeapObject> object) {
6698 TNode<BoolT> CodeStubAssembler::IsSeqOneByteString(TNode<HeapObject> object) {
6702 TNode<BoolT> CodeStubAssembler::IsSymbolInstanceType(
6703 TNode<Int32T> instance_type) {
6707 TNode<BoolT> CodeStubAssembler::IsInternalizedStringInstanceType(
6708 TNode<Int32T> instance_type) {
6716 TNode<BoolT> CodeStubAssembler::IsSharedStringInstanceType(
6717 TNode<Int32T> instance_type) {
6718 TNode<BoolT> is_shared = Word32Equal(
6729 TNode<BoolT> CodeStubAssembler::IsUniqueName(TNode<HeapObject> object) {
6730 TNode<Uint16T> instance_type = LoadInstanceType(object);
6741 TNode<BoolT> CodeStubAssembler::IsUniqueNameNoIndex(TNode<HeapObject> object) {
6742 TNode<Uint16T> instance_type = LoadInstanceType(object);
6759 TNode<BoolT> CodeStubAssembler::IsUniqueNameNoCachedIndex(
6760 TNode<HeapObject> object) {
6761 TNode<Uint16T> instance_type = LoadInstanceType(object);
6771 TNode<BoolT> CodeStubAssembler::IsBigIntInstanceType(
6772 TNode<Int32T> instance_type) {
6776 TNode<BoolT> CodeStubAssembler::IsBigInt(TNode<HeapObject> object) {
6780 TNode<BoolT> CodeStubAssembler::IsPrimitiveInstanceType(
6781 TNode<Int32T> instance_type) {
6786 TNode<BoolT> CodeStubAssembler::IsPrivateName(TNode<Symbol> symbol) {
6787 TNode<Uint32T> flags = LoadObjectField<Uint32T>(symbol, Symbol::kFlagsOffset);
6791 TNode<BoolT> CodeStubAssembler::IsHashTable(TNode<HeapObject> object) {
6792 TNode<Uint16T> instance_type = LoadInstanceType(object);
6800 TNode<BoolT> CodeStubAssembler::IsEphemeronHashTable(TNode<HeapObject> object) {
6804 TNode<BoolT> CodeStubAssembler::IsNameDictionary(TNode<HeapObject> object) {
6807 TNode<BoolT> CodeStubAssembler::IsOrderedNameDictionary(
6808 TNode<HeapObject> object) {
6812 TNode<BoolT> CodeStubAssembler::IsSwissNameDictionary(
6813 TNode<HeapObject> object) {
6817 TNode<BoolT> CodeStubAssembler::IsGlobalDictionary(TNode<HeapObject> object) {
6821 TNode<BoolT> CodeStubAssembler::IsNumberDictionary(TNode<HeapObject> object) {
6825 TNode<BoolT> CodeStubAssembler::IsJSGeneratorObject(TNode<HeapObject> object) {
6829 TNode<BoolT> CodeStubAssembler::IsFunctionInstanceType(
6830 TNode<Int32T> instance_type) {
6835 TNode<BoolT> CodeStubAssembler::IsJSFunctionInstanceType(
6836 TNode<Int32T> instance_type) {
6841 TNode<BoolT> CodeStubAssembler::IsJSFunction(TNode<HeapObject> object) {
6845 TNode<BoolT> CodeStubAssembler::IsJSBoundFunction(TNode<HeapObject> object) {
6849 TNode<BoolT> CodeStubAssembler::IsJSFunctionMap(TNode<Map> map) {
6853 TNode<BoolT> CodeStubAssembler::IsJSTypedArrayInstanceType(
6854 TNode<Int32T> instance_type) {
6858 TNode<BoolT> CodeStubAssembler::IsJSTypedArrayMap(TNode<Map> map) {
6862 TNode<BoolT> CodeStubAssembler::IsJSTypedArray(TNode<HeapObject> object) {
6866 TNode<BoolT> CodeStubAssembler::IsJSArrayBuffer(TNode<HeapObject> object) {
6870 TNode<BoolT> CodeStubAssembler::IsJSDataView(TNode<HeapObject> object) {
6874 TNode<BoolT> CodeStubAssembler::IsJSRegExp(TNode<HeapObject> object) {
6878 TNode<BoolT> CodeStubAssembler::IsNumeric(TNode<Object> object) {
6887 TNode<BoolT> CodeStubAssembler::IsNumberNormalized(TNode<Number> number) {
6893 TNode<Float64T> value = LoadHeapNumberValue(CAST(number));
6894 TNode<Float64T> smi_min =
6896 TNode<Float64T> smi_max =
6910 TNode<BoolT> CodeStubAssembler::IsNumberPositive(TNode<Number> number) {
6916 // TODO(cbruni): Use TNode<HeapNumber> instead of custom name.
6917 TNode<BoolT> CodeStubAssembler::IsHeapNumberPositive(TNode<HeapNumber> number) {
6918 TNode<Float64T> value = LoadHeapNumberValue(number);
6919 TNode<Float64T> float_zero = Float64Constant(0.);
6923 TNode<BoolT> CodeStubAssembler::IsNumberNonNegativeSafeInteger(
6924 TNode<Number> number) {
6929 TNode<HeapNumber> heap_number = CAST(number);
6937 TNode<BoolT> CodeStubAssembler::IsSafeInteger(TNode<Object> number) {
6948 TNode<BoolT> CodeStubAssembler::IsSafeInteger(TNode<HeapNumber> number) {
6950 TNode<Float64T> number_value = LoadHeapNumberValue(number);
6952 TNode<Float64T> integer = Float64Trunc(number_value);
6966 TNode<BoolT> CodeStubAssembler::IsInteger(TNode<Object> number) {
6977 TNode<BoolT> CodeStubAssembler::IsInteger(TNode<HeapNumber> number) {
6978 TNode<Float64T> number_value = LoadHeapNumberValue(number);
6980 TNode<Float64T> integer = Float64Trunc(number_value);
6985 TNode<BoolT> CodeStubAssembler::IsHeapNumberUint32(TNode<HeapNumber> number) {
6990 TNode<Float64T> value = LoadHeapNumberValue(number);
6991 TNode<Uint32T> int_value = TruncateFloat64ToWord32(value);
6997 TNode<BoolT> CodeStubAssembler::IsNumberArrayIndex(TNode<Number> number) {
7003 TNode<IntPtrT> CodeStubAssembler::LoadBasicMemoryChunkFlags(
7004 TNode<HeapObject> object) {
7005 TNode<IntPtrT> object_word = BitcastTaggedToWord(object);
7006 TNode<IntPtrT> page = PageFromAddress(object_word);
7013 TNode<BoolT> CodeStubAssembler::FixedArraySizeDoesntFitInNewSpace(
7014 TNode<TIndex> element_count, int base_size) {
7024 TNode<Uint16T> CodeStubAssembler::StringCharCodeAt(TNode<String> string,
7025 TNode<UintPtrT> index) {
7035 const TNode<UintPtrT> offset =
7037 const TNode<Int32T> instance_type = to_direct.instance_type();
7038 const TNode<RawPtrT> string_data = to_direct.PointerToData(&if_runtime);
7058 TNode<Object> result =
7069 TNode<String> CodeStubAssembler::StringFromSingleCharCode(TNode<Int32T> code) {
7080 TNode<FixedArray> cache = SingleCharacterStringCacheConstant();
7081 TNode<IntPtrT> code_index = Signed(ChangeUint32ToWord(code));
7087 TNode<Object> entry = UnsafeLoadFixedArrayElement(cache, code_index);
7093 TNode<String> result = AllocateSeqOneByteString(1);
7113 TNode<String> result = AllocateSeqTwoByteString(1);
7126 compiler::CodeAssemblerState* state, TNode<String> string, Flags flags)
7134 TNode<String> ToDirectStringAssembler::TryToDirect(Label* if_bailout) {
7157 const TNode<Int32T> representation = Word32And(
7166 const TNode<String> string = var_string_.value();
7171 const TNode<String> lhs =
7185 const TNode<String> string = var_string_.value();
7186 const TNode<IntPtrT> sliced_offset =
7190 const TNode<String> parent =
7202 const TNode<String> string = var_string_.value();
7203 const TNode<String> actual_string =
7205 const TNode<Uint16T> actual_instance_type = LoadInstanceType(actual_string);
7222 TNode<RawPtrT> ToDirectStringAssembler::TryToSequential(
7234 TNode<RawPtrT> result =
7249 TNode<String> string = var_string_.value();
7250 TNode<RawPtrT> result = LoadExternalStringResourceDataPtr(CAST(string));
7263 TNode<Number> CodeStubAssembler::StringToNumber(TNode<String> input) {
7270 TNode<Uint32T> raw_hash_field = LoadNameRawHashField(input);
7289 TNode<String> CodeStubAssembler::NumberToString(TNode<Number> input,
7296 TNode<FixedArray> number_string_cache = NumberStringCacheConstant();
7300 TNode<IntPtrT> number_string_cache_length =
7302 TNode<Int32T> one = Int32Constant(1);
7303 TNode<Word32T> mask = Int32Sub(
7313 TNode<HeapNumber> heap_number_input = CAST(input);
7318 TNode<Int32T> low =
7320 TNode<Int32T> high = LoadObjectField<Int32T>(
7322 TNode<Word32T> hash = Word32And(Word32Xor(low, high), mask);
7323 TNode<IntPtrT> entry_index =
7327 TNode<Object> number_key =
7330 TNode<HeapObject> number_key_heap_object = CAST(number_key);
7334 TNode<Int32T> low_compare = LoadObjectField<Int32T>(
7336 TNode<Int32T> high_compare = LoadObjectField<Int32T>(
7351 TNode<Word32T> hash = Word32And(SmiToInt32(smi_input.value()), mask);
7352 TNode<IntPtrT> entry_index =
7354 TNode<Object> smi_key =
7395 TNode<String> CodeStubAssembler::NumberToString(TNode<Number> input) {
7415 TNode<Numeric> CodeStubAssembler::NonNumberToNumberOrNumeric(
7416 TNode<Context> context, TNode<HeapObject> input, Object::Conversion mode,
7438 TNode<Object> result = CallStub(callable, context, var_input.value());
7524 TNode<Number> CodeStubAssembler::NonNumberToNumber(
7525 TNode<Context> context, TNode<HeapObject> input,
7532 TNode<HeapObject> input, TVariable<Number>* var_result, Label* if_bailout) {
7537 TNode<Uint16T> input_instance_type = LoadInstanceType(input);
7556 TNode<Numeric> CodeStubAssembler::NonNumberToNumeric(TNode<Context> context,
7557 TNode<HeapObject> input) {
7562 TNode<Number> CodeStubAssembler::ToNumber(TNode<Context> context,
7563 TNode<Object> input,
7570 TNode<Number> CodeStubAssembler::ToNumber_Inline(TNode<Context> context,
7571 TNode<Object> input) {
7593 TNode<Numeric> CodeStubAssembler::ToNumberOrNumeric(
7594 LazyNode<Context> context, TNode<Object> input,
7602 TNode<Smi> input_smi = CAST(input);
7612 TNode<HeapObject> input_ho = CAST(input);
7615 TNode<HeapNumber> input_hn = CAST(input_ho);
7648 TNode<Number> CodeStubAssembler::PlainPrimitiveToNumber(TNode<Object> input) {
7654 TNode<Smi> input_smi = CAST(input);
7661 TNode<HeapObject> input_ho = CAST(input);
7664 TNode<HeapNumber> input_hn = CAST(input_ho);
7681 TNode<BigInt> CodeStubAssembler::ToBigInt(TNode<Context> context,
7682 TNode<Object> input) {
7702 void CodeStubAssembler::TaggedToNumeric(TNode<Context> context,
7703 TNode<Object> value,
7709 TNode<Context> context, TNode<Object> value,
7715 void CodeStubAssembler::TaggedToNumeric(TNode<Context> context,
7716 TNode<Object> value,
7722 TNode<HeapObject> heap_object_value = CAST(value);
7723 TNode<Map> map = LoadMap(heap_object_value);
7725 TNode<Uint16T> instance_type = LoadMapInstanceType(map);
7760 TNode<Number> CodeStubAssembler::ToUint32(TNode<Context> context,
7761 TNode<Object> input) {
7762 const TNode<Float64T> float_zero = Float64Constant(0.0);
7763 const TNode<Float64T> float_two_32 =
7779 const TNode<Number> number = ToNumber(context, input);
7794 const TNode<Int32T> uint32_value = SmiToInt32(CAST(number));
7795 TNode<Float64T> float64_value = ChangeUint32ToFloat64(uint32_value);
7803 const TNode<Float64T> value = LoadHeapNumberValue(CAST(number));
7822 const TNode<Float64T> positive_infinity =
7831 const TNode<Float64T> negative_infinity =
7842 TNode<Float64T> x = Float64Trunc(value);
7847 const TNode<Number> result = ChangeFloat64ToTagged(x);
7863 TNode<String> CodeStubAssembler::ToString_Inline(TNode<Context> context,
7864 TNode<Object> input) {
7879 TNode<JSReceiver> CodeStubAssembler::ToObject(TNode<Context> context,
7880 TNode<Object> input) {
7884 TNode<JSReceiver> CodeStubAssembler::ToObject_Inline(TNode<Context> context,
7885 TNode<Object> input) {
7908 TNode<Number> CodeStubAssembler::ToLength_Inline(TNode<Context> context,
7909 TNode<Object> input) {
7910 TNode<Smi> smi_zero = SmiConstant(0);
7916 TNode<Object> CodeStubAssembler::OrdinaryToPrimitive(
7917 TNode<Context> context, TNode<Object> input, OrdinaryToPrimitiveHint hint) {
7922 TNode<Uint32T> CodeStubAssembler::DecodeWord32(TNode<Word32T> word32,
7934 TNode<UintPtrT> CodeStubAssembler::DecodeWord(TNode<WordT> word, uint32_t shift,
7946 TNode<Word32T> CodeStubAssembler::UpdateWord32(TNode<Word32T> word,
7947 TNode<Uint32T> value,
7953 TNode<Word32T> encoded_value = Word32Shl(value, Int32Constant(shift));
7954 TNode<Word32T> masked_word;
7964 TNode<WordT> CodeStubAssembler::UpdateWord(TNode<WordT> word,
7965 TNode<UintPtrT> value,
7972 TNode<WordT> encoded_value = WordShl(value, static_cast<int>(shift));
7973 TNode<WordT> masked_word;
7985 TNode<ExternalReference> counter_address =
7995 TNode<ExternalReference> counter_address =
8000 TNode<Int32T> value = Load<Int32T>(counter_address);
8009 TNode<ExternalReference> counter_address =
8014 TNode<Int32T> value = Load<Int32T>(counter_address);
8039 void CodeStubAssembler::TryToName(TNode<Object> key, Label* if_keyisindex,
8076 TNode<Uint32T> raw_hash_field = LoadNameRawHashField(CAST(key));
8108 TNode<IntPtrT> index = Signed(
8127 void CodeStubAssembler::StringWriteToFlatOneByte(TNode<String> source,
8128 TNode<RawPtrT> sink,
8129 TNode<Int32T> start,
8130 TNode<Int32T> length) {
8131 TNode<ExternalReference> function =
8140 void CodeStubAssembler::StringWriteToFlatTwoByte(TNode<String> source,
8141 TNode<RawPtrT> sink,
8142 TNode<Int32T> start,
8143 TNode<Int32T> length) {
8144 TNode<ExternalReference> function =
8153 TNode<RawPtr<Uint8T>> CodeStubAssembler::ExternalOneByteStringGetChars(
8154 TNode<ExternalOneByteString> string) {
8155 TNode<ExternalReference> function =
8162 TNode<RawPtr<Uint16T>> CodeStubAssembler::ExternalTwoByteStringGetChars(
8163 TNode<ExternalTwoByteString> string) {
8164 TNode<ExternalReference> function =
8171 TNode<RawPtr<Uint8T>> CodeStubAssembler::IntlAsciiCollationWeightsL1() {
8173 TNode<RawPtrT> ptr =
8180 TNode<RawPtr<Uint8T>> CodeStubAssembler::IntlAsciiCollationWeightsL3() {
8182 TNode<RawPtrT> ptr =
8191 TNode<String> string, Label* if_index, TVariable<IntPtrT>* var_index,
8194 TNode<ExternalReference> function = ExternalConstant(
8196 const TNode<ExternalReference> isolate_ptr =
8198 TNode<Object> result =
8204 TNode<IntPtrT> word_result = SmiUntag(CAST(result));
8218 TNode<IntPtrT> CodeStubAssembler::EntryToIndex(TNode<IntPtrT> entry,
8220 TNode<IntPtrT> entry_index =
8227 TNode<T> CodeStubAssembler::LoadDescriptorArrayElement(
8228 TNode<DescriptorArray> object, TNode<IntPtrT> index,
8234 TNode<Name> CodeStubAssembler::LoadKeyByKeyIndex(
8235 TNode<DescriptorArray> container, TNode<IntPtrT> key_index) {
8239 TNode<Uint32T> CodeStubAssembler::LoadDetailsByKeyIndex(
8240 TNode<DescriptorArray> container, TNode<IntPtrT> key_index) {
8247 TNode<Object> CodeStubAssembler::LoadValueByKeyIndex(
8248 TNode<DescriptorArray> container, TNode<IntPtrT> key_index) {
8255 TNode<MaybeObject> CodeStubAssembler::LoadFieldTypeByKeyIndex(
8256 TNode<DescriptorArray> container, TNode<IntPtrT> key_index) {
8263 TNode<IntPtrT> CodeStubAssembler::DescriptorEntryToIndex(
8264 TNode<IntPtrT> descriptor_entry) {
8269 TNode<Name> CodeStubAssembler::LoadKeyByDescriptorEntry(
8270 TNode<DescriptorArray> container, TNode<IntPtrT> descriptor_entry) {
8276 TNode<Name> CodeStubAssembler::LoadKeyByDescriptorEntry(
8277 TNode<DescriptorArray> container, int descriptor_entry) {
8283 TNode<Uint32T> CodeStubAssembler::LoadDetailsByDescriptorEntry(
8284 TNode<DescriptorArray> container, TNode<IntPtrT> descriptor_entry) {
8291 TNode<Uint32T> CodeStubAssembler::LoadDetailsByDescriptorEntry(
8292 TNode<DescriptorArray> container, int descriptor_entry) {
8298 TNode<Object> CodeStubAssembler::LoadValueByDescriptorEntry(
8299 TNode<DescriptorArray> container, TNode<IntPtrT> descriptor_entry) {
8305 TNode<Object> CodeStubAssembler::LoadValueByDescriptorEntry(
8306 TNode<DescriptorArray> container, int descriptor_entry) {
8312 TNode<MaybeObject> CodeStubAssembler::LoadFieldTypeByDescriptorEntry(
8313 TNode<DescriptorArray> container, TNode<IntPtrT> descriptor_entry) {
8322 TNode<Object> CodeStubAssembler::LoadValueByKeyIndex(
8323 TNode<ContainerType> container, TNode<IntPtrT> key_index) {
8333 V8_EXPORT_PRIVATE TNode<Object> CodeStubAssembler::LoadValueByKeyIndex(
8334 TNode<SwissNameDictionary> container, TNode<IntPtrT> key_index) {
8335 TNode<IntPtrT> offset_minus_tag = SwissNameDictionaryOffsetIntoDataTableMT(
8342 TNode<Uint32T> CodeStubAssembler::LoadDetailsByKeyIndex(
8343 TNode<ContainerType> container, TNode<IntPtrT> key_index) {
8354 V8_EXPORT_PRIVATE TNode<Uint32T> CodeStubAssembler::LoadDetailsByKeyIndex(
8355 TNode<SwissNameDictionary> container, TNode<IntPtrT> key_index) {
8356 TNode<IntPtrT> capacity =
8364 void CodeStubAssembler::StoreDetailsByKeyIndex(TNode<ContainerType> container,
8365 TNode<IntPtrT> key_index,
8366 TNode<Smi> details) {
8375 TNode<SwissNameDictionary> container, TNode<IntPtrT> key_index,
8376 TNode<Smi> details) {
8377 TNode<IntPtrT> capacity =
8379 TNode<Uint8T> details_byte = UncheckedCast<Uint8T>(SmiToInt32(details));
8386 void CodeStubAssembler::StoreValueByKeyIndex(TNode<ContainerType> container,
8387 TNode<IntPtrT> key_index,
8388 TNode<Object> value,
8399 TNode<SwissNameDictionary> container, TNode<IntPtrT> key_index,
8400 TNode<Object> value, WriteBarrierMode write_barrier) {
8401 TNode<IntPtrT> offset_minus_tag = SwissNameDictionaryOffsetIntoDataTableMT(
8421 template V8_EXPORT_PRIVATE TNode<IntPtrT>
8422 CodeStubAssembler::EntryToIndex<NameDictionary>(TNode<IntPtrT>, int);
8423 template V8_EXPORT_PRIVATE TNode<IntPtrT>
8424 CodeStubAssembler::EntryToIndex<GlobalDictionary>(TNode<IntPtrT>, int);
8425 template V8_EXPORT_PRIVATE TNode<IntPtrT>
8426 CodeStubAssembler::EntryToIndex<NumberDictionary>(TNode<IntPtrT>, int);
8428 template TNode<Object> CodeStubAssembler::LoadValueByKeyIndex(
8429 TNode<NameDictionary> container, TNode<IntPtrT> key_index);
8430 template TNode<Object> CodeStubAssembler::LoadValueByKeyIndex(
8431 TNode<GlobalDictionary> container, TNode<IntPtrT> key_index);
8432 template TNode<Uint32T> CodeStubAssembler::LoadDetailsByKeyIndex(
8433 TNode<NameDictionary> container, TNode<IntPtrT> key_index);
8435 TNode<NameDictionary> container, TNode<IntPtrT> key_index,
8436 TNode<Smi> details);
8438 TNode<NameDictionary> container, TNode<IntPtrT> key_index,
8439 TNode<Object> value, WriteBarrierMode write_barrier);
8442 TNode<IntPtrT> CodeStubAssembler::HashTableComputeCapacity(
8443 TNode<IntPtrT> at_least_space_for) {
8444 TNode<IntPtrT> capacity = IntPtrRoundUpToPowerOfTwo32(
8449 TNode<IntPtrT> CodeStubAssembler::IntPtrMax(TNode<IntPtrT> left,
8450 TNode<IntPtrT> right) {
8461 TNode<IntPtrT> CodeStubAssembler::IntPtrMin(TNode<IntPtrT> left,
8462 TNode<IntPtrT> right) {
8473 TNode<UintPtrT> CodeStubAssembler::UintPtrMin(TNode<UintPtrT> left,
8474 TNode<UintPtrT> right) {
8487 TNode<HeapObject> CodeStubAssembler::LoadName<NameDictionary>(
8488 TNode<HeapObject> key) {
8494 TNode<HeapObject> CodeStubAssembler::LoadName<GlobalDictionary>(
8495 TNode<HeapObject> key) {
8496 TNode<PropertyCell> property_cell = CAST(key);
8501 TNode<HeapObject> CodeStubAssembler::LoadName<NameToIndexHashTable>(
8502 TNode<HeapObject> key) {
8508 TNode<IntPtrT> CodeStubAssembler::NameToIndexHashTableLookup(
8509 TNode<NameToIndexHashTable> table, TNode<Name> name, Label* not_found) {
8516 TNode<Smi> value =
8523 TNode<Dictionary> dictionary, TNode<Name> unique_name, Label* if_found,
8534 TNode<IntPtrT> capacity = SmiUntag(GetCapacity<Dictionary>(dictionary));
8535 TNode<IntPtrT> mask = IntPtrSub(capacity, IntPtrConstant(1));
8536 TNode<UintPtrT> hash = ChangeUint32ToWord(LoadNameHash(unique_name));
8539 TNode<IntPtrT> count = IntPtrConstant(0);
8540 TNode<IntPtrT> initial_entry = Signed(WordAnd(hash, mask));
8541 TNode<Oddball> undefined = UndefinedConstant();
8553 TNode<IntPtrT> entry = var_entry.value();
8555 TNode<IntPtrT> index = EntryToIndex<Dictionary>(entry);
8558 TNode<HeapObject> current =
8585 CodeStubAssembler::NameDictionaryLookup<NameDictionary>(TNode<NameDictionary>,
8586 TNode<Name>, Label*,
8590 GlobalDictionary>(TNode<GlobalDictionary>, TNode<Name>, Label*,
8593 TNode<Word32T> CodeStubAssembler::ComputeSeededHash(TNode<IntPtrT> key) {
8594 const TNode<ExternalReference> function_addr =
8596 const TNode<ExternalReference> isolate_ptr =
8610 TNode<SwissNameDictionary> dictionary, TNode<Name> unique_name,
8618 TNode<NumberDictionary> dictionary, TNode<IntPtrT> intptr_index,
8624 TNode<IntPtrT> capacity = SmiUntag(GetCapacity<NumberDictionary>(dictionary));
8625 TNode<IntPtrT> mask = IntPtrSub(capacity, IntPtrConstant(1));
8627 TNode<UintPtrT> hash = ChangeUint32ToWord(ComputeSeededHash(intptr_index));
8628 TNode<Float64T> key_as_float64 = RoundIntPtrToFloat64(intptr_index);
8631 TNode<IntPtrT> count = IntPtrConstant(0);
8632 TNode<IntPtrT> initial_entry = Signed(WordAnd(hash, mask));
8634 TNode<Oddball> undefined = UndefinedConstant();
8635 TNode<Oddball> the_hole = TheHoleConstant();
8643 TNode<IntPtrT> entry = var_entry->value();
8645 TNode<IntPtrT> index = EntryToIndex<NumberDictionary>(entry);
8646 TNode<Object> current = UnsafeLoadFixedArrayElement(dictionary, index);
8654 TNode<IntPtrT> current_value = SmiUntag(CAST(current));
8661 TNode<Float64T> current_value = LoadHeapNumberValue(CAST(current));
8677 TNode<Object> CodeStubAssembler::BasicLoadNumberDictionaryElement(
8678 TNode<NumberDictionary> dictionary, TNode<IntPtrT> intptr_index,
8687 TNode<IntPtrT> index = EntryToIndex<NumberDictionary>(var_entry.value());
8688 TNode<Uint32T> details = LoadDetailsByKeyIndex(dictionary, index);
8689 TNode<Uint32T> kind = DecodeWord32<PropertyDetails::KindField>(details);
8699 void CodeStubAssembler::FindInsertionEntry(TNode<Dictionary> dictionary,
8700 TNode<Name> key,
8707 TNode<NameDictionary> dictionary, TNode<Name> key,
8716 void CodeStubAssembler::InsertEntry(TNode<Dictionary> dictionary,
8717 TNode<Name> key, TNode<Object> value,
8718 TNode<IntPtrT> index,
8719 TNode<Smi> enum_index) {
8725 TNode<NameDictionary> dictionary, TNode<Name> name, TNode<Object> value,
8726 TNode<IntPtrT> index, TNode<Smi> enum_index) {
8751 TNode<Smi> dont_enum =
8764 TNode<GlobalDictionary> dictionary, TNode<Name> key, TNode<Object> value,
8765 TNode<IntPtrT> index, TNode<Smi> enum_index) {
8770 void CodeStubAssembler::Add(TNode<Dictionary> dictionary, TNode<Name> key,
8771 TNode<Object> value, Label* bailout) {
8773 TNode<Smi> capacity = GetCapacity<Dictionary>(dictionary);
8774 TNode<Smi> nof = GetNumberOfElements<Dictionary>(dictionary);
8775 TNode<Smi> new_nof = SmiAdd(nof, SmiConstant(1));
8779 TNode<Smi> required_capacity_pseudo_smi = SmiAdd(new_nof, SmiShr(new_nof, 1));
8782 TNode<Smi> deleted = GetNumberOfDeletedElements<Dictionary>(dictionary);
8784 TNode<Smi> half_of_free_elements = SmiShr(SmiSub(capacity, new_nof), 1);
8787 TNode<Smi> enum_index = GetNextEnumerationIndex<Dictionary>(dictionary);
8788 TNode<Smi> new_enum_index = SmiAdd(enum_index, SmiConstant(1));
8789 TNode<Smi> max_enum_index =
8806 void CodeStubAssembler::Add(TNode<SwissNameDictionary> dictionary,
8807 TNode<Name> key, TNode<Object> value,
8814 TNode<Uint8T> details_byte_enum =
8816 TNode<Uint8T> details_byte_dont_enum =
8830 template void CodeStubAssembler::Add<NameDictionary>(TNode<NameDictionary>,
8831 TNode<Name>, TNode<Object>,
8835 TNode<Smi> CodeStubAssembler::GetNumberOfElements(
8836 TNode<Dictionary> dictionary) {
8842 TNode<Smi> CodeStubAssembler::GetNumberOfElements(
8843 TNode<SwissNameDictionary> dictionary) {
8844 TNode<IntPtrT> capacity =
8850 template TNode<Smi> CodeStubAssembler::GetNumberOfElements(
8851 TNode<NameDictionary> dictionary);
8852 template TNode<Smi> CodeStubAssembler::GetNumberOfElements(
8853 TNode<NumberDictionary> dictionary);
8854 template TNode<Smi> CodeStubAssembler::GetNumberOfElements(
8855 TNode<GlobalDictionary> dictionary);
8858 void CodeStubAssembler::LookupLinear(TNode<Name> unique_name,
8859 TNode<Array> array,
8860 TNode<Uint32T> number_of_valid_entries,
8870 TNode<IntPtrT> first_inclusive = IntPtrConstant(Array::ToKeyIndex(0));
8871 TNode<IntPtrT> factor = IntPtrConstant(Array::kEntrySize);
8872 TNode<IntPtrT> last_exclusive = IntPtrAdd(
8878 [=](TNode<IntPtrT> name_index) {
8879 TNode<MaybeObject> element =
8881 TNode<Name> candidate_name = CAST(element);
8890 TNode<Uint32T> CodeStubAssembler::NumberOfEntries<DescriptorArray>(
8891 TNode<DescriptorArray> descriptors) {
8896 TNode<Uint32T> CodeStubAssembler::NumberOfEntries<TransitionArray>(
8897 TNode<TransitionArray> transitions) {
8898 TNode<IntPtrT> length = LoadAndUntagWeakFixedArrayLength(transitions);
8910 TNode<IntPtrT> CodeStubAssembler::EntryIndexToIndex(
8911 TNode<Uint32T> entry_index) {
8912 TNode<Int32T> entry_size = Int32Constant(Array::kEntrySize);
8913 TNode<Word32T> index = Int32Mul(entry_index, entry_size);
8918 TNode<IntPtrT> CodeStubAssembler::ToKeyIndex(TNode<Uint32T> entry_index) {
8923 template TNode<IntPtrT> CodeStubAssembler::ToKeyIndex<DescriptorArray>(
8924 TNode<Uint32T>);
8925 template TNode<IntPtrT> CodeStubAssembler::ToKeyIndex<TransitionArray>(
8926 TNode<Uint32T>);
8929 TNode<Uint32T> CodeStubAssembler::GetSortedKeyIndex<DescriptorArray>(
8930 TNode<DescriptorArray> descriptors, TNode<Uint32T> descriptor_number) {
8931 TNode<Uint32T> details =
8937 TNode<Uint32T> CodeStubAssembler::GetSortedKeyIndex<TransitionArray>(
8938 TNode<TransitionArray> transitions, TNode<Uint32T> transition_number) {
8943 TNode<Name> CodeStubAssembler::GetKey(TNode<Array> array,
8944 TNode<Uint32T> entry_index) {
8949 TNode<MaybeObject> element =
8955 template TNode<Name> CodeStubAssembler::GetKey<DescriptorArray>(
8956 TNode<DescriptorArray>, TNode<Uint32T>);
8957 template TNode<Name> CodeStubAssembler::GetKey<TransitionArray>(
8958 TNode<TransitionArray>, TNode<Uint32T>);
8960 TNode<Uint32T> CodeStubAssembler::DescriptorArrayGetDetails(
8961 TNode<DescriptorArray> descriptors, TNode<Uint32T> descriptor_number) {
8969 void CodeStubAssembler::LookupBinary(TNode<Name> unique_name,
8970 TNode<Array> array,
8971 TNode<Uint32T> number_of_valid_entries,
8977 TNode<Uint32T> limit =
8980 TNode<Uint32T> hash = LoadNameHashAssumeComputed(unique_name);
8991 TNode<Uint32T> mid = Unsigned(
8995 TNode<Uint32T> sorted_key_index = GetSortedKeyIndex<Array>(array, mid);
8996 TNode<Name> mid_name = GetKey<Array>(array, sorted_key_index);
8998 TNode<Uint32T> mid_hash = LoadNameHashAssumeComputed(mid_name);
9022 TNode<Uint32T> sort_index =
9024 TNode<Name> current_name = GetKey<Array>(array, sort_index);
9025 TNode<Uint32T> current_hash = LoadNameHashAssumeComputed(current_name);
9041 TNode<Context> context, TNode<Map> map, TNode<JSObject> object,
9044 TNode<Uint16T> type = LoadMapInstanceType(map);
9045 TNode<Uint32T> bit_field3 = EnsureOnlyHasSimpleProperties(map, type, bailout);
9048 TNode<Uint32T> nof_descriptors =
9073 [&](TNode<IntPtrT> descriptor_key_index) {
9074 TNode<Name> next_key =
9148 TNode<DescriptorArray> descriptors = CAST(var_meta_storage.value());
9149 TNode<IntPtrT> name_index = var_entry.value();
9164 TNode<PropertyDictionary> dictionary =
9166 TNode<IntPtrT> entry = var_entry.value();
9168 TNode<Uint32T> details = LoadDetailsByKeyIndex(dictionary, entry);
9229 TNode<Object> CodeStubAssembler::GetConstructor(TNode<Map> map) {
9249 TNode<NativeContext> CodeStubAssembler::GetCreationContext(
9250 TNode<JSReceiver> receiver, Label* if_bailout) {
9251 TNode<Map> receiver_map = LoadMap(receiver);
9252 TNode<Object> constructor = GetConstructor(receiver_map);
9259 TNode<Map> function_map = LoadMap(CAST(constructor));
9282 TNode<Context> context = LoadJSFunctionContext(var_function.value());
9286 TNode<NativeContext> native_context = LoadNativeContext(context);
9290 TNode<NativeContext> CodeStubAssembler::GetFunctionRealm(
9291 TNode<Context> context, TNode<JSReceiver> receiver, Label* if_bailout) {
9302 TNode<JSReceiver> current_value = current.value();
9312 TNode<JSProxy> proxy = CAST(current.value());
9313 TNode<HeapObject> handler =
9317 TNode<JSReceiver> target =
9328 TNode<JSBoundFunction> bound_function = CAST(current.value());
9329 TNode<JSReceiver> target = CAST(LoadObjectField(
9337 TNode<JSWrappedFunction> wrapped_function = CAST(current.value());
9338 TNode<JSReceiver> target = CAST(LoadObjectField(
9346 TNode<JSFunction> function = CAST(current.value());
9347 TNode<Context> context =
9349 TNode<NativeContext> native_context = LoadNativeContext(context);
9354 void CodeStubAssembler::DescriptorLookup(TNode<Name> unique_name,
9355 TNode<DescriptorArray> descriptors,
9356 TNode<Uint32T> bitfield3,
9361 TNode<Uint32T> nof =
9367 void CodeStubAssembler::TransitionLookup(TNode<Name> unique_name,
9368 TNode<TransitionArray> transitions,
9373 TNode<Uint32T> number_of_valid_transitions =
9380 void CodeStubAssembler::Lookup(TNode<Name> unique_name, TNode<Array> array,
9381 TNode<Uint32T> number_of_valid_entries,
9408 TNode<JSObject> object, TNode<Map> map, TNode<Name> unique_name,
9415 TNode<Uint32T> bit_field3 = LoadMapBitField3(map);
9421 TNode<DescriptorArray> descriptors = LoadMapDescriptors(map);
9429 TNode<PropertyDictionary> dictionary = CAST(LoadSlowProperties(object));
9438 TNode<HeapObject> object, TNode<Map> map, TNode<Int32T> instance_type,
9439 TNode<Name> unique_name, Label* if_found_fast, Label* if_found_dict,
9457 TNode<Int32T> bit_field = LoadMapBitField(map);
9462 TNode<GlobalDictionary> dictionary = CAST(LoadSlowProperties(CAST(object)));
9470 void CodeStubAssembler::TryHasOwnProperty(TNode<HeapObject> object,
9471 TNode<Map> map,
9472 TNode<Int32T> instance_type,
9473 TNode<Name> unique_name,
9498 TNode<Object> CodeStubAssembler::GetMethod(TNode<Context> context,
9499 TNode<Object> object,
9502 TNode<Object> method = GetProperty(context, object, name);
9510 TNode<Object> CodeStubAssembler::GetIteratorMethod(
9511 TNode<Context> context, TNode<HeapObject> heap_obj,
9517 TNode<Object> CodeStubAssembler::CreateAsyncFromSyncIterator(
9518 TNode<Context> context, TNode<Object> sync_iterator) {
9526 const TNode<Object> next =
9529 const TNode<NativeContext> native_context = LoadNativeContext(context);
9530 const TNode<Map> map = CAST(LoadContextElement(
9532 const TNode<JSObject> iterator = AllocateJSObjectFromMap(map);
9555 TNode<HeapObject> object, TNode<Map> map,
9556 TNode<DescriptorArray> descriptors, TNode<IntPtrT> name_index,
9558 TNode<Uint32T> details = LoadDetailsByKeyIndex(descriptors, name_index);
9566 TNode<HeapObject> object, TNode<Map> map,
9567 TNode<DescriptorArray> descriptors, TNode<IntPtrT> name_index,
9568 TNode<Uint32T> details, TVariable<Object>* var_value) {
9571 TNode<Uint32T> location =
9580 TNode<IntPtrT> field_index =
9582 TNode<Uint32T> representation =
9590 TNode<IntPtrT> instance_size_in_words = LoadMapInstanceSizeInWords(map);
9600 TNode<IntPtrT> field_offset = TimesTaggedSize(field_index);
9613 TNode<HeapNumber> heap_number =
9622 TNode<HeapObject> properties = LoadFastProperties(CAST(object));
9624 TNode<Object> value =
9645 TNode<HeapNumber> heap_number =
9663 TNode<Dictionary> dictionary, TNode<IntPtrT> name_index,
9673 TNode<GlobalDictionary> dictionary, TNode<IntPtrT> name_index,
9677 TNode<PropertyCell> property_cell =
9680 TNode<Object> value =
9686 TNode<Uint32T> details = Unsigned(LoadAndUntagToWord32ObjectField(
9694 TNode<NameDictionary> dictionary, TNode<IntPtrT> name_index,
9698 TNode<SwissNameDictionary> dictionary, TNode<IntPtrT> name_index,
9705 TNode<Object> CodeStubAssembler::CallGetterIfAccessor(
9706 TNode<Object> value, TNode<HeapObject> holder, TNode<Uint32T> details,
9707 TNode<Context> context, TNode<Object> receiver, TNode<Object> name,
9712 TNode<Uint32T> kind = DecodeWord32<PropertyDetails::KindField>(details);
9725 TNode<AccessorPair> accessor_pair = CAST(value);
9726 TNode<HeapObject> getter =
9728 TNode<Map> getter_map = LoadMap(getter);
9750 TNode<HeapObject> cached_property_name = LoadObjectField<HeapObject>(
9758 TNode<NativeContext> creation_context =
9790 TNode<AccessorInfo> accessor_info = CAST(value);
9794 TNode<Map> holder_map = LoadMap(holder);
9795 TNode<Uint16T> holder_instance_type = LoadMapInstanceType(holder_map);
9808 TNode<JSArray> array = CAST(holder);
9821 TNode<JSFunction> function = CAST(holder);
9835 TNode<Object> holder_value = LoadJSPrimitiveWrapperValue(CAST(holder));
9848 TNode<Context> context, TNode<Object> receiver, TNode<JSReceiver> object,
9849 TNode<Map> map, TNode<Int32T> instance_type, TNode<Name> unique_name,
9858 TNode<Context> context, TNode<Object> receiver, TNode<JSReceiver> object,
9859 TNode<Map> map, TNode<Int32T> instance_type, TNode<Name> unique_name,
9882 TNode<DescriptorArray> descriptors = CAST(var_meta_storage.value());
9883 TNode<IntPtrT> name_index = var_entry.value();
9891 TNode<PropertyDictionary> dictionary = CAST(var_meta_storage.value());
9892 TNode<IntPtrT> entry = var_entry.value();
9899 TNode<GlobalDictionary> dictionary = CAST(var_meta_storage.value());
9900 TNode<IntPtrT> entry = var_entry.value();
9913 TNode<Object> value =
9922 TNode<HeapObject> object, TNode<Map> map, TNode<Int32T> instance_type,
9923 TNode<IntPtrT> intptr_index, Label* if_found, Label* if_absent,
9928 TNode<Int32T> elements_kind = LoadMapElementsKind(map);
10014 TNode<FixedArray> elements = CAST(LoadElements(CAST(object)));
10015 TNode<IntPtrT> length = LoadAndUntagFixedArrayBaseLength(elements);
10019 TNode<Object> element = UnsafeLoadFixedArrayElement(elements, intptr_index);
10020 TNode<Oddball> the_hole = TheHoleConstant();
10025 TNode<FixedArrayBase> elements = LoadElements(CAST(object));
10026 TNode<IntPtrT> length = LoadAndUntagFixedArrayBaseLength(elements);
10047 TNode<NumberDictionary> elements = CAST(LoadElements(CAST(object)));
10053 TNode<String> string = CAST(LoadJSPrimitiveWrapperValue(CAST(object)));
10054 TNode<IntPtrT> length = LoadStringLengthAsWord(string);
10060 TNode<String> string = CAST(LoadJSPrimitiveWrapperValue(CAST(object)));
10061 TNode<IntPtrT> length = LoadStringLengthAsWord(string);
10067 TNode<JSArrayBuffer> buffer = LoadJSArrayBufferViewBuffer(CAST(object));
10070 TNode<UintPtrT> length = LoadJSTypedArrayLength(CAST(object));
10075 TNode<JSArrayBuffer> buffer = LoadJSArrayBufferViewBuffer(CAST(object));
10076 TNode<UintPtrT> length =
10095 void CodeStubAssembler::BranchIfMaybeSpecialIndex(TNode<String> name_string,
10103 TNode<Smi> string_length = LoadStringLengthAsSmi(name_string);
10110 TNode<Int32T> first_char = StringCharCodeAt(name_string, UintPtrConstant(0));
10125 TNode<Object> receiver, TNode<Object> object_arg, TNode<Object> key,
10131 TNode<HeapObject> object = CAST(object_arg);
10133 TNode<Map> map = LoadMap(object);
10134 TNode<Uint16T> instance_type = LoadMapInstanceType(map);
10161 TNode<Map> holder_map = var_holder_map.value();
10162 TNode<Int32T> holder_instance_type = var_holder_instance_type.value();
10186 TNode<HeapObject> proto = LoadMapPrototype(holder_map);
10190 TNode<Map> proto_map = LoadMap(proto);
10191 TNode<Uint16T> proto_instance_type = LoadMapInstanceType(proto_map);
10216 TNode<HeapObject> proto = LoadMapPrototype(var_holder_map.value());
10220 TNode<Map> proto_map = LoadMap(proto);
10221 TNode<Uint16T> proto_instance_type = LoadMapInstanceType(proto_map);
10231 TNode<Oddball> CodeStubAssembler::HasInPrototypeChain(TNode<Context> context,
10232 TNode<HeapObject> object,
10233 TNode<Object> prototype) {
10246 TNode<Map> object_map = var_object_map.value();
10247 TNode<Uint16T> object_instance_type = LoadMapInstanceType(object_map);
10256 TNode<Int32T> object_bitfield = LoadMapBitField(object_map);
10265 TNode<HeapObject> object_prototype = LoadMapPrototype(object_map);
10295 TNode<Oddball> CodeStubAssembler::OrdinaryHasInstance(
10296 TNode<Context> context, TNode<Object> callable_maybe_smi,
10297 TNode<Object> object_maybe_smi) {
10311 TNode<HeapObject> object = CAST(object_maybe_smi);
10312 TNode<HeapObject> callable = CAST(callable_maybe_smi);
10313 TNode<Map> callable_map = LoadMap(callable);
10316 TNode<Uint16T> callable_instance_type = LoadMapInstanceType(callable_map);
10324 TNode<HeapObject> callable_prototype = LoadObjectField<HeapObject>(
10364 TNode<IntPtrT> CodeStubAssembler::ElementOffsetFromIndex(
10365 TNode<TIndex> index_node, ElementsKind kind, int base_size) {
10375 TNode<IntPtrT> intptr_index_node;
10378 TNode<Smi> smi_index_node = ReinterpretCast<Smi>(index_node);
10392 TNode<TaggedIndex> tagged_index_node =
10405 TNode<IntPtrT> shifted_index =
10417 template V8_EXPORT_PRIVATE TNode<IntPtrT>
10418 CodeStubAssembler::ElementOffsetFromIndex<Smi>(TNode<Smi> index_node,
10421 template V8_EXPORT_PRIVATE TNode<IntPtrT>
10423 TNode<TaggedIndex> index_node, ElementsKind kind, int base_size);
10424 template V8_EXPORT_PRIVATE TNode<IntPtrT>
10425 CodeStubAssembler::ElementOffsetFromIndex<IntPtrT>(TNode<IntPtrT> index_node,
10429 TNode<BoolT> CodeStubAssembler::IsOffsetInBounds(TNode<IntPtrT> offset,
10430 TNode<IntPtrT> length,
10436 TNode<IntPtrT> last_offset = ElementOffsetFromIndex(length, kind, correction);
10440 TNode<HeapObject> CodeStubAssembler::LoadFeedbackCellValue(
10441 TNode<JSFunction> closure) {
10442 TNode<FeedbackCell> feedback_cell =
10447 TNode<HeapObject> CodeStubAssembler::LoadFeedbackVector(
10448 TNode<JSFunction> closure) {
10465 TNode<ClosureFeedbackCellArray> CodeStubAssembler::LoadClosureFeedbackArray(
10466 TNode<JSFunction> closure) {
10477 TNode<FeedbackVector> vector = CAST(feedback_cell_array.value());
10486 TNode<FeedbackVector> CodeStubAssembler::LoadFeedbackVectorForStub() {
10487 TNode<JSFunction> function =
10492 TNode<FeedbackVector> CodeStubAssembler::LoadFeedbackVectorFromBaseline() {
10497 TNode<Context> CodeStubAssembler::LoadContextFromBaseline() {
10501 TNode<FeedbackVector>
10503 TNode<RawPtrT> frame_pointer = LoadParentFramePointer();
10504 TNode<RawPtrT> parent_frame_pointer = Load<RawPtrT>(frame_pointer);
10505 TNode<JSFunction> function = CAST(
10511 void CodeStubAssembler::UpdateFeedback(TNode<Smi> feedback,
10512 TNode<HeapObject> maybe_feedback_vector,
10513 TNode<UintPtrT> slot_id,
10526 void CodeStubAssembler::MaybeUpdateFeedback(TNode<Smi> feedback,
10527 TNode<HeapObject> maybe_vector,
10528 TNode<UintPtrT> slot_id) {
10538 void CodeStubAssembler::UpdateFeedback(TNode<Smi> feedback,
10539 TNode<FeedbackVector> feedback_vector,
10540 TNode<UintPtrT> slot_id) {
10546 TNode<MaybeObject> feedback_element =
10548 TNode<Smi> previous_feedback = CAST(feedback_element);
10549 TNode<Smi> combined_feedback = SmiOr(previous_feedback, feedback);
10563 TNode<FeedbackVector> feedback_vector, TNode<UintPtrT> slot_id,
10590 TNode<Smi> feedback) {
10595 void CodeStubAssembler::CheckForAssociatedProtector(TNode<Name> name,
10609 TNode<Map> CodeStubAssembler::LoadReceiverMap(TNode<Object> receiver) {
10615 TNode<IntPtrT> CodeStubAssembler::TryToIntptr(
10616 TNode<Object> key, Label* if_not_intptr,
10622 TNode<Int32T> instance_type = LoadInstanceType(CAST(key));
10638 TNode<Float64T> value = LoadHeapNumberValue(CAST(key));
10639 TNode<IntPtrT> int_value = ChangeFloat64ToIntPtr(value);
10662 TNode<Context> CodeStubAssembler::LoadScriptContext(
10663 TNode<Context> context, TNode<IntPtrT> context_index) {
10664 TNode<NativeContext> native_context = LoadNativeContext(context);
10665 TNode<ScriptContextTable> script_context_table = CAST(
10668 TNode<Context> script_context = CAST(LoadFixedArrayElement(
10704 void CodeStubAssembler::StoreElementTypedArrayBigInt(TNode<RawPtrT> elements,
10706 TNode<TIndex> index,
10707 TNode<BigInt> value) {
10712 TNode<IntPtrT> offset = ElementOffsetFromIndex(index, kind, 0);
10739 void CodeStubAssembler::StoreElementTypedArray(TNode<RawPtrT> elements,
10741 TNode<UintPtrT> index,
10742 TNode<BigInt> value) {
10747 void CodeStubAssembler::StoreElementTypedArray(TNode<RawPtrT> elements,
10749 TNode<IntPtrT> index,
10750 TNode<BigInt> value) {
10755 void CodeStubAssembler::StoreElementTypedArrayWord32(TNode<RawPtrT> elements,
10757 TNode<TIndex> index,
10758 TNode<Word32T> value) {
10766 TNode<IntPtrT> offset = ElementOffsetFromIndex(index, kind, 0);
10773 void CodeStubAssembler::StoreElementTypedArray(TNode<RawPtrT> elements,
10775 TNode<UintPtrT> index,
10776 TNode<Word32T> value) {
10781 void CodeStubAssembler::StoreElementTypedArray(TNode<RawPtrT> elements,
10783 TNode<IntPtrT> index,
10784 TNode<Word32T> value) {
10789 void CodeStubAssembler::StoreElementTypedArray(TNode<TArray> elements,
10791 TNode<TIndex> index,
10792 TNode<TValue> value) {
10808 TNode<IntPtrT> offset = ElementOffsetFromIndex(index, kind, 0);
10815 void CodeStubAssembler::StoreElement(TNode<FixedArrayBase> elements,
10816 ElementsKind kind, TNode<TIndex> index,
10817 TNode<Object> value) {
10825 TNode<Smi> smi_value = CAST(value);
10833 void CodeStubAssembler::StoreElement(TNode<FixedArrayBase> elements,
10834 ElementsKind kind, TNode<TIndex> index,
10835 TNode<Float64T> value) {
10844 void CodeStubAssembler::StoreElement(TNode<RawPtrT> elements, ElementsKind kind,
10845 TNode<TIndex> index, TNode<TValue> value) {
10862 template V8_EXPORT_PRIVATE void CodeStubAssembler::StoreElement(TNode<RawPtrT>,
10864 TNode<UintPtrT>,
10865 TNode<Int32T>);
10866 template V8_EXPORT_PRIVATE void CodeStubAssembler::StoreElement(TNode<RawPtrT>,
10868 TNode<UintPtrT>,
10869 TNode<Word32T>);
10871 TNode<RawPtrT>, ElementsKind, TNode<UintPtrT>, TNode<Float32T>);
10873 TNode<RawPtrT>, ElementsKind, TNode<UintPtrT>, TNode<Float64T>);
10874 template V8_EXPORT_PRIVATE void CodeStubAssembler::StoreElement(TNode<RawPtrT>,
10876 TNode<UintPtrT>,
10877 TNode<BigInt>);
10879 TNode<Uint8T> CodeStubAssembler::Int32ToUint8Clamped(
10880 TNode<Int32T> int32_value) {
10882 TNode<Int32T> int32_zero = Int32Constant(0);
10883 TNode<Int32T> int32_255 = Int32Constant(255);
10894 TNode<Uint8T> CodeStubAssembler::Float64ToUint8Clamped(
10895 TNode<Float64T> float64_value) {
10902 TNode<Float64T> rounded_value = Float64RoundToEven(float64_value);
10911 TNode<Word32T> CodeStubAssembler::PrepareValueForWriteToTypedArray<Word32T>(
10912 TNode<Object> input, ElementsKind elements_kind, TNode<Context> context) {
10938 TNode<HeapObject> heap_object = CAST(var_input.value());
10947 TNode<Float64T> value =
10959 TNode<Int32T> value = SmiToInt32(CAST(var_input.value()));
10979 TNode<Float32T> CodeStubAssembler::PrepareValueForWriteToTypedArray<Float32T>(
10980 TNode<Object> input, ElementsKind elements_kind, TNode<Context> context) {
10994 TNode<HeapObject> heap_object = CAST(var_input.value());
11003 TNode<Float64T> value =
11011 TNode<Int32T> value = SmiToInt32(CAST(var_input.value()));
11027 TNode<Float64T> CodeStubAssembler::PrepareValueForWriteToTypedArray<Float64T>(
11028 TNode<Object> input, ElementsKind elements_kind, TNode<Context> context) {
11042 TNode<HeapObject> heap_object = CAST(var_input.value());
11058 TNode<Int32T> value = SmiToInt32(CAST(var_input.value()));
11074 TNode<BigInt> CodeStubAssembler::PrepareValueForWriteToTypedArray<BigInt>(
11075 TNode<Object> input, ElementsKind elements_kind, TNode<Context> context) {
11081 void CodeStubAssembler::BigIntToRawBytes(TNode<BigInt> bigint,
11087 TNode<Word32T> bitfield = LoadBigIntBitfield(bigint);
11088 TNode<Uint32T> length = DecodeWord32<BigIntBase::LengthBits>(bitfield);
11089 TNode<Uint32T> sign = DecodeWord32<BigIntBase::SignBits>(bitfield);
11116 TNode<Object> value, ElementsKind elements_kind,
11117 TNode<Word32T> converted_value, TVariable<Object>* maybe_converted_value) {
11142 TNode<Object> value, ElementsKind elements_kind,
11143 TNode<Float32T> converted_value, TVariable<Object>* maybe_converted_value) {
11162 TNode<Object> value, ElementsKind elements_kind,
11163 TNode<Float64T> converted_value, TVariable<Object>* maybe_converted_value) {
11181 TNode<Object> value, ElementsKind elements_kind,
11182 TNode<BigInt> converted_value, TVariable<Object>* maybe_converted_value) {
11188 TNode<JSTypedArray> typed_array, TNode<IntPtrT> key, TNode<Object> value,
11190 TNode<Context> context, TVariable<Object>* maybe_converted_value) {
11201 TNode<TValue> converted_value =
11211 TNode<JSArrayBuffer> buffer = LoadJSArrayBufferViewBuffer(typed_array);
11217 TNode<UintPtrT> length;
11236 TNode<RawPtrT> data_ptr = LoadJSTypedArrayDataPtr(typed_array);
11260 TNode<JSObject> object, TNode<Object> key, TNode<Object> value,
11262 TNode<Context> context, TVariable<Object>* maybe_converted_value) {
11265 TNode<FixedArrayBase> elements = LoadElements(object);
11275 TNode<IntPtrT> intptr_key = TryToIntptr(key, bailout);
11280 TNode<JSTypedArray> typed_array = CAST(object);
11332 base::Optional<TNode<Float64T>> float_value;
11339 TNode<Smi> smi_length = Select<Smi>(
11347 TNode<UintPtrT> length = Unsigned(SmiUntag(smi_length));
11360 TNode<Object> target_value =
11384 TNode<FixedArrayBase> CodeStubAssembler::CheckForCapacityGrow(
11385 TNode<JSObject> object, TNode<FixedArrayBase> elements, ElementsKind kind,
11386 TNode<UintPtrT> length, TNode<IntPtrT> key, Label* bailout) {
11392 TNode<BoolT> condition;
11403 TNode<IntPtrT> current_capacity =
11411 TNode<FixedArrayBase> new_elements = TryGrowElementsCapacity(
11420 TNode<Number> tagged_key = ChangeUintPtrToTagged(Unsigned(key));
11421 TNode<Object> maybe_elements = CallRuntime(
11424 TNode<FixedArrayBase> new_elements = CAST(maybe_elements);
11433 TNode<IntPtrT> new_length = IntPtrAdd(key, IntPtrConstant(1));
11450 TNode<FixedArrayBase> CodeStubAssembler::CopyElementsOnWrite(
11451 TNode<HeapObject> object, TNode<FixedArrayBase> elements, ElementsKind kind,
11452 TNode<IntPtrT> length, Label* bailout) {
11458 TNode<IntPtrT> capacity = SmiUntag(LoadFixedArrayBaseLength(elements));
11459 TNode<FixedArrayBase> new_elements = GrowElementsCapacity(
11469 void CodeStubAssembler::TransitionElementsKind(TNode<JSObject> object,
11470 TNode<Map> map,
11481 TNode<FixedArrayBase> elements = LoadElements(object);
11487 TNode<IntPtrT> elements_length =
11489 TNode<IntPtrT> array_length = Select<IntPtrT>(
11508 void CodeStubAssembler::TrapAllocationMemento(TNode<JSObject> object,
11515 TNode<ExternalReference> new_space_top_address = ExternalConstant(
11522 TNode<IntPtrT> object_word = BitcastTaggedToWord(object);
11525 TNode<IntPtrT> object_page = PageFromAddress(object_word);
11527 TNode<IntPtrT> page_flags =
11542 TNode<IntPtrT> memento_last_word = IntPtrAdd(
11544 TNode<IntPtrT> memento_last_word_page = PageFromAddress(memento_last_word);
11546 TNode<IntPtrT> new_space_top = Load<IntPtrT>(new_space_top_address);
11547 TNode<IntPtrT> new_space_top_page = PageFromAddress(new_space_top);
11570 TNode<AnyTaggedT> maybe_mapword =
11572 TNode<AnyTaggedT> memento_mapword =
11581 TNode<IntPtrT> CodeStubAssembler::PageFromAddress(TNode<IntPtrT> address) {
11586 TNode<AllocationSite> CodeStubAssembler::CreateAllocationSiteInFeedbackVector(
11587 TNode<FeedbackVector> feedback_vector, TNode<UintPtrT> slot) {
11588 TNode<IntPtrT> size = IntPtrConstant(AllocationSite::kSizeWithWeakNext);
11589 TNode<HeapObject> site = Allocate(size, AllocationFlag::kPretenured);
11592 TNode<WordT> field = UpdateWord<AllocationSite::ElementsKindBits>(
11599 TNode<Smi> zero = SmiConstant(0);
11615 TNode<ExternalReference> site_list = ExternalConstant(
11617 TNode<Object> next_site =
11632 TNode<MaybeObject> CodeStubAssembler::StoreWeakReferenceInFeedbackVector(
11633 TNode<FeedbackVector> feedback_vector, TNode<UintPtrT> slot,
11634 TNode<HeapObject> value, int additional_offset) {
11635 TNode<MaybeObject> weak_value = MakeWeak(value);
11641 TNode<BoolT> CodeStubAssembler::HasBoilerplate(
11642 TNode<Object> maybe_literal_site) {
11646 TNode<Smi> CodeStubAssembler::LoadTransitionInfo(
11647 TNode<AllocationSite> allocation_site) {
11648 TNode<Smi> transition_info = CAST(LoadObjectField(
11653 TNode<JSObject> CodeStubAssembler::LoadBoilerplate(
11654 TNode<AllocationSite> allocation_site) {
11655 TNode<JSObject> boilerplate = CAST(LoadObjectField(
11660 TNode<Int32T> CodeStubAssembler::LoadElementsKind(
11661 TNode<AllocationSite> allocation_site) {
11662 TNode<Smi> transition_info = LoadTransitionInfo(allocation_site);
11663 TNode<Int32T> elements_kind =
11671 TNode<TIndex> CodeStubAssembler::BuildFastLoop(const VariableList& vars,
11672 TNode<TIndex> start_index,
11673 TNode<TIndex> end_index,
11689 TNode<BoolT> first_check = IntPtrOrSmiEqual(var.value(), end_index);
11714 template V8_EXPORT_PRIVATE TNode<IntPtrT>
11716 TNode<IntPtrT> start_index,
11717 TNode<IntPtrT> end_index,
11721 template V8_EXPORT_PRIVATE TNode<UintPtrT>
11723 TNode<UintPtrT> start_index,
11724 TNode<UintPtrT> end_index,
11731 TNode<UnionT<UnionT<FixedArray, PropertyArray>, HeapObject>> array,
11732 ElementsKind kind, TNode<TIndex> first_element_inclusive,
11733 TNode<TIndex> last_element_exclusive, const FastArrayForEachBody& body,
11750 TNode<IntPtrT> index = IntPtrConstant(i);
11751 TNode<IntPtrT> offset = ElementOffsetFromIndex(
11757 TNode<IntPtrT> index = IntPtrConstant(i);
11758 TNode<IntPtrT> offset = ElementOffsetFromIndex(
11767 TNode<IntPtrT> start = ElementOffsetFromIndex(
11769 TNode<IntPtrT> limit = ElementOffsetFromIndex(
11775 start, limit, [&](TNode<IntPtrT> offset) { body(array, offset); },
11783 TNode<TIndex> element_count, Label* doesnt_fit, int base_size) {
11788 void CodeStubAssembler::InitializeFieldsWithRoot(TNode<HeapObject> object,
11789 TNode<IntPtrT> start_offset,
11790 TNode<IntPtrT> end_offset,
11795 TNode<AnyTaggedT> root_value;
11803 [=](TNode<IntPtrT> current) {
11811 TNode<Number> left,
11812 TNode<Number> right,
11822 TNode<Smi> smi_left = CAST(left);
11827 TNode<Smi> smi_right = CAST(right);
11906 void CodeStubAssembler::GotoIfNumberGreaterThanOrEqual(TNode<Number> left,
11907 TNode<Number> right,
11933 TNode<Context> CodeStubAssembler::GotoIfHasContextExtensionUpToDepth(
11934 TNode<Context> context, TNode<Uint32T> depth, Label* target) {
11948 TNode<BoolT> has_extension =
11953 TNode<Object> extension_slot =
11972 TNode<Oddball> CodeStubAssembler::RelationalComparison(
11973 Operation op, TNode<Object> left, TNode<Object> right,
12004 TNode<Smi> smi_left = CAST(left);
12009 TNode<Map> right_map = LoadMap(CAST(right));
12011 TNode<Uint16T> right_instance_type = LoadMapInstanceType(right_map);
12017 TNode<Smi> smi_right = CAST(right);
12073 TNode<Map> left_map = LoadMap(CAST(left));
12083 TNode<Uint16T> left_instance_type = LoadMapInstanceType(left_map);
12118 TNode<Map> right_map = LoadMap(CAST(right));
12124 TNode<Uint16T> left_instance_type = LoadMapInstanceType(left_map);
12135 TNode<Uint16T> right_instance_type = LoadMapInstanceType(right_map);
12177 TNode<Uint16T> right_instance_type = LoadMapInstanceType(right_map);
12229 TNode<Uint16T> right_instance_type = LoadMapInstanceType(right_map);
12308 TNode<Uint16T> right_instance_type = LoadMapInstanceType(right_map);
12396 TNode<Smi> CodeStubAssembler::CollectFeedbackForString(
12397 TNode<Int32T> instance_type) {
12398 TNode<Smi> feedback = SelectSmiConstant(
12407 void CodeStubAssembler::GenerateEqual_Same(TNode<Object> value, Label* if_equal,
12417 TNode<HeapObject> value_heapobject = CAST(value);
12418 TNode<Map> value_map = LoadMap(value_heapobject);
12423 TNode<Uint16T> instance_type = LoadMapInstanceType(value_map);
12488 TNode<Float64T> number_value = LoadHeapNumberValue(value_heapobject);
12500 TNode<Oddball> CodeStubAssembler::Equal(TNode<Object> left, TNode<Object> right,
12563 TNode<Map> right_map = LoadMap(CAST(right));
12570 TNode<Uint16T> right_type = LoadMapInstanceType(right_map);
12631 TNode<Map> left_map = LoadMap(CAST(left));
12632 TNode<Map> right_map = LoadMap(CAST(right));
12633 TNode<Uint16T> left_type = LoadMapInstanceType(left_map);
12634 TNode<Uint16T> right_type = LoadMapInstanceType(right_map);
12902 TNode<Map> right_map = LoadMap(CAST(right));
12903 TNode<Uint16T> right_type = LoadMapInstanceType(right_map);
12941 TNode<Oddball> CodeStubAssembler::StrictEqual(
12942 TNode<Object> lhs, TNode<Object> rhs, TVariable<Smi>* var_type_feedback) {
13021 TNode<Map> lhs_map = LoadMap(CAST(lhs));
13036 TNode<Float64T> lhs_value = LoadHeapNumberValue(CAST(lhs));
13037 TNode<Float64T> rhs_value = SmiToFloat64(CAST(rhs));
13047 TNode<HeapObject> rhs_ho = CAST(rhs);
13049 TNode<Map> rhs_map = LoadMap(rhs_ho);
13058 TNode<Float64T> lhs_value = LoadHeapNumberValue(CAST(lhs));
13059 TNode<Float64T> rhs_value = LoadHeapNumberValue(CAST(rhs));
13085 TNode<Uint16T> lhs_instance_type = LoadMapInstanceType(lhs_map);
13095 TNode<Uint16T> rhs_instance_type = LoadInstanceType(CAST(rhs));
13106 TNode<Smi> lhs_feedback =
13108 TNode<Smi> rhs_feedback =
13131 TNode<Uint16T> rhs_instance_type = LoadInstanceType(CAST(rhs));
13155 TNode<Map> rhs_map = LoadMap(CAST(rhs));
13156 TNode<Uint16T> rhs_instance_type = LoadMapInstanceType(rhs_map);
13261 TNode<Map> rhs_map = LoadMap(CAST(rhs));
13270 TNode<Float64T> lhs_value = SmiToFloat64(CAST(lhs));
13271 TNode<Float64T> rhs_value = LoadHeapNumberValue(CAST(rhs));
13281 TNode<Uint16T> rhs_instance_type = LoadMapInstanceType(rhs_map);
13317 void CodeStubAssembler::BranchIfSameValue(TNode<Object> lhs, TNode<Object> rhs,
13364 const TNode<Map> lhs_map = LoadMap(CAST(lhs));
13367 const TNode<Uint16T> lhs_instance_type =
13388 const TNode<Object> result = CallBuiltin(
13396 const TNode<Object> result = CallRuntime(
13406 TNode<Float64T> lhs_value = UncheckedCast<Float64T>(var_lhs_value.value());
13407 TNode<Float64T> rhs_value = UncheckedCast<Float64T>(var_rhs_value.value());
13412 void CodeStubAssembler::BranchIfSameNumberValue(TNode<Float64T> lhs_value,
13413 TNode<Float64T> rhs_value,
13424 const TNode<Uint32T> lhs_hi_word = Float64ExtractHighWord32(lhs_value);
13425 const TNode<Uint32T> rhs_hi_word = Float64ExtractHighWord32(rhs_value);
13440 TNode<Oddball> CodeStubAssembler::HasProperty(TNode<Context> context,
13441 TNode<Object> object,
13442 TNode<Object> key,
13449 TNode<HeapObject> receiver, TNode<HeapObject> holder,
13450 TNode<Map> holder_map, TNode<Int32T> holder_instance_type,
13451 TNode<Name> unique_name, Label* next_holder, Label* if_bailout) {
13458 TNode<HeapObject> receiver, TNode<HeapObject> holder,
13459 TNode<Map> holder_map, TNode<Int32T> holder_instance_type,
13460 TNode<IntPtrT> index, Label* next_holder, Label* if_bailout) {
13474 TNode<Name> name = CAST(CallBuiltin(Builtin::kToName, context, key));
13523 void CodeStubAssembler::ForInPrepare(TNode<HeapObject> enumerator,
13524 TNode<UintPtrT> slot,
13525 TNode<HeapObject> maybe_feedback_vector,
13526 TNode<FixedArray>* cache_array_out,
13527 TNode<Smi>* cache_length_out,
13538 TNode<Map> map_enumerator = CAST(enumerator);
13539 TNode<WordT> enum_length = LoadMapEnumLength(map_enumerator);
13542 TNode<DescriptorArray> descriptors = LoadMapDescriptors(map_enumerator);
13543 TNode<EnumCache> enum_cache = LoadObjectField<EnumCache>(
13545 TNode<FixedArray> enum_keys =
13549 TNode<FixedArray> enum_indices =
13551 TNode<IntPtrT> enum_indices_length =
13553 TNode<Smi> feedback = SelectSmiConstant(
13567 TNode<FixedArray> array_enumerator = CAST(enumerator);
13583 TNode<String> CodeStubAssembler::Typeof(TNode<Object> value) {
13592 TNode<HeapObject> value_heap_object = CAST(value);
13593 TNode<Map> map = LoadMap(value_heap_object);
13597 TNode<Uint16T> instance_type = LoadMapInstanceType(map);
13601 TNode<Int32T> callable_or_undetectable_mask =
13631 TNode<String> type =
13671 TNode<HeapObject> CodeStubAssembler::GetSuperConstructor(
13672 TNode<JSFunction> active_function) {
13673 TNode<Map> map = LoadMap(active_function);
13677 TNode<JSReceiver> CodeStubAssembler::SpeciesConstructor(
13678 TNode<Context> context, TNode<Object> object,
13679 TNode<JSReceiver> default_constructor) {
13684 TNode<Object> constructor =
13696 TNode<Object> species =
13717 TNode<Oddball> CodeStubAssembler::InstanceOf(TNode<Object> object,
13718 TNode<Object> callable,
13719 TNode<Context> context) {
13731 TNode<Object> inst_of_handler =
13737 TNode<NativeContext> native_context = LoadNativeContext(context);
13738 TNode<Object> function_has_instance =
13758 TNode<Object> result = Call(context, inst_of_handler, callable, object);
13793 TNode<Number> CodeStubAssembler::NumberInc(TNode<Number> value) {
13802 TNode<Smi> smi_value = CAST(value);
13803 TNode<Smi> one = SmiConstant(1);
13816 TNode<HeapNumber> heap_number_value = CAST(value);
13825 TNode<Float64T> finc_value = var_finc_value.value();
13826 TNode<Float64T> one = Float64Constant(1.0);
13827 TNode<Float64T> finc_result = Float64Add(finc_value, one);
13836 TNode<Number> CodeStubAssembler::NumberDec(TNode<Number> value) {
13844 TNode<Smi> smi_value = CAST(value);
13845 TNode<Smi> one = SmiConstant(1);
13859 TNode<HeapNumber> heap_number_value = CAST(value);
13868 TNode<Float64T> fdec_value = var_fdec_value.value();
13869 TNode<Float64T> minus_one = Float64Constant(-1.0);
13870 TNode<Float64T> fdec_result = Float64Add(fdec_value, minus_one);
13879 TNode<Number> CodeStubAssembler::NumberAdd(TNode<Number> a, TNode<Number> b) {
13900 TNode<Number> CodeStubAssembler::NumberSub(TNode<Number> a, TNode<Number> b) {
13921 void CodeStubAssembler::GotoIfNotNumber(TNode<Object> input,
13929 void CodeStubAssembler::GotoIfNumber(TNode<Object> input, Label* is_number) {
13934 TNode<Number> CodeStubAssembler::BitwiseOp(TNode<Word32T> left32,
13935 TNode<Word32T> right32,
13965 TNode<Number> CodeStubAssembler::BitwiseSmiOp(TNode<Smi> left, TNode<Smi> right,
13982 TNode<Int32T> left32 = SmiToInt32(left);
13983 TNode<Int32T> right32 = SmiToInt32(right);
13995 TNode<JSObject> CodeStubAssembler::AllocateJSIteratorResult(
13996 TNode<Context> context, TNode<Object> value, TNode<Oddball> done) {
13998 TNode<NativeContext> native_context = LoadNativeContext(context);
13999 TNode<Map> map = CAST(
14001 TNode<HeapObject> result = Allocate(JSIteratorResult::kSize);
14012 TNode<JSObject> CodeStubAssembler::AllocateJSIteratorResultForEntry(
14013 TNode<Context> context, TNode<Object> key, TNode<Object> value) {
14014 TNode<NativeContext> native_context = LoadNativeContext(context);
14015 TNode<Smi> length = SmiConstant(2);
14017 TNode<FixedArray> elements =
14024 TNode<Map> array_map = CAST(LoadContextElement(
14026 TNode<HeapObject> array = Allocate(JSArray::kHeaderSize);
14032 TNode<Map> iterator_map = CAST(
14034 TNode<HeapObject> result = Allocate(JSIteratorResult::kSize);
14046 TNode<JSReceiver> CodeStubAssembler::ArraySpeciesCreate(TNode<Context> context,
14047 TNode<Object> o,
14048 TNode<Number> len) {
14049 TNode<JSReceiver> constructor =
14055 TNode<Context> context, TNode<JSArrayBuffer> array_buffer,
14065 TNode<Context> context, TNode<JSArrayBufferView> array_buffer_view,
14067 TNode<JSArrayBuffer> buffer = LoadJSArrayBufferViewBuffer(array_buffer_view);
14071 TNode<RawPtrT> CodeStubAssembler::LoadJSArrayBufferBackingStorePtr(
14072 TNode<JSArrayBuffer> array_buffer) {
14077 TNode<JSArrayBuffer> CodeStubAssembler::LoadJSArrayBufferViewBuffer(
14078 TNode<JSArrayBufferView> array_buffer_view) {
14083 TNode<UintPtrT> CodeStubAssembler::LoadJSArrayBufferViewByteLength(
14084 TNode<JSArrayBufferView> array_buffer_view) {
14089 TNode<UintPtrT> CodeStubAssembler::LoadJSArrayBufferViewByteOffset(
14090 TNode<JSArrayBufferView> array_buffer_view) {
14095 TNode<UintPtrT> CodeStubAssembler::LoadJSTypedArrayLengthAndCheckDetached(
14096 TNode<JSTypedArray> typed_array, Label* detached) {
14098 TNode<JSArrayBuffer> buffer = LoadJSArrayBufferViewBuffer(typed_array);
14123 TNode<UintPtrT> CodeStubAssembler::LoadVariableLengthJSTypedArrayLength(
14124 TNode<JSTypedArray> array, TNode<JSArrayBuffer> buffer,
14127 TNode<UintPtrT> byte_length = LoadVariableLengthJSArrayBufferViewByteLength(
14129 TNode<IntPtrT> element_size =
14134 TNode<UintPtrT>
14136 TNode<JSArrayBufferView> array, TNode<JSArrayBuffer> buffer,
14140 TNode<UintPtrT> array_byte_offset = LoadJSArrayBufferViewByteOffset(array);
14148 const TNode<ExternalReference> byte_length_function =
14150 TNode<ExternalReference> isolate_ptr =
14152 TNode<UintPtrT> buffer_byte_length = UncheckedCast<UintPtrT>(
14169 TNode<UintPtrT> buffer_byte_length = LoadJSArrayBufferByteLength(buffer);
14189 TNode<UintPtrT> array_byte_length =
14204 TNode<JSArrayBufferView> array_buffer_view, Label* detached_or_oob,
14206 TNode<JSArrayBuffer> buffer = LoadJSArrayBufferViewBuffer(array_buffer_view);
14214 TNode<UintPtrT> buffer_byte_length = LoadJSArrayBufferByteLength(buffer);
14215 TNode<UintPtrT> array_byte_offset =
14234 TNode<UintPtrT> array_byte_length =
14244 TNode<BoolT> CodeStubAssembler::IsJSArrayBufferViewDetachedOrOutOfBoundsBoolean(
14245 TNode<JSArrayBufferView> array_buffer_view) {
14268 TNode<UintPtrT> index, TNode<JSTypedArray> typed_array,
14270 TNode<UintPtrT> len = LoadJSTypedArrayLengthAndCheckDetached(
14277 TNode<UintPtrT> CodeStubAssembler::LoadVariableLengthJSTypedArrayByteLength(
14278 TNode<Context> context, TNode<JSTypedArray> array,
14279 TNode<JSArrayBuffer> buffer) {
14283 TNode<UintPtrT> length =
14285 TNode<IntPtrT> element_size =
14288 TNode<IntPtrT> byte_length = IntPtrMul(Signed(length), element_size);
14300 TNode<IntPtrT> CodeStubAssembler::RabGsabElementsKindToElementByteSize(
14301 TNode<Int32T> elements_kind) {
14349 TNode<JSArrayBuffer> CodeStubAssembler::GetTypedArrayBuffer(
14350 TNode<Context> context, TNode<JSTypedArray> array) {
14356 TNode<JSArrayBuffer> buffer = LoadJSArrayBufferViewBuffer(array);
14372 TNode<IntPtrT> argc, TNode<RawPtrT> fp)
14377 TNode<IntPtrT> offset = assembler_->IntPtrConstant(
14386 TNode<Object> CodeStubArguments::GetReceiver() const {
14391 void CodeStubArguments::SetReceiver(TNode<Object> object) const {
14397 TNode<RawPtrT> CodeStubArguments::AtIndexPtr(TNode<IntPtrT> index) const {
14398 TNode<IntPtrT> offset =
14403 TNode<Object> CodeStubArguments::AtIndex(TNode<IntPtrT> index) const {
14409 TNode<Object> CodeStubArguments::AtIndex(int index) const {
14413 TNode<IntPtrT> CodeStubArguments::GetLengthWithoutReceiver() const {
14418 TNode<IntPtrT> CodeStubArguments::GetLengthWithReceiver() const {
14422 TNode<Object> CodeStubArguments::GetOptionalArgumentValue(
14423 TNode<IntPtrT> index, TNode<Object> default_value) {
14444 const CodeStubArguments::ForEachBodyFunction& body, TNode<IntPtrT> first,
14445 TNode<IntPtrT> last) const {
14453 TNode<RawPtrT> start = AtIndexPtr(first);
14454 TNode<RawPtrT> end = AtIndexPtr(last);
14458 [&](TNode<RawPtrT> current) {
14459 TNode<Object> arg = assembler_->LoadFullTagged(current);
14465 void CodeStubArguments::PopAndReturn(TNode<Object> value) {
14466 TNode<IntPtrT> pop_count = GetLengthWithReceiver();
14470 TNode<BoolT> CodeStubAssembler::IsFastElementsKind(
14471 TNode<Int32T> elements_kind) {
14477 TNode<BoolT> CodeStubAssembler::IsFastOrNonExtensibleOrSealedElementsKind(
14478 TNode<Int32T> elements_kind) {
14489 TNode<BoolT> CodeStubAssembler::IsDoubleElementsKind(
14490 TNode<Int32T> elements_kind) {
14498 TNode<BoolT> CodeStubAssembler::IsFastSmiOrTaggedElementsKind(
14499 TNode<Int32T> elements_kind) {
14507 TNode<BoolT> CodeStubAssembler::IsFastSmiElementsKind(
14508 TNode<Int32T> elements_kind) {
14513 TNode<BoolT> CodeStubAssembler::IsHoleyFastElementsKind(
14514 TNode<Int32T> elements_kind) {
14523 TNode<BoolT> CodeStubAssembler::IsHoleyFastElementsKindForRead(
14524 TNode<Int32T> elements_kind) {
14539 TNode<BoolT> CodeStubAssembler::IsElementsKindGreaterThan(
14540 TNode<Int32T> target_kind, ElementsKind reference_kind) {
14544 TNode<BoolT> CodeStubAssembler::IsElementsKindGreaterThanOrEqual(
14545 TNode<Int32T> target_kind, ElementsKind reference_kind) {
14549 TNode<BoolT> CodeStubAssembler::IsElementsKindLessThanOrEqual(
14550 TNode<Int32T> target_kind, ElementsKind reference_kind) {
14554 TNode<BoolT> CodeStubAssembler::IsDebugActive() {
14555 TNode<Uint8T> is_debug_active = Load<Uint8T>(
14560 TNode<BoolT> CodeStubAssembler::IsSideEffectFreeDebuggingActive() {
14561 TNode<Uint8T> debug_execution_mode = Load<Uint8T>(ExternalConstant(
14564 TNode<BoolT> is_active =
14571 TNode<BoolT> CodeStubAssembler::HasAsyncEventDelegate() {
14572 const TNode<RawPtrT> async_event_delegate = Load<RawPtrT>(ExternalConstant(
14577 TNode<Uint32T> CodeStubAssembler::PromiseHookFlags() {
14582 TNode<BoolT> CodeStubAssembler::IsAnyPromiseHookEnabled(TNode<Uint32T> flags) {
14588 TNode<BoolT> CodeStubAssembler::IsIsolatePromiseHookEnabled(
14589 TNode<Uint32T> flags) {
14594 TNode<BoolT> CodeStubAssembler::IsContextPromiseHookEnabled(
14595 TNode<Uint32T> flags) {
14600 TNode<BoolT> CodeStubAssembler::
14601 IsIsolatePromiseHookEnabledOrHasAsyncEventDelegate(TNode<Uint32T> flags) {
14607 TNode<BoolT> CodeStubAssembler::
14609 TNode<Uint32T> flags) {
14616 TNode<BoolT> CodeStubAssembler::NeedsAnyPromiseHooks(TNode<Uint32T> flags) {
14620 TNode<CodeT> CodeStubAssembler::LoadBuiltin(TNode<Smi> builtin_id) {
14623 TNode<IntPtrT> offset =
14626 TNode<ExternalReference> table =
14632 TNode<CodeT> CodeStubAssembler::GetSharedFunctionInfoCode(
14633 TNode<SharedFunctionInfo> shared_info, TVariable<Uint16T>* data_type_out,
14635 TNode<Object> sfi_data =
14657 TNode<Uint16T> data_type = LoadInstanceType(CAST(sfi_data));
14714 TNode<CodeT> baseline_code = CAST(sfi_data);
14736 TNode<CodeT> trampoline =
14764 TNode<RawPtrT> CodeStubAssembler::GetCodeEntry(TNode<CodeT> code) {
14766 TNode<CodeDataContainer> cdc = CodeDataContainerFromCodeT(code);
14771 TNode<IntPtrT> object = BitcastTaggedToWord(code);
14777 TNode<JSFunction> CodeStubAssembler::AllocateFunctionWithMapAndContext(
14778 TNode<Map> map, TNode<SharedFunctionInfo> shared_info,
14779 TNode<Context> context) {
14780 const TNode<CodeT> code = GetSharedFunctionInfoCode(shared_info);
14787 const TNode<HeapObject> fun = Allocate(JSFunction::kSizeWithoutPrototype);
14803 void CodeStubAssembler::CheckPrototypeEnumCache(TNode<JSReceiver> receiver,
14804 TNode<Map> receiver_map,
14822 TNode<Object> object_elements =
14829 TNode<Number> object_length = LoadJSArrayLength(CAST(var_object.value()));
14835 TNode<HeapObject> object = LoadMapPrototype(object_map.value());
14841 TNode<WordT> object_enum_length = LoadMapEnumLength(object_map.value());
14846 TNode<Map> CodeStubAssembler::CheckEnumCache(TNode<JSReceiver> receiver,
14850 TNode<Map> receiver_map = LoadMap(receiver);
14854 TNode<WordT> receiver_enum_length = LoadMapEnumLength(receiver_map);
14863 TNode<Smi> length;
14864 TNode<HeapObject> properties = LoadSlowProperties(receiver);
14906 TNode<Object> CodeStubAssembler::GetArgumentValue(TorqueStructArguments args,
14907 TNode<IntPtrT> index) {
14912 TNode<RawPtrT> frame, TNode<IntPtrT> argc,
14928 TNode<MaybeObject> tagged_value) {
14939 TNode<Object> arg = UncheckedCast<Object>(tagged_value);
14956 void CodeStubAssembler::PerformStackCheck(TNode<Context> context) {
14959 TNode<UintPtrT> stack_limit = UncheckedCast<UintPtrT>(
14962 TNode<BoolT> sp_within_limit = StackPointerGreaterThan(stack_limit);
14973 TNode<Object> CodeStubAssembler::CallApiCallback(
14974 TNode<Object> context, TNode<RawPtrT> callback, TNode<IntPtrT> argc,
14975 TNode<Object> data, TNode<Object> holder, TNode<Object> receiver) {
14980 TNode<Object> CodeStubAssembler::CallApiCallback(
14981 TNode<Object> context, TNode<RawPtrT> callback, TNode<IntPtrT> argc,
14982 TNode<Object> data, TNode<Object> holder, TNode<Object> receiver,
14983 TNode<Object> value) {
14989 TNode<Object> CodeStubAssembler::CallRuntimeNewArray(
14990 TNode<Context> context, TNode<Object> receiver, TNode<Object> length,
14991 TNode<Object> new_target, TNode<Object> allocation_site) {
14999 void CodeStubAssembler::TailCallRuntimeNewArray(TNode<Context> context,
15000 TNode<Object> receiver,
15001 TNode<Object> length,
15002 TNode<Object> new_target,
15003 TNode<Object> allocation_site) {
15011 TNode<JSArray> CodeStubAssembler::ArrayCreate(TNode<Context> context,
15012 TNode<Number> length) {
15017 TNode<Smi> limit = SmiConstant(JSArray::kInitialMaxFastElementArray);
15030 TNode<NativeContext> native_context = LoadNativeContext(context);
15031 TNode<JSFunction> array_function =
15039 TNode<Smi> length_smi = CAST(length);
15041 TNode<Map> array_map = CAST(LoadContextElement(
15055 void CodeStubAssembler::SetPropertyLength(TNode<Context> context,
15056 TNode<Object> array,
15057 TNode<Number> length) {
15062 TNode<Smi> CodeStubAssembler::RefillMathRandom(
15063 TNode<NativeContext> native_context) {
15065 const TNode<ExternalReference> refill_math_random =
15067 const TNode<ExternalReference> isolate_ptr =
15077 TNode<String> CodeStubAssembler::TaggedToDirectString(TNode<Object> value,
15086 TNode<JSFinalizationRegistry> finalization_registry,
15087 TNode<WeakCell> weak_cell) {
15088 const TNode<ExternalReference> remove_cell = ExternalConstant(
15091 const TNode<ExternalReference> isolate_ptr =
15102 TNode<NativeContext> native_context, TNode<Map> initial_prototype_map,
15110 void PrototypeCheckAssembler::CheckAndBranch(TNode<HeapObject> prototype,
15113 TNode<Map> prototype_map = LoadMap(prototype);
15114 TNode<DescriptorArray> descriptors = LoadMapDescriptors(prototype_map);
15137 TNode<Uint32T> combined_details;
15152 TNode<Uint32T> details =
15162 TNode<Uint32T> constness =
15207 TNode<Uint32T> details =
15217 TNode<Object> actual_value = var_value.value();
15218 TNode<Object> expected_value =
15242 TNode<Uint32T> Load(TNode<ByteArray> meta_table, TNode<IntPtrT> index) {
15243 TNode<IntPtrT> offset = OverallOffset(meta_table, index);
15249 TNode<Uint32T> Load(TNode<ByteArray> meta_table, int index) {
15253 void Store(TNode<ByteArray> meta_table, TNode<IntPtrT> index,
15254 TNode<Uint32T> data) {
15255 TNode<IntPtrT> offset = OverallOffset(meta_table, index);
15259 TNode<UintPtrT> max_value = csa.UintPtrConstant((1ULL << bits) - 1);
15269 void Store(TNode<ByteArray> meta_table, int index, TNode<Uint32T> data) {
15274 TNode<IntPtrT> OverallOffset(TNode<ByteArray> meta_table,
15275 TNode<IntPtrT> index) {
15280 TNode<IntPtrT> overall_offset;
15288 TNode<IntPtrT> index_offset =
15295 TNode<IntPtrT> byte_array_data_bytes =
15297 TNode<IntPtrT> max_allowed_offset = csa.IntPtrAdd(
15317 void GenerateMetaTableAccess(CodeStubAssembler* csa, TNode<IntPtrT> capacity,
15352 TNode<IntPtrT> CodeStubAssembler::LoadSwissNameDictionaryNumberOfElements(
15353 TNode<SwissNameDictionary> table, TNode<IntPtrT> capacity) {
15354 TNode<ByteArray> meta_table = LoadSwissNameDictionaryMetaTable(table);
15366 TNode<IntPtrT>
15368 TNode<SwissNameDictionary> table, TNode<IntPtrT> capacity) {
15369 TNode<ByteArray> meta_table = LoadSwissNameDictionaryMetaTable(table);
15383 TNode<SwissNameDictionary> table, TNode<IntPtrT> capacity,
15384 TNode<IntPtrT> enum_index, TNode<Int32T> entry) {
15385 TNode<ByteArray> meta_table = LoadSwissNameDictionaryMetaTable(table);
15386 TNode<IntPtrT> meta_table_index = IntPtrAdd(
15397 TNode<Uint32T>
15399 TNode<ByteArray> meta_table, TNode<IntPtrT> capacity,
15400 TNode<Uint32T> max_usable_capacity, Label* bailout) {
15404 TNode<Uint32T> nof = mta.Load(
15406 TNode<Uint32T> nod =
15409 TNode<Uint32T> used = Uint32Add(nof, nod);
15411 TNode<Uint32T> inc_nof = Uint32Add(nof, Uint32Constant(1));
15421 TNode<Uint32T> CodeStubAssembler::SwissNameDictionaryUpdateCountsForDeletion(
15422 TNode<ByteArray> meta_table, TNode<IntPtrT> capacity) {
15426 TNode<Uint32T> nof = mta.Load(
15428 TNode<Uint32T> nod =
15432 TNode<Uint32T> new_nof = Uint32Sub(nof, Uint32Constant(1));
15433 TNode<Uint32T> new_nod = Uint32Add(nod, Uint32Constant(1));
15448 TNode<SwissNameDictionary> CodeStubAssembler::AllocateSwissNameDictionary(
15449 TNode<IntPtrT> at_least_space_for) {
15453 TNode<IntPtrT> capacity =
15460 TNode<SwissNameDictionary> CodeStubAssembler::AllocateSwissNameDictionary(
15465 TNode<SwissNameDictionary>
15467 TNode<IntPtrT> capacity) {
15502 TNode<IntPtrT> meta_table_payload_size =
15505 TNode<ByteArray> meta_table =
15510 TNode<IntPtrT> total_size = SwissNameDictionarySizeFor(capacity);
15512 TNode<SwissNameDictionary> table = UncheckedCast<SwissNameDictionary>(
15539 TNode<IntPtrT> ctrl_table_start_offset_minus_tag =
15542 TNode<IntPtrT> table_address_with_tag = BitcastTaggedToWord(table);
15543 TNode<IntPtrT> ctrl_table_size_bytes =
15545 TNode<IntPtrT> ctrl_table_start_ptr =
15547 TNode<IntPtrT> ctrl_table_end_ptr =
15563 TNode<Int32T> empty32 = Int32Constant(kEmpty32);
15566 [=](TNode<IntPtrT> current) {
15574 TNode<IntPtrT> data_table_start_offset_minus_tag =
15576 TNode<IntPtrT> data_table_ptr =
15578 TNode<IntPtrT> data_table_size = IntPtrMul(
15591 TNode<SwissNameDictionary> CodeStubAssembler::CopySwissNameDictionary(
15592 TNode<SwissNameDictionary> original) {
15595 TNode<IntPtrT> capacity =
15602 TNode<IntPtrT> meta_table_payload_size =
15605 TNode<ByteArray> meta_table =
15610 TNode<IntPtrT> total_size = SwissNameDictionarySizeFor(capacity);
15612 TNode<SwissNameDictionary> table = UncheckedCast<SwissNameDictionary>(
15625 TNode<ExternalReference> memcpy =
15628 TNode<IntPtrT> old_table_address_with_tag = BitcastTaggedToWord(original);
15629 TNode<IntPtrT> new_table_address_with_tag = BitcastTaggedToWord(table);
15631 TNode<IntPtrT> ctrl_table_start_offset_minus_tag =
15634 TNode<IntPtrT> ctrl_table_size_bytes =
15639 TNode<IntPtrT> old_ctrl_table_start_ptr = IntPtrAdd(
15641 TNode<IntPtrT> new_ctrl_table_start_ptr = IntPtrAdd(
15653 TNode<IntPtrT> start_offset =
15655 TNode<IntPtrT> data_table_size = IntPtrMul(
15661 [=](TNode<IntPtrT> offset) {
15662 TNode<Object> table_field = LoadObjectField(original, offset);
15670 TNode<IntPtrT> old_meta_table_address_with_tag =
15672 TNode<IntPtrT> new_meta_table_address_with_tag =
15675 TNode<IntPtrT> meta_table_size =
15678 TNode<IntPtrT> old_data_start =
15681 TNode<IntPtrT> new_data_start =
15693 TNode<IntPtrT> property_details_start_offset_minus_tag =
15701 TNode<IntPtrT> start = ctrl_table_start_offset_minus_tag;
15706 [&](TNode<IntPtrT> ctrl_table_offset) {
15707 TNode<Uint8T> ctrl = Load<Uint8T>(original, ctrl_table_offset);
15722 TNode<Uint8T> details =
15743 TNode<IntPtrT> CodeStubAssembler::SwissNameDictionaryOffsetIntoDataTableMT(
15744 TNode<SwissNameDictionary> dict, TNode<IntPtrT> index, int field_index) {
15745 TNode<IntPtrT> data_table_start = SwissNameDictionaryDataTableStartOffsetMT();
15747 TNode<IntPtrT> offset_within_data_table = IntPtrMul(
15759 TNode<IntPtrT>
15761 TNode<SwissNameDictionary> dict, TNode<IntPtrT> capacity,
15762 TNode<IntPtrT> index) {
15767 TNode<IntPtrT> data_table_start = SwissNameDictionaryDataTableStartOffsetMT();
15769 TNode<IntPtrT> gw = IntPtrConstant(SwissNameDictionary::kGroupWidth);
15770 TNode<IntPtrT> data_and_ctrl_table_size = IntPtrAdd(
15777 TNode<IntPtrT> property_details_table_start =
15787 TNode<IntPtrT> offset_within_details_table = index;
15792 TNode<SwissNameDictionary> table, TNode<Int32T> capacity) {
15797 TNode<Name> CodeStubAssembler::LoadSwissNameDictionaryKey(
15798 TNode<SwissNameDictionary> dict, TNode<IntPtrT> entry) {
15799 TNode<IntPtrT> offset_minus_tag = SwissNameDictionaryOffsetIntoDataTableMT(
15806 TNode<Uint8T> CodeStubAssembler::LoadSwissNameDictionaryPropertyDetails(
15807 TNode<SwissNameDictionary> table, TNode<IntPtrT> capacity,
15808 TNode<IntPtrT> entry) {
15809 TNode<IntPtrT> offset_minus_tag =
15817 TNode<SwissNameDictionary> table, TNode<IntPtrT> capacity,
15818 TNode<IntPtrT> entry, TNode<Uint8T> details) {
15819 TNode<IntPtrT> offset_minus_tag =
15829 TNode<SwissNameDictionary> dict, TNode<IntPtrT> entry, TNode<Object> key,
15830 TNode<Object> value) {
15835 TNode<IntPtrT> key_offset_minus_tag =
15841 TNode<IntPtrT> value_offset_minus_tag =
15847 TNode<Uint64T> CodeStubAssembler::LoadSwissNameDictionaryCtrlTableGroup(
15848 TNode<IntPtrT> address) {
15849 TNode<RawPtrT> ptr = ReinterpretCast<RawPtrT>(address);
15850 TNode<Uint64T> data = UnalignedLoad<Uint64T>(ptr, IntPtrConstant(0));
15861 TNode<Uint64T> result = Uint64Constant(0);
15867 TNode<Uint64T> mask = Uint64Constant(0xffULL << src_offset);
15868 TNode<Uint64T> src_data = Word64And(data, mask);
15870 TNode<Uint64T> shifted =
15881 TNode<SwissNameDictionary> table, TNode<IntPtrT> capacity,
15882 TNode<IntPtrT> entry, TNode<Uint8T> ctrl) {
15888 TNode<IntPtrT> one = IntPtrConstant(1);
15889 TNode<IntPtrT> offset = SwissNameDictionaryCtrlTableStartOffsetMT(capacity);
15895 TNode<IntPtrT> offset_entry = IntPtrAdd(offset, entry);
15899 TNode<IntPtrT> mask = IntPtrSub(capacity, one);
15900 TNode<IntPtrT> group_width = IntPtrConstant(SwissNameDictionary::kGroupWidth);
15905 TNode<IntPtrT> copy_entry_lhs =
15908 TNode<IntPtrT> copy_entry_rhs = WordAnd(IntPtrSub(group_width, one), mask);
15909 TNode<IntPtrT> copy_entry = IntPtrAdd(copy_entry_lhs, copy_entry_rhs);
15910 TNode<IntPtrT> offset_copy_entry = IntPtrAdd(offset, copy_entry);
15926 TNode<SwissNameDictionary> table, TNode<Name> key, Label* found,
15937 void CodeStubAssembler::SwissNameDictionaryAdd(TNode<SwissNameDictionary> table,
15938 TNode<Name> key,
15939 TNode<Object> value,
15940 TNode<Uint8T> property_details,
15952 TNode<Context> context, TVariable<Object>* var_shared_value) {
15956 TNode<Object> value = var_shared_value->value();
15964 TNode<IntPtrT> page_flags = LoadBasicMemoryChunkFlags(CAST(value));
15971 TNode<Uint16T> value_instance_type =