| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 | 112 |
| 113 // Copy a single transition from the origin array. | 113 // Copy a single transition from the origin array. |
| 114 inline void NoIncrementalWriteBarrierCopyFrom(TransitionArray* origin, | 114 inline void NoIncrementalWriteBarrierCopyFrom(TransitionArray* origin, |
| 115 int origin_transition, | 115 int origin_transition, |
| 116 int target_transition); | 116 int target_transition); |
| 117 | 117 |
| 118 // Search a transition for a given property name. | 118 // Search a transition for a given property name. |
| 119 inline int Search(Name* name); | 119 inline int Search(Name* name); |
| 120 | 120 |
| 121 // Allocates a TransitionArray. | 121 // Allocates a TransitionArray. |
| 122 MUST_USE_RESULT static MaybeObject* Allocate(int number_of_transitions); | 122 MUST_USE_RESULT static MaybeObject* Allocate( |
| 123 Isolate* isolate, int number_of_transitions); |
| 123 | 124 |
| 124 bool IsSimpleTransition() { | 125 bool IsSimpleTransition() { |
| 125 return length() == kSimpleTransitionSize && | 126 return length() == kSimpleTransitionSize && |
| 126 get(kSimpleTransitionTarget)->IsHeapObject() && | 127 get(kSimpleTransitionTarget)->IsHeapObject() && |
| 127 // The IntrusivePrototypeTransitionIterator may have set the map of the | 128 // The IntrusivePrototypeTransitionIterator may have set the map of the |
| 128 // prototype transitions array to a smi. In that case, there are | 129 // prototype transitions array to a smi. In that case, there are |
| 129 // prototype transitions, hence this transition array is a full | 130 // prototype transitions, hence this transition array is a full |
| 130 // transition array. | 131 // transition array. |
| 131 HeapObject::cast(get(kSimpleTransitionTarget))->map()->IsMap() && | 132 HeapObject::cast(get(kSimpleTransitionTarget))->map()->IsMap() && |
| 132 get(kSimpleTransitionTarget)->IsMap(); | 133 get(kSimpleTransitionTarget)->IsMap(); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 Name* key, | 203 Name* key, |
| 203 Map* target); | 204 Map* target); |
| 204 | 205 |
| 205 DISALLOW_IMPLICIT_CONSTRUCTORS(TransitionArray); | 206 DISALLOW_IMPLICIT_CONSTRUCTORS(TransitionArray); |
| 206 }; | 207 }; |
| 207 | 208 |
| 208 | 209 |
| 209 } } // namespace v8::internal | 210 } } // namespace v8::internal |
| 210 | 211 |
| 211 #endif // V8_TRANSITIONS_H_ | 212 #endif // V8_TRANSITIONS_H_ |
| OLD | NEW |