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

Side by Side Diff: runtime/vm/raw_object.cc

Issue 16390002: Make ImmutableArray a sub class of AllStatic. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/raw_object.h" 5 #include "vm/raw_object.h"
6 6
7 #include "vm/class_table.h" 7 #include "vm/class_table.h"
8 #include "vm/freelist.h" 8 #include "vm/freelist.h"
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 204
205 // Only reasonable to be called on heap objects. 205 // Only reasonable to be called on heap objects.
206 ASSERT(IsHeapObject()); 206 ASSERT(IsHeapObject());
207 207
208 // Read the necessary data out of the class before visting the class itself. 208 // Read the necessary data out of the class before visting the class itself.
209 intptr_t class_id = GetClassId(); 209 intptr_t class_id = GetClassId();
210 210
211 if (class_id < kNumPredefinedCids) { 211 if (class_id < kNumPredefinedCids) {
212 switch (class_id) { 212 switch (class_id) {
213 #define RAW_VISITPOINTERS(clazz) \ 213 #define RAW_VISITPOINTERS(clazz) \
214 case clazz::kClassId: { \ 214 case k##clazz##Cid: { \
215 Raw##clazz* raw_obj = reinterpret_cast<Raw##clazz*>(this); \ 215 Raw##clazz* raw_obj = reinterpret_cast<Raw##clazz*>(this); \
216 size = Raw##clazz::Visit##clazz##Pointers(raw_obj, visitor); \ 216 size = Raw##clazz::Visit##clazz##Pointers(raw_obj, visitor); \
217 break; \ 217 break; \
218 } 218 }
219 CLASS_LIST_NO_OBJECT(RAW_VISITPOINTERS) 219 CLASS_LIST_NO_OBJECT(RAW_VISITPOINTERS)
220 #undef RAW_VISITPOINTERS 220 #undef RAW_VISITPOINTERS
221 #define RAW_VISITPOINTERS(clazz) \ 221 #define RAW_VISITPOINTERS(clazz) \
222 case kTypedData##clazz##Cid: 222 case kTypedData##clazz##Cid:
223 CLASS_LIST_TYPED_DATA(RAW_VISITPOINTERS) { 223 CLASS_LIST_TYPED_DATA(RAW_VISITPOINTERS) {
224 RawTypedData* raw_obj = reinterpret_cast<RawTypedData*>(this); 224 RawTypedData* raw_obj = reinterpret_cast<RawTypedData*>(this);
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 801
802 intptr_t RawWeakProperty::VisitWeakPropertyPointers( 802 intptr_t RawWeakProperty::VisitWeakPropertyPointers(
803 RawWeakProperty* raw_obj, ObjectPointerVisitor* visitor) { 803 RawWeakProperty* raw_obj, ObjectPointerVisitor* visitor) {
804 // Make sure that we got here with the tagged pointer as this. 804 // Make sure that we got here with the tagged pointer as this.
805 ASSERT(raw_obj->IsHeapObject()); 805 ASSERT(raw_obj->IsHeapObject());
806 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); 806 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
807 return WeakProperty::InstanceSize(); 807 return WeakProperty::InstanceSize();
808 } 808 }
809 809
810 } // namespace dart 810 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698