Lines Matching defs:smi
54 PropertyDetails::PropertyDetails(Smi* smi) {
55 value_ = smi->value();
59 Smi* PropertyDetails::AsSmi() {
60 return Smi::FromInt(value_);
65 Smi* smi = Smi::FromInt(value_ | DeletedField::encode(1));
66 return PropertyDetails(smi);
97 // Getter that returns a tagged Smi and setter that writes a tagged Smi.
99 Smi* holder::name() { return Smi::cast(READ_FIELD(this, offset)); } \
100 void holder::set_##name(Smi* value, WriteBarrierMode mode) { \
105 // Getter that returns a Smi as an int and writes an int as a Smi.
109 return Smi::cast(value)->value(); \
112 WRITE_FIELD(this, offset, Smi::FromInt(value)); \
808 ? static_cast<double>(reinterpret_cast<Smi*>(this)->value())
823 if (value == FastI2D(int_value) && Smi::IsValid(int_value)) {
824 return Smi::FromInt(int_value);
971 int Smi::value() {
976 Smi* Smi::FromInt(int value) {
977 ASSERT(Smi::IsValid(value));
981 return reinterpret_cast<Smi*>(tagged_value);
985 Smi* Smi::FromIntptr(intptr_t value) {
986 ASSERT(Smi::IsValid(value));
988 return reinterpret_cast<Smi*>((value << smi_shift_bits) | kSmiTag);
1054 bool Smi::IsValid(intptr_t value) {
1060 // To be representable as a long smi, the value must be a 32-bit integer.
1413 return Smi::cast(READ_FIELD(this, kKindOffset))->value();
1418 WRITE_FIELD(this, kKindOffset, Smi::FromInt(value));
1505 void JSObject::SetInternalField(int index, Smi* value) {
1626 int value = Smi::cast(this)->value();
1668 void FixedArray::set(int index, Smi* value) {
1830 void FixedArray::set_unchecked(int index, Smi* value) {
1869 return Smi::cast(storage)->value();
1874 WRITE_FIELD(this, kBitField3StorageOffset, Smi::FromInt(value));
1927 Smi* DescriptorArray::GetDetails(int descriptor_number) {
1929 return Smi::cast(GetContentArray()->get(ToDetailsIndex(descriptor_number)));
2097 (Smi::cast(max_index_object)->value() & kRequiresSlowElementsMask);
2104 uint32_t value = static_cast<uint32_t>(Smi::cast(max_index_object)->value());
2109 set(kMaxNumberKeyIndex, Smi::FromInt(kRequiresSlowElementsMask));
2142 CAST_ACCESSOR(Smi)
2481 return Smi::cast(get(kCacheSizeIndex))->value();
2486 set(kCacheSizeIndex, Smi::FromInt(size));
2491 return Smi::cast(get(kFingerIndex))->value();
2496 set(kFingerIndex, Smi::FromInt(finger_index));
2542 return Smi::FromInt(static_cast<int>(get_scalar(index)));
2573 return Smi::FromInt(static_cast<int>(get_scalar(index)));
2592 return Smi::FromInt(static_cast<int>(get_scalar(index)));
2611 return Smi::FromInt(static_cast<int>(get_scalar(index)));
2630 return Smi::FromInt(static_cast<int>(get_scalar(index)));
3343 WRITE_FIELD(this, kInstanceDescriptorsOrBitField3Offset, Smi::FromInt(0));
3354 Smi::FromInt(DescriptorArray::cast(object)->bit_field3_storage()));
3369 value->set_bit_field3_storage(Smi::cast(object)->value());
3386 return Smi::cast(object)->value();
3394 ASSERT(Smi::IsValid(value));
3400 Smi::FromInt(value));
3808 return static_cast<BuiltinFunctionId>(Smi::cast(function_data())->value());
4205 Smi* smi = Smi::cast(FixedArray::cast(data)->get(kTagIndex));
4206 return static_cast<JSRegExp::Type>(smi->value());
4211 Smi* smi = Smi::cast(DataAtUnchecked(kTagIndex));
4212 return static_cast<JSRegExp::Type>(smi->value());
4221 return Smi::cast(DataAt(kIrregexpCaptureCountIndex))->value();
4232 Smi* smi = Smi::cast(FixedArray::cast(data)->get(kFlagsIndex));
4233 return Flags(smi->value());
4269 fa->set_unchecked(index, Smi::cast(value));
4617 set_flag(Smi::FromInt(AttributesField::update(flag()->value(), attributes)));
4625 SetEntry(entry, key, value, PropertyDetails(Smi::FromInt(0)));
4709 return Smi::cast(maybe_hash->ToObjectChecked())->value();
4717 return Smi::cast(maybe_hash->ToObjectChecked())->value();
4755 void JSArray::set_length(Smi* length) {
4756 // Don't need a write barrier for a Smi.
4779 set_length(Smi::FromInt(storage->length()));
4796 void TypeFeedbackCells::SetAstId(int index, Smi* id) {
4801 Smi* TypeFeedbackCells::AstId(int index) {
4802 return Smi::cast(get(1 + index * 2));