| 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 866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 877 MarkBit mark = Marking::MarkBitFrom(object); | 877 MarkBit mark = Marking::MarkBitFrom(object); |
| 878 heap->mark_compact_collector()->MarkObject(object, mark); | 878 heap->mark_compact_collector()->MarkObject(object, mark); |
| 879 } | 879 } |
| 880 | 880 |
| 881 static inline void VisitCodeTarget(Heap* heap, RelocInfo* rinfo) { | 881 static inline void VisitCodeTarget(Heap* heap, RelocInfo* rinfo) { |
| 882 ASSERT(RelocInfo::IsCodeTarget(rinfo->rmode())); | 882 ASSERT(RelocInfo::IsCodeTarget(rinfo->rmode())); |
| 883 Code* target = Code::GetCodeFromTargetAddress(rinfo->target_address()); | 883 Code* target = Code::GetCodeFromTargetAddress(rinfo->target_address()); |
| 884 if (FLAG_cleanup_code_caches_at_gc && target->is_inline_cache_stub()) { | 884 if (FLAG_cleanup_code_caches_at_gc && target->is_inline_cache_stub()) { |
| 885 IC::Clear(rinfo->pc()); | 885 IC::Clear(rinfo->pc()); |
| 886 target = Code::GetCodeFromTargetAddress(rinfo->target_address()); | 886 target = Code::GetCodeFromTargetAddress(rinfo->target_address()); |
| 887 } else { | 887 } else if (FLAG_cleanup_code_caches_at_gc && CallStub::HasCache(target)) { |
| 888 if (FLAG_cleanup_code_caches_at_gc && | 888 CallStub::Clear(heap, rinfo->pc()); |
| 889 target->kind() == Code::STUB && | |
| 890 target->major_key() == CodeStub::CallFunction && | |
| 891 target->has_function_cache()) { | |
| 892 CallFunctionStub::Clear(heap, rinfo->pc()); | |
| 893 } | |
| 894 } | 889 } |
| 895 MarkBit code_mark = Marking::MarkBitFrom(target); | 890 MarkBit code_mark = Marking::MarkBitFrom(target); |
| 896 heap->mark_compact_collector()->MarkObject(target, code_mark); | 891 heap->mark_compact_collector()->MarkObject(target, code_mark); |
| 897 | 892 |
| 898 heap->mark_compact_collector()->RecordRelocSlot(rinfo, target); | 893 heap->mark_compact_collector()->RecordRelocSlot(rinfo, target); |
| 899 } | 894 } |
| 900 | 895 |
| 901 static inline void VisitDebugTarget(Heap* heap, RelocInfo* rinfo) { | 896 static inline void VisitDebugTarget(Heap* heap, RelocInfo* rinfo) { |
| 902 ASSERT((RelocInfo::IsJSReturn(rinfo->rmode()) && | 897 ASSERT((RelocInfo::IsJSReturn(rinfo->rmode()) && |
| 903 rinfo->IsPatchedReturnSequence()) || | 898 rinfo->IsPatchedReturnSequence()) || |
| (...skipping 2999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3903 while (buffer != NULL) { | 3898 while (buffer != NULL) { |
| 3904 SlotsBuffer* next_buffer = buffer->next(); | 3899 SlotsBuffer* next_buffer = buffer->next(); |
| 3905 DeallocateBuffer(buffer); | 3900 DeallocateBuffer(buffer); |
| 3906 buffer = next_buffer; | 3901 buffer = next_buffer; |
| 3907 } | 3902 } |
| 3908 *buffer_address = NULL; | 3903 *buffer_address = NULL; |
| 3909 } | 3904 } |
| 3910 | 3905 |
| 3911 | 3906 |
| 3912 } } // namespace v8::internal | 3907 } } // namespace v8::internal |
| OLD | NEW |