| 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/dart.h" | 8 #include "vm/dart.h" |
| 9 #include "vm/freelist.h" | 9 #include "vm/freelist.h" |
| 10 #include "vm/isolate.h" | 10 #include "vm/isolate.h" |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 ObjectPointerVisitor* visitor) { | 454 ObjectPointerVisitor* visitor) { |
| 455 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); | 455 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
| 456 | 456 |
| 457 RawCode* obj = raw_obj->ptr(); | 457 RawCode* obj = raw_obj->ptr(); |
| 458 intptr_t length = obj->pointer_offsets_length_; | 458 intptr_t length = obj->pointer_offsets_length_; |
| 459 if (Code::AliveBit::decode(obj->state_bits_)) { | 459 if (Code::AliveBit::decode(obj->state_bits_)) { |
| 460 // Also visit all the embedded pointers in the corresponding instructions. | 460 // Also visit all the embedded pointers in the corresponding instructions. |
| 461 uword entry_point = reinterpret_cast<uword>(obj->instructions_->ptr()) + | 461 uword entry_point = reinterpret_cast<uword>(obj->instructions_->ptr()) + |
| 462 Instructions::HeaderSize(); | 462 Instructions::HeaderSize(); |
| 463 for (intptr_t i = 0; i < length; i++) { | 463 for (intptr_t i = 0; i < length; i++) { |
| 464 int32_t offset = obj->data_[i]; | 464 int32_t offset = obj->data()[i]; |
| 465 visitor->VisitPointer( | 465 visitor->VisitPointer( |
| 466 reinterpret_cast<RawObject**>(entry_point + offset)); | 466 reinterpret_cast<RawObject**>(entry_point + offset)); |
| 467 } | 467 } |
| 468 } | 468 } |
| 469 return Code::InstanceSize(length); | 469 return Code::InstanceSize(length); |
| 470 } | 470 } |
| 471 | 471 |
| 472 | 472 |
| 473 intptr_t RawInstructions::VisitInstructionsPointers( | 473 intptr_t RawInstructions::VisitInstructionsPointers( |
| 474 RawInstructions* raw_obj, ObjectPointerVisitor* visitor) { | 474 RawInstructions* raw_obj, ObjectPointerVisitor* visitor) { |
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 864 intptr_t RawUserTag::VisitUserTagPointers( | 864 intptr_t RawUserTag::VisitUserTagPointers( |
| 865 RawUserTag* raw_obj, ObjectPointerVisitor* visitor) { | 865 RawUserTag* raw_obj, ObjectPointerVisitor* visitor) { |
| 866 // Make sure that we got here with the tagged pointer as this. | 866 // Make sure that we got here with the tagged pointer as this. |
| 867 ASSERT(raw_obj->IsHeapObject()); | 867 ASSERT(raw_obj->IsHeapObject()); |
| 868 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); | 868 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
| 869 return UserTag::InstanceSize(); | 869 return UserTag::InstanceSize(); |
| 870 } | 870 } |
| 871 | 871 |
| 872 | 872 |
| 873 } // namespace dart | 873 } // namespace dart |
| OLD | NEW |