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

Unified Diff: src/hydrogen.cc

Issue 239623005: Clear invalid field maps in PropertyAccessInfo. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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 | « no previous file | test/mjsunit/regress/regress-363956.js » ('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 b93df482861615d499b3b4668143e2537ca9bab4..1b70767eee39444a8d7cecfd6c8b9775b09110e6 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -5493,7 +5493,7 @@ bool HOptimizedGraphBuilder::PropertyAccessInfo::IsCompatible(
if (!IsLoad()) return false;
// Throw away type information for merging polymorphic loads.
- field_map_ = info->field_map_ = Handle<Map>();
+ info->field_map_ = Handle<Map>::null();
}
info->GeneralizeRepresentation(r);
return true;
@@ -5518,7 +5518,7 @@ bool HOptimizedGraphBuilder::PropertyAccessInfo::LoadResult(Handle<Map> map) {
access_ = HObjectAccess::ForField(map, &lookup_, name_);
// Load field map for heap objects.
- if (access_.representation().IsHeapObject()) LoadFieldMap(map);
+ LoadFieldMap(map);
} else if (lookup_.IsPropertyCallbacks()) {
Handle<Object> callback(lookup_.GetValueFromMap(*map), isolate());
if (!callback->IsAccessorPair()) return false;
@@ -5546,9 +5546,13 @@ bool HOptimizedGraphBuilder::PropertyAccessInfo::LoadResult(Handle<Map> map) {
void HOptimizedGraphBuilder::PropertyAccessInfo::LoadFieldMap(Handle<Map> map) {
+ // Clear any previous field map.
+ field_map_ = Handle<Map>::null();
+
// Figure out the field type from the accessor map.
HeapType* field_type = lookup_.GetFieldTypeFromMap(*map);
if (field_type->IsClass()) {
+ ASSERT(access_.representation().IsHeapObject());
Handle<Map> field_map = field_type->AsClass();
if (field_map->is_stable()) {
field_map_ = field_map;
@@ -5604,7 +5608,7 @@ bool HOptimizedGraphBuilder::PropertyAccessInfo::CanAccessMonomorphic() {
access_ = HObjectAccess::ForField(map, &lookup_, name_);
// Load field map for heap objects.
- if (access_.representation().IsHeapObject()) LoadFieldMap(transition());
+ LoadFieldMap(transition());
return true;
}
return false;
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-363956.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698