| Index: src/objects-inl.h
|
| ===================================================================
|
| --- src/objects-inl.h (revision 2423)
|
| +++ src/objects-inl.h (working copy)
|
| @@ -1350,6 +1350,56 @@
|
| }
|
|
|
|
|
| +PropertyType DescriptorArray::GetType(int descriptor_number) {
|
| + ASSERT(descriptor_number < number_of_descriptors());
|
| + return PropertyDetails(GetDetails(descriptor_number)).type();
|
| +}
|
| +
|
| +
|
| +int DescriptorArray::GetFieldIndex(int descriptor_number) {
|
| + return Descriptor::IndexFromValue(GetValue(descriptor_number));
|
| +}
|
| +
|
| +
|
| +JSFunction* DescriptorArray::GetConstantFunction(int descriptor_number) {
|
| + return JSFunction::cast(GetValue(descriptor_number));
|
| +}
|
| +
|
| +
|
| +Object* DescriptorArray::GetCallbacksObject(int descriptor_number) {
|
| + ASSERT(GetType(descriptor_number) == CALLBACKS);
|
| + return GetValue(descriptor_number);
|
| +}
|
| +
|
| +
|
| +AccessorDescriptor* DescriptorArray::GetCallbacks(int descriptor_number) {
|
| + ASSERT(GetType(descriptor_number) == CALLBACKS);
|
| + Proxy* p = Proxy::cast(GetCallbacksObject(descriptor_number));
|
| + return reinterpret_cast<AccessorDescriptor*>(p->proxy());
|
| +}
|
| +
|
| +
|
| +bool DescriptorArray::IsProperty(int descriptor_number) {
|
| + return GetType(descriptor_number) < FIRST_PHANTOM_PROPERTY_TYPE;
|
| +}
|
| +
|
| +
|
| +bool DescriptorArray::IsTransition(int descriptor_number) {
|
| + PropertyType t = GetType(descriptor_number);
|
| + return t == MAP_TRANSITION || t == CONSTANT_TRANSITION;
|
| +}
|
| +
|
| +
|
| +bool DescriptorArray::IsNullDescriptor(int descriptor_number) {
|
| + return GetType(descriptor_number) == NULL_DESCRIPTOR;
|
| +}
|
| +
|
| +
|
| +bool DescriptorArray::IsDontEnum(int descriptor_number) {
|
| + return PropertyDetails(GetDetails(descriptor_number)).IsDontEnum();
|
| +}
|
| +
|
| +
|
| void DescriptorArray::Get(int descriptor_number, Descriptor* desc) {
|
| desc->Init(GetKey(descriptor_number),
|
| GetValue(descriptor_number),
|
| @@ -1373,6 +1423,13 @@
|
| }
|
|
|
|
|
| +void DescriptorArray::SetFrom(int index, DescriptorArray* src, int src_index) {
|
| + Descriptor desc;
|
| + src->Get(src_index, &desc);
|
| + Set(index, &desc);
|
| +}
|
| +
|
| +
|
| void DescriptorArray::Swap(int first, int second) {
|
| fast_swap(this, ToKeyIndex(first), ToKeyIndex(second));
|
| FixedArray* content_array = GetContentArray();
|
|
|