| 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 4684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4695 static Code* GetCodeAgeStub(Age age, MarkingParity parity); | 4695 static Code* GetCodeAgeStub(Age age, MarkingParity parity); |
| 4696 | 4696 |
| 4697 // Code aging -- platform-specific | 4697 // Code aging -- platform-specific |
| 4698 static void PatchPlatformCodeAge(byte* sequence, Age age, | 4698 static void PatchPlatformCodeAge(byte* sequence, Age age, |
| 4699 MarkingParity parity); | 4699 MarkingParity parity); |
| 4700 | 4700 |
| 4701 DISALLOW_IMPLICIT_CONSTRUCTORS(Code); | 4701 DISALLOW_IMPLICIT_CONSTRUCTORS(Code); |
| 4702 }; | 4702 }; |
| 4703 | 4703 |
| 4704 | 4704 |
| 4705 Map* FindClosestElementsTransition(Map* map, ElementsKind to_kind); |
| 4706 |
| 4707 |
| 4705 // All heap objects have a Map that describes their structure. | 4708 // All heap objects have a Map that describes their structure. |
| 4706 // A Map contains information about: | 4709 // A Map contains information about: |
| 4707 // - Size information about the object | 4710 // - Size information about the object |
| 4708 // - How to iterate over an object (for garbage collection) | 4711 // - How to iterate over an object (for garbage collection) |
| 4709 class Map: public HeapObject { | 4712 class Map: public HeapObject { |
| 4710 public: | 4713 public: |
| 4711 // Instance size. | 4714 // Instance size. |
| 4712 // Size in bytes or kVariableSizeSentinel if instances do not have | 4715 // Size in bytes or kVariableSizeSentinel if instances do not have |
| 4713 // a fixed size. | 4716 // a fixed size. |
| 4714 inline int instance_size(); | 4717 inline int instance_size(); |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4873 inline bool HasTransitionArray(); | 4876 inline bool HasTransitionArray(); |
| 4874 inline bool HasElementsTransition(); | 4877 inline bool HasElementsTransition(); |
| 4875 inline Map* elements_transition_map(); | 4878 inline Map* elements_transition_map(); |
| 4876 MUST_USE_RESULT inline MaybeObject* set_elements_transition_map( | 4879 MUST_USE_RESULT inline MaybeObject* set_elements_transition_map( |
| 4877 Map* transitioned_map); | 4880 Map* transitioned_map); |
| 4878 inline void SetTransition(int transition_index, Map* target); | 4881 inline void SetTransition(int transition_index, Map* target); |
| 4879 inline Map* GetTransition(int transition_index); | 4882 inline Map* GetTransition(int transition_index); |
| 4880 MUST_USE_RESULT inline MaybeObject* AddTransition(String* key, | 4883 MUST_USE_RESULT inline MaybeObject* AddTransition(String* key, |
| 4881 Map* target, | 4884 Map* target, |
| 4882 SimpleTransitionFlag flag); | 4885 SimpleTransitionFlag flag); |
| 4886 MaybeObject* AddMissingElementsTransitions(ElementsKind to_kind); |
| 4883 DECL_ACCESSORS(transitions, TransitionArray) | 4887 DECL_ACCESSORS(transitions, TransitionArray) |
| 4884 inline void ClearTransitions(Heap* heap, | 4888 inline void ClearTransitions(Heap* heap, |
| 4885 WriteBarrierMode mode = UPDATE_WRITE_BARRIER); | 4889 WriteBarrierMode mode = UPDATE_WRITE_BARRIER); |
| 4886 | 4890 |
| 4887 // Tells whether the map is attached to SharedFunctionInfo | 4891 // Tells whether the map is attached to SharedFunctionInfo |
| 4888 // (for inobject slack tracking). | 4892 // (for inobject slack tracking). |
| 4889 inline void set_attached_to_shared_function_info(bool value); | 4893 inline void set_attached_to_shared_function_info(bool value); |
| 4890 | 4894 |
| 4891 inline bool attached_to_shared_function_info(); | 4895 inline bool attached_to_shared_function_info(); |
| 4892 | 4896 |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5114 // Returns the map that this map transitions to if its elements_kind | 5118 // Returns the map that this map transitions to if its elements_kind |
| 5115 // is changed to |elements_kind|, or NULL if no such map is cached yet. | 5119 // is changed to |elements_kind|, or NULL if no such map is cached yet. |
| 5116 // |safe_to_add_transitions| is set to false if adding transitions is not | 5120 // |safe_to_add_transitions| is set to false if adding transitions is not |
| 5117 // allowed. | 5121 // allowed. |
| 5118 Map* LookupElementsTransitionMap(ElementsKind elements_kind); | 5122 Map* LookupElementsTransitionMap(ElementsKind elements_kind); |
| 5119 | 5123 |
| 5120 // Returns the transitioned map for this map with the most generic | 5124 // Returns the transitioned map for this map with the most generic |
| 5121 // elements_kind that's found in |candidates|, or null handle if no match is | 5125 // elements_kind that's found in |candidates|, or null handle if no match is |
| 5122 // found at all. | 5126 // found at all. |
| 5123 Handle<Map> FindTransitionedMap(MapHandleList* candidates); | 5127 Handle<Map> FindTransitionedMap(MapHandleList* candidates); |
| 5124 Map* FindTransitionedMap(MapList* candidates); | |
| 5125 | 5128 |
| 5126 // Zaps the contents of backing data structures. Note that the | 5129 // Zaps the contents of backing data structures. Note that the |
| 5127 // heap verifier (i.e. VerifyMarkingVisitor) relies on zapping of objects | 5130 // heap verifier (i.e. VerifyMarkingVisitor) relies on zapping of objects |
| 5128 // holding weak references when incremental marking is used, because it also | 5131 // holding weak references when incremental marking is used, because it also |
| 5129 // iterates over objects that are otherwise unreachable. | 5132 // iterates over objects that are otherwise unreachable. |
| 5130 // In general we only want to call these functions in release mode when | 5133 // In general we only want to call these functions in release mode when |
| 5131 // heap verification is turned on. | 5134 // heap verification is turned on. |
| 5132 void ZapPrototypeTransitions(); | 5135 void ZapPrototypeTransitions(); |
| 5133 void ZapTransitions(); | 5136 void ZapTransitions(); |
| 5134 | 5137 |
| (...skipping 3951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9086 } else { | 9089 } else { |
| 9087 value &= ~(1 << bit_position); | 9090 value &= ~(1 << bit_position); |
| 9088 } | 9091 } |
| 9089 return value; | 9092 return value; |
| 9090 } | 9093 } |
| 9091 }; | 9094 }; |
| 9092 | 9095 |
| 9093 } } // namespace v8::internal | 9096 } } // namespace v8::internal |
| 9094 | 9097 |
| 9095 #endif // V8_OBJECTS_H_ | 9098 #endif // V8_OBJECTS_H_ |
| OLD | NEW |