[compiler] Mark boilerplate descriptions as NeverEverSerialized

Mark:
 * ArrayBoilerplateDescription
 * ObjectBoilerplateDescription
as NeverEverSerialized, disable their Data classes and remove the
related code.

Bug: v8:7790
Change-Id: I9ac1f27d9d7a0d36a04214422261e157cbbcd4b7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2979604
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75327}
This commit is contained in:
Santiago Aboy Solanes 2021-06-23 10:49:04 +01:00 committed by V8 LUCI CQ
parent 939ee79d99
commit 78ba02233d

View File

@ -737,15 +737,12 @@ class ArrayBoilerplateDescriptionData : public HeapObjectData {
public:
ArrayBoilerplateDescriptionData(JSHeapBroker* broker, ObjectData** storage,
Handle<ArrayBoilerplateDescription> object)
: HeapObjectData(broker, storage, object),
constants_elements_length_(object->constant_elements().length()) {
DCHECK(!broker->is_concurrent_inlining());
: HeapObjectData(broker, storage, object) {
// ArrayBoilerplateDescriptionData is NeverEverSerialize.
// TODO(solanes, v8:7790): Remove this class once all kNeverSerialized types
// are NeverEverSerialize.
UNREACHABLE();
}
int constants_elements_length() const { return constants_elements_length_; }
private:
int const constants_elements_length_;
};
class JSDataViewData : public JSObjectData {
@ -1808,14 +1805,12 @@ class ObjectBoilerplateDescriptionData : public FixedArrayData {
JSHeapBroker* broker, ObjectData** storage,
Handle<ObjectBoilerplateDescription> object,
ObjectDataKind kind = ObjectDataKind::kSerializedHeapObject)
: FixedArrayData(broker, storage, object, kind), size_(object->size()) {
DCHECK(!broker->is_concurrent_inlining());
: FixedArrayData(broker, storage, object, kind) {
// ObjectBoilerplateDescriptionData is NeverEverSerialize.
// TODO(solanes, v8:7790): Remove this class once all kNeverSerialized types
// are NeverEverSerialize.
UNREACHABLE();
}
int size() const { return size_; }
private:
int const size_;
};
// Only used in JSNativeContextSpecialization.
@ -2826,6 +2821,8 @@ bool NeverEverSerialize() {
return true; \
}
NEVER_EVER_SERIALIZE(ArrayBoilerplateDescription)
NEVER_EVER_SERIALIZE(ObjectBoilerplateDescription)
NEVER_EVER_SERIALIZE(RegExpBoilerplateDescription)
#undef NEVER_EVER_SERIALIZE
@ -3267,11 +3264,8 @@ base::Optional<double> StringRef::ToNumber() {
}
int ArrayBoilerplateDescriptionRef::constants_elements_length() const {
if (data_->should_access_heap()) {
return object()->constant_elements().length();
}
return data()->AsArrayBoilerplateDescription()->constants_elements_length();
}
ObjectRef FixedArrayRef::get(int i) const { return TryGet(i).value(); }
@ -3435,7 +3429,7 @@ BIMODAL_ACCESSOR_WITH_FLAG(Map, Object, GetConstructor)
BIMODAL_ACCESSOR_WITH_FLAG(Map, HeapObject, GetBackPointer)
BIMODAL_ACCESSOR_C(Map, bool, is_abandoned_prototype_map)
BIMODAL_ACCESSOR_C(ObjectBoilerplateDescription, int, size)
int ObjectBoilerplateDescriptionRef::size() const { return object()->size(); }
BIMODAL_ACCESSOR(PropertyCell, Object, value)
BIMODAL_ACCESSOR_C(PropertyCell, PropertyDetails, property_details)