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

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

Issue 304143002: Add support for extended constant pool arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Sync Created 6 years, 6 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/heap.cc ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/compilation-cache.h" 8 #include "src/compilation-cache.h"
9 #include "src/cpu-profiler.h" 9 #include "src/cpu-profiler.h"
10 #include "src/deoptimizer.h" 10 #include "src/deoptimizer.h"
(...skipping 2829 matching lines...) Expand 10 before | Expand all | Expand 10 after
2840 Address code_entry = Memory::Address_at(code_entry_slot); 2840 Address code_entry = Memory::Address_at(code_entry_slot);
2841 2841
2842 if (Page::FromAddress(code_entry)->IsEvacuationCandidate()) { 2842 if (Page::FromAddress(code_entry)->IsEvacuationCandidate()) {
2843 SlotsBuffer::AddTo(&slots_buffer_allocator_, 2843 SlotsBuffer::AddTo(&slots_buffer_allocator_,
2844 &migration_slots_buffer_, 2844 &migration_slots_buffer_,
2845 SlotsBuffer::CODE_ENTRY_SLOT, 2845 SlotsBuffer::CODE_ENTRY_SLOT,
2846 code_entry_slot, 2846 code_entry_slot,
2847 SlotsBuffer::IGNORE_OVERFLOW); 2847 SlotsBuffer::IGNORE_OVERFLOW);
2848 } 2848 }
2849 } else if (compacting_ && dst->IsConstantPoolArray()) { 2849 } else if (compacting_ && dst->IsConstantPoolArray()) {
2850 ConstantPoolArray* constant_pool = ConstantPoolArray::cast(dst); 2850 ConstantPoolArray* array = ConstantPoolArray::cast(dst);
2851 for (int i = 0; i < constant_pool->count_of_code_ptr_entries(); i++) { 2851 ConstantPoolArray::Iterator code_iter(array, ConstantPoolArray::CODE_PTR);
2852 while (!code_iter.is_finished()) {
2852 Address code_entry_slot = 2853 Address code_entry_slot =
2853 dst_addr + constant_pool->OffsetOfElementAt(i); 2854 dst_addr + array->OffsetOfElementAt(code_iter.next_index());
2854 Address code_entry = Memory::Address_at(code_entry_slot); 2855 Address code_entry = Memory::Address_at(code_entry_slot);
2855 2856
2856 if (Page::FromAddress(code_entry)->IsEvacuationCandidate()) { 2857 if (Page::FromAddress(code_entry)->IsEvacuationCandidate()) {
2857 SlotsBuffer::AddTo(&slots_buffer_allocator_, 2858 SlotsBuffer::AddTo(&slots_buffer_allocator_,
2858 &migration_slots_buffer_, 2859 &migration_slots_buffer_,
2859 SlotsBuffer::CODE_ENTRY_SLOT, 2860 SlotsBuffer::CODE_ENTRY_SLOT,
2860 code_entry_slot, 2861 code_entry_slot,
2861 SlotsBuffer::IGNORE_OVERFLOW); 2862 SlotsBuffer::IGNORE_OVERFLOW);
2862 } 2863 }
2863 } 2864 }
(...skipping 1600 matching lines...) Expand 10 before | Expand all | Expand 10 after
4464 while (buffer != NULL) { 4465 while (buffer != NULL) {
4465 SlotsBuffer* next_buffer = buffer->next(); 4466 SlotsBuffer* next_buffer = buffer->next();
4466 DeallocateBuffer(buffer); 4467 DeallocateBuffer(buffer);
4467 buffer = next_buffer; 4468 buffer = next_buffer;
4468 } 4469 }
4469 *buffer_address = NULL; 4470 *buffer_address = NULL;
4470 } 4471 }
4471 4472
4472 4473
4473 } } // namespace v8::internal 4474 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698