@@ -950,7 +950,6 @@ bool IsFastLiteralHelper(Handle<JSObject> boilerplate, int max_depth,
950950 DCHECK_EQ (kData , details.kind ());
951951 if ((*max_properties)-- == 0 ) return false ;
952952 FieldIndex field_index = FieldIndex::ForDescriptor (boilerplate->map (), i);
953- if (boilerplate->IsUnboxedDoubleField (field_index)) continue ;
954953 Handle<Object> value (boilerplate->RawFastPropertyAt (field_index), isolate);
955954 if (value->IsJSObject ()) {
956955 Handle<JSObject> value_object = Handle<JSObject>::cast (value);
@@ -1042,7 +1041,6 @@ struct PropertyDescriptor {
10421041 FieldIndex field_index;
10431042 ObjectData* field_owner = nullptr ;
10441043 ObjectData* field_type = nullptr ;
1045- bool is_unboxed_double_field = false ;
10461044};
10471045
10481046class MapData : public HeapObjectData {
@@ -1397,10 +1395,6 @@ class DescriptorArrayData : public HeapObjectData {
13971395 return contents_.at (descriptor_index.as_int ()).field_type ;
13981396 }
13991397
1400- bool IsUnboxedDoubleField (InternalIndex descriptor_index) const {
1401- return contents_.at (descriptor_index.as_int ()).is_unboxed_double_field ;
1402- }
1403-
14041398 ObjectData* GetStrongValue (InternalIndex descriptor_index) const {
14051399 return contents_.at (descriptor_index.as_int ()).value ;
14061400 }
@@ -1440,7 +1434,6 @@ void DescriptorArrayData::SerializeDescriptor(JSHeapBroker* broker,
14401434 broker->GetOrCreateData (map->FindFieldOwner (isolate, descriptor_index));
14411435 d.field_type =
14421436 broker->GetOrCreateData (descriptors->GetFieldType (descriptor_index));
1443- d.is_unboxed_double_field = map->IsUnboxedDoubleField (d.field_index );
14441437 }
14451438 contents_[descriptor_index.as_int ()] = d;
14461439
@@ -2349,33 +2342,24 @@ void JSObjectData::SerializeRecursiveAsBoilerplate(JSHeapBroker* broker,
23492342 // this field.
23502343 DCHECK_EQ (field_index.property_index (),
23512344 static_cast <int >(inobject_fields_.size ()));
2352- if (boilerplate->IsUnboxedDoubleField (field_index)) {
2353- uint64_t value_bits =
2354- boilerplate->RawFastDoublePropertyAsBitsAt (field_index);
2355- inobject_fields_.push_back (JSObjectField{value_bits});
2356- } else {
2357- Handle<Object> value (boilerplate->RawFastPropertyAt (field_index),
2358- isolate);
2359- // In case of double fields we use a sentinel NaN value to mark
2360- // uninitialized fields. A boilerplate value with such a field may migrate
2361- // from its double to a tagged representation. If the double is unboxed,
2362- // the raw double is converted to a heap number, otherwise the (boxed)
2363- // double ceases to be mutable, and becomes a normal heap number. The
2364- // sentinel value carries no special meaning when it occurs in a heap
2365- // number, so we would like to recover the uninitialized value. We check
2366- // for the sentinel here, specifically, since migrations might have been
2367- // triggered as part of boilerplate serialization.
2368- if (!details.representation ().IsDouble () && value->IsHeapNumber () &&
2369- HeapNumber::cast (*value).value_as_bits () == kHoleNanInt64 ) {
2370- value = isolate->factory ()->uninitialized_value ();
2371- }
2372- ObjectData* value_data = broker->GetOrCreateData (value);
2373- if (value_data->IsJSObject () && !value_data->should_access_heap ()) {
2374- value_data->AsJSObject ()->SerializeRecursiveAsBoilerplate (broker,
2375- depth - 1 );
2376- }
2377- inobject_fields_.push_back (JSObjectField{value_data});
2345+ Handle<Object> value (boilerplate->RawFastPropertyAt (field_index), isolate);
2346+ // In case of double fields we use a sentinel NaN value to mark
2347+ // uninitialized fields. A boilerplate value with such a field may migrate
2348+ // from its double to a tagged representation. The sentinel value carries
2349+ // no special meaning when it occurs in a heap number, so we would like to
2350+ // recover the uninitialized value. We check for the sentinel here,
2351+ // specifically, since migrations might have been triggered as part of
2352+ // boilerplate serialization.
2353+ if (!details.representation ().IsDouble () && value->IsHeapNumber () &&
2354+ HeapNumber::cast (*value).value_as_bits () == kHoleNanInt64 ) {
2355+ value = isolate->factory ()->uninitialized_value ();
2356+ }
2357+ ObjectData* value_data = broker->GetOrCreateData (value);
2358+ if (value_data->IsJSObject () && !value_data->should_access_heap ()) {
2359+ value_data->AsJSObject ()->SerializeRecursiveAsBoilerplate (broker,
2360+ depth - 1 );
23782361 }
2362+ inobject_fields_.push_back (JSObjectField{value_data});
23792363 }
23802364 TRACE (broker, " Copied " << inobject_fields_.size () << " in-object fields" );
23812365
@@ -3079,24 +3063,6 @@ FeedbackCellRef FeedbackVectorRef::GetClosureFeedbackCell(int index) const {
30793063 data ()->AsFeedbackVector ()->GetClosureFeedbackCell (broker (), index));
30803064}
30813065
3082- double JSObjectRef::RawFastDoublePropertyAt (FieldIndex index) const {
3083- if (data_->should_access_heap ()) {
3084- return object ()->RawFastDoublePropertyAt (index);
3085- }
3086- JSObjectData* object_data = data ()->AsJSObject ();
3087- CHECK (index.is_inobject ());
3088- return object_data->GetInobjectField (index.property_index ()).AsDouble ();
3089- }
3090-
3091- uint64_t JSObjectRef::RawFastDoublePropertyAsBitsAt (FieldIndex index) const {
3092- if (data_->should_access_heap ()) {
3093- return object ()->RawFastDoublePropertyAsBitsAt (index);
3094- }
3095- JSObjectData* object_data = data ()->AsJSObject ();
3096- CHECK (index.is_inobject ());
3097- return object_data->GetInobjectField (index.property_index ()).AsBitsOfDouble ();
3098- }
3099-
31003066ObjectRef JSObjectRef::RawFastPropertyAt (FieldIndex index) const {
31013067 if (data_->should_access_heap ()) {
31023068 return ObjectRef (broker (), broker ()->CanonicalPersistentHandle (
@@ -3213,17 +3179,6 @@ ObjectRef MapRef::GetFieldType(InternalIndex descriptor_index) const {
32133179 return ObjectRef (broker (), descriptors->GetFieldType (descriptor_index));
32143180}
32153181
3216- bool MapRef::IsUnboxedDoubleField (InternalIndex descriptor_index) const {
3217- CHECK_LT (descriptor_index.as_int (), NumberOfOwnDescriptors ());
3218- if (data_->should_access_heap ()) {
3219- return object ()->IsUnboxedDoubleField (
3220- FieldIndex::ForDescriptor (*object (), descriptor_index));
3221- }
3222- DescriptorArrayData* descriptors =
3223- data ()->AsMap ()->instance_descriptors ()->AsDescriptorArray ();
3224- return descriptors->IsUnboxedDoubleField (descriptor_index);
3225- }
3226-
32273182base::Optional<int > StringRef::length () const {
32283183 if (data_->should_access_heap ()) {
32293184 if (data_->kind () == kNeverSerializedHeapObject &&
0 commit comments