OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2677 ASSERT(!MarkCompactCollector::IsOnEvacuationCandidate(*slot)); | 2677 ASSERT(!MarkCompactCollector::IsOnEvacuationCandidate(*slot)); |
2678 } | 2678 } |
2679 } | 2679 } |
2680 | 2680 |
2681 | 2681 |
2682 static inline void UpdateSlot(ObjectVisitor* v, | 2682 static inline void UpdateSlot(ObjectVisitor* v, |
2683 SlotsBuffer::SlotType slot_type, | 2683 SlotsBuffer::SlotType slot_type, |
2684 Address addr) { | 2684 Address addr) { |
2685 switch (slot_type) { | 2685 switch (slot_type) { |
2686 case SlotsBuffer::CODE_TARGET_SLOT: { | 2686 case SlotsBuffer::CODE_TARGET_SLOT: { |
2687 RelocInfo rinfo(addr, RelocInfo::CODE_TARGET, NULL, NULL); | 2687 RelocInfo rinfo(addr, RelocInfo::CODE_TARGET, 0, NULL); |
2688 rinfo.Visit(v); | 2688 rinfo.Visit(v); |
2689 break; | 2689 break; |
2690 } | 2690 } |
2691 case SlotsBuffer::CODE_ENTRY_SLOT: { | 2691 case SlotsBuffer::CODE_ENTRY_SLOT: { |
2692 v->VisitCodeEntry(addr); | 2692 v->VisitCodeEntry(addr); |
2693 break; | 2693 break; |
2694 } | 2694 } |
2695 case SlotsBuffer::RELOCATED_CODE_OBJECT: { | 2695 case SlotsBuffer::RELOCATED_CODE_OBJECT: { |
2696 HeapObject* obj = HeapObject::FromAddress(addr); | 2696 HeapObject* obj = HeapObject::FromAddress(addr); |
2697 Code::cast(obj)->CodeIterateBody(v); | 2697 Code::cast(obj)->CodeIterateBody(v); |
2698 break; | 2698 break; |
2699 } | 2699 } |
2700 case SlotsBuffer::DEBUG_TARGET_SLOT: { | 2700 case SlotsBuffer::DEBUG_TARGET_SLOT: { |
2701 RelocInfo rinfo(addr, RelocInfo::DEBUG_BREAK_SLOT, NULL, NULL); | 2701 RelocInfo rinfo(addr, RelocInfo::DEBUG_BREAK_SLOT, 0, NULL); |
2702 if (rinfo.IsPatchedDebugBreakSlotSequence()) rinfo.Visit(v); | 2702 if (rinfo.IsPatchedDebugBreakSlotSequence()) rinfo.Visit(v); |
2703 break; | 2703 break; |
2704 } | 2704 } |
2705 case SlotsBuffer::JS_RETURN_SLOT: { | 2705 case SlotsBuffer::JS_RETURN_SLOT: { |
2706 RelocInfo rinfo(addr, RelocInfo::JS_RETURN, NULL, NULL); | 2706 RelocInfo rinfo(addr, RelocInfo::JS_RETURN, 0, NULL); |
2707 if (rinfo.IsPatchedReturnSequence()) rinfo.Visit(v); | 2707 if (rinfo.IsPatchedReturnSequence()) rinfo.Visit(v); |
2708 break; | 2708 break; |
2709 } | 2709 } |
2710 default: | 2710 default: |
2711 UNREACHABLE(); | 2711 UNREACHABLE(); |
2712 break; | 2712 break; |
2713 } | 2713 } |
2714 } | 2714 } |
2715 | 2715 |
2716 | 2716 |
(...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3617 while (buffer != NULL) { | 3617 while (buffer != NULL) { |
3618 SlotsBuffer* next_buffer = buffer->next(); | 3618 SlotsBuffer* next_buffer = buffer->next(); |
3619 DeallocateBuffer(buffer); | 3619 DeallocateBuffer(buffer); |
3620 buffer = next_buffer; | 3620 buffer = next_buffer; |
3621 } | 3621 } |
3622 *buffer_address = NULL; | 3622 *buffer_address = NULL; |
3623 } | 3623 } |
3624 | 3624 |
3625 | 3625 |
3626 } } // namespace v8::internal | 3626 } } // namespace v8::internal |
OLD | NEW |