OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1752 matching lines...) Loading... |
1763 PropertyAttributes attributes, | 1763 PropertyAttributes attributes, |
1764 StrictModeFlag strict_mode, | 1764 StrictModeFlag strict_mode, |
1765 ExtensibilityCheck extensibility_check); | 1765 ExtensibilityCheck extensibility_check); |
1766 | 1766 |
1767 static Handle<Object> SetLocalPropertyIgnoreAttributes( | 1767 static Handle<Object> SetLocalPropertyIgnoreAttributes( |
1768 Handle<JSObject> object, | 1768 Handle<JSObject> object, |
1769 Handle<Name> key, | 1769 Handle<Name> key, |
1770 Handle<Object> value, | 1770 Handle<Object> value, |
1771 PropertyAttributes attributes); | 1771 PropertyAttributes attributes); |
1772 | 1772 |
| 1773 static inline Handle<String> ExpectedTransitionKey(Handle<Map> map); |
| 1774 static inline Handle<Map> ExpectedTransitionTarget(Handle<Map> map); |
| 1775 |
1773 // Try to follow an existing transition to a field with attributes NONE. The | 1776 // Try to follow an existing transition to a field with attributes NONE. The |
1774 // return value indicates whether the transition was successful. | 1777 // return value indicates whether the transition was successful. |
1775 static inline bool TryTransitionToField(Handle<JSObject> object, | 1778 static inline Handle<Map> FindTransitionToField(Handle<Map> map, |
1776 Handle<Name> key); | 1779 Handle<Name> key); |
1777 | 1780 |
1778 inline int LastAddedFieldIndex(); | 1781 inline int LastAddedFieldIndex(); |
1779 | 1782 |
1780 // Extend the receiver with a single fast property appeared first in the | 1783 // Extend the receiver with a single fast property appeared first in the |
1781 // passed map. This also extends the property backing store if necessary. | 1784 // passed map. This also extends the property backing store if necessary. |
1782 static void AddFastPropertyUsingMap(Handle<JSObject> object, Handle<Map> map); | 1785 static void AddFastPropertyUsingMap(Handle<JSObject> object, Handle<Map> map); |
1783 inline MUST_USE_RESULT MaybeObject* AddFastPropertyUsingMap(Map* map); | 1786 inline MUST_USE_RESULT MaybeObject* AddFastPropertyUsingMap(Map* map); |
| 1787 static void TransitionToMap(Handle<JSObject> object, Handle<Map> map); |
| 1788 inline MUST_USE_RESULT MaybeObject* TransitionToMap(Map* map); |
1784 | 1789 |
1785 // Can cause GC. | 1790 // Can cause GC. |
1786 MUST_USE_RESULT MaybeObject* SetLocalPropertyIgnoreAttributes( | 1791 MUST_USE_RESULT MaybeObject* SetLocalPropertyIgnoreAttributes( |
1787 Name* key, | 1792 Name* key, |
1788 Object* value, | 1793 Object* value, |
1789 PropertyAttributes attributes); | 1794 PropertyAttributes attributes); |
1790 | 1795 |
1791 // Retrieve a value in a normalized object given a lookup result. | 1796 // Retrieve a value in a normalized object given a lookup result. |
1792 // Handles the special representation of JS global objects. | 1797 // Handles the special representation of JS global objects. |
1793 Object* GetNormalizedProperty(LookupResult* result); | 1798 Object* GetNormalizedProperty(LookupResult* result); |
(...skipping 3443 matching lines...) Loading... |
5237 Descriptor* descriptor); | 5242 Descriptor* descriptor); |
5238 MUST_USE_RESULT MaybeObject* CopyAddDescriptor(Descriptor* descriptor, | 5243 MUST_USE_RESULT MaybeObject* CopyAddDescriptor(Descriptor* descriptor, |
5239 TransitionFlag flag); | 5244 TransitionFlag flag); |
5240 MUST_USE_RESULT MaybeObject* CopyInsertDescriptor(Descriptor* descriptor, | 5245 MUST_USE_RESULT MaybeObject* CopyInsertDescriptor(Descriptor* descriptor, |
5241 TransitionFlag flag); | 5246 TransitionFlag flag); |
5242 MUST_USE_RESULT MaybeObject* CopyReplaceDescriptor( | 5247 MUST_USE_RESULT MaybeObject* CopyReplaceDescriptor( |
5243 DescriptorArray* descriptors, | 5248 DescriptorArray* descriptors, |
5244 Descriptor* descriptor, | 5249 Descriptor* descriptor, |
5245 int index, | 5250 int index, |
5246 TransitionFlag flag); | 5251 TransitionFlag flag); |
| 5252 MUST_USE_RESULT MaybeObject* AsElementsKind(ElementsKind kind); |
5247 MUST_USE_RESULT MaybeObject* CopyAsElementsKind(ElementsKind kind, | 5253 MUST_USE_RESULT MaybeObject* CopyAsElementsKind(ElementsKind kind, |
5248 TransitionFlag flag); | 5254 TransitionFlag flag); |
5249 | 5255 |
5250 MUST_USE_RESULT MaybeObject* CopyNormalized(PropertyNormalizationMode mode, | 5256 MUST_USE_RESULT MaybeObject* CopyNormalized(PropertyNormalizationMode mode, |
5251 NormalizedMapSharingMode sharing); | 5257 NormalizedMapSharingMode sharing); |
5252 | 5258 |
5253 inline void AppendDescriptor(Descriptor* desc, | 5259 inline void AppendDescriptor(Descriptor* desc, |
5254 const DescriptorArray::WhitenessWitness&); | 5260 const DescriptorArray::WhitenessWitness&); |
5255 | 5261 |
5256 // Returns a copy of the map, with all transitions dropped from the | 5262 // Returns a copy of the map, with all transitions dropped from the |
(...skipping 4059 matching lines...) Loading... |
9316 } else { | 9322 } else { |
9317 value &= ~(1 << bit_position); | 9323 value &= ~(1 << bit_position); |
9318 } | 9324 } |
9319 return value; | 9325 return value; |
9320 } | 9326 } |
9321 }; | 9327 }; |
9322 | 9328 |
9323 } } // namespace v8::internal | 9329 } } // namespace v8::internal |
9324 | 9330 |
9325 #endif // V8_OBJECTS_H_ | 9331 #endif // V8_OBJECTS_H_ |
OLD | NEW |