| 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/become.h" | 7 #include "vm/become.h" |
| 8 #include "vm/class_table.h" | 8 #include "vm/class_table.h" |
| 9 #include "vm/dart.h" | 9 #include "vm/dart.h" |
| 10 #include "vm/freelist.h" | 10 #include "vm/freelist.h" |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 return false; | 435 return false; |
| 436 } | 436 } |
| 437 | 437 |
| 438 | 438 |
| 439 intptr_t RawFunction::VisitFunctionPointers(RawFunction* raw_obj, | 439 intptr_t RawFunction::VisitFunctionPointers(RawFunction* raw_obj, |
| 440 ObjectPointerVisitor* visitor) { | 440 ObjectPointerVisitor* visitor) { |
| 441 if (visitor->visit_function_code() || !CheckUsageCounter(raw_obj)) { | 441 if (visitor->visit_function_code() || !CheckUsageCounter(raw_obj)) { |
| 442 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); | 442 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
| 443 return Function::InstanceSize(); | 443 return Function::InstanceSize(); |
| 444 } | 444 } |
| 445 #if defined(DART_PRECOMPILED_RUNTIME) |
| 446 UNREACHABLE(); |
| 447 #else |
| 445 visitor->VisitPointers(raw_obj->from(), raw_obj->to_no_code()); | 448 visitor->VisitPointers(raw_obj->from(), raw_obj->to_no_code()); |
| 446 | 449 |
| 447 if (ShouldVisitCode(raw_obj->ptr()->code_)) { | 450 if (ShouldVisitCode(raw_obj->ptr()->code_)) { |
| 448 visitor->VisitPointer( | 451 visitor->VisitPointer( |
| 449 reinterpret_cast<RawObject**>(&raw_obj->ptr()->code_)); | 452 reinterpret_cast<RawObject**>(&raw_obj->ptr()->code_)); |
| 450 } else { | 453 } else { |
| 451 visitor->add_skipped_code_function(raw_obj); | 454 visitor->add_skipped_code_function(raw_obj); |
| 452 } | 455 } |
| 453 | 456 |
| 454 if (ShouldVisitCode(raw_obj->ptr()->unoptimized_code_)) { | 457 if (ShouldVisitCode(raw_obj->ptr()->unoptimized_code_)) { |
| 455 visitor->VisitPointer( | 458 visitor->VisitPointer( |
| 456 reinterpret_cast<RawObject**>(&raw_obj->ptr()->unoptimized_code_)); | 459 reinterpret_cast<RawObject**>(&raw_obj->ptr()->unoptimized_code_)); |
| 457 } else { | 460 } else { |
| 458 visitor->add_skipped_code_function(raw_obj); | 461 visitor->add_skipped_code_function(raw_obj); |
| 459 } | 462 } |
| 463 #endif |
| 460 return Function::InstanceSize(); | 464 return Function::InstanceSize(); |
| 461 } | 465 } |
| 462 | 466 |
| 463 | 467 |
| 464 intptr_t RawField::VisitFieldPointers(RawField* raw_obj, | 468 intptr_t RawField::VisitFieldPointers(RawField* raw_obj, |
| 465 ObjectPointerVisitor* visitor) { | 469 ObjectPointerVisitor* visitor) { |
| 466 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); | 470 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
| 467 return Field::InstanceSize(); | 471 return Field::InstanceSize(); |
| 468 } | 472 } |
| 469 | 473 |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 960 intptr_t RawUserTag::VisitUserTagPointers( | 964 intptr_t RawUserTag::VisitUserTagPointers( |
| 961 RawUserTag* raw_obj, ObjectPointerVisitor* visitor) { | 965 RawUserTag* raw_obj, ObjectPointerVisitor* visitor) { |
| 962 // Make sure that we got here with the tagged pointer as this. | 966 // Make sure that we got here with the tagged pointer as this. |
| 963 ASSERT(raw_obj->IsHeapObject()); | 967 ASSERT(raw_obj->IsHeapObject()); |
| 964 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); | 968 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
| 965 return UserTag::InstanceSize(); | 969 return UserTag::InstanceSize(); |
| 966 } | 970 } |
| 967 | 971 |
| 968 | 972 |
| 969 } // namespace dart | 973 } // namespace dart |
| OLD | NEW |