OLD | NEW |
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 #ifndef V8_HEAP_HEAP_INL_H_ | 5 #ifndef V8_HEAP_HEAP_INL_H_ |
6 #define V8_HEAP_HEAP_INL_H_ | 6 #define V8_HEAP_HEAP_INL_H_ |
7 | 7 |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 // object to record the forwarding pointer. A forwarding pointer can | 540 // object to record the forwarding pointer. A forwarding pointer can |
541 // point to an old space, the code space, or the to space of the new | 541 // point to an old space, the code space, or the to space of the new |
542 // generation. | 542 // generation. |
543 MapWord first_word = object->map_word(); | 543 MapWord first_word = object->map_word(); |
544 | 544 |
545 // If the first word is a forwarding address, the object has already been | 545 // If the first word is a forwarding address, the object has already been |
546 // copied. | 546 // copied. |
547 if (first_word.IsForwardingAddress()) { | 547 if (first_word.IsForwardingAddress()) { |
548 HeapObject* dest = first_word.ToForwardingAddress(); | 548 HeapObject* dest = first_word.ToForwardingAddress(); |
549 DCHECK(object->GetIsolate()->heap()->InFromSpace(*p)); | 549 DCHECK(object->GetIsolate()->heap()->InFromSpace(*p)); |
| 550 // TODO(jochen): Remove again after fixing http://crbug.com/452095 |
| 551 CHECK((*p)->IsHeapObject() && dest->IsHeapObject()); |
550 *p = dest; | 552 *p = dest; |
551 return; | 553 return; |
552 } | 554 } |
553 | 555 |
554 UpdateAllocationSiteFeedback(object, IGNORE_SCRATCHPAD_SLOT); | 556 UpdateAllocationSiteFeedback(object, IGNORE_SCRATCHPAD_SLOT); |
555 | 557 |
556 // AllocationMementos are unrooted and shouldn't survive a scavenge | 558 // AllocationMementos are unrooted and shouldn't survive a scavenge |
557 DCHECK(object->map() != object->GetHeap()->allocation_memento_map()); | 559 DCHECK(object->map() != object->GetHeap()->allocation_memento_map()); |
558 // Call the slow part of scavenge object. | 560 // Call the slow part of scavenge object. |
559 return ScavengeObjectSlow(p, object); | 561 return ScavengeObjectSlow(p, object); |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
733 | 735 |
734 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { | 736 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { |
735 for (Object** current = start; current < end; current++) { | 737 for (Object** current = start; current < end; current++) { |
736 CHECK((*current)->IsSmi()); | 738 CHECK((*current)->IsSmi()); |
737 } | 739 } |
738 } | 740 } |
739 } | 741 } |
740 } // namespace v8::internal | 742 } // namespace v8::internal |
741 | 743 |
742 #endif // V8_HEAP_HEAP_INL_H_ | 744 #endif // V8_HEAP_HEAP_INL_H_ |
OLD | NEW |