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

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

Issue 986553005: Contribution of PowerPC port (continuation of 422063005) - serialize.cc cleanup (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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
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/base/atomicops.h" 7 #include "src/base/atomicops.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/compilation-cache.h" 10 #include "src/compilation-cache.h"
(...skipping 2857 matching lines...) Expand 10 before | Expand all | Expand 10 after
2868 static inline void UpdateSlot(Heap* heap, Object** slot) { 2868 static inline void UpdateSlot(Heap* heap, Object** slot) {
2869 Object* obj = reinterpret_cast<Object*>( 2869 Object* obj = reinterpret_cast<Object*>(
2870 base::NoBarrier_Load(reinterpret_cast<base::AtomicWord*>(slot))); 2870 base::NoBarrier_Load(reinterpret_cast<base::AtomicWord*>(slot)));
2871 2871
2872 if (!obj->IsHeapObject()) return; 2872 if (!obj->IsHeapObject()) return;
2873 2873
2874 HeapObject* heap_obj = HeapObject::cast(obj); 2874 HeapObject* heap_obj = HeapObject::cast(obj);
2875 2875
2876 // TODO(ishell): remove, once crbug/454297 is caught. 2876 // TODO(ishell): remove, once crbug/454297 is caught.
2877 #if V8_TARGET_ARCH_64_BIT 2877 #if V8_TARGET_ARCH_64_BIT
2878 #ifndef V8_OS_AIX // no point checking on AIX as full 64 range is supported
2878 const uintptr_t kBoundary = V8_UINT64_C(1) << 48; 2879 const uintptr_t kBoundary = V8_UINT64_C(1) << 48;
2879 STATIC_ASSERT(kBoundary > 0); 2880 STATIC_ASSERT(kBoundary > 0);
2880 if (reinterpret_cast<uintptr_t>(heap_obj->address()) >= kBoundary) { 2881 if (reinterpret_cast<uintptr_t>(heap_obj->address()) >= kBoundary) {
2881 CheckLayoutDescriptorAndDie(heap, slot); 2882 CheckLayoutDescriptorAndDie(heap, slot);
2882 } 2883 }
2883 #endif 2884 #endif
2885 #endif
2884 MapWord map_word = heap_obj->map_word(); 2886 MapWord map_word = heap_obj->map_word();
2885 if (map_word.IsForwardingAddress()) { 2887 if (map_word.IsForwardingAddress()) {
2886 DCHECK(heap->InFromSpace(heap_obj) || 2888 DCHECK(heap->InFromSpace(heap_obj) ||
2887 MarkCompactCollector::IsOnEvacuationCandidate(heap_obj)); 2889 MarkCompactCollector::IsOnEvacuationCandidate(heap_obj));
2888 HeapObject* target = map_word.ToForwardingAddress(); 2890 HeapObject* target = map_word.ToForwardingAddress();
2889 base::NoBarrier_CompareAndSwap( 2891 base::NoBarrier_CompareAndSwap(
2890 reinterpret_cast<base::AtomicWord*>(slot), 2892 reinterpret_cast<base::AtomicWord*>(slot),
2891 reinterpret_cast<base::AtomicWord>(obj), 2893 reinterpret_cast<base::AtomicWord>(obj),
2892 reinterpret_cast<base::AtomicWord>(target)); 2894 reinterpret_cast<base::AtomicWord>(target));
2893 DCHECK(!heap->InFromSpace(target) && 2895 DCHECK(!heap->InFromSpace(target) &&
(...skipping 1602 matching lines...) Expand 10 before | Expand all | Expand 10 after
4496 SlotsBuffer* buffer = *buffer_address; 4498 SlotsBuffer* buffer = *buffer_address;
4497 while (buffer != NULL) { 4499 while (buffer != NULL) {
4498 SlotsBuffer* next_buffer = buffer->next(); 4500 SlotsBuffer* next_buffer = buffer->next();
4499 DeallocateBuffer(buffer); 4501 DeallocateBuffer(buffer);
4500 buffer = next_buffer; 4502 buffer = next_buffer;
4501 } 4503 }
4502 *buffer_address = NULL; 4504 *buffer_address = NULL;
4503 } 4505 }
4504 } 4506 }
4505 } // namespace v8::internal 4507 } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698