| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 StaticVisitor::MarkObject(heap, code); | 168 StaticVisitor::MarkObject(heap, code); |
| 169 } | 169 } |
| 170 | 170 |
| 171 | 171 |
| 172 template<typename StaticVisitor> | 172 template<typename StaticVisitor> |
| 173 void StaticMarkingVisitor<StaticVisitor>::VisitEmbeddedPointer( | 173 void StaticMarkingVisitor<StaticVisitor>::VisitEmbeddedPointer( |
| 174 Heap* heap, RelocInfo* rinfo) { | 174 Heap* heap, RelocInfo* rinfo) { |
| 175 ASSERT(rinfo->rmode() == RelocInfo::EMBEDDED_OBJECT); | 175 ASSERT(rinfo->rmode() == RelocInfo::EMBEDDED_OBJECT); |
| 176 ASSERT(!rinfo->target_object()->IsConsString()); | 176 ASSERT(!rinfo->target_object()->IsConsString()); |
| 177 HeapObject* object = HeapObject::cast(rinfo->target_object()); | 177 HeapObject* object = HeapObject::cast(rinfo->target_object()); |
| 178 if (!FLAG_weak_embedded_maps_in_optimized_code || | 178 if (!FLAG_weak_embedded_maps_in_optimized_code || !FLAG_collect_maps || |
| 179 !FLAG_collect_maps || rinfo->host()->kind() != Code::OPTIMIZED_FUNCTION || | 179 rinfo->host()->kind() != Code::OPTIMIZED_FUNCTION || |
| 180 !object->IsMap() || !Map::cast(object)->CanTransition()) { | 180 !object->IsMap() || !Map::cast(object)->CanTransition()) { |
| 181 heap->mark_compact_collector()->RecordRelocSlot(rinfo, object); | 181 heap->mark_compact_collector()->RecordRelocSlot(rinfo, object); |
| 182 StaticVisitor::MarkObject(heap, object); | 182 StaticVisitor::MarkObject(heap, object); |
| 183 } | 183 } |
| 184 } | 184 } |
| 185 | 185 |
| 186 | 186 |
| 187 template<typename StaticVisitor> | 187 template<typename StaticVisitor> |
| 188 void StaticMarkingVisitor<StaticVisitor>::VisitGlobalPropertyCell( | 188 void StaticMarkingVisitor<StaticVisitor>::VisitGlobalPropertyCell( |
| 189 Heap* heap, RelocInfo* rinfo) { | 189 Heap* heap, RelocInfo* rinfo) { |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 RelocIterator it(this, mode_mask); | 689 RelocIterator it(this, mode_mask); |
| 690 for (; !it.done(); it.next()) { | 690 for (; !it.done(); it.next()) { |
| 691 it.rinfo()->template Visit<StaticVisitor>(heap); | 691 it.rinfo()->template Visit<StaticVisitor>(heap); |
| 692 } | 692 } |
| 693 } | 693 } |
| 694 | 694 |
| 695 | 695 |
| 696 } } // namespace v8::internal | 696 } } // namespace v8::internal |
| 697 | 697 |
| 698 #endif // V8_OBJECTS_VISITING_INL_H_ | 698 #endif // V8_OBJECTS_VISITING_INL_H_ |
| OLD | NEW |