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

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

Issue 11367044: Merged String subclasses into String. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 258
259 if (class_id < kNumPredefinedCids) { 259 if (class_id < kNumPredefinedCids) {
260 switch (class_id) { 260 switch (class_id) {
261 #define RAW_VISITPOINTERS(clazz) \ 261 #define RAW_VISITPOINTERS(clazz) \
262 case clazz::kClassId: { \ 262 case clazz::kClassId: { \
263 Raw##clazz* raw_obj = reinterpret_cast<Raw##clazz*>(this); \ 263 Raw##clazz* raw_obj = reinterpret_cast<Raw##clazz*>(this); \
264 size = Raw##clazz::Visit##clazz##Pointers(raw_obj, visitor); \ 264 size = Raw##clazz::Visit##clazz##Pointers(raw_obj, visitor); \
265 break; \ 265 break; \
266 } 266 }
267 CLASS_LIST_NO_OBJECT(RAW_VISITPOINTERS) 267 CLASS_LIST_NO_OBJECT(RAW_VISITPOINTERS)
268 CLASS_LIST_STRING_SUBTYPES(RAW_VISITPOINTERS)
268 #undef RAW_VISITPOINTERS 269 #undef RAW_VISITPOINTERS
269 case kFreeListElement: { 270 case kFreeListElement: {
270 ASSERT(FreeBit::decode(ptr()->tags_)); 271 ASSERT(FreeBit::decode(ptr()->tags_));
271 uword addr = RawObject::ToAddr(const_cast<RawObject*>(this)); 272 uword addr = RawObject::ToAddr(const_cast<RawObject*>(this));
272 FreeListElement* element = reinterpret_cast<FreeListElement*>(addr); 273 FreeListElement* element = reinterpret_cast<FreeListElement*>(addr);
273 size = element->Size(); 274 size = element->Size();
274 break; 275 break;
275 } 276 }
276 default: 277 default:
277 OS::Print("Class Id: %"Pd"\n", class_id); 278 OS::Print("Class Id: %"Pd"\n", class_id);
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
955 956
956 intptr_t RawWeakProperty::VisitWeakPropertyPointers( 957 intptr_t RawWeakProperty::VisitWeakPropertyPointers(
957 RawWeakProperty* raw_obj, ObjectPointerVisitor* visitor) { 958 RawWeakProperty* raw_obj, ObjectPointerVisitor* visitor) {
958 // Make sure that we got here with the tagged pointer as this. 959 // Make sure that we got here with the tagged pointer as this.
959 ASSERT(raw_obj->IsHeapObject()); 960 ASSERT(raw_obj->IsHeapObject());
960 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); 961 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
961 return WeakProperty::InstanceSize(); 962 return WeakProperty::InstanceSize();
962 } 963 }
963 964
964 } // namespace dart 965 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698