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 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 visitor->VisitPointer(&(first + i)->raw_obj_); | 549 visitor->VisitPointer(&(first + i)->raw_obj_); |
550 } | 550 } |
551 } | 551 } |
552 return ObjectPool::InstanceSize(raw_obj->ptr()->length_); | 552 return ObjectPool::InstanceSize(raw_obj->ptr()->length_); |
553 } | 553 } |
554 | 554 |
555 | 555 |
556 intptr_t RawInstructions::VisitInstructionsPointers( | 556 intptr_t RawInstructions::VisitInstructionsPointers( |
557 RawInstructions* raw_obj, ObjectPointerVisitor* visitor) { | 557 RawInstructions* raw_obj, ObjectPointerVisitor* visitor) { |
558 RawInstructions* obj = raw_obj->ptr(); | 558 RawInstructions* obj = raw_obj->ptr(); |
| 559 if (!Dart::IsRunningPrecompiledCode()) { |
| 560 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
| 561 } |
559 return Instructions::InstanceSize(obj->size_); | 562 return Instructions::InstanceSize(obj->size_); |
560 } | 563 } |
561 | 564 |
562 | 565 |
563 bool RawInstructions::ContainsPC(RawInstructions* raw_instr, uword pc) { | 566 bool RawInstructions::ContainsPC(RawInstructions* raw_instr, uword pc) { |
564 uword start_pc = | 567 uword start_pc = |
565 reinterpret_cast<uword>(raw_instr->ptr()) + Instructions::HeaderSize(); | 568 reinterpret_cast<uword>(raw_instr->ptr()) + Instructions::HeaderSize(); |
566 uword end_pc = start_pc + raw_instr->ptr()->size_; | 569 uword end_pc = start_pc + raw_instr->ptr()->size_; |
567 ASSERT(end_pc > start_pc); | 570 ASSERT(end_pc > start_pc); |
568 return (pc >= start_pc) && (pc < end_pc); | 571 return (pc >= start_pc) && (pc < end_pc); |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
934 intptr_t RawUserTag::VisitUserTagPointers( | 937 intptr_t RawUserTag::VisitUserTagPointers( |
935 RawUserTag* raw_obj, ObjectPointerVisitor* visitor) { | 938 RawUserTag* raw_obj, ObjectPointerVisitor* visitor) { |
936 // Make sure that we got here with the tagged pointer as this. | 939 // Make sure that we got here with the tagged pointer as this. |
937 ASSERT(raw_obj->IsHeapObject()); | 940 ASSERT(raw_obj->IsHeapObject()); |
938 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); | 941 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
939 return UserTag::InstanceSize(); | 942 return UserTag::InstanceSize(); |
940 } | 943 } |
941 | 944 |
942 | 945 |
943 } // namespace dart | 946 } // namespace dart |
OLD | NEW |