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

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

Issue 11188031: Move DescriptorArray into the map (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: remove padding area Created 8 years, 2 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.cc ('k') | src/v8globals.h » ('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 // 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 void TransitionArray::set_elements_transition(Map* transition_map, 77 void TransitionArray::set_elements_transition(Map* transition_map,
78 WriteBarrierMode mode) { 78 WriteBarrierMode mode) {
79 ASSERT(IsFullTransitionArray()); 79 ASSERT(IsFullTransitionArray());
80 Heap* heap = GetHeap(); 80 Heap* heap = GetHeap();
81 WRITE_FIELD(this, kElementsTransitionOffset, transition_map); 81 WRITE_FIELD(this, kElementsTransitionOffset, transition_map);
82 CONDITIONAL_WRITE_BARRIER( 82 CONDITIONAL_WRITE_BARRIER(
83 heap, this, kElementsTransitionOffset, transition_map, mode); 83 heap, this, kElementsTransitionOffset, transition_map, mode);
84 } 84 }
85 85
86 86
87 Object** TransitionArray::GetDescriptorsSlot() {
88 return HeapObject::RawField(reinterpret_cast<HeapObject*>(this),
89 kDescriptorsOffset);
90 }
91
92
93 DescriptorArray* TransitionArray::descriptors() {
94 return DescriptorArray::cast(get(kDescriptorsIndex));
95 }
96
97
98 void TransitionArray::set_descriptors(DescriptorArray* descriptors) {
99 ASSERT(descriptors->IsDescriptorArray());
100 set(kDescriptorsIndex, descriptors);
101 }
102
103
104 Object* TransitionArray::back_pointer_storage() { 87 Object* TransitionArray::back_pointer_storage() {
105 return get(kBackPointerStorageIndex); 88 return get(kBackPointerStorageIndex);
106 } 89 }
107 90
108 91
109 void TransitionArray::set_back_pointer_storage(Object* back_pointer, 92 void TransitionArray::set_back_pointer_storage(Object* back_pointer,
110 WriteBarrierMode mode) { 93 WriteBarrierMode mode) {
111 Heap* heap = GetHeap(); 94 Heap* heap = GetHeap();
112 WRITE_FIELD(this, kBackPointerStorageOffset, back_pointer); 95 WRITE_FIELD(this, kBackPointerStorageOffset, back_pointer);
113 CONDITIONAL_WRITE_BARRIER( 96 CONDITIONAL_WRITE_BARRIER(
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 206
224 207
225 #undef FIELD_ADDR 208 #undef FIELD_ADDR
226 #undef WRITE_FIELD 209 #undef WRITE_FIELD
227 #undef CONDITIONAL_WRITE_BARRIER 210 #undef CONDITIONAL_WRITE_BARRIER
228 211
229 212
230 } } // namespace v8::internal 213 } } // namespace v8::internal
231 214
232 #endif // V8_TRANSITIONS_INL_H_ 215 #endif // V8_TRANSITIONS_INL_H_
OLDNEW
« no previous file with comments | « src/transitions.cc ('k') | src/v8globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698