Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/transitions-inl.h

Issue 1483003002: Revert of Introduce instance type for transition arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/transitions.cc ('k') | src/types.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_INL_H_ 5 #ifndef V8_TRANSITIONS_INL_H_
6 #define V8_TRANSITIONS_INL_H_ 6 #define V8_TRANSITIONS_INL_H_
7 7
8 #include "src/transitions.h" 8 #include "src/transitions.h"
9 9
10 namespace v8 { 10 namespace v8 {
11 namespace internal { 11 namespace internal {
12 12
13 13
14 TransitionArray* TransitionArray::cast(Object* object) { 14 TransitionArray* TransitionArray::cast(Object* object) {
15 DCHECK(object->IsTransitionArray()); 15 DCHECK(object->IsTransitionArray());
16 return reinterpret_cast<TransitionArray*>(object); 16 return reinterpret_cast<TransitionArray*>(object);
17 } 17 }
18 18
19 19
20 Object* TransitionArray::next_link() { return get(kNextLinkIndex); }
21
22
23 void TransitionArray::set_next_link(Object* next, WriteBarrierMode mode) {
24 return set(kNextLinkIndex, next, mode);
25 }
26
27
28 bool TransitionArray::HasPrototypeTransitions() { 20 bool TransitionArray::HasPrototypeTransitions() {
29 return get(kPrototypeTransitionsIndex) != Smi::FromInt(0); 21 return get(kPrototypeTransitionsIndex) != Smi::FromInt(0);
30 } 22 }
31 23
32 24
33 FixedArray* TransitionArray::GetPrototypeTransitions() { 25 FixedArray* TransitionArray::GetPrototypeTransitions() {
34 DCHECK(HasPrototypeTransitions()); // Callers must check first. 26 DCHECK(HasPrototypeTransitions()); // Callers must check first.
35 Object* prototype_transitions = get(kPrototypeTransitionsIndex); 27 Object* prototype_transitions = get(kPrototypeTransitionsIndex);
36 return FixedArray::cast(prototype_transitions); 28 return FixedArray::cast(prototype_transitions);
37 } 29 }
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 166
175 void TransitionArray::SetNumberOfTransitions(int number_of_transitions) { 167 void TransitionArray::SetNumberOfTransitions(int number_of_transitions) {
176 DCHECK(number_of_transitions <= Capacity(this)); 168 DCHECK(number_of_transitions <= Capacity(this));
177 set(kTransitionLengthIndex, Smi::FromInt(number_of_transitions)); 169 set(kTransitionLengthIndex, Smi::FromInt(number_of_transitions));
178 } 170 }
179 171
180 } // namespace internal 172 } // namespace internal
181 } // namespace v8 173 } // namespace v8
182 174
183 #endif // V8_TRANSITIONS_INL_H_ 175 #endif // V8_TRANSITIONS_INL_H_
OLDNEW
« no previous file with comments | « src/transitions.cc ('k') | src/types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698