| OLD | NEW |
| 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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 case kLocalVarDescriptorsCid: { | 219 case kLocalVarDescriptorsCid: { |
| 220 const RawLocalVarDescriptors* raw_descriptors = | 220 const RawLocalVarDescriptors* raw_descriptors = |
| 221 reinterpret_cast<const RawLocalVarDescriptors*>(this); | 221 reinterpret_cast<const RawLocalVarDescriptors*>(this); |
| 222 intptr_t num_descriptors = raw_descriptors->ptr()->length_; | 222 intptr_t num_descriptors = raw_descriptors->ptr()->length_; |
| 223 instance_size = LocalVarDescriptors::InstanceSize(num_descriptors); | 223 instance_size = LocalVarDescriptors::InstanceSize(num_descriptors); |
| 224 break; | 224 break; |
| 225 } | 225 } |
| 226 case kExceptionHandlersCid: { | 226 case kExceptionHandlersCid: { |
| 227 const RawExceptionHandlers* raw_handlers = | 227 const RawExceptionHandlers* raw_handlers = |
| 228 reinterpret_cast<const RawExceptionHandlers*>(this); | 228 reinterpret_cast<const RawExceptionHandlers*>(this); |
| 229 intptr_t num_handlers = Smi::Value(raw_handlers->ptr()->length_); | 229 intptr_t num_handlers = raw_handlers->ptr()->length_; |
| 230 instance_size = ExceptionHandlers::InstanceSize(num_handlers); | 230 instance_size = ExceptionHandlers::InstanceSize(num_handlers); |
| 231 break; | 231 break; |
| 232 } | 232 } |
| 233 case kDeoptInfoCid: { | 233 case kDeoptInfoCid: { |
| 234 const RawDeoptInfo* raw_deopt_info = | 234 const RawDeoptInfo* raw_deopt_info = |
| 235 reinterpret_cast<const RawDeoptInfo*>(this); | 235 reinterpret_cast<const RawDeoptInfo*>(this); |
| 236 intptr_t num_entries = Smi::Value(raw_deopt_info->ptr()->length_); | 236 intptr_t num_entries = Smi::Value(raw_deopt_info->ptr()->length_); |
| 237 instance_size = DeoptInfo::InstanceSize(num_entries); | 237 instance_size = DeoptInfo::InstanceSize(num_entries); |
| 238 break; | 238 break; |
| 239 } | 239 } |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 RawLocalVarDescriptors* obj = raw_obj->ptr(); | 516 RawLocalVarDescriptors* obj = raw_obj->ptr(); |
| 517 intptr_t len = obj->length_; | 517 intptr_t len = obj->length_; |
| 518 visitor->VisitPointer(reinterpret_cast<RawObject**>(&obj->names_)); | 518 visitor->VisitPointer(reinterpret_cast<RawObject**>(&obj->names_)); |
| 519 return LocalVarDescriptors::InstanceSize(len); | 519 return LocalVarDescriptors::InstanceSize(len); |
| 520 } | 520 } |
| 521 | 521 |
| 522 | 522 |
| 523 intptr_t RawExceptionHandlers::VisitExceptionHandlersPointers( | 523 intptr_t RawExceptionHandlers::VisitExceptionHandlersPointers( |
| 524 RawExceptionHandlers* raw_obj, ObjectPointerVisitor* visitor) { | 524 RawExceptionHandlers* raw_obj, ObjectPointerVisitor* visitor) { |
| 525 RawExceptionHandlers* obj = raw_obj->ptr(); | 525 RawExceptionHandlers* obj = raw_obj->ptr(); |
| 526 intptr_t length = Smi::Value(obj->length_); | 526 intptr_t len = obj->length_; |
| 527 visitor->VisitPointer(reinterpret_cast<RawObject**>(&obj->length_)); | 527 visitor->VisitPointer( |
| 528 return ExceptionHandlers::InstanceSize(length); | 528 reinterpret_cast<RawObject**>(&obj->handled_types_data_)); |
| 529 return ExceptionHandlers::InstanceSize(len); |
| 529 } | 530 } |
| 530 | 531 |
| 531 | 532 |
| 532 intptr_t RawDeoptInfo::VisitDeoptInfoPointers( | 533 intptr_t RawDeoptInfo::VisitDeoptInfoPointers( |
| 533 RawDeoptInfo* raw_obj, ObjectPointerVisitor* visitor) { | 534 RawDeoptInfo* raw_obj, ObjectPointerVisitor* visitor) { |
| 534 RawDeoptInfo* obj = raw_obj->ptr(); | 535 RawDeoptInfo* obj = raw_obj->ptr(); |
| 535 intptr_t length = Smi::Value(obj->length_); | 536 intptr_t length = Smi::Value(obj->length_); |
| 536 visitor->VisitPointer(reinterpret_cast<RawObject**>(&obj->length_)); | 537 visitor->VisitPointer(reinterpret_cast<RawObject**>(&obj->length_)); |
| 537 return DeoptInfo::InstanceSize(length); | 538 return DeoptInfo::InstanceSize(length); |
| 538 } | 539 } |
| (...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1006 | 1007 |
| 1007 intptr_t RawWeakProperty::VisitWeakPropertyPointers( | 1008 intptr_t RawWeakProperty::VisitWeakPropertyPointers( |
| 1008 RawWeakProperty* raw_obj, ObjectPointerVisitor* visitor) { | 1009 RawWeakProperty* raw_obj, ObjectPointerVisitor* visitor) { |
| 1009 // Make sure that we got here with the tagged pointer as this. | 1010 // Make sure that we got here with the tagged pointer as this. |
| 1010 ASSERT(raw_obj->IsHeapObject()); | 1011 ASSERT(raw_obj->IsHeapObject()); |
| 1011 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); | 1012 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
| 1012 return WeakProperty::InstanceSize(); | 1013 return WeakProperty::InstanceSize(); |
| 1013 } | 1014 } |
| 1014 | 1015 |
| 1015 } // namespace dart | 1016 } // namespace dart |
| OLD | NEW |