Lines Matching refs:value
258 TNode<BoolT> CodeStubAssembler::Is##name(TNode<Object> value) { \
259 return TaggedEqual(value, name##Constant()); \
261 TNode<BoolT> CodeStubAssembler::IsNot##name(TNode<Object> value) { \
262 return TaggedNotEqual(value, name##Constant()); \
267 TNode<BInt> CodeStubAssembler::BIntConstant(int value) {
269 return SmiConstant(value);
271 return IntPtrConstant(value);
278 TNode<Smi> CodeStubAssembler::IntPtrOrSmiConstant<Smi>(int value) {
279 return SmiConstant(value);
283 TNode<IntPtrT> CodeStubAssembler::IntPtrOrSmiConstant<IntPtrT>(int value) {
284 return IntPtrConstant(value);
288 TNode<UintPtrT> CodeStubAssembler::IntPtrOrSmiConstant<UintPtrT>(int value) {
289 return Unsigned(IntPtrConstant(value));
293 TNode<RawPtrT> CodeStubAssembler::IntPtrOrSmiConstant<RawPtrT>(int value) {
294 return ReinterpretCast<RawPtrT>(IntPtrConstant(value));
298 TNode<Smi> maybe_constant, int* value) {
301 *value = Smi::ToInt(smi_constant);
308 TNode<IntPtrT> maybe_constant, int* value) {
311 *value = int32_constant;
318 TNode<IntPtrT> value) {
320 CSA_DCHECK(this, UintPtrLessThanOrEqual(value, IntPtrConstant(0x80000000u)));
321 value = Signed(IntPtrSub(value, IntPtrConstant(1)));
323 value = Signed(WordOr(value, WordShr(value, IntPtrConstant(i))));
325 return Signed(IntPtrAdd(value, IntPtrConstant(1)));
328 TNode<BoolT> CodeStubAssembler::WordIsPowerOfTwo(TNode<IntPtrT> value) {
330 if (TryToIntPtrConstant(value, &constant)) {
333 // value && !(value & (value - 1))
336 IntPtrEqual(value, IntPtrConstant(0)),
338 [=] { return WordAnd(value, IntPtrSub(value, IntPtrConstant(1))); }),
351 GotoIf(Float64LessThanOrEqual(Float64Sub(var_x.value(), one_half), x),
353 var_x = Float64Sub(var_x.value(), one);
357 return var_x.value();
385 GotoIfNot(Float64LessThan(var_x.value(), x), &return_x);
386 var_x = Float64Add(var_x.value(), one);
399 GotoIfNot(Float64GreaterThan(var_x.value(), minus_x), &return_minus_x);
400 var_x = Float64Sub(var_x.value(), one);
405 var_x = Float64Neg(var_x.value());
409 return var_x.value();
437 GotoIfNot(Float64GreaterThan(var_x.value(), x), &return_x);
438 var_x = Float64Sub(var_x.value(), one);
451 GotoIfNot(Float64LessThan(var_x.value(), minus_x), &return_minus_x);
452 var_x = Float64Add(var_x.value(), one);
457 var_x = Float64Neg(var_x.value());
461 return var_x.value();
492 return var_result.value();
523 GotoIfNot(Float64GreaterThan(var_x.value(), x), &return_x);
524 var_x = Float64Sub(var_x.value(), one);
542 GotoIfNot(Float64GreaterThan(var_x.value(), minus_x), &return_minus_x);
543 var_x = Float64Sub(var_x.value(), one);
549 var_x = Float64Neg(var_x.value());
553 return var_x.value();
557 TNode<UintPtrT> value) {
566 // TNode<UintPtrT> value = Unsigned(value_word);
570 // {value = ((value >> 1) & mask[0]) + (value & mask[0])}
571 lhs = WordAnd(WordShr(value, UintPtrConstant(1)), UintPtrConstant(mask[0]));
572 rhs = WordAnd(value, UintPtrConstant(mask[0]));
573 value = UintPtrAdd(lhs, rhs);
576 // {value = ((value >> 2) & mask[1]) + (value & mask[1])}
577 lhs = WordAnd(WordShr(value, UintPtrConstant(2)), UintPtrConstant(mask[1]));
578 rhs = WordAnd(value, UintPtrConstant(mask[1]));
579 value = UintPtrAdd(lhs, rhs);
582 // {value = ((value >> 4) & mask[2]) + (value & mask[2])}
583 lhs = WordAnd(WordShr(value, UintPtrConstant(4)), UintPtrConstant(mask[2]));
584 rhs = WordAnd(value, UintPtrConstant(mask[2]));
585 value = UintPtrAdd(lhs, rhs);
590 // result, so there's no need to mask value anymore, since there's no
592 // {value = (value >> 8) + value}
593 lhs = WordShr(value, UintPtrConstant(8));
594 value = UintPtrAdd(lhs, value);
597 // {value = (value >> 16) + value}
598 lhs = WordShr(value, UintPtrConstant(16));
599 value = UintPtrAdd(lhs, value);
603 // {value = (value >> 32) + value}
604 lhs = WordShr(value, UintPtrConstant(32));
605 value = UintPtrAdd(lhs, value);
609 // {return static_cast<unsigned>(value & 0xff)}
610 return Signed(WordAnd(value, UintPtrConstant(0xff)));
613 TNode<Int64T> CodeStubAssembler::PopulationCount64(TNode<Word64T> value) {
615 return Word64Popcnt(value);
624 PopulationCountFallback(ReinterpretCast<UintPtrT>(value)));
627 TNode<Int32T> CodeStubAssembler::PopulationCount32(TNode<Word32T> value) {
629 return Word32Popcnt(value);
634 PopulationCountFallback(ReinterpretCast<UintPtrT>(value));
638 ReinterpretCast<UintPtrT>(ChangeUint32ToUint64(value)));
643 TNode<Int64T> CodeStubAssembler::CountTrailingZeros64(TNode<Word64T> value) {
645 return Word64Ctz(value);
657 TNode<Word64T> lhs = Word64Not(value);
658 TNode<Word64T> rhs = Uint64Sub(Unsigned(value), Uint64Constant(1));
662 TNode<Int32T> CodeStubAssembler::CountTrailingZeros32(TNode<Word32T> value) {
664 return Word32Ctz(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) {
679 return Word64Clz(value);
682 TNode<Int32T> CodeStubAssembler::CountLeadingZeros32(TNode<Word32T> value) {
683 return Word32Clz(value);
687 TNode<Smi> CodeStubAssembler::TaggedToParameter(TNode<Smi> value) {
688 return value;
692 TNode<IntPtrT> CodeStubAssembler::TaggedToParameter(TNode<Smi> value) {
693 return SmiUntag(value);
697 TNode<TaggedIndex> value) {
698 return Signed(WordSarShiftOutZeros(BitcastTaggedToWordForTagAndSmiBits(value),
703 TNode<IntPtrT> value) {
705 BitcastWordToTaggedSigned(WordShl(value, IntPtrConstant(kSmiTagSize))));
708 TNode<Smi> CodeStubAssembler::TaggedIndexToSmi(TNode<TaggedIndex> value) {
712 WordShl(BitcastTaggedToWordForTagAndSmiBits(value),
717 return ReinterpretCast<Smi>(value);
720 TNode<TaggedIndex> CodeStubAssembler::SmiToTaggedIndex(TNode<Smi> value) {
722 return ReinterpretCast<TaggedIndex>(value);
727 WordSar(BitcastTaggedToWordForTagAndSmiBits(value),
734 TruncateWordToInt32(BitcastTaggedToWordForTagAndSmiBits(value));
748 TNode<Smi> CodeStubAssembler::SmiFromInt32(TNode<Int32T> value) {
753 ChangeUint32ToWord(Int32Add(value, value)));
755 return SmiTag(ChangeInt32ToIntPtr(value));
758 TNode<Smi> CodeStubAssembler::SmiFromUint32(TNode<Uint32T> value) {
759 CSA_DCHECK(this, IntPtrLessThan(ChangeUint32ToWord(value),
761 return SmiFromInt32(Signed(value));
764 TNode<BoolT> CodeStubAssembler::IsValidPositiveSmi(TNode<IntPtrT> value) {
766 if (TryToIntPtrConstant(value, &constant_value)) {
773 return UintPtrLessThanOrEqual(value, IntPtrConstant(Smi::kMaxValue));
776 TNode<Smi> CodeStubAssembler::SmiTag(TNode<IntPtrT> value) {
778 if (TryToInt32Constant(value, &constant_value) &&
783 return SmiFromInt32(TruncateIntPtrToInt32(value));
786 BitcastWordToTaggedSigned(WordShl(value, SmiShiftBitsConstant()));
790 TNode<IntPtrT> CodeStubAssembler::SmiUntag(TNode<Smi> value) {
792 if (TryToIntPtrConstant(value, &constant_value)) {
795 TNode<IntPtrT> raw_bits = BitcastTaggedToWordForTagAndSmiBits(value);
803 TNode<Int32T> CodeStubAssembler::SmiToInt32(TNode<Smi> value) {
806 TruncateIntPtrToInt32(BitcastTaggedToWordForTagAndSmiBits(value)),
809 TNode<IntPtrT> result = SmiUntag(value);
813 TNode<Float64T> CodeStubAssembler::SmiToFloat64(TNode<Smi> value) {
814 return ChangeInt32ToFloat64(SmiToInt32(value));
926 return result.value();
944 return result.value();
1007 return var_result.value();
1061 TNode<Float64T> value =
1062 Float64Mul(var_lhs_float64.value(), var_rhs_float64.value());
1063 var_result = AllocateHeapNumberWithValue(value);
1068 return var_result.value();
1130 TNode<Int32T> CodeStubAssembler::TruncateWordToInt32(TNode<WordT> value) {
1132 return TruncateInt64ToInt32(ReinterpretCast<Int64T>(value));
1134 return ReinterpretCast<Int32T>(value);
1137 TNode<Int32T> CodeStubAssembler::TruncateIntPtrToInt32(TNode<IntPtrT> value) {
1139 return TruncateInt64ToInt32(ReinterpretCast<Int64T>(value));
1141 return ReinterpretCast<Int32T>(value);
1271 IntPtrAdd(UncheckedCast<IntPtrT>(top), adjusted_size.value());
1303 GotoIf(IntPtrEqual(adjusted_size.value(), size_in_bytes), &next);
1315 IntPtrAdd(address.value(), IntPtrConstant(kHeapObjectTag)));
1327 return UncheckedCast<HeapObject>(result.value());
1461 TNode<Object> value;
1465 value = SmiConstant(0);
1467 value = NullConstant();
1471 StoreFieldsNoWriteBarrier(start, limit, value);
1476 void CodeStubAssembler::BranchIfToBooleanIsTrue(TNode<Object> value,
1481 // Rule out false {value}.
1482 GotoIf(TaggedEqual(value, FalseConstant()), if_false);
1484 // Check if {value} is a Smi or a HeapObject.
1485 Branch(TaggedIsSmi(value), &if_smi, &if_notsmi);
1489 // The {value} is a Smi, only need to check against zero.
1490 BranchIfSmiEqual(CAST(value), SmiConstant(0), if_false, if_true);
1495 TNode<HeapObject> value_heapobject = CAST(value);
1497 // Check if {value} is the empty string.
1500 // The {value} is a HeapObject, load its map.
1507 // We still need to handle numbers specially, but all other {value}s
1514 // Load the floating point value of {value}.
1518 // Check if the floating point {value} is neither 0.0, -0.0 nor NaN.
1525 TNode<BigInt> bigint = CAST(value);
1612 // real value). TODO(saelo) initialize the entry with zero here and switch
1667 TNode<UintPtrT> value = UncheckedCast<UintPtrT>(pointer);
1670 value = UncheckedCast<UintPtrT>(WordOr(pointer, tag));
1673 value);
1952 GotoIf(TaggedIsSmi(result.value()), &done);
1954 InstanceTypeEqual(LoadInstanceType(CAST(result.value())), MAP_TYPE);
1957 LoadObjectField(CAST(result.value()),
1962 return result.value();
2052 GotoIf(IntPtrEqual(var_hash.value(),
2056 return var_hash.value();
2124 TNode<BoolT> CodeStubAssembler::IsStrong(TNode<MaybeObject> value) {
2126 BitcastTaggedToWordForTagAndSmiBits(value)),
2132 TNode<MaybeObject> value, Label* if_not_strong) {
2133 GotoIfNot(IsStrong(value), if_not_strong);
2134 return CAST(value);
2137 TNode<BoolT> CodeStubAssembler::IsWeakOrCleared(TNode<MaybeObject> value) {
2139 BitcastTaggedToWordForTagAndSmiBits(value)),
2144 TNode<BoolT> CodeStubAssembler::IsCleared(TNode<MaybeObject> value) {
2145 return Word32Equal(TruncateIntPtrToInt32(BitcastMaybeObjectToWord(value)),
2150 TNode<MaybeObject> value) {
2151 CSA_DCHECK(this, IsWeakOrCleared(value));
2152 CSA_DCHECK(this, IsNotCleared(value));
2154 BitcastMaybeObjectToWord(value), IntPtrConstant(~kWeakHeapObjectMask))));
2158 TNode<MaybeObject> value, Label* if_cleared) {
2159 GotoIf(IsCleared(value), if_cleared);
2160 return GetHeapObjectAssumeWeak(value);
2164 // (maybe_object & ~mask) == value
2168 TNode<MaybeObject> maybe_object, TNode<Object> value) {
2174 TruncateWordToInt32(BitcastTaggedToWord(value)));
2178 BitcastTaggedToWord(value));
2200 TNode<MaybeObject> CodeStubAssembler::MakeWeak(TNode<HeapObject> value) {
2202 WordOr(BitcastTaggedToWord(value), IntPtrConstant(kWeakHeapObjectTag))));
2239 static_assert(std::is_same<TIndex, Smi>::value ||
2240 std::is_same<TIndex, UintPtrT>::value ||
2241 std::is_same<TIndex, IntPtrT>::value,
2251 constexpr MachineType machine_type = MachineTypeOf<TValue>::value;
2264 static_assert(std::is_same<TIndex, Smi>::value ||
2265 std::is_same<TIndex, UintPtrT>::value ||
2266 std::is_same<TIndex, IntPtrT>::value,
2330 TNode<IntPtrT> value =
2332 return Signed(DecodeWord<PropertyArray::LengthField>(value));
2347 // compensated offset value) below will decompress the tagged value.
2361 TNode<IntPtrT> value = Load<IntPtrT>(data_pointer, offset);
2362 return BigIntFromInt64(value);
2388 GotoIf(IntPtrEqual(var_high.value(), IntPtrConstant(0)), &high_zero);
2389 Branch(IntPtrLessThan(var_high.value(), IntPtrConstant(0)), &negative,
2393 Branch(IntPtrEqual(var_low.value(), IntPtrConstant(0)), &if_zero,
2399 // We must negate the value by computing "0 - (high|low)", performing
2402 var_high = IntPtrSub(IntPtrConstant(0), var_high.value());
2404 Branch(IntPtrEqual(var_low.value(), IntPtrConstant(0)), &no_carry, &carry);
2406 var_high = IntPtrSub(var_high.value(), IntPtrConstant(1));
2409 var_low = IntPtrSub(IntPtrConstant(0), var_low.value());
2412 Branch(IntPtrEqual(var_high.value(), IntPtrConstant(0)),
2419 StoreBigIntBitfield(var_result.value(),
2420 Word32Or(var_sign.value(),
2422 StoreBigIntDigit(var_result.value(), 0, Unsigned(var_low.value()));
2429 StoreBigIntBitfield(var_result.value(),
2430 Word32Or(var_sign.value(),
2432 StoreBigIntDigit(var_result.value(), 0, Unsigned(var_low.value()));
2433 StoreBigIntDigit(var_result.value(), 1, Unsigned(var_high.value()));
2442 return var_result.value();
2445 TNode<BigInt> CodeStubAssembler::BigIntFromInt64(TNode<IntPtrT> value) {
2449 GotoIf(IntPtrEqual(value, IntPtrConstant(0)), &if_zero);
2451 Branch(IntPtrGreaterThan(value, IntPtrConstant(0)), &if_positive,
2456 StoreBigIntBitfield(var_result.value(),
2459 StoreBigIntDigit(var_result.value(), 0, Unsigned(value));
2465 StoreBigIntBitfield(var_result.value(),
2468 StoreBigIntDigit(var_result.value(), 0,
2469 Unsigned(IntPtrSub(IntPtrConstant(0), value)));
2480 return var_result.value();
2487 TNode<UintPtrT> value = Load<UintPtrT>(data_pointer, offset);
2488 return BigIntFromUint64(value);
2512 StoreBigIntDigit(var_result.value(), 0, low);
2513 StoreBigIntDigit(var_result.value(), 1, high);
2519 StoreBigIntDigit(var_result.value(), 0, low);
2527 return var_result.value();
2530 TNode<BigInt> CodeStubAssembler::BigIntFromUint64(TNode<UintPtrT> value) {
2534 GotoIf(IntPtrEqual(value, IntPtrConstant(0)), &if_zero);
2536 StoreBigIntDigit(var_result.value(), 0, value);
2543 return var_result.value();
2621 return var_result.value();
2732 Branch(TaggedEqual(var_result.value(), TheHoleConstant()), if_hole, &done);
2758 return var_result.value();
2783 // This means the actual value is not needed.
2795 TNode<IntPtrT> value =
2797 return IsSetWord<ScopeInfo::HasContextExtensionSlotBit>(value);
2801 TNode<Context> context, int slot_index, TNode<Object> value) {
2804 IntPtrConstant(offset), value);
2829 TaggedEqual(cur_context.value(), native_context)));
2830 GotoIf(TaggedEqual(LoadMap(CAST(cur_context.value())), module_map),
2834 LoadContextElement(CAST(cur_context.value()), Context::PREVIOUS_INDEX);
2839 return UncheckedCast<Context>(cur_context.value());
2858 return return_value.value();
2955 return var_result.value();
2968 GotoIfNot(HasInstanceType(var_result.value(), CODET_TYPE),
2971 TNode<CodeT> code = CAST(var_result.value());
2987 GotoIfNot(HasInstanceType(var_result.value(), INTERPRETER_DATA_TYPE), &done);
2989 var_result.value(), InterpreterData::kBytecodeArrayOffset);
2994 return CAST(var_result.value());
2999 TNode<Word32T> value) {
3001 IntPtrConstant(offset - kHeapObjectTag), value);
3005 TNode<Float64T> value) {
3006 StoreObjectFieldNoWriteBarrier(object, HeapNumber::kValueOffset, value);
3010 TNode<Smi> value) {
3011 StoreObjectFieldNoWriteBarrier(object, offset, value);
3016 TNode<Smi> value) {
3017 StoreObjectFieldNoWriteBarrier(object, offset, value);
3021 TNode<Object> value) {
3024 UncheckedCast<HeapObject>(object), offset, value);
3029 TNode<Object> value) {
3032 StoreObjectField(object, const_offset, value);
3034 Store(object, IntPtrSub(offset, IntPtrConstant(kHeapObjectTag)), value);
3039 TNode<HeapObject> object, int offset, TNode<Object> value) {
3042 object, offset, value);
3046 TNode<HeapObject> object, TNode<IntPtrT> offset, TNode<Object> value) {
3056 UnsafeStoreObjectFieldNoWriteBarrier(object, const_offset, value);
3060 value);
3095 TNode<Object> value, WriteBarrierMode barrier_mode, int additional_offset) {
3097 static_assert(std::is_same<TIndex, Smi>::value ||
3098 std::is_same<TIndex, UintPtrT>::value ||
3099 std::is_same<TIndex, IntPtrT>::value,
3136 StoreNoWriteBarrier(MachineRepresentation::kTagged, object, offset, value);
3139 value);
3141 StoreEphemeronKey(object, offset, value);
3143 Store(object, offset, value);
3164 TNode<FixedDoubleArray> object, TNode<TIndex> index, TNode<Float64T> value,
3167 static_assert(std::is_same<TIndex, Smi>::value ||
3168 std::is_same<TIndex, UintPtrT>::value ||
3169 std::is_same<TIndex, IntPtrT>::value,
3178 TNode<Float64T> value_silenced = Float64SilenceNaN(value);
3188 TNode<AnyTaggedT> value, WriteBarrierMode barrier_mode,
3205 value);
3208 offset, value);
3210 Store(feedback_vector, offset, value);
3235 TaggedToParameter<BInt>(LoadFixedArrayBaseLength(var_elements->value()));
3240 *var_elements = GrowElementsCapacity(array, var_elements->value(), kind, kind,
3259 TNode<IntPtrT> first = arg_index->value();
3262 PossiblyGrowElementsCapacity(kind, array, var_length.value(), &var_elements,
3268 TNode<FixedArrayBase> elements = var_elements.value();
3272 TryStoreArrayElement(kind, &pre_bailout, elements, var_length.value(),
3278 TNode<Smi> length = BIntToSmi(var_length.value());
3286 TNode<Smi> length = ParameterToTagged(var_length.value());
3290 *arg_index = IntPtrAdd(arg_index->value(), SmiUntag(diff));
3295 return var_tagged_length.value();
3301 TNode<Object> value) {
3303 GotoIf(TaggedIsNotSmi(value), bailout);
3305 GotoIfNotNumber(value, bailout);
3309 StoreElement(elements, kind, index, ChangeNumberToFloat64(CAST(value)));
3311 StoreElement(elements, kind, index, value);
3317 TNode<Object> value,
3325 PossiblyGrowElementsCapacity(kind, array, var_length.value(), &var_elements,
3330 TryStoreArrayElement(kind, bailout, var_elements.value(), var_length.value(),
3331 value);
3334 TNode<Smi> length = BIntToSmi(var_length.value());
3338 TNode<Cell> CodeStubAssembler::AllocateCellWithValue(TNode<Object> value,
3343 StoreCellValue(cell, value, mode);
3351 void CodeStubAssembler::StoreCellValue(TNode<Cell> cell, TNode<Object> value,
3356 StoreObjectField(cell, Cell::kValueOffset, value);
3358 StoreObjectFieldNoWriteBarrier(cell, Cell::kValueOffset, value);
3370 TNode<Float64T> value) {
3372 StoreHeapNumberValue(result, value);
3386 TNode<Float64T> value =
3388 result = AllocateHeapNumberWithValue(value);
3393 return result.value();
3540 return CAST(var_result.value());
3929 // field contain the "used" value.
3963 TNode<Object> value) {
3971 value);
4048 return {array.value(), empty_array};
4095 FillFixedDoubleArrayWithZero(CAST(elements.value()), capacity);
4097 FillFixedArrayWithSmiZero(CAST(elements.value()), capacity);
4103 array = AllocateJSArray(array_map, elements.value(), length,
4113 elements = InnerAllocateElements(this, array.value(), elements_offset);
4115 StoreObjectFieldNoWriteBarrier(array.value(), JSObject::kElementsOffset,
4116 elements.value());
4124 StoreMapNoWriteBarrier(elements.value(), elements_map_index);
4128 StoreObjectFieldNoWriteBarrier(elements.value(), FixedArray::kLengthOffset,
4134 return {array.value(), elements.value()};
4229 GotoIf(IsHoleyFastElementsKindForRead(var_elements_kind.value()),
4240 var_elements_kind.value());
4262 GotoIfNot(var_holes_converted.value(), &allocate_jsarray);
4272 var_elements_kind.value(),
4274 GotoIf(IsElementsKindLessThanOrEqual(var_elements_kind.value(),
4284 LoadJSArrayElementsMap(var_elements_kind.value(), native_context);
4286 TNode<JSArray> result = AllocateJSArray(array_map, var_new_elements.value(),
4296 std::is_same<TIndex, Smi>::value || std::is_same<TIndex, IntPtrT>::value,
4366 std::is_same<TIndex, Smi>::value || std::is_same<TIndex, IntPtrT>::value,
4389 Branch(TaggedEqual(var_target_map.value(), FixedCOWArrayMapConstant()),
4418 to_kind, capacity, allocation_flags, var_target_map.value());
4455 return UncheckedCast<FixedArray>(var_result.value());
4465 std::is_same<TIndex, Smi>::value || std::is_same<TIndex, IntPtrT>::value,
4504 Branch(WordEqual(var_from_offset.value(), limit_offset), &done, &decrement);
4509 IntPtrSub(var_from_offset.value(), IntPtrConstant(kDoubleSize));
4516 TNode<Float64T> value = LoadDoubleWithHoleCheck(
4517 from_array, var_from_offset.value(), &if_hole, MachineType::Float64());
4520 to_offset, value);
4541 return var_result.value();
4551 std::is_same<TIndex, Smi>::value || std::is_same<TIndex, IntPtrT>::value,
4639 return var_result.value();
4682 TNode<Oddball> value = UndefinedConstant();
4685 [this, value](TNode<HeapObject> array, TNode<IntPtrT> offset) {
4687 value);
4698 std::is_same<TIndex, Smi>::value || std::is_same<TIndex, IntPtrT>::value,
4704 // Determine the value to initialize the {array} based
4706 TNode<Object> value = LoadRoot(value_root_index);
4709 float_value = LoadHeapNumberValue(CAST(value));
4714 [this, value, float_value, kind](TNode<HeapObject> array,
4721 value);
5008 std::is_same<TIndex, Smi>::value || std::is_same<TIndex, IntPtrT>::value,
5066 var_to_offset = var_from_offset.value();
5081 Branch(WordEqual(var_from_offset.value(), limit_offset), &done, &decrement);
5086 var_from_offset.value(),
5095 var_to_offset.value(),
5119 TNode<Float64T> value = LoadElementAndPrepareForStore<Float64T>(
5120 from_array, var_from_offset.value(), from_kind, to_kind, if_hole);
5122 to_offset, value);
5124 TNode<Object> value = LoadElementAndPrepareForStore<Object>(
5125 from_array, var_from_offset.value(), from_kind, to_kind, if_hole);
5128 Store(to_array_adjusted, to_offset, value);
5131 to_array_adjusted, to_offset, value);
5141 // change its value on ia32 (the x87 stack is used to return values
5210 TNode<AnyTaggedT> value = Load<AnyTaggedT>(array, offset);
5213 value = CloneIfMutablePrimitive(CAST(value));
5217 Store(to_array, offset, value);
5220 value);
5253 TNode<Float64T> value =
5255 return AllocateHeapNumberWithValue(value);
5257 TNode<Object> value = Load<Object>(array, offset);
5259 GotoIf(TaggedEqual(value, TheHoleConstant()), if_hole);
5261 return value;
5275 TNode<Object> value = Load<Object>(array, offset);
5277 GotoIf(TaggedEqual(value, TheHoleConstant()), if_hole);
5280 return SmiToFloat64(CAST(value));
5282 return LoadHeapNumberValue(CAST(value));
5290 std::is_same<TIndex, Smi>::value || std::is_same<TIndex, IntPtrT>::value,
5321 std::is_same<TIndex, Smi>::value || std::is_same<TIndex, IntPtrT>::value,
5345 std::is_same<TIndex, Smi>::value || std::is_same<TIndex, IntPtrT>::value,
5424 TNode<Float64T> value = LoadHeapNumberValue(CAST(acc));
5425 TNode<Int32T> value32 = RoundFloat64ToInt32(value);
5427 GotoIfNot(Float64Equal(value, value64), if_not_possible);
5432 return acc_intptr.value();
5436 TNode<Object> value, Label* if_valueisnotnumber) {
5438 TaggedIsSmi(value), [&]() { return SmiToFloat64(CAST(value)); },
5440 GotoIfNot(IsHeapNumber(CAST(value)), if_valueisnotnumber);
5441 return LoadHeapNumberValue(CAST(value));
5446 TNode<Context> context, TNode<Object> value) {
5448 TVARIABLE(Object, var_value, value);
5456 // Load the current {value}.
5457 value = var_value.value();
5459 // Convert {value} to Float64 if it is a number and convert it to a number
5461 var_result = TryTaggedToFloat64(value, &if_valueisnotnumber);
5466 // Convert the {value} to a Number first.
5467 var_value = CallBuiltin(Builtin::kNonNumberToNumber, context, value);
5472 return var_result.value();
5476 TNode<Object> value) {
5480 context, value, &done, &var_result, IsKnownTaggedPointer::kNo);
5482 return var_result.value();
5485 // Truncate {value} to word32 and jump to {if_number} if it is a Number,
5488 TNode<Context> context, TNode<Object> value, Label* if_number,
5492 context, value, if_number, var_word32, IsKnownTaggedPointer::kNo,
5496 // Truncate {value} to word32 and jump to {if_number} if it is a Number,
5500 TNode<Context> context, TNode<Object> value, Label* if_number,
5504 context, value, if_number, var_word32, IsKnownTaggedPointer::kNo,
5522 TNode<Context> context, TNode<Object> value, Label* if_number,
5527 TVARIABLE(Object, var_value, value);
5533 GotoIf(TaggedIsNotSmi(value), &loop);
5535 // {value} is a Smi.
5536 *var_word32 = SmiToInt32(CAST(value));
5544 value = var_value.value();
5548 TNode<HeapObject> value_heap_object = CAST(value);
5560 // convert the value to a Numeric, we cannot reach this path. We can
5562 CSA_DCHECK(this, SmiEqual(var_feedback->value(),
5570 var_value = CallBuiltin(builtin, context, value);
5582 *var_word32 = TruncateHeapNumberValueToWord32(CAST(value));
5588 *var_maybe_bigint = CAST(value);
5594 value = var_value.value();
5595 GotoIf(TaggedIsNotSmi(value), &loop);
5597 // {value} is a Smi.
5598 *var_word32 = SmiToInt32(CAST(value));
5612 TNode<Float64T> value = LoadHeapNumberValue(CAST(number));
5613 var_result = Signed(TruncateFloat64ToWord32(value));
5617 return var_result.value();
5622 TNode<Float64T> value = LoadHeapNumberValue(object);
5623 return Signed(TruncateFloat64ToWord32(value));
5629 TNode<Float64T> value = LoadHeapNumberValue(number);
5630 TryFloat64ToSmi(value, var_result_smi, if_smi);
5633 void CodeStubAssembler::TryFloat32ToSmi(TNode<Float32T> value,
5636 TNode<Int32T> ivalue = TruncateFloat32ToInt32(value);
5641 GotoIfNot(Float32Equal(value, fvalue), &if_heap_number);
5643 Branch(Int32LessThan(UncheckedCast<Int32T>(BitcastFloat32ToInt32(value)),
5665 void CodeStubAssembler::TryFloat64ToSmi(TNode<Float64T> value,
5668 TNode<Int32T> value32 = RoundFloat64ToInt32(value);
5673 GotoIfNot(Float64Equal(value, value64), &if_heap_number);
5675 Branch(Int32LessThan(UncheckedCast<Int32T>(Float64ExtractHighWord32(value)),
5697 TNode<Number> CodeStubAssembler::ChangeFloat32ToTagged(TNode<Float32T> value) {
5701 TryFloat32ToSmi(value, &var_smi_result, &if_smi);
5703 var_result = AllocateHeapNumberWithValue(ChangeFloat32ToFloat64(value));
5708 var_result = var_smi_result.value();
5712 return var_result.value();
5715 TNode<Number> CodeStubAssembler::ChangeFloat64ToTagged(TNode<Float64T> value) {
5719 TryFloat64ToSmi(value, &var_smi_result, &if_smi);
5721 var_result = AllocateHeapNumberWithValue(value);
5726 var_result = var_smi_result.value();
5730 return var_result.value();
5733 TNode<Number> CodeStubAssembler::ChangeInt32ToTagged(TNode<Int32T> value) {
5735 return SmiTag(ChangeInt32ToIntPtr(value));
5739 TNode<PairT<Int32T, BoolT>> pair = Int32AddWithOverflow(value, value);
5746 TNode<Float64T> value64 = ChangeInt32ToFloat64(value);
5760 return var_result.value();
5764 TNode<Int32T> value) {
5766 return SmiTag(ChangeInt32ToIntPtr(value));
5769 TNode<Int32T> result_int32 = Int32Add(value, value);
5775 TNode<Number> CodeStubAssembler::ChangeUint32ToTagged(TNode<Uint32T> value) {
5779 // If {value} > 2^31 - 1, we need to store it in a HeapNumber.
5780 Branch(Uint32LessThan(Uint32Constant(Smi::kMaxValue), value), &if_overflow,
5785 // The {value} is definitely in valid Smi range.
5786 var_result = SmiTag(Signed(ChangeUint32ToWord(value)));
5792 TNode<Float64T> float64_value = ChangeUint32ToFloat64(value);
5798 return var_result.value();
5801 TNode<Number> CodeStubAssembler::ChangeUintPtrToTagged(TNode<UintPtrT> value) {
5805 // If {value} > 2^31 - 1, we need to store it in a HeapNumber.
5806 Branch(UintPtrLessThan(UintPtrConstant(Smi::kMaxValue), value), &if_overflow,
5811 // The {value} is definitely in valid Smi range.
5812 var_result = SmiTag(Signed(value));
5818 TNode<Float64T> float64_value = ChangeUintPtrToFloat64(value);
5824 return var_result.value();
5832 TNode<Object> value,
5834 TVARIABLE(Object, var_value, value);
5836 // Check if the {value} is a Smi or a HeapObject.
5839 Branch(TaggedIsSmi(value), &if_valueissmi, &if_valueisnotsmi);
5842 // Load the instance type of the {value}.
5843 TNode<Uint16T> value_instance_type = LoadInstanceType(CAST(value));
5845 // Check if the {value} is already String.
5851 // Check if the {value} is null.
5853 GotoIf(IsNullOrUndefined(value), &if_valueisnullorundefined);
5854 // Convert the {value} to a String.
5855 var_value = CallBuiltin(Builtin::kToString, context, value);
5860 // The {value} is either null or undefined.
5868 // The {value} is a Smi, convert it to a String.
5869 var_value = CallBuiltin(Builtin::kNumberToString, context, value);
5873 return CAST(var_value.value());
5876 TNode<Uint32T> CodeStubAssembler::ChangeNumberToUint32(TNode<Number> value) {
5879 Branch(TaggedIsSmi(value), &if_smi, &if_heapnumber);
5882 var_result = Unsigned(SmiToInt32(CAST(value)));
5887 var_result = ChangeFloat64ToUint32(LoadHeapNumberValue(CAST(value)));
5891 return var_result.value();
5894 TNode<Float64T> CodeStubAssembler::ChangeNumberToFloat64(TNode<Number> value) {
5898 GotoIf(TaggedIsSmi(value), &smi);
5899 result = LoadHeapNumberValue(CAST(value));
5904 result = SmiToFloat64(CAST(value));
5909 return result.value();
5945 return var_result.value();
5948 TNode<WordT> CodeStubAssembler::TimesSystemPointerSize(TNode<WordT> value) {
5949 return WordShl(value, kSystemPointerSizeLog2);
5952 TNode<WordT> CodeStubAssembler::TimesTaggedSize(TNode<WordT> value) {
5953 return WordShl(value, kTaggedSizeLog2);
5956 TNode<WordT> CodeStubAssembler::TimesDoubleSize(TNode<WordT> value) {
5957 return WordShl(value, kDoubleSizeLog2);
5971 // Check if the {value} is a Smi or a HeapObject.
5973 TaggedIsSmi(var_value.value()),
5976 TNode<HeapObject> value = CAST(var_value.value());
5978 // Load the map of the {value}.
5979 TNode<Map> value_map = LoadMap(value);
5981 // Load the instance type of the {value}.
5984 // Check if {value} is a JSPrimitiveWrapper.
5991 // Load the actual value from the {value}.
5992 var_value = LoadObjectField(value, JSPrimitiveWrapper::kValueOffset);
6035 // The {value} is not a compatible receiver for this method.
6041 return var_value.value();
6045 TNode<Object> value,
6050 GotoIf(TaggedIsSmi(value), &throw_exception);
6052 // Load the instance type of the {value}.
6053 TNode<Map> map = LoadMap(CAST(value));
6059 // The {value} is not a compatible receiver for this method.
6062 StringConstant(method_name), value);
6068 TNode<Object> value,
6073 GotoIf(TaggedIsSmi(value), &throw_exception);
6075 // Load the instance type of the {value}.
6076 TNode<Map> value_map = LoadMap(CAST(value));
6082 // The {value} is not a compatible receiver for this method.
6084 ThrowTypeError(context, msg_template, StringConstant(method_name), value);
6090 TNode<Object> value,
6094 GotoIf(TaggedIsSmi(value), &throw_exception);
6095 Branch(IsCallable(CAST(value)), &out, &throw_exception);
6097 // The {value} is not a compatible receiver for this method.
6448 TNode<BoolT> CodeStubAssembler::IsNullOrUndefined(TNode<Object> value) {
6449 return UncheckedCast<BoolT>(Word32Or(IsUndefined(value), IsNull(value)));
6649 return var_result.value();
6893 TNode<Float64T> value = LoadHeapNumberValue(CAST(number));
6899 GotoIf(Float64LessThan(value, smi_min), &out);
6900 GotoIf(Float64GreaterThan(value, smi_max), &out);
6901 GotoIfNot(Float64Equal(value, value), &out); // NaN.
6907 return var_result.value();
6918 TNode<Float64T> value = LoadHeapNumberValue(number);
6920 return Float64GreaterThanOrEqual(value, float_zero);
6949 // Load the actual value of {number}.
6951 // Truncate the value of {number} to an integer (or an infinity).
6955 // Check if {number}s value matches the integer (ruling out the
6959 // Check if the {integer} value is in safe integer range.
6979 // Truncate the value of {number} to an integer (or an infinity).
6981 // Check if {number}s value matches the integer (ruling out the infinities).
6990 TNode<Float64T> value = LoadHeapNumberValue(number);
6991 TNode<Uint32T> int_value = TruncateFloat64ToWord32(value);
6992 return Float64Equal(value, ChangeUint32ToFloat64(int_value));
7016 std::is_same<TIndex, Smi>::value || std::is_same<TIndex, IntPtrT>::value,
7066 return var_result.value();
7122 return var_result.value();
7142 Branch(IsSequentialStringInstanceType(var_instance_type_.value()), &out,
7158 var_instance_type_.value(), Int32Constant(kStringRepresentationMask));
7166 const TNode<String> string = var_string_.value();
7185 const TNode<String> string = var_string_.value();
7188 var_offset_ = IntPtrAdd(var_offset_.value(), sliced_offset);
7202 const TNode<String> string = var_string_.value();
7219 return var_string_.value();
7235 ReinterpretCast<RawPtrT>(BitcastTaggedToWord(var_string_.value()));
7246 GotoIf(IsUncachedExternalStringInstanceType(var_instance_type_.value()),
7249 TNode<String> string = var_string_.value();
7260 return var_result.value();
7286 return var_result.value();
7333 // Cache entry's key must match the heap number value we're looking for.
7341 // Heap number match, return value from cache entry.
7351 TNode<Word32T> hash = Word32And(SmiToInt32(smi_input.value()), mask);
7357 GotoIf(TaggedNotEqual(smi_key, smi_input.value()), &if_smi_cache_missed);
7359 // Smi match, return value from cache entry.
7378 result = NumberToStringSmi(SmiToInt32(smi_input.value()),
7383 smi_input.value());
7386 result.value());
7392 return result.value();
7412 return result.value();
7422 TVARIABLE(Uint16T, instance_type, LoadInstanceType(var_input.value()));
7428 Branch(IsJSReceiverInstanceType(instance_type.value()), &if_inputisreceiver,
7433 // The {var_input.value()} is a JSReceiver, we need to convert it to a
7438 TNode<Object> result = CallStub(callable, context, var_input.value());
7460 CSA_DCHECK(this, Word32BinaryNot(IsHeapNumber(var_input.value())));
7461 instance_type = LoadInstanceType(var_input.value());
7473 TryPlainPrimitiveNonNumberToNumber(var_input.value(), &var_result_number,
7475 var_result = var_result_number.value();
7480 Branch(IsBigIntInstanceType(instance_type.value()), &if_inputisbigint,
7486 var_result = CAST(var_input.value());
7495 var_input.value()));
7503 // The {var_input.value()} is something else (e.g. Symbol), let the
7511 var_result = CAST(CallRuntime(function_id, context, var_input.value()));
7519 CSA_DCHECK(this, IsNumber(var_result.value()));
7521 return var_result.value();
7542 // The {input} is an Oddball, we just need to load the Number value of it.
7590 return var_result.value();
7645 return var_result.value();
7678 return var_result.value();
7699 return var_result.value();
7703 TNode<Object> value,
7705 TaggedToNumeric(context, value, var_numeric, nullptr);
7709 TNode<Context> context, TNode<Object> value,
7712 TaggedToNumeric(context, value, var_numeric, var_feedback);
7716 TNode<Object> value,
7721 GotoIf(TaggedIsSmi(value), &if_smi);
7722 TNode<HeapObject> heap_object_value = CAST(value);
7736 *var_numeric = CAST(value);
7741 *var_numeric = CAST(value);
7746 *var_numeric = CAST(value);
7803 const TNode<Float64T> value = LoadHeapNumberValue(CAST(number));
7808 Branch(Float64Equal(value, float_zero), &return_zero, &next);
7815 Branch(Float64Equal(value, value), &next, &return_zero);
7824 Branch(Float64Equal(value, positive_infinity), &return_zero, &next);
7833 Branch(Float64Equal(value, negative_infinity), &return_zero, &next);
7837 // * Let int be the mathematical value that is the same sign as number and
7842 TNode<Float64T> x = Float64Trunc(value);
7860 return CAST(var_result.value());
7876 return CAST(var_result.value());
7905 return result.value();
7947 TNode<Uint32T> value,
7951 // Ensure the {value} fits fully in the mask.
7952 CSA_DCHECK(this, Uint32LessThanOrEqual(value, Uint32Constant(mask >> shift)));
7953 TNode<Word32T> encoded_value = Word32Shl(value, Int32Constant(shift));
7965 TNode<UintPtrT> value,
7969 // Ensure the {value} fits fully in the mask.
7971 UintPtrLessThanOrEqual(value, UintPtrConstant(mask >> shift)));
7972 TNode<WordT> encoded_value = WordShl(value, static_cast<int>(shift));
7983 void CodeStubAssembler::SetCounter(StatsCounter* counter, int value) {
7988 Int32Constant(value));
8000 TNode<Int32T> value = Load<Int32T>(counter_address);
8001 value = Int32Add(value, Int32Constant(delta));
8002 StoreNoWriteBarrier(MachineRepresentation::kWord32, counter_address, value);
8014 TNode<Int32T> value = Load<Int32T>(counter_address);
8015 value = Int32Sub(value, Int32Constant(delta));
8016 StoreNoWriteBarrier(MachineRepresentation::kWord32, counter_address, value);
8021 void CodeStubAssembler::Increment(TVariable<TIndex>* variable, int value) {
8023 IntPtrOrSmiAdd(variable->value(), IntPtrOrSmiConstant<TIndex>(value));
8029 int value);
8031 TVariable<IntPtrT>* variable, int value);
8033 TVariable<RawPtrT>* variable, int value);
8058 GotoIf(IsSymbolInstanceType(var_instance_type.value()), &if_symbol);
8062 Branch(IsStringInstanceType(var_instance_type.value()), &if_string,
8086 GotoIf(InstanceTypeEqual(var_instance_type.value(), THIN_STRING_TYPE),
8088 GotoIf(InstanceTypeEqual(var_instance_type.value(),
8093 GotoIf(IsSetWord32(var_instance_type.value(), kIsNotInternalizedMask),
8118 GotoIfNot(InstanceTypeEqual(var_instance_type.value(), ODDBALL_TYPE),
8319 // Loads the value for the entry with the given key_index.
8320 // Returns a tagged value.
8324 static_assert(!std::is_same<ContainerType, DescriptorArray>::value,
8344 static_assert(!std::is_same<ContainerType, DescriptorArray>::value,
8384 // Stores the value for the entry with the given key_index.
8388 TNode<Object> value,
8393 StoreFixedArrayElement(container, key_index, value, write_barrier,
8400 TNode<Object> value, WriteBarrierMode write_barrier) {
8418 value, mode);
8439 TNode<Object> value, WriteBarrierMode write_barrier);
8516 TNode<Smi> value =
8517 CAST(LoadValueByKeyIndex<NameToIndexHashTable>(table, var_entry.value()));
8518 return SmiToIntPtr(value);
8525 static_assert(std::is_same<Dictionary, NameDictionary>::value ||
8526 std::is_same<Dictionary, GlobalDictionary>::value ||
8527 std::is_same<Dictionary, NameToIndexHashTable>::value,
8553 TNode<IntPtrT> entry = var_entry.value();
8576 entry = Signed(WordAnd(IntPtrAdd(entry, var_count.value()), mask));
8643 TNode<IntPtrT> entry = var_entry->value();
8670 entry = Signed(WordAnd(IntPtrAdd(entry, var_count.value()), mask));
8686 // Check that the value is a data property.
8687 TNode<IntPtrT> index = EntryToIndex<NumberDictionary>(var_entry.value());
8694 // Finally, load the value.
8717 TNode<Name> key, TNode<Object> value,
8725 TNode<NameDictionary> dictionary, TNode<Name> name, TNode<Object> value,
8734 // Store name and value.
8736 StoreValueByKeyIndex<NameDictionary>(dictionary, index, value);
8744 // We OR over the actual index below, so we expect the initial value to be 0.
8753 var_details = SmiOr(var_details.value(), dont_enum);
8759 var_details.value());
8764 TNode<GlobalDictionary> dictionary, TNode<Name> key, TNode<Object> value,
8771 TNode<Object> value, Label* bailout) {
8801 InsertEntry<Dictionary>(dictionary, key, value, var_key_index.value(),
8807 TNode<Name> key, TNode<Object> value,
8827 SwissNameDictionaryAdd(dictionary, key, value, var_details.value(), bailout);
8864 static_assert(std::is_base_of<FixedArray, Array>::value ||
8865 std::is_base_of<WeakFixedArray, Array>::value ||
8866 std::is_base_of<DescriptorArray, Array>::value,
8945 static_assert(std::is_base_of<TransitionArray, Array>::value ||
8946 std::is_base_of<DescriptorArray, Array>::value,
8984 CSA_DCHECK(this, Uint32LessThanOrEqual(var_low.value(), var_high.value()));
8992 Int32Add(var_low.value(),
8993 Word32Shr(Int32Sub(var_high.value(), var_low.value()), 1)));
9013 GotoIf(Word32NotEqual(var_low.value(), var_high.value()), &binary_loop);
9020 GotoIf(Int32GreaterThan(var_low.value(), limit), if_not_found);
9023 GetSortedKeyIndex<Array>(array, var_low.value());
9035 var_low = Unsigned(Int32Add(var_low.value(), Int32Constant(1)));
9072 list, var_start_key_index.value(), var_end_key_index.value(),
9075 LoadKeyByKeyIndex(var_descriptors.value(), descriptor_key_index);
9090 GotoIf(var_is_symbol_processing_loop.value(), &if_name_ok);
9096 Branch(var_has_symbol.value(), &next_iteration, &if_first_symbol);
9109 Branch(var_is_symbol_processing_loop.value(), &next_iteration,
9124 Branch(var_stable.value(), &if_stable, &if_not_stable);
9130 var_meta_storage = var_descriptors.value();
9140 TryLookupPropertyInSimpleObject(object, var_map.value(), next_key,
9148 TNode<DescriptorArray> descriptors = CAST(var_meta_storage.value());
9149 TNode<IntPtrT> name_index = var_entry.value();
9153 GotoIf(IsSetWord32(var_details.value(),
9157 LoadPropertyFromFastObject(object, var_map.value(), descriptors,
9158 name_index, var_details.value(),
9165 CAST(var_meta_storage.value());
9166 TNode<IntPtrT> entry = var_entry.value();
9180 // Here we have details and value which could be an accessor.
9186 var_value.value(), object, var_details.value(), context, object,
9196 body(next_key, var_value.value());
9201 GotoIfNot(var_stable.value(), &next_iteration);
9216 GotoIf(var_is_symbol_processing_loop.value(), &done);
9217 GotoIfNot(var_has_symbol.value(), &done);
9233 GotoIfNot(IsMap(var_maybe_constructor.value()), &done);
9239 LoadObjectField(var_maybe_constructor.value(),
9241 GotoIf(IsMap(var_maybe_constructor.value()), &loop);
9246 return var_maybe_constructor.value();
9282 TNode<Context> context = LoadJSFunctionContext(var_function.value());
9302 TNode<JSReceiver> current_value = current.value();
9312 TNode<JSProxy> proxy = CAST(current.value());
9328 TNode<JSBoundFunction> bound_function = CAST(current.value());
9337 TNode<JSWrappedFunction> wrapped_function = CAST(current.value());
9346 TNode<JSFunction> function = CAST(current.value());
9491 LoadPropertyFromGlobalDictionary(CAST(var_meta_storage.value()),
9492 var_name_index.value(), &var_details,
9551 return return_value.value();
9624 TNode<Object> value =
9633 *var_value = value;
9638 var_double_value = LoadHeapNumberValue(CAST(value));
9646 AllocateHeapNumberWithValue(var_double_value.value());
9680 TNode<Object> value =
9682 GotoIf(TaggedEqual(value, TheHoleConstant()), if_deleted);
9684 *var_value = value;
9701 // |value| is the property backing store's contents, which is either a value or
9703 // PropertyCell (TODO: use UnionT). Returns either the original value, or the
9706 TNode<Object> value, TNode<HeapObject> holder, TNode<Uint32T> details,
9709 TVARIABLE(Object, var_value, value);
9718 GotoIfNot(IsAccessorPair(CAST(value)), &if_accessor_info);
9725 TNode<AccessorPair> accessor_pair = CAST(value);
9790 TNode<AccessorInfo> accessor_info = CAST(value);
9844 return var_value.value();
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();
9906 // Here we have details and value which could be an accessor.
9913 TNode<Object> value =
9914 CallGetterIfAccessor(var_value->value(), object, var_details->value(),
9916 *var_value = value;
10161 TNode<Map> holder_map = var_holder_map.value();
10162 TNode<Int32T> holder_instance_type = var_holder_instance_type.value();
10165 lookup_property_in_holder(CAST(receiver), var_holder.value(), holder_map,
10166 holder_instance_type, var_unique.value(),
10174 GotoIfNot(IsString(var_unique.value()), &next_proto);
10175 BranchIfMaybeSpecialIndex(CAST(var_unique.value()), if_bailout,
10210 lookup_element_in_holder(CAST(receiver), var_holder.value(),
10211 var_holder_map.value(),
10212 var_holder_instance_type.value(),
10213 var_index.value(), &next_proto, if_bailout);
10216 TNode<HeapObject> proto = LoadMapPrototype(var_holder_map.value());
10246 TNode<Map> object_map = var_object_map.value();
10292 return var_result.value();
10343 callable_prototype = var_callable_prototype.value();
10360 return var_result.value();
10367 static_assert(std::is_same<TIndex, Smi>::value ||
10368 std::is_same<TIndex, TaggedIndex>::value ||
10369 std::is_same<TIndex, IntPtrT>::value ||
10370 std::is_same<TIndex, UintPtrT>::value,
10377 if (std::is_same<TIndex, Smi>::value) {
10384 index = smi_index.value();
10391 } else if (std::is_same<TIndex, TaggedIndex>::value) {
10455 GotoIf(IsFeedbackVector(maybe_vector.value()), &done);
10462 return maybe_vector.value();
10472 GotoIf(HasInstanceType(feedback_cell_array.value(),
10477 TNode<FeedbackVector> vector = CAST(feedback_cell_array.value());
10483 return CAST(feedback_cell_array.value());
10586 *existing_feedback = SmiOr(existing_feedback->value(), SmiConstant(feedback));
10592 *existing_feedback = SmiOr(existing_feedback->value(), feedback);
10638 TNode<Float64T> value = LoadHeapNumberValue(CAST(key));
10639 TNode<IntPtrT> int_value = ChangeFloat64ToIntPtr(value);
10640 GotoIfNot(Float64Equal(value, RoundIntPtrToFloat64(int_value)),
10659 return var_intptr_key.value();
10707 TNode<BigInt> value) {
10708 static_assert(std::is_same<TIndex, UintPtrT>::value ||
10709 std::is_same<TIndex, IntPtrT>::value,
10716 BigIntToRawBytes(value, &var_low, &var_high);
10721 StoreNoWriteBarrier(rep, elements, offset, var_high.value());
10724 var_low.value());
10726 StoreNoWriteBarrier(rep, elements, offset, var_low.value());
10729 StoreNoWriteBarrier(rep, elements, offset, var_low.value());
10733 var_high.value());
10742 TNode<BigInt> value) {
10743 StoreElementTypedArrayBigInt(elements, kind, index, value);
10750 TNode<BigInt> value) {
10751 StoreElementTypedArrayBigInt(elements, kind, index, value);
10758 TNode<Word32T> value) {
10759 static_assert(std::is_same<TIndex, UintPtrT>::value ||
10760 std::is_same<TIndex, IntPtrT>::value,
10764 CSA_DCHECK(this, Word32Equal(value, Word32And(Int32Constant(0xFF), value)));
10769 StoreNoWriteBarrier(rep, elements, offset, value);
10776 TNode<Word32T> value) {
10777 StoreElementTypedArrayWord32(elements, kind, index, value);
10784 TNode<Word32T> value) {
10785 StoreElementTypedArrayWord32(elements, kind, index, value);
10792 TNode<TValue> value) {
10794 static_assert(std::is_same<TIndex, Smi>::value ||
10795 std::is_same<TIndex, UintPtrT>::value ||
10796 std::is_same<TIndex, IntPtrT>::value,
10798 static_assert(std::is_same<TArray, RawPtrT>::value ||
10799 std::is_same<TArray, FixedArrayBase>::value,
10801 static_assert(std::is_same<TValue, Int32T>::value ||
10802 std::is_same<TValue, Float32T>::value ||
10803 std::is_same<TValue, Float64T>::value ||
10804 std::is_same<TValue, Object>::value,
10805 "Only Int32T, Float32T, Float64T or object value "
10811 StoreNoWriteBarrier(rep, elements, offset, value);
10817 TNode<Object> value) {
10819 std::is_same<TIndex, Smi>::value || std::is_same<TIndex, IntPtrT>::value,
10823 StoreElementTypedArray(elements, kind, index, value);
10825 TNode<Smi> smi_value = CAST(value);
10828 StoreFixedArrayElement(CAST(elements), index, value);
10835 TNode<Float64T> value) {
10837 std::is_same<TIndex, Smi>::value || std::is_same<TIndex, IntPtrT>::value,
10840 StoreFixedDoubleArrayElement(CAST(elements), index, value);
10845 TNode<TIndex> index, TNode<TValue> value) {
10846 static_assert(std::is_same<TIndex, Smi>::value ||
10847 std::is_same<TIndex, IntPtrT>::value ||
10848 std::is_same<TIndex, UintPtrT>::value,
10851 std::is_same<TValue, Int32T>::value ||
10852 std::is_same<TValue, Word32T>::value ||
10853 std::is_same<TValue, Float32T>::value ||
10854 std::is_same<TValue, Float64T>::value ||
10855 std::is_same<TValue, BigInt>::value,
10856 "Only Int32T, Word32T, Float32T, Float64T or BigInt value types "
10860 StoreElementTypedArray(elements, kind, index, value);
10891 return UncheckedCast<Uint8T>(var_value.value());
10907 return UncheckedCast<Uint8T>(var_value.value());
10934 GotoIf(TaggedIsSmi(var_input.value()), &if_smi);
10936 // same layout as the HeapNumber for the HeapNumber::value field. This
10938 TNode<HeapObject> heap_object = CAST(var_input.value());
10947 TNode<Float64T> value =
10950 var_result = Float64ToUint8Clamped(value);
10952 var_result = TruncateFloat64ToWord32(value);
10959 TNode<Int32T> value = SmiToInt32(CAST(var_input.value()));
10961 var_result = Int32ToUint8Clamped(value);
10963 var_result = value;
10975 return var_result.value();
10990 GotoIf(TaggedIsSmi(var_input.value()), &if_smi);
10992 // same layout as the HeapNumber for the HeapNumber::value field. This
10994 TNode<HeapObject> heap_object = CAST(var_input.value());
11003 TNode<Float64T> value =
11005 var_result = TruncateFloat64ToFloat32(value);
11011 TNode<Int32T> value = SmiToInt32(CAST(var_input.value()));
11012 var_result = RoundInt32ToFloat32(value);
11023 return var_result.value();
11038 GotoIf(TaggedIsSmi(var_input.value()), &if_smi);
11040 // same layout as the HeapNumber for the HeapNumber::value field. This
11042 TNode<HeapObject> heap_object = CAST(var_input.value());
11058 TNode<Int32T> value = SmiToInt32(CAST(var_input.value()));
11059 var_result = ChangeInt32ToFloat64(value);
11070 return var_result.value();
11100 // Negative value. Simulate two's complement.
11102 *var_high = Unsigned(IntPtrSub(IntPtrConstant(0), var_high->value()));
11104 GotoIf(IntPtrEqual(var_low->value(), IntPtrConstant(0)), &no_carry);
11105 *var_high = Unsigned(IntPtrSub(var_high->value(), IntPtrConstant(1)));
11109 *var_low = Unsigned(IntPtrSub(IntPtrConstant(0), var_low->value()));
11116 TNode<Object> value, ElementsKind elements_kind,
11142 TNode<Object> value, ElementsKind elements_kind,
11145 GotoIf(TaggedIsSmi(value), &dont_allocate_heap_number);
11146 GotoIf(IsHeapNumber(CAST(value)), &dont_allocate_heap_number);
11154 *maybe_converted_value = value;
11162 TNode<Object> value, ElementsKind elements_kind,
11165 GotoIf(TaggedIsSmi(value), &dont_allocate_heap_number);
11166 GotoIf(IsHeapNumber(CAST(value)), &dont_allocate_heap_number);
11173 *maybe_converted_value = value;
11181 TNode<Object> value, ElementsKind elements_kind,
11188 TNode<JSTypedArray> typed_array, TNode<IntPtrT> key, TNode<Object> value,
11202 PrepareValueForWriteToTypedArray<TValue>(value, elements_kind, context);
11242 // We already prepared the incoming value for storing into a typed array.
11244 // ToNumber again in the runtime so pass the converted value to the runtime.
11245 // The prepared value is an untagged value. Convert it to a tagged value
11247 // before we prepare the value, since ToNumber can detach the ArrayBuffer.
11251 value, elements_kind, converted_value, maybe_converted_value);
11260 TNode<JSObject> object, TNode<Object> key, TNode<Object> value,
11277 // TODO(rmcilroy): TNodify the converted value once this funciton and
11296 EmitElementStoreTypedArray<Word32T>(typed_array, intptr_key, value,
11302 EmitElementStoreTypedArray<Float32T>(typed_array, intptr_key, value,
11308 EmitElementStoreTypedArray<Float64T>(typed_array, intptr_key, value,
11316 EmitElementStoreTypedArray<BigInt>(typed_array, intptr_key, value,
11329 // In case value is stored into a fast smi array, assure that the value is
11334 GotoIfNot(TaggedIsSmi(value), bailout);
11336 float_value = TryTaggedToFloat64(value, bailout);
11378 StoreElement(elements, elements_kind, intptr_key, float_value.value());
11380 StoreElement(elements, elements_kind, intptr_key, value);
11396 // We don't support growing here unless the value is being appended.
11447 return checked_elements.value();
11466 return new_elements_var.value();
11634 TNode<HeapObject> value, int additional_offset) {
11635 TNode<MaybeObject> weak_value = MakeWeak(value);
11689 TNode<BoolT> first_check = IntPtrOrSmiEqual(var.value(), end_index);
11692 if (first_check_val) return var.value();
11703 body(var.value());
11707 Branch(IntPtrOrSmiNotEqual(var.value(), end_index), &loop, &after_loop);
11710 return var.value();
11878 Branch(Float64Equal(var_left_float.value(), var_right_float.value()),
11882 Branch(Float64LessThan(var_left_float.value(), var_right_float.value()),
11886 Branch(Float64LessThanOrEqual(var_left_float.value(),
11887 var_right_float.value()),
11892 Float64GreaterThan(var_left_float.value(), var_right_float.value()),
11896 Branch(Float64GreaterThanOrEqual(var_left_float.value(),
11897 var_right_float.value()),
11943 CSA_DCHECK(this, Word32NotEqual(cur_depth.value(), Int32Constant(0)));
11949 LoadScopeInfoHasExtensionField(LoadScopeInfo(cur_context.value()));
11952 // Jump to the target if the extension slot is not an undefined value.
11954 LoadContextElement(cur_context.value(), Context::EXTENSION_INDEX);
11960 cur_depth = Unsigned(Int32Sub(cur_depth.value(), Int32Constant(1)));
11962 LoadContextElement(cur_context.value(), Context::PREVIOUS_INDEX));
11964 Branch(Word32NotEqual(cur_depth.value(), Int32Constant(0)),
11969 return cur_context.value();
11996 left = var_left.value();
11997 right = var_right.value();
12357 Branch(Float64LessThan(var_left_float.value(), var_right_float.value()),
12361 Branch(Float64LessThanOrEqual(var_left_float.value(),
12362 var_right_float.value()),
12367 Float64GreaterThan(var_left_float.value(), var_right_float.value()),
12371 Branch(Float64GreaterThanOrEqual(var_left_float.value(),
12372 var_right_float.value()),
12393 return var_result.value();
12407 void CodeStubAssembler::GenerateEqual_Same(TNode<Object> value, Label* if_equal,
12412 // left and the right hand side reference exactly the same value.
12415 GotoIf(TaggedIsSmi(value), &if_smi);
12417 TNode<HeapObject> value_heapobject = CAST(value);
12532 left = var_left.value();
12533 right = var_right.value();
12538 // {left} and {right} reference the exact same value, yet we need special
12556 // We have already checked for {left} and {right} being the same value,
12921 Branch(Float64Equal(var_left_float.value(), var_right_float.value()),
12938 return result.value();
12946 // if (lhs->IsHeapNumber()) return HeapNumber::cast(lhs)->value() != NaN;
12952 // return Smi::ToInt(rhs) == HeapNumber::cast(lhs)->value();
12954 // return HeapNumber::cast(rhs)->value() ==
12955 // HeapNumber::cast(lhs)->value();
12985 // return Smi::ToInt(lhs) == HeapNumber::cast(rhs)->value();
13004 // The {lhs} and {rhs} reference the exact same value, yet we need special
13247 // HeapNumber with an equal floating point value.
13263 // The {rhs} could be a HeapNumber with the same value as {lhs}.
13311 return result.value();
13335 // iff the {rhs} is a HeapNumber with the same float64 value.
13351 // iff the {lhs} is a HeapNumber with the same float64 value.
13359 // HeapNumbers with the same value, or both are Strings with the
13361 // value.
13406 TNode<Float64T> lhs_value = UncheckedCast<Float64T>(var_lhs_value.value());
13407 TNode<Float64T> rhs_value = UncheckedCast<Float64T>(var_rhs_value.value());
13519 CSA_DCHECK(this, IsBoolean(result.value()));
13520 return result.value();
13579 *cache_array_out = cache_array.value();
13580 *cache_length_out = cache_length.value();
13583 TNode<String> CodeStubAssembler::Typeof(TNode<Object> value) {
13590 GotoIf(TaggedIsSmi(value), &return_number);
13592 TNode<HeapObject> value_heap_object = CAST(value);
13668 return result_var.value();
13714 return var_result.value();
13790 return var_result.value();
13793 TNode<Number> CodeStubAssembler::NumberInc(TNode<Number> value) {
13797 Branch(TaggedIsSmi(value), &if_issmi, &if_isnotsmi);
13802 TNode<Smi> smi_value = CAST(value);
13816 TNode<HeapNumber> heap_number_value = CAST(value);
13818 // Load the HeapNumber value.
13825 TNode<Float64T> finc_value = var_finc_value.value();
13833 return var_result.value();
13836 TNode<Number> CodeStubAssembler::NumberDec(TNode<Number> value) {
13840 Branch(TaggedIsSmi(value), &if_issmi, &if_isnotsmi);
13844 TNode<Smi> smi_value = CAST(value);
13859 TNode<HeapNumber> heap_number_value = CAST(value);
13861 // Load the HeapNumber value.
13868 TNode<Float64T> fdec_value = var_fdec_value.value();
13876 return var_result.value();
13897 return var_result.value();
13918 return var_result.value();
13996 TNode<Context> context, TNode<Object> value, TNode<Oddball> done) {
14007 StoreObjectFieldNoWriteBarrier(result, JSIteratorResult::kValueOffset, value);
14013 TNode<Context> context, TNode<Object> key, TNode<Object> value) {
14023 StoreFixedArrayElement(elements, 1, value);
14119 return result.value();
14200 return result.value();
14264 return result.value();
14297 return result.value();
14346 return result.value();
14368 return CAST(var_result.value());
14439 return result.value();
14465 void CodeStubArguments::PopAndReturn(TNode<Object> value) {
14467 assembler_->PopAndReturn(pop_count, value);
14761 return sfi_code.value();
14818 // which is a JavaScript value and hence cannot be confused with an elements
14823 LoadObjectField(var_object.value(), JSObject::kElementsOffset);
14828 GotoIfNot(IsJSArrayMap(object_map.value()), if_slow);
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());
14938 // DebugPrint explicitly checks whether the tagged value is a MaybeObject.
14983 TNode<Object> value) {
14986 value);
15052 return array.value();
15064 // Cache exhausted, populate the cache. Return value is the new index.
15077 TNode<String> CodeStubAssembler::TaggedToDirectString(TNode<Object> value,
15079 ToDirectStringAssembler to_direct(state(), CAST(value));
15082 return CAST(value);
15176 // expected value for all relevant properties.
15206 // Finally, check whether the actual value equals the expected value.
15217 TNode<Object> actual_value = var_value.value();
15363 return ChangeInt32ToIntPtr(nof.value());
15379 return ChangeInt32ToIntPtr(nod.value());
15418 return used_var.value();
15445 return new_nof_var.value();
15723 Load<Uint8T>(original, details_table_offset_minus_tag.value());
15726 details_table_offset_minus_tag.value(), details,
15732 IntPtrAdd(details_table_offset_minus_tag.value(),
15830 TNode<Object> value) {
15844 value, StoreToObjectWriteBarrier::kFull);
15939 TNode<Object> value,
15943 SwissNameDictionaryAddSIMD(table, key, value, property_details,
15946 SwissNameDictionaryAddPortable(table, key, value, property_details,
15953 // The barrier ensures that the value can be shared across Isolates.
15956 TNode<Object> value = var_shared_value->value();
15960 GotoIf(TaggedIsSmi(value), &done);
15964 TNode<IntPtrT> page_flags = LoadBasicMemoryChunkFlags(CAST(value));
15972 LoadMapInstanceType(LoadMap(CAST(value)));
15992 CallRuntime(Runtime::kSharedValueBarrierSlow, context, value);
16001 WordAnd(LoadBasicMemoryChunkFlags(CAST(var_shared_value->value())),