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

Unified Diff: src/hydrogen-instructions.cc

Issue 18503006: Move representation into HObjectAccess and remove from HLoadNamedField and HStoreNamedField. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Pass elements kind to HObjectAccess::ForArrayLength Created 7 years, 5 months 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/hydrogen-instructions.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()));
}
« no previous file with comments | « src/hydrogen-instructions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698