Lines Matching full:value
47 value_ = smi->value();
58 Smi* smi = Smi::FromInt(AsSmi()->value() | DeletedField::encode(1));
72 void holder::set_##name(int value) { WRITE_INT_FIELD(this, offset, value); }
77 void holder::set_##name(type* value, WriteBarrierMode mode) { \
78 WRITE_FIELD(this, offset, value); \
86 Object* value = READ_FIELD(this, offset); \
87 return Smi::cast(value)->value(); \
89 void holder::set_##name(int value) { \
90 WRITE_FIELD(this, offset, Smi::FromInt(value)); \
104 void holder::set_##name(bool value) { \
105 set_##field(BooleanBit::set(field(), offset, value)); \
514 return IsJSValue() && JSValue::cast(this)->value()->IsString();
669 ? static_cast<double>(reinterpret_cast<Smi*>(this)->value())
670 : reinterpret_cast<HeapNumber*>(this)->value();
678 double value = HeapNumber::cast(this)->value();
679 int int_value = FastD2I(value);
680 if (value == FastI2D(int_value) && Smi::IsValid(int_value)) {
715 #define WRITE_FIELD(p, offset, value) \
716 (*reinterpret_cast<Object**>(FIELD_ADDR(p, offset)) = value)
723 // write due to the assert validating the written value.
736 #define WRITE_DOUBLE_FIELD(p, offset, value) \
737 (*reinterpret_cast<double*>(FIELD_ADDR(p, offset)) = value)
742 #define WRITE_INT_FIELD(p, offset, value) \
743 (*reinterpret_cast<int*>(FIELD_ADDR(p, offset)) = value)
748 #define WRITE_INTPTR_FIELD(p, offset, value) \
749 (*reinterpret_cast<intptr_t*>(FIELD_ADDR(p, offset)) = value)
754 #define WRITE_UINT32_FIELD(p, offset, value) \
755 (*reinterpret_cast<uint32_t*>(FIELD_ADDR(p, offset)) = value)
760 #define WRITE_SHORT_FIELD(p, offset, value) \
761 (*reinterpret_cast<uint16_t*>(FIELD_ADDR(p, offset)) = value)
766 #define WRITE_BYTE_FIELD(p, offset, value) \
767 (*reinterpret_cast<byte*>(FIELD_ADDR(p, offset)) = value)
775 int Smi::value() {
780 Smi* Smi::FromInt(int value) {
781 ASSERT(Smi::IsValid(value));
784 (static_cast<intptr_t>(value) << smi_shift_bits) | kSmiTag;
789 Smi* Smi::FromIntptr(intptr_t value) {
790 ASSERT(Smi::IsValid(value));
792 return reinterpret_cast<Smi*>((value << smi_shift_bits) | kSmiTag);
797 return static_cast<Type>(value() & kFailureTypeTagMask);
816 return static_cast<int>(value() >> kShiftBits);
822 return static_cast<AllocationSpace>((value() >> kFailureTypeTagSize)
842 intptr_t Failure::value() const {
858 int value = static_cast<int>(requested << kSpaceTagSize) | NEW_SPACE;
859 return Construct(RETRY_AFTER_GC, value);
863 Failure* Failure::Construct(Type type, intptr_t value) {
864 intptr_t info = (static_cast<intptr_t>(value) << kFailureTypeTagSize) | type;
870 bool Smi::IsValid(intptr_t value) {
872 bool in_range = (value >= kMinValue) && (value <= kMaxValue);
876 // To be representable as a long smi, the value must be a 32-bit integer.
877 bool result = (value == static_cast<int32_t>(value));
880 // most-significant bits of 'value' must be either 00 or 11 due to
885 // bool result = ((value + 0x40000000) & 0x80000000) == 0;
890 bool result = (static_cast<uintptr_t>(value + 0x40000000U) < 0x80000000U);
1021 void HeapObject::set_map(Map* value) {
1022 set_map_word(MapWord::FromMap(value));
1106 double HeapNumber::value() {
1111 void HeapNumber::set_value(double value) {
1112 WRITE_DOUBLE_FIELD(this, kValueOffset, value);
1128 void JSObject::set_elements(Array* value, WriteBarrierMode mode) {
1130 ASSERT(value->IsFixedArray() || value->IsPixelArray() ||
1131 value->IsExternalArray());
1132 WRITE_FIELD(this, kElementsOffset, value);
1153 Object* JSGlobalPropertyCell::value() {
1213 void JSObject::SetInternalField(int index, Object* value) {
1219 WRITE_FIELD(this, offset, value);
1240 Object* JSObject::FastPropertyAtPut(int index, Object* value) {
1245 WRITE_FIELD(this, offset, value);
1249 properties()->set(index, value);
1251 return value;
1265 Object* value,
1271 WRITE_FIELD(this, offset, value);
1273 return value;
1279 Object* value = Heap::undefined_value();
1281 WRITE_FIELD(this, offset, value);
1287 Object* value = Heap::undefined_value();
1289 WRITE_FIELD(this, offset, value);
1301 int value = Smi::cast(object)->value();
1302 if (value < 0) return false;
1303 *index = value;
1307 double value = HeapNumber::cast(object)->value();
1308 uint32_t uint_value = static_cast<uint32_t>(value);
1309 if (value == static_cast<double>(uint_value)) {
1322 if (!js_value->value()->IsString()) return false;
1324 String* str = String::cast(js_value->value());
1337 void FixedArray::set(int index, Smi* value) {
1338 ASSERT(reinterpret_cast<Object*>(value)->IsSmi());
1340 WRITE_FIELD(this, offset, value);
1344 void FixedArray::set(int index, Object* value) {
1347 WRITE_FIELD(this, offset, value);
1359 Object* value,
1363 WRITE_FIELD(this, offset, value);
1368 void FixedArray::fast_set(FixedArray* array, int index, Object* value) {
1370 ASSERT(!Heap::InNewSpace(value));
1371 WRITE_FIELD(array, kHeaderSize + index * kPointerSize, value);
1539 (Smi::cast(max_index_object)->value() & kRequiresSlowElementsMask);
1546 uint32_t value = static_cast<uint32_t>(Smi::cast(max_index_object)->value());
1547 return value >> kRequiresSlowElementsTagSize;
1626 void String::set_hash_field(uint32_t value) {
1627 WRITE_UINT32_FIELD(this, kHashFieldOffset, value);
1673 void String::Set(int index, uint16_t value) {
1678 ? SeqAsciiString::cast(this)->SeqAsciiStringSet(index, value)
1679 : SeqTwoByteString::cast(this)->SeqTwoByteStringSet(index, value);
1702 void SeqAsciiString::SeqAsciiStringSet(int index, uint16_t value) {
1703 ASSERT(index >= 0 && index < length() && value <= kMaxAsciiCharCode);
1705 static_cast<byte>(value));
1735 void SeqTwoByteString::SeqTwoByteStringSet(int index, uint16_t value) {
1737 WRITE_SHORT_FIELD(this, kHeaderSize + index * kShortSize, value);
1763 void ConsString::set_first(String* value, WriteBarrierMode mode) {
1764 WRITE_FIELD(this, kFirstOffset, value);
1779 void ConsString::set_second(String* value, WriteBarrierMode mode) {
1780 WRITE_FIELD(this, kSecondOffset, value);
1813 void ByteArray::set(int index, byte value) {
1815 WRITE_BYTE_FIELD(this, kHeaderSize + index * kCharSize, value);
1842 void PixelArray::set_external_pointer(uint8_t* value, WriteBarrierMode mode) {
1843 intptr_t ptr = reinterpret_cast<intptr_t>(value);
1855 void PixelArray::set(int index, uint8_t value) {
1858 ptr[index] = value;
1868 void ExternalArray::set_external_pointer(void* value, WriteBarrierMode mode) {
1869 intptr_t ptr = reinterpret_cast<intptr_t>(value);
1881 void ExternalByteArray::set(int index, int8_t value) {
1884 ptr[index] = value;
1895 void ExternalUnsignedByteArray::set(int index, uint8_t value) {
1898 ptr[index] = value;
1909 void ExternalShortArray::set(int index, int16_t value) {
1912 ptr[index] = value;
1923 void ExternalUnsignedShortArray::set(int index, uint16_t value) {
1926 ptr[index] = value;
1937 void ExternalIntArray::set(int index, int32_t value) {
1940 ptr[index] = value;
1951 void ExternalUnsignedIntArray::set(int index, uint32_t value) {
1954 ptr[index] = value;
1965 void ExternalFloatArray::set(int index, float value) {
1968 ptr[index] = value;
2005 void Map::set_instance_size(int value) {
2006 ASSERT_EQ(0, value & (kPointerSize - 1));
2007 value >>= kPointerSizeLog2;
2008 ASSERT(0 <= value && value < 256);
2009 WRITE_BYTE_FIELD(this, kInstanceSizeOffset, static_cast<byte>(value));
2013 void Map::set_inobject_properties(int value) {
2014 ASSERT(0 <= value && value < 256);
2015 WRITE_BYTE_FIELD(this, kInObjectPropertiesOffset, static_cast<byte>(value));
2019 void Map::set_pre_allocated_property_fields(int value) {
2020 ASSERT(0 <= value && value < 256);
2023 static_cast<byte>(value));
2032 void Map::set_instance_type(InstanceType value) {
2033 ASSERT(0 <= value && value < 256);
2034 WRITE_BYTE_FIELD(this, kInstanceTypeOffset, value);
2043 void Map::set_unused_property_fields(int value) {
2044 WRITE_BYTE_FIELD(this, kUnusedPropertyFieldsOffset, Min(value, 255));
2053 void Map::set_bit_field(byte value) {
2054 WRITE_BYTE_FIELD(this, kBitFieldOffset, value);
2063 void Map::set_bit_field2(byte value) {
2064 WRITE_BYTE_FIELD(this, kBitField2Offset, value);
2068 void Map::set_non_instance_prototype(bool value) {
2069 if (value) {
2246 void Map::set_prototype(Object* value, WriteBarrierMode mode) {
2247 ASSERT(value->IsNull() || value->IsJSObject());
2248 WRITE_FIELD(this, kPrototypeOffset, value);
2429 void SharedFunctionInfo::set_code(Code* value, WriteBarrierMode mode) {
2430 WRITE_FIELD(this, kCodeOffset, value);
2456 void JSFunction::set_code(Code* value) {
2457 shared()->set_code(value);
2471 void JSFunction::set_context(Object* value) {
2472 ASSERT(value == Heap::undefined_value() || value->IsContext());
2473 WRITE_FIELD(this, kContextOffset, value);
2486 void JSFunction::set_initial_map(Map* value) {
2487 set_prototype_or_initial_map(value);
2518 // value, that value is stored in the constructor field of the map.
2541 Object* value) {
2543 WRITE_FIELD(this, kJSBuiltinsOffset + (id * kPointerSize), value);
2553 void Proxy::set_proxy(Address value) {
2554 WRITE_INTPTR_FIELD(this, kProxyOffset, OffsetFrom(value));
2564 ACCESSORS(JSValue, value, Object, kValueOffset)
2620 return static_cast<JSRegExp::Type>(smi->value());
2629 return Smi::cast(DataAt(kIrregexpCaptureCountIndex))->value();
2641 return Flags(smi->value());
2659 void JSRegExp::SetDataAt(int index, Object* value) {
2662 FixedArray::cast(data())->set(index, value);
2849 // Get the calculated raw hash value and do some more bit ops to distribute
2850 // the hash further. Ensure that we never return zero as the hash value.
2926 void AccessorInfo::set_all_can_read(bool value) {
2927 set_flag(BooleanBit::set(flag(), kAllCanReadBit, value));
2936 void AccessorInfo::set_all_can_write(bool value) {
2937 set_flag(BooleanBit::set(flag(), kAllCanWriteBit, value));
2946 void AccessorInfo::set_prohibits_overwriting(bool value) {
2947 set_flag(BooleanBit::set(flag(), kProhibitsOverwritingBit, value));
2952 return AttributesField::decode(static_cast<uint32_t>(flag()->value()));
2958 int rest_value = flag()->value() & ~AttributesField::mask();
2965 value,
2972 FixedArray::set(index+1, value, mode);