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

Unified Diff: src/objects-inl.h

Issue 751643005: Reland of "Enable inobject double fields unboxing for 64-bit archs." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixes Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | test/cctest/test-unboxed-doubles.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 108f9f62489ad62b492ce22a748826a81baee62f..f3ac5717cd25bc9a56d811b10a2959352a02bfb8 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -5220,6 +5220,12 @@ LayoutDescriptor* Map::layout_descriptor_gc_safe() {
}
+bool Map::HasFastPointerLayout() const {
+ Object* layout_desc = READ_FIELD(this, kLayoutDecriptorOffset);
+ return LayoutDescriptor::IsFastPointerLayout(layout_desc);
+}
+
+
void Map::UpdateDescriptors(DescriptorArray* descriptors,
LayoutDescriptor* layout_desc) {
set_instance_descriptors(descriptors);
@@ -7357,8 +7363,7 @@ template<int start_offset, int end_offset, int size>
void FixedBodyDescriptor<start_offset, end_offset, size>::IterateBody(
HeapObject* obj,
ObjectVisitor* v) {
- if (!FLAG_unbox_double_fields ||
- obj->map()->layout_descriptor()->IsFastPointerLayout()) {
Igor Sheludko 2014/11/24 09:32:10 It is not correct to call here layout_descriptor()
+ if (!FLAG_unbox_double_fields || obj->map()->HasFastPointerLayout()) {
v->VisitPointers(HeapObject::RawField(obj, start_offset),
HeapObject::RawField(obj, end_offset));
} else {
@@ -7371,8 +7376,7 @@ template<int start_offset>
void FlexibleBodyDescriptor<start_offset>::IterateBody(HeapObject* obj,
int object_size,
ObjectVisitor* v) {
- if (!FLAG_unbox_double_fields ||
- obj->map()->layout_descriptor()->IsFastPointerLayout()) {
+ if (!FLAG_unbox_double_fields || obj->map()->HasFastPointerLayout()) {
v->VisitPointers(HeapObject::RawField(obj, start_offset),
HeapObject::RawField(obj, object_size));
} else {
« no previous file with comments | « src/objects.h ('k') | test/cctest/test-unboxed-doubles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698