Index: src/hydrogen-instructions.cc |
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
index 89e8bf61e7ba610d3bc14f9feeabb3c54c161eb2..d810a77bc267745a4ee1fcca10399cec2ffdb910 100644 |
--- a/src/hydrogen-instructions.cc |
+++ b/src/hydrogen-instructions.cc |
@@ -3919,7 +3919,8 @@ HObjectAccess HObjectAccess::ForFixedArrayHeader(int offset) { |
} |
-HObjectAccess HObjectAccess::ForJSObjectOffset(int offset) { |
+HObjectAccess HObjectAccess::ForJSObjectOffset(int offset, |
+ Representation representation) { |
ASSERT(offset >= 0); |
Portion portion = kInobject; |
@@ -3928,7 +3929,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); |
} |
@@ -3943,13 +3944,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); |
} |
@@ -3957,30 +3959,35 @@ 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); |
} |
} |
HObjectAccess HObjectAccess::ForCellPayload(Isolate* isolate) { |
return HObjectAccess( |
- kInobject, Cell::kValueOffset, |
+ kInobject, Cell::kValueOffset, Representation::Tagged(), |
Handle<String>(isolate->heap()->cell_value_string())); |
} |