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

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

Issue 12937010: Handle TypedDataView objects in Dart_TypedDataAcquireData and (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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 | « runtime/vm/raw_object.h ('k') | runtime/vm/snapshot.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 (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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 #define RAW_VISITPOINTERS(clazz) \ 314 #define RAW_VISITPOINTERS(clazz) \
315 case kExternalTypedData##clazz##Cid: 315 case kExternalTypedData##clazz##Cid:
316 CLASS_LIST_TYPED_DATA(RAW_VISITPOINTERS) { 316 CLASS_LIST_TYPED_DATA(RAW_VISITPOINTERS) {
317 RawExternalTypedData* raw_obj = 317 RawExternalTypedData* raw_obj =
318 reinterpret_cast<RawExternalTypedData*>(this); 318 reinterpret_cast<RawExternalTypedData*>(this);
319 size = RawExternalTypedData::VisitExternalTypedDataPointers(raw_obj, 319 size = RawExternalTypedData::VisitExternalTypedDataPointers(raw_obj,
320 visitor); 320 visitor);
321 break; 321 break;
322 } 322 }
323 #undef RAW_VISITPOINTERS 323 #undef RAW_VISITPOINTERS
324 #define RAW_VISITPOINTERS(clazz) \
325 case kTypedData##clazz##ViewCid:
326 CLASS_LIST_TYPED_DATA(RAW_VISITPOINTERS)
327 case kByteDataViewCid: {
328 RawInstance* raw_obj = reinterpret_cast<RawInstance*>(this);
329 size = RawInstance::VisitInstancePointers(raw_obj, visitor);
330 break;
331 }
332 #undef RAW_VISITPOINTERS
324 case kFreeListElement: { 333 case kFreeListElement: {
325 ASSERT(FreeBit::decode(ptr()->tags_)); 334 ASSERT(FreeBit::decode(ptr()->tags_));
326 uword addr = RawObject::ToAddr(const_cast<RawObject*>(this)); 335 uword addr = RawObject::ToAddr(const_cast<RawObject*>(this));
327 FreeListElement* element = reinterpret_cast<FreeListElement*>(addr); 336 FreeListElement* element = reinterpret_cast<FreeListElement*>(addr);
328 size = element->Size(); 337 size = element->Size();
329 break; 338 break;
330 } 339 }
331 default: 340 default:
332 OS::Print("Class Id: %"Pd"\n", class_id); 341 OS::Print("Class Id: %"Pd"\n", class_id);
333 UNREACHABLE(); 342 UNREACHABLE();
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
1113 1122
1114 intptr_t RawWeakProperty::VisitWeakPropertyPointers( 1123 intptr_t RawWeakProperty::VisitWeakPropertyPointers(
1115 RawWeakProperty* raw_obj, ObjectPointerVisitor* visitor) { 1124 RawWeakProperty* raw_obj, ObjectPointerVisitor* visitor) {
1116 // Make sure that we got here with the tagged pointer as this. 1125 // Make sure that we got here with the tagged pointer as this.
1117 ASSERT(raw_obj->IsHeapObject()); 1126 ASSERT(raw_obj->IsHeapObject());
1118 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); 1127 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
1119 return WeakProperty::InstanceSize(); 1128 return WeakProperty::InstanceSize();
1120 } 1129 }
1121 1130
1122 } // namespace dart 1131 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/raw_object.h ('k') | runtime/vm/snapshot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698