OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1782 MUST_USE_RESULT MaybeObject* ReplaceSlowProperty( | 1782 MUST_USE_RESULT MaybeObject* ReplaceSlowProperty( |
1783 String* name, | 1783 String* name, |
1784 Object* value, | 1784 Object* value, |
1785 PropertyAttributes attributes); | 1785 PropertyAttributes attributes); |
1786 | 1786 |
1787 // Returns a new map with all transitions dropped from the object's current | 1787 // Returns a new map with all transitions dropped from the object's current |
1788 // map and the ElementsKind set. | 1788 // map and the ElementsKind set. |
1789 MUST_USE_RESULT MaybeObject* GetElementsTransitionMap( | 1789 MUST_USE_RESULT MaybeObject* GetElementsTransitionMap( |
1790 ElementsKind elements_kind); | 1790 ElementsKind elements_kind); |
1791 | 1791 |
| 1792 MUST_USE_RESULT MaybeObject* TransitionElementsKind(ElementsKind to_kind); |
| 1793 |
1792 // Converts a descriptor of any other type to a real field, | 1794 // Converts a descriptor of any other type to a real field, |
1793 // backed by the properties array. Descriptors of visible | 1795 // backed by the properties array. Descriptors of visible |
1794 // types, such as CONSTANT_FUNCTION, keep their enumeration order. | 1796 // types, such as CONSTANT_FUNCTION, keep their enumeration order. |
1795 // Converts the descriptor on the original object's map to a | 1797 // Converts the descriptor on the original object's map to a |
1796 // map transition, and the the new field is on the object's new map. | 1798 // map transition, and the the new field is on the object's new map. |
1797 MUST_USE_RESULT MaybeObject* ConvertDescriptorToFieldAndMapTransition( | 1799 MUST_USE_RESULT MaybeObject* ConvertDescriptorToFieldAndMapTransition( |
1798 String* name, | 1800 String* name, |
1799 Object* new_value, | 1801 Object* new_value, |
1800 PropertyAttributes attributes); | 1802 PropertyAttributes attributes); |
1801 | 1803 |
(...skipping 2479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4281 // |safe_to_add_transitions| is set to false if adding transitions is not | 4283 // |safe_to_add_transitions| is set to false if adding transitions is not |
4282 // allowed. | 4284 // allowed. |
4283 Map* LookupElementsTransitionMap(ElementsKind elements_kind, | 4285 Map* LookupElementsTransitionMap(ElementsKind elements_kind, |
4284 bool* safe_to_add_transition); | 4286 bool* safe_to_add_transition); |
4285 | 4287 |
4286 // Adds an entry to this map's descriptor array for a transition to | 4288 // Adds an entry to this map's descriptor array for a transition to |
4287 // |transitioned_map| when its elements_kind is changed to |elements_kind|. | 4289 // |transitioned_map| when its elements_kind is changed to |elements_kind|. |
4288 MaybeObject* AddElementsTransition(ElementsKind elements_kind, | 4290 MaybeObject* AddElementsTransition(ElementsKind elements_kind, |
4289 Map* transitioned_map); | 4291 Map* transitioned_map); |
4290 | 4292 |
| 4293 // Returns the transitioned map for this map with the most generic |
| 4294 // elements_kind that's found in |candidates|, or NULL if no match is |
| 4295 // found at all. |
| 4296 Map* FindTransitionedMap(MapList* candidates); |
| 4297 |
4291 // Dispatched behavior. | 4298 // Dispatched behavior. |
4292 #ifdef OBJECT_PRINT | 4299 #ifdef OBJECT_PRINT |
4293 inline void MapPrint() { | 4300 inline void MapPrint() { |
4294 MapPrint(stdout); | 4301 MapPrint(stdout); |
4295 } | 4302 } |
4296 void MapPrint(FILE* out); | 4303 void MapPrint(FILE* out); |
4297 #endif | 4304 #endif |
4298 #ifdef DEBUG | 4305 #ifdef DEBUG |
4299 void MapVerify(); | 4306 void MapVerify(); |
4300 void SharedMapVerify(); | 4307 void SharedMapVerify(); |
(...skipping 3288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7589 } else { | 7596 } else { |
7590 value &= ~(1 << bit_position); | 7597 value &= ~(1 << bit_position); |
7591 } | 7598 } |
7592 return value; | 7599 return value; |
7593 } | 7600 } |
7594 }; | 7601 }; |
7595 | 7602 |
7596 } } // namespace v8::internal | 7603 } } // namespace v8::internal |
7597 | 7604 |
7598 #endif // V8_OBJECTS_H_ | 7605 #endif // V8_OBJECTS_H_ |
OLD | NEW |