| 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 4676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4687 | 4687 |
| 4688 // Code aging -- platform-specific | 4688 // Code aging -- platform-specific |
| 4689 byte* FindPlatformCodeAgeSequence(); | 4689 byte* FindPlatformCodeAgeSequence(); |
| 4690 static void PatchPlatformCodeAge(byte* sequence, Age age, | 4690 static void PatchPlatformCodeAge(byte* sequence, Age age, |
| 4691 MarkingParity parity); | 4691 MarkingParity parity); |
| 4692 | 4692 |
| 4693 DISALLOW_IMPLICIT_CONSTRUCTORS(Code); | 4693 DISALLOW_IMPLICIT_CONSTRUCTORS(Code); |
| 4694 }; | 4694 }; |
| 4695 | 4695 |
| 4696 | 4696 |
| 4697 Map* FindClosestElementsTransition(Map* map, ElementsKind to_kind); |
| 4698 |
| 4699 |
| 4697 // All heap objects have a Map that describes their structure. | 4700 // All heap objects have a Map that describes their structure. |
| 4698 // A Map contains information about: | 4701 // A Map contains information about: |
| 4699 // - Size information about the object | 4702 // - Size information about the object |
| 4700 // - How to iterate over an object (for garbage collection) | 4703 // - How to iterate over an object (for garbage collection) |
| 4701 class Map: public HeapObject { | 4704 class Map: public HeapObject { |
| 4702 public: | 4705 public: |
| 4703 // Instance size. | 4706 // Instance size. |
| 4704 // Size in bytes or kVariableSizeSentinel if instances do not have | 4707 // Size in bytes or kVariableSizeSentinel if instances do not have |
| 4705 // a fixed size. | 4708 // a fixed size. |
| 4706 inline int instance_size(); | 4709 inline int instance_size(); |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4865 inline bool HasTransitionArray(); | 4868 inline bool HasTransitionArray(); |
| 4866 inline bool HasElementsTransition(); | 4869 inline bool HasElementsTransition(); |
| 4867 inline Map* elements_transition_map(); | 4870 inline Map* elements_transition_map(); |
| 4868 MUST_USE_RESULT inline MaybeObject* set_elements_transition_map( | 4871 MUST_USE_RESULT inline MaybeObject* set_elements_transition_map( |
| 4869 Map* transitioned_map); | 4872 Map* transitioned_map); |
| 4870 inline void SetTransition(int transition_index, Map* target); | 4873 inline void SetTransition(int transition_index, Map* target); |
| 4871 inline Map* GetTransition(int transition_index); | 4874 inline Map* GetTransition(int transition_index); |
| 4872 MUST_USE_RESULT inline MaybeObject* AddTransition(String* key, | 4875 MUST_USE_RESULT inline MaybeObject* AddTransition(String* key, |
| 4873 Map* target, | 4876 Map* target, |
| 4874 SimpleTransitionFlag flag); | 4877 SimpleTransitionFlag flag); |
| 4878 MaybeObject* AddMissingElementsTransitions(ElementsKind to_kind); |
| 4875 DECL_ACCESSORS(transitions, TransitionArray) | 4879 DECL_ACCESSORS(transitions, TransitionArray) |
| 4876 inline void ClearTransitions(Heap* heap, | 4880 inline void ClearTransitions(Heap* heap, |
| 4877 WriteBarrierMode mode = UPDATE_WRITE_BARRIER); | 4881 WriteBarrierMode mode = UPDATE_WRITE_BARRIER); |
| 4878 | 4882 |
| 4879 // Tells whether the map is attached to SharedFunctionInfo | 4883 // Tells whether the map is attached to SharedFunctionInfo |
| 4880 // (for inobject slack tracking). | 4884 // (for inobject slack tracking). |
| 4881 inline void set_attached_to_shared_function_info(bool value); | 4885 inline void set_attached_to_shared_function_info(bool value); |
| 4882 | 4886 |
| 4883 inline bool attached_to_shared_function_info(); | 4887 inline bool attached_to_shared_function_info(); |
| 4884 | 4888 |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5106 // Returns the map that this map transitions to if its elements_kind | 5110 // Returns the map that this map transitions to if its elements_kind |
| 5107 // is changed to |elements_kind|, or NULL if no such map is cached yet. | 5111 // is changed to |elements_kind|, or NULL if no such map is cached yet. |
| 5108 // |safe_to_add_transitions| is set to false if adding transitions is not | 5112 // |safe_to_add_transitions| is set to false if adding transitions is not |
| 5109 // allowed. | 5113 // allowed. |
| 5110 Map* LookupElementsTransitionMap(ElementsKind elements_kind); | 5114 Map* LookupElementsTransitionMap(ElementsKind elements_kind); |
| 5111 | 5115 |
| 5112 // Returns the transitioned map for this map with the most generic | 5116 // Returns the transitioned map for this map with the most generic |
| 5113 // elements_kind that's found in |candidates|, or null handle if no match is | 5117 // elements_kind that's found in |candidates|, or null handle if no match is |
| 5114 // found at all. | 5118 // found at all. |
| 5115 Handle<Map> FindTransitionedMap(MapHandleList* candidates); | 5119 Handle<Map> FindTransitionedMap(MapHandleList* candidates); |
| 5116 Map* FindTransitionedMap(MapList* candidates); | |
| 5117 | 5120 |
| 5118 // Zaps the contents of backing data structures. Note that the | 5121 // Zaps the contents of backing data structures. Note that the |
| 5119 // heap verifier (i.e. VerifyMarkingVisitor) relies on zapping of objects | 5122 // heap verifier (i.e. VerifyMarkingVisitor) relies on zapping of objects |
| 5120 // holding weak references when incremental marking is used, because it also | 5123 // holding weak references when incremental marking is used, because it also |
| 5121 // iterates over objects that are otherwise unreachable. | 5124 // iterates over objects that are otherwise unreachable. |
| 5122 // In general we only want to call these functions in release mode when | 5125 // In general we only want to call these functions in release mode when |
| 5123 // heap verification is turned on. | 5126 // heap verification is turned on. |
| 5124 void ZapPrototypeTransitions(); | 5127 void ZapPrototypeTransitions(); |
| 5125 void ZapTransitions(); | 5128 void ZapTransitions(); |
| 5126 | 5129 |
| (...skipping 3874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9001 } else { | 9004 } else { |
| 9002 value &= ~(1 << bit_position); | 9005 value &= ~(1 << bit_position); |
| 9003 } | 9006 } |
| 9004 return value; | 9007 return value; |
| 9005 } | 9008 } |
| 9006 }; | 9009 }; |
| 9007 | 9010 |
| 9008 } } // namespace v8::internal | 9011 } } // namespace v8::internal |
| 9009 | 9012 |
| 9010 #endif // V8_OBJECTS_H_ | 9013 #endif // V8_OBJECTS_H_ |
| OLD | NEW |