Index: src/hydrogen-instructions.cc |
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
index 932fd47af13fc12bf081f3bb232063edd59ee7d2..268055ca33bda1fe15b975d6cb07ebefdd677cbf 100644 |
--- a/src/hydrogen-instructions.cc |
+++ b/src/hydrogen-instructions.cc |
@@ -3765,7 +3765,8 @@ HObjectAccess HObjectAccess::ForFixedArrayHeader(int offset) { |
} |
-HObjectAccess HObjectAccess::ForJSObjectOffset(int offset) { |
+HObjectAccess HObjectAccess::ForJSObjectOffset(int offset, |
+ Representation representation) { |
ASSERT(offset >= 0); |
Portion portion = kInobject; |
@@ -3774,7 +3775,7 @@ HObjectAccess HObjectAccess::ForJSObjectOffset(int offset) { |
} else if (offset == JSObject::kMapOffset) { |
portion = kMaps; |
} |
- return HObjectAccess(portion, offset, Handle<String>::null()); |
+ return HObjectAccess(portion, offset, representation); |
} |
@@ -3789,13 +3790,14 @@ HObjectAccess HObjectAccess::ForJSArrayOffset(int offset) { |
} else if (offset == JSObject::kMapOffset) { |
portion = kMaps; |
} |
- return HObjectAccess(portion, offset, Handle<String>::null()); |
+ return HObjectAccess(portion, offset); |
} |
-HObjectAccess HObjectAccess::ForBackingStoreOffset(int offset) { |
+HObjectAccess HObjectAccess::ForBackingStoreOffset(int offset, |
+ Representation representation) { |
ASSERT(offset >= 0); |
- return HObjectAccess(kBackingStore, offset, Handle<String>::null()); |
+ return HObjectAccess(kBackingStore, offset, representation); |
} |
@@ -3803,23 +3805,28 @@ HObjectAccess HObjectAccess::ForField(Handle<Map> map, |
LookupResult *lookup, Handle<String> name) { |
ASSERT(lookup->IsField() || lookup->IsTransitionToField(*map)); |
int index; |
+ Representation representation; |
if (lookup->IsField()) { |
index = lookup->GetLocalFieldIndexFromMap(*map); |
+ representation = lookup->representation(); |
} else { |
Map* transition = lookup->GetTransitionMapFromMap(*map); |
int descriptor = transition->LastAdded(); |
index = transition->instance_descriptors()->GetFieldIndex(descriptor) - |
map->inobject_properties(); |
+ PropertyDetails details = |
+ transition->instance_descriptors()->GetDetails(descriptor); |
+ representation = details.representation(); |
} |
if (index < 0) { |
// Negative property indices are in-object properties, indexed |
// from the end of the fixed part of the object. |
int offset = (index * kPointerSize) + map->instance_size(); |
- return HObjectAccess(kInobject, offset); |
+ return HObjectAccess(kInobject, offset, representation); |
} else { |
// Non-negative property indices are in the properties array. |
int offset = (index * kPointerSize) + FixedArray::kHeaderSize; |
- return HObjectAccess(kBackingStore, offset, name); |
+ return HObjectAccess(kBackingStore, offset, representation, name); |
} |
} |