Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(483)

Side by Side Diff: src/mark-compact.cc

Issue 11117020: Merged r12504, r12531, r12562, r12563, r12655 into 3.13 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.13
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/mark-compact.h ('k') | src/objects.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 4062 matching lines...) Expand 10 before | Expand all | Expand 10 after
4073 target_page->slots_buffer_address(), 4073 target_page->slots_buffer_address(),
4074 SlotsBuffer::CODE_ENTRY_SLOT, 4074 SlotsBuffer::CODE_ENTRY_SLOT,
4075 slot, 4075 slot,
4076 SlotsBuffer::FAIL_ON_OVERFLOW)) { 4076 SlotsBuffer::FAIL_ON_OVERFLOW)) {
4077 EvictEvacuationCandidate(target_page); 4077 EvictEvacuationCandidate(target_page);
4078 } 4078 }
4079 } 4079 }
4080 } 4080 }
4081 4081
4082 4082
4083 void MarkCompactCollector::RecordCodeTargetPatch(Address pc, Code* target) {
4084 ASSERT(heap()->gc_state() == Heap::MARK_COMPACT);
4085 if (is_compacting()) {
4086 Code* host = heap()->isolate()->inner_pointer_to_code_cache()->
4087 GcSafeFindCodeForInnerPointer(pc);
4088 MarkBit mark_bit = Marking::MarkBitFrom(host);
4089 if (Marking::IsBlack(mark_bit)) {
4090 RelocInfo rinfo(pc, RelocInfo::CODE_TARGET, 0, host);
4091 RecordRelocSlot(&rinfo, target);
4092 }
4093 }
4094 }
4095
4096
4083 static inline SlotsBuffer::SlotType DecodeSlotType( 4097 static inline SlotsBuffer::SlotType DecodeSlotType(
4084 SlotsBuffer::ObjectSlot slot) { 4098 SlotsBuffer::ObjectSlot slot) {
4085 return static_cast<SlotsBuffer::SlotType>(reinterpret_cast<intptr_t>(slot)); 4099 return static_cast<SlotsBuffer::SlotType>(reinterpret_cast<intptr_t>(slot));
4086 } 4100 }
4087 4101
4088 4102
4089 void SlotsBuffer::UpdateSlots(Heap* heap) { 4103 void SlotsBuffer::UpdateSlots(Heap* heap) {
4090 PointersUpdatingVisitor v(heap); 4104 PointersUpdatingVisitor v(heap);
4091 4105
4092 for (int slot_idx = 0; slot_idx < idx_; ++slot_idx) { 4106 for (int slot_idx = 0; slot_idx < idx_; ++slot_idx) {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
4142 while (buffer != NULL) { 4156 while (buffer != NULL) {
4143 SlotsBuffer* next_buffer = buffer->next(); 4157 SlotsBuffer* next_buffer = buffer->next();
4144 DeallocateBuffer(buffer); 4158 DeallocateBuffer(buffer);
4145 buffer = next_buffer; 4159 buffer = next_buffer;
4146 } 4160 }
4147 *buffer_address = NULL; 4161 *buffer_address = NULL;
4148 } 4162 }
4149 4163
4150 4164
4151 } } // namespace v8::internal 4165 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mark-compact.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698