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

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

Issue 223533002: Don't overwrite transition array map while iterating over the transition tree. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 months 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 | Annotate | Revision Log
« no previous file with comments | « src/transitions.h ('k') | no next file » | 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 // 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 } 81 }
82 82
83 83
84 FixedArray* TransitionArray::GetPrototypeTransitions() { 84 FixedArray* TransitionArray::GetPrototypeTransitions() {
85 ASSERT(IsFullTransitionArray()); 85 ASSERT(IsFullTransitionArray());
86 Object* prototype_transitions = get(kPrototypeTransitionsIndex); 86 Object* prototype_transitions = get(kPrototypeTransitionsIndex);
87 return FixedArray::cast(prototype_transitions); 87 return FixedArray::cast(prototype_transitions);
88 } 88 }
89 89
90 90
91 HeapObject* TransitionArray::UncheckedPrototypeTransitions() {
92 ASSERT(HasPrototypeTransitions());
93 return reinterpret_cast<HeapObject*>(get(kPrototypeTransitionsIndex));
94 }
95
96
97 void TransitionArray::SetPrototypeTransitions(FixedArray* transitions, 91 void TransitionArray::SetPrototypeTransitions(FixedArray* transitions,
98 WriteBarrierMode mode) { 92 WriteBarrierMode mode) {
99 ASSERT(IsFullTransitionArray()); 93 ASSERT(IsFullTransitionArray());
100 ASSERT(transitions->IsFixedArray()); 94 ASSERT(transitions->IsFixedArray());
101 Heap* heap = GetHeap(); 95 Heap* heap = GetHeap();
102 WRITE_FIELD(this, kPrototypeTransitionsOffset, transitions); 96 WRITE_FIELD(this, kPrototypeTransitionsOffset, transitions);
103 CONDITIONAL_WRITE_BARRIER( 97 CONDITIONAL_WRITE_BARRIER(
104 heap, this, kPrototypeTransitionsOffset, transitions, mode); 98 heap, this, kPrototypeTransitionsOffset, transitions, mode);
105 } 99 }
106 100
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 178
185 179
186 #undef FIELD_ADDR 180 #undef FIELD_ADDR
187 #undef WRITE_FIELD 181 #undef WRITE_FIELD
188 #undef CONDITIONAL_WRITE_BARRIER 182 #undef CONDITIONAL_WRITE_BARRIER
189 183
190 184
191 } } // namespace v8::internal 185 } } // namespace v8::internal
192 186
193 #endif // V8_TRANSITIONS_INL_H_ 187 #endif // V8_TRANSITIONS_INL_H_
OLDNEW
« no previous file with comments | « src/transitions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698