| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |