OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1843 Object* GetEnumCache() { | 1843 Object* GetEnumCache() { |
1844 ASSERT(HasEnumCache()); | 1844 ASSERT(HasEnumCache()); |
1845 FixedArray* bridge = FixedArray::cast(get(kEnumerationIndexIndex)); | 1845 FixedArray* bridge = FixedArray::cast(get(kEnumerationIndexIndex)); |
1846 return bridge->get(kEnumCacheBridgeCacheIndex); | 1846 return bridge->get(kEnumCacheBridgeCacheIndex); |
1847 } | 1847 } |
1848 | 1848 |
1849 // Initialize or change the enum cache, | 1849 // Initialize or change the enum cache, |
1850 // using the supplied storage for the small "bridge". | 1850 // using the supplied storage for the small "bridge". |
1851 void SetEnumCache(FixedArray* bridge_storage, FixedArray* new_cache); | 1851 void SetEnumCache(FixedArray* bridge_storage, FixedArray* new_cache); |
1852 | 1852 |
1853 // Accessors for fetching instance descriptor at descriptor number.. | 1853 // Accessors for fetching instance descriptor at descriptor number. |
1854 inline String* GetKey(int descriptor_number); | 1854 inline String* GetKey(int descriptor_number); |
1855 inline Object* GetValue(int descriptor_number); | 1855 inline Object* GetValue(int descriptor_number); |
1856 inline Smi* GetDetails(int descriptor_number); | 1856 inline Smi* GetDetails(int descriptor_number); |
| 1857 inline PropertyType GetType(int descriptor_number); |
| 1858 inline int GetFieldIndex(int descriptor_number); |
| 1859 inline JSFunction* GetConstantFunction(int descriptor_number); |
| 1860 inline Object* GetCallbacksObject(int descriptor_number); |
| 1861 inline AccessorDescriptor* GetCallbacks(int descriptor_number); |
| 1862 inline bool IsProperty(int descriptor_number); |
| 1863 inline bool IsTransition(int descriptor_number); |
| 1864 inline bool IsNullDescriptor(int descriptor_number); |
| 1865 inline bool IsDontEnum(int descriptor_number); |
1857 | 1866 |
1858 // Accessor for complete descriptor. | 1867 // Accessor for complete descriptor. |
1859 inline void Get(int descriptor_number, Descriptor* desc); | 1868 inline void Get(int descriptor_number, Descriptor* desc); |
1860 inline void Set(int descriptor_number, Descriptor* desc); | 1869 inline void Set(int descriptor_number, Descriptor* desc); |
1861 | 1870 |
| 1871 // Transfer complete descriptor from another descriptor array to |
| 1872 // this one. |
| 1873 inline void SetFrom(int index, DescriptorArray* src, int src_index); |
| 1874 |
1862 // Copy the descriptor array, insert a new descriptor and optionally | 1875 // Copy the descriptor array, insert a new descriptor and optionally |
1863 // remove map transitions. If the descriptor is already present, it is | 1876 // remove map transitions. If the descriptor is already present, it is |
1864 // replaced. If a replaced descriptor is a real property (not a transition | 1877 // replaced. If a replaced descriptor is a real property (not a transition |
1865 // or null), its enumeration index is kept as is. | 1878 // or null), its enumeration index is kept as is. |
1866 // If adding a real property, map transitions must be removed. If adding | 1879 // If adding a real property, map transitions must be removed. If adding |
1867 // a transition, they must not be removed. All null descriptors are removed. | 1880 // a transition, they must not be removed. All null descriptors are removed. |
1868 Object* CopyInsert(Descriptor* descriptor, TransitionFlag transition_flag); | 1881 Object* CopyInsert(Descriptor* descriptor, TransitionFlag transition_flag); |
1869 | 1882 |
1870 // Remove all transitions. Return a copy of the array with all transitions | 1883 // Remove all transitions. Return a copy of the array with all transitions |
1871 // removed, or a Failure object if the new array could not be allocated. | 1884 // removed, or a Failure object if the new array could not be allocated. |
(...skipping 2851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4723 } else { | 4736 } else { |
4724 value &= ~(1 << bit_position); | 4737 value &= ~(1 << bit_position); |
4725 } | 4738 } |
4726 return value; | 4739 return value; |
4727 } | 4740 } |
4728 }; | 4741 }; |
4729 | 4742 |
4730 } } // namespace v8::internal | 4743 } } // namespace v8::internal |
4731 | 4744 |
4732 #endif // V8_OBJECTS_H_ | 4745 #endif // V8_OBJECTS_H_ |
OLD | NEW |