OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_TRANSITIONS_H_ | 5 #ifndef V8_TRANSITIONS_H_ |
6 #define V8_TRANSITIONS_H_ | 6 #define V8_TRANSITIONS_H_ |
7 | 7 |
8 #include "src/checks.h" | 8 #include "src/checks.h" |
9 #include "src/elements-kind.h" | 9 #include "src/elements-kind.h" |
10 #include "src/heap/heap.h" | 10 #include "src/heap/heap.h" |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 static inline int CompareNames(Name* key1, uint32_t hash1, Name* key2, | 290 static inline int CompareNames(Name* key1, uint32_t hash1, Name* key2, |
291 uint32_t hash2); | 291 uint32_t hash2); |
292 | 292 |
293 // Compares two details, returns -1 if details1 is "less" than details2, | 293 // Compares two details, returns -1 if details1 is "less" than details2, |
294 // 0 if details1 equal to details2 and 1 otherwise. | 294 // 0 if details1 equal to details2 and 1 otherwise. |
295 static inline int CompareDetails(PropertyKind kind1, | 295 static inline int CompareDetails(PropertyKind kind1, |
296 PropertyAttributes attributes1, | 296 PropertyAttributes attributes1, |
297 PropertyKind kind2, | 297 PropertyKind kind2, |
298 PropertyAttributes attributes2); | 298 PropertyAttributes attributes2); |
299 | 299 |
300 inline void NoIncrementalWriteBarrierSet(int transition_number, | 300 inline void Set(int transition_number, Name* key, Map* target); |
301 Name* key, | |
302 Map* target); | |
303 | 301 |
304 // Copy a single transition from the origin array. | 302 // Copy a single transition from the origin array. |
305 inline void NoIncrementalWriteBarrierCopyFrom(TransitionArray* origin, | 303 inline void NoIncrementalWriteBarrierCopyFrom(TransitionArray* origin, |
306 int origin_transition, | 304 int origin_transition, |
307 int target_transition); | 305 int target_transition); |
308 | 306 |
309 #ifdef DEBUG | 307 #ifdef DEBUG |
310 static void CheckNewTransitionsAreConsistent(Handle<Map> map, | 308 static void CheckNewTransitionsAreConsistent(Handle<Map> map, |
311 TransitionArray* old_transitions, | 309 TransitionArray* old_transitions, |
312 Object* transitions); | 310 Object* transitions); |
313 #endif | 311 #endif |
314 | 312 |
315 DISALLOW_IMPLICIT_CONSTRUCTORS(TransitionArray); | 313 DISALLOW_IMPLICIT_CONSTRUCTORS(TransitionArray); |
316 }; | 314 }; |
317 | 315 |
318 | 316 |
319 } // namespace internal | 317 } // namespace internal |
320 } // namespace v8 | 318 } // namespace v8 |
321 | 319 |
322 #endif // V8_TRANSITIONS_H_ | 320 #endif // V8_TRANSITIONS_H_ |
OLD | NEW |