OLD | NEW |
---|---|
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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/snapshot/deserializer.h" | 5 #include "src/snapshot/deserializer.h" |
6 | 6 |
7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
8 #include "src/external-reference-table.h" | 8 #include "src/external-reference-table.h" |
9 #include "src/heap/heap.h" | 9 #include "src/heap/heap.h" |
10 #include "src/isolate.h" | 10 #include "src/isolate.h" |
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
762 current = reinterpret_cast<Object**>( | 762 current = reinterpret_cast<Object**>( |
763 reinterpret_cast<Address>(current) + skip); | 763 reinterpret_cast<Address>(current) + skip); |
764 // Fall through. | 764 // Fall through. |
765 } | 765 } |
766 | 766 |
767 FOUR_CASES(kHotObject) | 767 FOUR_CASES(kHotObject) |
768 FOUR_CASES(kHotObject + 4) { | 768 FOUR_CASES(kHotObject + 4) { |
769 int index = data & kHotObjectMask; | 769 int index = data & kHotObjectMask; |
770 Object* hot_object = hot_objects_.Get(index); | 770 Object* hot_object = hot_objects_.Get(index); |
771 UnalignedCopy(current, &hot_object); | 771 UnalignedCopy(current, &hot_object); |
772 if (write_barrier_needed) { | 772 if (write_barrier_needed && isolate->heap()->InNewSpace(hot_object)) { |
vogelheim
2016/06/22 09:22:31
I don't understand this change.
(This looks perfe
Yang
2016/06/22 09:43:02
This is just a drive-by fix to adapt this to what
| |
773 Address current_address = reinterpret_cast<Address>(current); | 773 Address current_address = reinterpret_cast<Address>(current); |
774 SLOW_DCHECK(isolate->heap()->ContainsSlow(current_object_address)); | |
775 isolate->heap()->RecordWrite( | 774 isolate->heap()->RecordWrite( |
776 HeapObject::FromAddress(current_object_address), | 775 HeapObject::FromAddress(current_object_address), |
777 static_cast<int>(current_address - current_object_address), | 776 static_cast<int>(current_address - current_object_address), |
778 hot_object); | 777 hot_object); |
779 } | 778 } |
780 current++; | 779 current++; |
781 break; | 780 break; |
782 } | 781 } |
783 | 782 |
784 // Deserialize raw data of fixed length from 1 to 32 words. | 783 // Deserialize raw data of fixed length from 1 to 32 words. |
(...skipping 23 matching lines...) Expand all Loading... | |
808 | 807 |
809 default: | 808 default: |
810 CHECK(false); | 809 CHECK(false); |
811 } | 810 } |
812 } | 811 } |
813 CHECK_EQ(limit, current); | 812 CHECK_EQ(limit, current); |
814 return true; | 813 return true; |
815 } | 814 } |
816 } // namespace internal | 815 } // namespace internal |
817 } // namespace v8 | 816 } // namespace v8 |
OLD | NEW |