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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 if (visitor->visit_function_code() || !CheckUsageCounter(raw_obj)) { | 436 if (visitor->visit_function_code() || !CheckUsageCounter(raw_obj)) { |
437 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); | 437 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
438 return Function::InstanceSize(); | 438 return Function::InstanceSize(); |
439 } | 439 } |
440 visitor->VisitPointers(raw_obj->from(), raw_obj->to_no_code()); | 440 visitor->VisitPointers(raw_obj->from(), raw_obj->to_no_code()); |
441 | 441 |
442 if (ShouldVisitCode(raw_obj->ptr()->instructions_->ptr()->code_)) { | 442 if (ShouldVisitCode(raw_obj->ptr()->instructions_->ptr()->code_)) { |
443 visitor->VisitPointer( | 443 visitor->VisitPointer( |
444 reinterpret_cast<RawObject**>(&raw_obj->ptr()->instructions_)); | 444 reinterpret_cast<RawObject**>(&raw_obj->ptr()->instructions_)); |
445 } else { | 445 } else { |
446 visitor->skipped_code_functions()->Add(raw_obj); | 446 visitor->add_skipped_code_function(raw_obj); |
447 } | 447 } |
448 | 448 |
449 if (ShouldVisitCode(raw_obj->ptr()->unoptimized_code_)) { | 449 if (ShouldVisitCode(raw_obj->ptr()->unoptimized_code_)) { |
450 visitor->VisitPointer( | 450 visitor->VisitPointer( |
451 reinterpret_cast<RawObject**>(&raw_obj->ptr()->unoptimized_code_)); | 451 reinterpret_cast<RawObject**>(&raw_obj->ptr()->unoptimized_code_)); |
452 } else { | 452 } else { |
453 visitor->skipped_code_functions()->Add(raw_obj); | 453 visitor->add_skipped_code_function(raw_obj); |
454 } | 454 } |
455 return Function::InstanceSize(); | 455 return Function::InstanceSize(); |
456 } | 456 } |
457 | 457 |
458 | 458 |
459 intptr_t RawField::VisitFieldPointers(RawField* raw_obj, | 459 intptr_t RawField::VisitFieldPointers(RawField* raw_obj, |
460 ObjectPointerVisitor* visitor) { | 460 ObjectPointerVisitor* visitor) { |
461 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); | 461 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
462 return Field::InstanceSize(); | 462 return Field::InstanceSize(); |
463 } | 463 } |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
932 intptr_t RawUserTag::VisitUserTagPointers( | 932 intptr_t RawUserTag::VisitUserTagPointers( |
933 RawUserTag* raw_obj, ObjectPointerVisitor* visitor) { | 933 RawUserTag* raw_obj, ObjectPointerVisitor* visitor) { |
934 // Make sure that we got here with the tagged pointer as this. | 934 // Make sure that we got here with the tagged pointer as this. |
935 ASSERT(raw_obj->IsHeapObject()); | 935 ASSERT(raw_obj->IsHeapObject()); |
936 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); | 936 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
937 return UserTag::InstanceSize(); | 937 return UserTag::InstanceSize(); |
938 } | 938 } |
939 | 939 |
940 | 940 |
941 } // namespace dart | 941 } // namespace dart |
OLD | NEW |