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

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: 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
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 "v8.h" 5 #include "v8.h"
6 6
7 #include "code-stubs.h" 7 #include "code-stubs.h"
8 #include "compilation-cache.h" 8 #include "compilation-cache.h"
9 #include "cpu-profiler.h" 9 #include "cpu-profiler.h"
10 #include "deoptimizer.h" 10 #include "deoptimizer.h"
(...skipping 2865 matching lines...) Expand 10 before | Expand all | Expand 10 after
2876 Address code_entry = Memory::Address_at(code_entry_slot); 2876 Address code_entry = Memory::Address_at(code_entry_slot);
2877 2877
2878 if (Page::FromAddress(code_entry)->IsEvacuationCandidate()) { 2878 if (Page::FromAddress(code_entry)->IsEvacuationCandidate()) {
2879 SlotsBuffer::AddTo(&slots_buffer_allocator_, 2879 SlotsBuffer::AddTo(&slots_buffer_allocator_,
2880 &migration_slots_buffer_, 2880 &migration_slots_buffer_,
2881 SlotsBuffer::CODE_ENTRY_SLOT, 2881 SlotsBuffer::CODE_ENTRY_SLOT,
2882 code_entry_slot, 2882 code_entry_slot,
2883 SlotsBuffer::IGNORE_OVERFLOW); 2883 SlotsBuffer::IGNORE_OVERFLOW);
2884 } 2884 }
2885 } else if (compacting_ && dst->IsConstantPoolArray()) { 2885 } else if (compacting_ && dst->IsConstantPoolArray()) {
2886 ConstantPoolArray* constant_pool = ConstantPoolArray::cast(dst); 2886 ConstantPoolArray* array = ConstantPoolArray::cast(dst);
2887 for (int i = 0; i < constant_pool->count_of_code_ptr_entries(); i++) { 2887 ConstantPoolArray::Iterator code_iter(array, ConstantPoolArray::CODE_PTR);
2888 while (!code_iter.is_finished()) {
2888 Address code_entry_slot = 2889 Address code_entry_slot =
2889 dst_addr + constant_pool->OffsetOfElementAt(i); 2890 dst_addr + array->OffsetOfElementAt(code_iter.next_index());
2890 Address code_entry = Memory::Address_at(code_entry_slot); 2891 Address code_entry = Memory::Address_at(code_entry_slot);
2891 2892
2892 if (Page::FromAddress(code_entry)->IsEvacuationCandidate()) { 2893 if (Page::FromAddress(code_entry)->IsEvacuationCandidate()) {
2893 SlotsBuffer::AddTo(&slots_buffer_allocator_, 2894 SlotsBuffer::AddTo(&slots_buffer_allocator_,
2894 &migration_slots_buffer_, 2895 &migration_slots_buffer_,
2895 SlotsBuffer::CODE_ENTRY_SLOT, 2896 SlotsBuffer::CODE_ENTRY_SLOT,
2896 code_entry_slot, 2897 code_entry_slot,
2897 SlotsBuffer::IGNORE_OVERFLOW); 2898 SlotsBuffer::IGNORE_OVERFLOW);
2898 } 2899 }
2899 } 2900 }
(...skipping 1601 matching lines...) Expand 10 before | Expand all | Expand 10 after
4501 while (buffer != NULL) { 4502 while (buffer != NULL) {
4502 SlotsBuffer* next_buffer = buffer->next(); 4503 SlotsBuffer* next_buffer = buffer->next();
4503 DeallocateBuffer(buffer); 4504 DeallocateBuffer(buffer);
4504 buffer = next_buffer; 4505 buffer = next_buffer;
4505 } 4506 }
4506 *buffer_address = NULL; 4507 *buffer_address = NULL;
4507 } 4508 }
4508 4509
4509 4510
4510 } } // namespace v8::internal 4511 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698