| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 } | 280 } |
| 281 if (IsCompacting()) { | 281 if (IsCompacting()) { |
| 282 // When compacting we convert the target to a real object pointer. | 282 // When compacting we convert the target to a real object pointer. |
| 283 code = CodeFromDerivedPointer(rinfo->target_address()); | 283 code = CodeFromDerivedPointer(rinfo->target_address()); |
| 284 rinfo->set_target_object(code); | 284 rinfo->set_target_object(code); |
| 285 } | 285 } |
| 286 } | 286 } |
| 287 | 287 |
| 288 void VisitDebugTarget(RelocInfo* rinfo) { | 288 void VisitDebugTarget(RelocInfo* rinfo) { |
| 289 ASSERT(RelocInfo::IsJSReturn(rinfo->rmode()) && | 289 ASSERT(RelocInfo::IsJSReturn(rinfo->rmode()) && |
| 290 rinfo->is_call_instruction()); | 290 rinfo->IsCallInstruction()); |
| 291 HeapObject* code = CodeFromDerivedPointer(rinfo->call_address()); | 291 HeapObject* code = CodeFromDerivedPointer(rinfo->call_address()); |
| 292 MarkCompactCollector::MarkObject(code); | 292 MarkCompactCollector::MarkObject(code); |
| 293 // When compacting we convert the call to a real object pointer. | 293 // When compacting we convert the call to a real object pointer. |
| 294 if (IsCompacting()) rinfo->set_call_object(code); | 294 if (IsCompacting()) rinfo->set_call_object(code); |
| 295 } | 295 } |
| 296 | 296 |
| 297 private: | 297 private: |
| 298 // Mark object pointed to by p. | 298 // Mark object pointed to by p. |
| 299 void MarkObjectByPointer(Object** p) { | 299 void MarkObjectByPointer(Object** p) { |
| 300 if (!(*p)->IsHeapObject()) return; | 300 if (!(*p)->IsHeapObject()) return; |
| (...skipping 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1727 | 1727 |
| 1728 void MarkCompactCollector::RebuildRSets() { | 1728 void MarkCompactCollector::RebuildRSets() { |
| 1729 #ifdef DEBUG | 1729 #ifdef DEBUG |
| 1730 ASSERT(state_ == RELOCATE_OBJECTS); | 1730 ASSERT(state_ == RELOCATE_OBJECTS); |
| 1731 state_ = REBUILD_RSETS; | 1731 state_ = REBUILD_RSETS; |
| 1732 #endif | 1732 #endif |
| 1733 Heap::RebuildRSets(); | 1733 Heap::RebuildRSets(); |
| 1734 } | 1734 } |
| 1735 | 1735 |
| 1736 } } // namespace v8::internal | 1736 } } // namespace v8::internal |
| OLD | NEW |