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

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

Issue 8334009: Use the distinguished class, ApiFailure, to signal when a Dart_Result is (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 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 | « runtime/vm/raw_object.h ('k') | runtime/vm/raw_object_snapshot.cc » ('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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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/object.h" 7 #include "vm/object.h"
8 #include "vm/visitor.h" 8 #include "vm/visitor.h"
9 9
10 10
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 } 334 }
335 335
336 336
337 intptr_t RawUnhandledException::VisitUnhandledExceptionPointers( 337 intptr_t RawUnhandledException::VisitUnhandledExceptionPointers(
338 RawUnhandledException* raw_obj, ObjectPointerVisitor* visitor) { 338 RawUnhandledException* raw_obj, ObjectPointerVisitor* visitor) {
339 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); 339 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
340 return UnhandledException::InstanceSize(); 340 return UnhandledException::InstanceSize();
341 } 341 }
342 342
343 343
344 intptr_t RawApiFailure::VisitApiFailurePointers(
345 RawApiFailure* raw_obj, ObjectPointerVisitor* visitor) {
346 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
347 return ApiFailure::InstanceSize();
348 }
349
350
344 intptr_t RawInstance::VisitInstancePointers(RawInstance* raw_obj, 351 intptr_t RawInstance::VisitInstancePointers(RawInstance* raw_obj,
345 ObjectPointerVisitor* visitor) { 352 ObjectPointerVisitor* visitor) {
346 // Make sure that we got here with the tagged pointer as this. 353 // Make sure that we got here with the tagged pointer as this.
347 ASSERT(raw_obj->IsHeapObject()); 354 ASSERT(raw_obj->IsHeapObject());
348 RawInstance* obj = raw_obj->ptr(); 355 RawInstance* obj = raw_obj->ptr();
349 intptr_t instance_size = obj->class_->ptr()->instance_size_; 356 intptr_t instance_size = obj->class_->ptr()->instance_size_;
350 intptr_t num_native_fields = obj->class_->ptr()->num_native_fields_; 357 intptr_t num_native_fields = obj->class_->ptr()->num_native_fields_;
351 358
352 // Calculate the first and last raw object pointer fields. 359 // Calculate the first and last raw object pointer fields.
353 uword obj_addr = RawObject::ToAddr(raw_obj); 360 uword obj_addr = RawObject::ToAddr(raw_obj);
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 intptr_t RawJSRegExp::VisitJSRegExpPointers(RawJSRegExp* raw_obj, 490 intptr_t RawJSRegExp::VisitJSRegExpPointers(RawJSRegExp* raw_obj,
484 ObjectPointerVisitor* visitor) { 491 ObjectPointerVisitor* visitor) {
485 // Make sure that we got here with the tagged pointer as this. 492 // Make sure that we got here with the tagged pointer as this.
486 ASSERT(raw_obj->IsHeapObject()); 493 ASSERT(raw_obj->IsHeapObject());
487 intptr_t length = Smi::Value(raw_obj->ptr()->data_length_); 494 intptr_t length = Smi::Value(raw_obj->ptr()->data_length_);
488 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); 495 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
489 return JSRegExp::InstanceSize(length); 496 return JSRegExp::InstanceSize(length);
490 } 497 }
491 498
492 } // namespace dart 499 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/raw_object.h ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698