| 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 1781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1792 JSFunction* function, | 1792 JSFunction* function, |
| 1793 PropertyAttributes attributes); | 1793 PropertyAttributes attributes); |
| 1794 | 1794 |
| 1795 MUST_USE_RESULT MaybeObject* ReplaceSlowProperty( | 1795 MUST_USE_RESULT MaybeObject* ReplaceSlowProperty( |
| 1796 String* name, | 1796 String* name, |
| 1797 Object* value, | 1797 Object* value, |
| 1798 PropertyAttributes attributes); | 1798 PropertyAttributes attributes); |
| 1799 | 1799 |
| 1800 // Returns a new map with all transitions dropped from the object's current | 1800 // Returns a new map with all transitions dropped from the object's current |
| 1801 // map and the ElementsKind set. | 1801 // map and the ElementsKind set. |
| 1802 static Handle<Map> GetElementsTransitionMap(Handle<JSObject> object, |
| 1803 ElementsKind to_kind); |
| 1802 MUST_USE_RESULT MaybeObject* GetElementsTransitionMap( | 1804 MUST_USE_RESULT MaybeObject* GetElementsTransitionMap( |
| 1803 ElementsKind elements_kind); | 1805 ElementsKind elements_kind); |
| 1804 | 1806 |
| 1805 MUST_USE_RESULT MaybeObject* TransitionElementsKind(ElementsKind to_kind); | 1807 MUST_USE_RESULT MaybeObject* TransitionElementsKind(ElementsKind to_kind); |
| 1806 | 1808 |
| 1807 // Converts a descriptor of any other type to a real field, | 1809 // Converts a descriptor of any other type to a real field, |
| 1808 // backed by the properties array. Descriptors of visible | 1810 // backed by the properties array. Descriptors of visible |
| 1809 // types, such as CONSTANT_FUNCTION, keep their enumeration order. | 1811 // types, such as CONSTANT_FUNCTION, keep their enumeration order. |
| 1810 // Converts the descriptor on the original object's map to a | 1812 // Converts the descriptor on the original object's map to a |
| 1811 // map transition, and the the new field is on the object's new map. | 1813 // map transition, and the the new field is on the object's new map. |
| (...skipping 2508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4320 // allowed. | 4322 // allowed. |
| 4321 Map* LookupElementsTransitionMap(ElementsKind elements_kind, | 4323 Map* LookupElementsTransitionMap(ElementsKind elements_kind, |
| 4322 bool* safe_to_add_transition); | 4324 bool* safe_to_add_transition); |
| 4323 | 4325 |
| 4324 // Adds an entry to this map's descriptor array for a transition to | 4326 // Adds an entry to this map's descriptor array for a transition to |
| 4325 // |transitioned_map| when its elements_kind is changed to |elements_kind|. | 4327 // |transitioned_map| when its elements_kind is changed to |elements_kind|. |
| 4326 MaybeObject* AddElementsTransition(ElementsKind elements_kind, | 4328 MaybeObject* AddElementsTransition(ElementsKind elements_kind, |
| 4327 Map* transitioned_map); | 4329 Map* transitioned_map); |
| 4328 | 4330 |
| 4329 // Returns the transitioned map for this map with the most generic | 4331 // Returns the transitioned map for this map with the most generic |
| 4330 // elements_kind that's found in |candidates|, or NULL if no match is | 4332 // elements_kind that's found in |candidates|, or null handle if no match is |
| 4331 // found at all. | 4333 // found at all. |
| 4334 Handle<Map> FindTransitionedMap(MapHandleList* candidates); |
| 4332 Map* FindTransitionedMap(MapList* candidates); | 4335 Map* FindTransitionedMap(MapList* candidates); |
| 4333 | 4336 |
| 4337 |
| 4334 // Dispatched behavior. | 4338 // Dispatched behavior. |
| 4335 #ifdef OBJECT_PRINT | 4339 #ifdef OBJECT_PRINT |
| 4336 inline void MapPrint() { | 4340 inline void MapPrint() { |
| 4337 MapPrint(stdout); | 4341 MapPrint(stdout); |
| 4338 } | 4342 } |
| 4339 void MapPrint(FILE* out); | 4343 void MapPrint(FILE* out); |
| 4340 #endif | 4344 #endif |
| 4341 #ifdef DEBUG | 4345 #ifdef DEBUG |
| 4342 void MapVerify(); | 4346 void MapVerify(); |
| 4343 void SharedMapVerify(); | 4347 void SharedMapVerify(); |
| (...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5824 | 5828 |
| 5825 private: | 5829 private: |
| 5826 DISALLOW_IMPLICIT_CONSTRUCTORS(CodeCacheHashTable); | 5830 DISALLOW_IMPLICIT_CONSTRUCTORS(CodeCacheHashTable); |
| 5827 }; | 5831 }; |
| 5828 | 5832 |
| 5829 | 5833 |
| 5830 class PolymorphicCodeCache: public Struct { | 5834 class PolymorphicCodeCache: public Struct { |
| 5831 public: | 5835 public: |
| 5832 DECL_ACCESSORS(cache, Object) | 5836 DECL_ACCESSORS(cache, Object) |
| 5833 | 5837 |
| 5838 static void Update(Handle<PolymorphicCodeCache> cache, |
| 5839 MapHandleList* maps, |
| 5840 Code::Flags flags, |
| 5841 Handle<Code> code); |
| 5842 |
| 5834 MUST_USE_RESULT MaybeObject* Update(MapList* maps, | 5843 MUST_USE_RESULT MaybeObject* Update(MapList* maps, |
| 5835 Code::Flags flags, | 5844 Code::Flags flags, |
| 5836 Code* code); | 5845 Code* code); |
| 5846 |
| 5847 // Returns an undefined value if the entry is not found. |
| 5848 Handle<Object> Lookup(MapHandleList* maps, Code::Flags flags); |
| 5849 |
| 5837 Object* Lookup(MapList* maps, Code::Flags flags); | 5850 Object* Lookup(MapList* maps, Code::Flags flags); |
| 5838 | 5851 |
| 5839 static inline PolymorphicCodeCache* cast(Object* obj); | 5852 static inline PolymorphicCodeCache* cast(Object* obj); |
| 5840 | 5853 |
| 5841 #ifdef OBJECT_PRINT | 5854 #ifdef OBJECT_PRINT |
| 5842 inline void PolymorphicCodeCachePrint() { | 5855 inline void PolymorphicCodeCachePrint() { |
| 5843 PolymorphicCodeCachePrint(stdout); | 5856 PolymorphicCodeCachePrint(stdout); |
| 5844 } | 5857 } |
| 5845 void PolymorphicCodeCachePrint(FILE* out); | 5858 void PolymorphicCodeCachePrint(FILE* out); |
| 5846 #endif | 5859 #endif |
| (...skipping 1817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7664 } else { | 7677 } else { |
| 7665 value &= ~(1 << bit_position); | 7678 value &= ~(1 << bit_position); |
| 7666 } | 7679 } |
| 7667 return value; | 7680 return value; |
| 7668 } | 7681 } |
| 7669 }; | 7682 }; |
| 7670 | 7683 |
| 7671 } } // namespace v8::internal | 7684 } } // namespace v8::internal |
| 7672 | 7685 |
| 7673 #endif // V8_OBJECTS_H_ | 7686 #endif // V8_OBJECTS_H_ |
| OLD | NEW |