Lines Matching refs:Descriptor
57 #include "src/property-descriptor.h"
1766 std::unique_ptr<v8::PropertyDescriptor> descriptor(
1769 descriptor.reset(new v8::PropertyDescriptor(
1773 descriptor.reset(new v8::PropertyDescriptor(
1776 descriptor.reset(
1781 descriptor->set_enumerable(desc.enumerable());
1784 descriptor->set_configurable(desc.configurable());
1791 result = !args.Call(definer, index, *descriptor).is_null();
1803 result = !args.Call(definer, name, *descriptor).is_null();
2029 // Directly decode from the descriptor array if |from| did not change shape.
3218 // Ensure the descriptor array does not get too big.
3236 Descriptor d = Descriptor::DataField(name, index, attributes, constness,
3253 // Ensure the descriptor array does not get too big.
3266 Descriptor d = Descriptor::DataConstant(name, 0, constant, attributes);
3675 // Copy the next enumeration index from instance descriptor.
3762 // Clear out the old descriptor array to avoid problems to sharing
3763 // the descriptor array without using an explicit.
3842 Descriptor d = Descriptor::DataField(
3891 // proper sharing of descriptor arrays.
3895 // Don't overwrite the empty descriptor array or initial map's descriptors.
3921 // in the descriptor array.
3932 Map* Map::FindFieldOwner(int descriptor) {
3934 DCHECK_EQ(kField, instance_descriptors()->GetDetails(descriptor).location());
3941 if (parent->NumberOfOwnDescriptors() <= descriptor) break;
3947 void Map::UpdateFieldType(int descriptor, Handle<Name> name,
3954 PropertyDetails details = instance_descriptors()->GetDetails(descriptor);
3973 PropertyDetails details = descriptors->GetDetails(descriptor);
3982 // Skip if already updated the shared descriptor.
3983 if (descriptors->GetValue(descriptor) != *new_wrapped_type) {
3985 Descriptor d = Descriptor::DataField(
3986 name, descriptors->GetFieldIndex(descriptor), details.attributes(),
3988 descriptors->Replace(descriptor, &d);
4603 // The descriptors are still the same, so keep the layout descriptor.
4612 // that the maps to which we push the new descriptor array back can rely
4672 // instance descriptor. Since it may cause a GC, it has to be done before we
4689 // Check if a descriptor with this name already exists before writing.
4713 Descriptor d =
4714 Descriptor::AccessorConstant(key, entry, entry->property_attributes());
5605 // Compute the length of the instance descriptor.
5653 // Allocate the instance descriptor.
5669 // Fill in the instance descriptor and the fields.
5687 Descriptor d;
5690 d = Descriptor::DataConstant(key, handle(value, isolate),
5693 d = Descriptor::DataField(
5700 d = Descriptor::AccessorConstant(key, handle(value, isolate),
6305 // 2d. Else Desc must be an accessor Property Descriptor,
6946 if (!interceptor->descriptor()->IsUndefined(isolate)) {
6963 interceptor->descriptor());
6971 interceptor->descriptor());
6976 // descriptor.
6981 "Invalid property descriptor.");
7020 // 3. Let D be a newly created Property Descriptor with no fields.
7687 // Create a new descriptor array with the appropriate property attributes
8215 // Directly decode from the descriptor array if |from| did not change shape.
8288 PropertyDescriptor descriptor;
8290 isolate, object, key, &descriptor);
8292 if (!did_get_descriptor.FromJust() || !descriptor.enumerable()) continue;
8629 // Initial maps must always own their descriptors and it's descriptor array
8672 Descriptor* descriptor) {
8673 // Sanity check. This path is only to be taken if the map owns its descriptor
8675 // descriptors in the descriptor array.
8680 Handle<Name> name = descriptor->GetKey();
8682 // Ensure there's space for the new descriptor in the shared descriptor array.
8696 ? LayoutDescriptor::ShareAppend(map, descriptor->GetDetails())
8701 descriptors->Append(descriptor);
8807 // starting from descriptor with index |split_map|.NumberOfOwnDescriptors().
8819 // This is necessary to guarantee that GC will mark the whole descriptor
8822 // descriptor could unnecessarily be in slow mode but we will fix after
8980 // copying the map; creating a new descriptor array cell.
9067 bool CanHoldValue(DescriptorArray* descriptors, int descriptor,
9069 PropertyDetails details = descriptors->GetDetails(descriptor);
9074 descriptors->GetFieldType(descriptor)->NowContains(value);
9085 DCHECK(descriptors->GetValue(descriptor) != value ||
9087 return descriptors->GetValue(descriptor) == value;
9097 Handle<Map> UpdateDescriptorForValue(Handle<Map> map, int descriptor,
9100 if (CanHoldValue(map->instance_descriptors(), descriptor, constness,
9107 map->instance_descriptors()->GetDetails(descriptor).attributes();
9112 return mu.ReconfigureToDataField(descriptor, attributes, constness,
9119 Handle<Map> Map::PrepareForDataProperty(Handle<Map> map, int descriptor,
9125 return UpdateDescriptorForValue(Update(map), descriptor, constness, value);
9148 int descriptor = transition->LastAdded();
9151 ->GetDetails(descriptor)
9154 return UpdateDescriptorForValue(transition, descriptor, constness, value);
9188 Handle<Map> Map::ReconfigureExistingProperty(Handle<Map> map, int descriptor,
9197 return CopyGeneralizeAllFields(map, map->elements_kind(), descriptor, kind,
9203 map->PrintReconfiguration(stdout, descriptor, kind, attributes);
9211 descriptor, attributes, kDefaultFieldConstness, Representation::None(),
9217 Handle<Name> name, int descriptor,
9246 int descriptor = transition->LastAdded();
9247 DCHECK(descriptors->GetKey(descriptor)->Equals(*name));
9249 DCHECK_EQ(kAccessor, descriptors->GetDetails(descriptor).kind());
9250 DCHECK_EQ(attributes, descriptors->GetDetails(descriptor).attributes());
9252 Handle<Object> maybe_pair(descriptors->GetValue(descriptor), isolate);
9267 if (descriptor != DescriptorArray::kNotFound) {
9268 if (descriptor != map->LastAdded()) {
9271 PropertyDetails old_details = old_descriptors->GetDetails(descriptor);
9280 Handle<Object> maybe_pair(old_descriptors->GetValue(descriptor), isolate);
9314 Descriptor d = Descriptor::AccessorConstant(name, pair, attributes);
9320 Descriptor* descriptor,
9328 return ShareDescriptor(map, descriptors, descriptor);
9334 new_descriptors->Append(descriptor);
9342 flag, descriptor->GetKey(), "CopyAddDescriptor",
9348 Descriptor* descriptor,
9354 *descriptor->GetKey(), *map);
9356 return CopyReplaceDescriptor(map, old_descriptors, descriptor, index, flag);
9358 return CopyAddDescriptor(map, descriptor, flag);
9433 Descriptor* descriptor,
9436 Handle<Name> key = descriptor->GetKey();
9442 new_descriptors->Replace(insertion_index, descriptor);
10040 void DescriptorArray::Replace(int index, Descriptor* descriptor) {
10041 descriptor->SetSortedKeyIndex(GetSortedKeyIndex(index));
10042 Set(index, descriptor);
10077 // Reset sorting since the descriptor array might contain invalid pointers.
15628 // configurable, it's guaranteed to be the first in the descriptor array.