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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 // [2] Smi(0) or elements transition map | 46 // [2] Smi(0) or elements transition map |
47 // [3] Smi(0) or fixed array of prototype transitions | 47 // [3] Smi(0) or fixed array of prototype transitions |
48 // [4] First transition | 48 // [4] First transition |
49 // [length() - kTransitionSize] Last transition | 49 // [length() - kTransitionSize] Last transition |
50 class TransitionArray: public FixedArray { | 50 class TransitionArray: public FixedArray { |
51 public: | 51 public: |
52 // Accessors for fetching instance transition at transition number. | 52 // Accessors for fetching instance transition at transition number. |
53 inline String* GetKey(int transition_number); | 53 inline String* GetKey(int transition_number); |
54 inline void SetKey(int transition_number, String* value); | 54 inline void SetKey(int transition_number, String* value); |
55 inline Object** GetKeySlot(int transition_number); | 55 inline Object** GetKeySlot(int transition_number); |
| 56 int GetSortedKeyIndex(int transition_number) { return transition_number; } |
| 57 |
| 58 String* GetSortedKey(int transition_number) { |
| 59 return GetKey(transition_number); |
| 60 } |
56 | 61 |
57 inline Map* GetTarget(int transition_number); | 62 inline Map* GetTarget(int transition_number); |
58 inline void SetTarget(int transition_number, Map* target); | 63 inline void SetTarget(int transition_number, Map* target); |
59 | 64 |
60 inline PropertyDetails GetTargetDetails(int transition_number); | 65 inline PropertyDetails GetTargetDetails(int transition_number); |
61 | 66 |
62 inline Map* elements_transition(); | 67 inline Map* elements_transition(); |
63 inline void set_elements_transition( | 68 inline void set_elements_transition( |
64 Map* target, | 69 Map* target, |
65 WriteBarrierMode mode = UPDATE_WRITE_BARRIER); | 70 WriteBarrierMode mode = UPDATE_WRITE_BARRIER); |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 Map* target, | 181 Map* target, |
177 const WhitenessWitness&); | 182 const WhitenessWitness&); |
178 | 183 |
179 DISALLOW_IMPLICIT_CONSTRUCTORS(TransitionArray); | 184 DISALLOW_IMPLICIT_CONSTRUCTORS(TransitionArray); |
180 }; | 185 }; |
181 | 186 |
182 | 187 |
183 } } // namespace v8::internal | 188 } } // namespace v8::internal |
184 | 189 |
185 #endif // V8_TRANSITIONS_H_ | 190 #endif // V8_TRANSITIONS_H_ |
OLD | NEW |