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

Unified Diff: src/hydrogen.cc

Issue 488073002: Further reduce LookupResult usage (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: More consistency Created 6 years, 4 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/bootstrapper.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 6096c248970e2e0b0f1950cd8ae238f1b62b7d99..59d3bb909314f89320c5dbbad48a2dc104b5b442 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -5977,7 +5977,9 @@ bool HOptimizedGraphBuilder::PropertyAccessInfo::LoadResult(Handle<Map> map) {
if (lookup_.IsField()) {
// Construct the object field access.
- access_ = HObjectAccess::ForField(map, &lookup_, name_);
+ int index = lookup_.GetLocalFieldIndexFromMap(*map);
+ Representation representation = lookup_.representation();
+ access_ = HObjectAccess::ForField(map, index, representation, name_);
// Load field map for heap objects.
LoadFieldMaps(map);
@@ -6087,7 +6089,14 @@ bool HOptimizedGraphBuilder::PropertyAccessInfo::CanAccessMonomorphic() {
map->LookupTransition(NULL, *name_, &lookup_);
if (lookup_.IsTransitionToField() && map->unused_property_fields() > 0) {
// Construct the object field access.
- access_ = HObjectAccess::ForField(map, &lookup_, name_);
+ int descriptor = transition()->LastAdded();
+ int index =
+ transition()->instance_descriptors()->GetFieldIndex(descriptor) -
+ map->inobject_properties();
+ PropertyDetails details =
+ transition()->instance_descriptors()->GetDetails(descriptor);
+ Representation representation = details.representation();
+ access_ = HObjectAccess::ForField(map, index, representation, name_);
// Load field map for heap objects.
LoadFieldMaps(transition());
« no previous file with comments | « src/bootstrapper.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698