| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 Object* back_pointer); | 106 Object* back_pointer); |
| 107 | 107 |
| 108 // Copy the transition array, inserting a new transition. | 108 // Copy the transition array, inserting a new transition. |
| 109 // TODO(verwaest): This should not cause an existing transition to be | 109 // TODO(verwaest): This should not cause an existing transition to be |
| 110 // overwritten. | 110 // overwritten. |
| 111 MUST_USE_RESULT MaybeObject* CopyInsert(String* name, Map* target); | 111 MUST_USE_RESULT MaybeObject* CopyInsert(String* name, Map* target); |
| 112 | 112 |
| 113 // Copy a single transition from the origin array. | 113 // Copy a single transition from the origin array. |
| 114 inline void CopyFrom(TransitionArray* origin, | 114 inline void CopyFrom(TransitionArray* origin, |
| 115 int origin_transition, | 115 int origin_transition, |
| 116 int target_transition, | 116 int target_transition); |
| 117 const WhitenessWitness& witness); | |
| 118 | 117 |
| 119 // Search a transition for a given property name. | 118 // Search a transition for a given property name. |
| 120 inline int Search(String* name); | 119 inline int Search(String* name); |
| 121 | 120 |
| 122 // Allocates a TransitionArray. | 121 // Allocates a TransitionArray. |
| 123 MUST_USE_RESULT static MaybeObject* Allocate( | 122 MUST_USE_RESULT static MaybeObject* Allocate( |
| 124 int number_of_transitions, | 123 int number_of_transitions, |
| 125 JSGlobalPropertyCell* descriptors_cell); | 124 JSGlobalPropertyCell* descriptors_cell); |
| 126 | 125 |
| 127 // Casting. | 126 // Casting. |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 } | 176 } |
| 178 | 177 |
| 179 static int ToTargetIndex(int transition_number) { | 178 static int ToTargetIndex(int transition_number) { |
| 180 return kFirstIndex + | 179 return kFirstIndex + |
| 181 (transition_number * kTransitionSize) + | 180 (transition_number * kTransitionSize) + |
| 182 kTransitionTarget; | 181 kTransitionTarget; |
| 183 } | 182 } |
| 184 | 183 |
| 185 inline void Set(int transition_number, | 184 inline void Set(int transition_number, |
| 186 String* key, | 185 String* key, |
| 187 Map* target, | 186 Map* target); |
| 188 const WhitenessWitness&); | |
| 189 | 187 |
| 190 DISALLOW_IMPLICIT_CONSTRUCTORS(TransitionArray); | 188 DISALLOW_IMPLICIT_CONSTRUCTORS(TransitionArray); |
| 191 }; | 189 }; |
| 192 | 190 |
| 193 | 191 |
| 194 } } // namespace v8::internal | 192 } } // namespace v8::internal |
| 195 | 193 |
| 196 #endif // V8_TRANSITIONS_H_ | 194 #endif // V8_TRANSITIONS_H_ |
| OLD | NEW |