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

Side by Side Diff: src/heap/heap.cc

Issue 768113002: Do not call Heap::IterateAndMarkPointersToFromSpace() for unboxed double fields. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « no previous file | test/cctest/test-unboxed-doubles.cc » ('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/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/once.h" 10 #include "src/base/once.h"
(...skipping 1782 matching lines...) Expand 10 before | Expand all | Expand 10 after
1793 while (!promotion_queue()->is_empty()) { 1793 while (!promotion_queue()->is_empty()) {
1794 HeapObject* target; 1794 HeapObject* target;
1795 int size; 1795 int size;
1796 promotion_queue()->remove(&target, &size); 1796 promotion_queue()->remove(&target, &size);
1797 1797
1798 // Promoted object might be already partially visited 1798 // Promoted object might be already partially visited
1799 // during old space pointer iteration. Thus we search specificly 1799 // during old space pointer iteration. Thus we search specificly
1800 // for pointers to from semispace instead of looking for pointers 1800 // for pointers to from semispace instead of looking for pointers
1801 // to new space. 1801 // to new space.
1802 DCHECK(!target->IsMap()); 1802 DCHECK(!target->IsMap());
1803 IterateAndMarkPointersToFromSpace( 1803 Address start_address = target->address();
1804 target->address(), target->address() + size, &ScavengeObject); 1804 Address end_address = start_address + size;
1805 #if V8_DOUBLE_FIELDS_UNBOXING
1806 InobjectPropertiesHelper helper(target->map());
1807 bool has_only_tagged_fields = helper.all_fields_tagged();
1808
1809 if (!has_only_tagged_fields) {
1810 for (Address slot = start_address; slot < end_address;
1811 slot += kPointerSize) {
1812 if (helper.IsTagged(static_cast<int>(slot - start_address))) {
1813 // TODO(ishell): call this once for contiguous region
1814 // of tagged fields.
1815 IterateAndMarkPointersToFromSpace(slot, slot + kPointerSize,
1816 &ScavengeObject);
1817 }
1818 }
1819 } else {
1820 #endif
1821 IterateAndMarkPointersToFromSpace(start_address, end_address,
1822 &ScavengeObject);
1823 #if V8_DOUBLE_FIELDS_UNBOXING
1824 }
1825 #endif
1805 } 1826 }
1806 } 1827 }
1807 1828
1808 // Take another spin if there are now unswept objects in new space 1829 // Take another spin if there are now unswept objects in new space
1809 // (there are currently no more unswept promoted objects). 1830 // (there are currently no more unswept promoted objects).
1810 } while (new_space_front != new_space_.top()); 1831 } while (new_space_front != new_space_.top());
1811 1832
1812 return new_space_front; 1833 return new_space_front;
1813 } 1834 }
1814 1835
(...skipping 4532 matching lines...) Expand 10 before | Expand all | Expand 10 after
6347 static_cast<int>(object_sizes_last_time_[index])); 6368 static_cast<int>(object_sizes_last_time_[index]));
6348 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 6369 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
6349 #undef ADJUST_LAST_TIME_OBJECT_COUNT 6370 #undef ADJUST_LAST_TIME_OBJECT_COUNT
6350 6371
6351 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 6372 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
6352 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 6373 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
6353 ClearObjectStats(); 6374 ClearObjectStats();
6354 } 6375 }
6355 } 6376 }
6356 } // namespace v8::internal 6377 } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/cctest/test-unboxed-doubles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698