Index: src/hydrogen-instructions.cc |
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
index ac509a70566cccf608f9ef2bd9f3eae13bca900f..caeebae67368fe72ed11cb71037cdee42be691b6 100644 |
--- a/src/hydrogen-instructions.cc |
+++ b/src/hydrogen-instructions.cc |
@@ -1206,13 +1206,23 @@ HLoadNamedFieldPolymorphic::HLoadNamedFieldPolymorphic(HValue* object, |
Handle<Map> map = types->at(i); |
LookupResult lookup; |
map->LookupInDescriptors(NULL, *name, &lookup); |
- if (lookup.IsProperty() && lookup.type() == FIELD) { |
- types_.Add(types->at(i)); |
- int index = lookup.GetLocalFieldIndexFromMap(*map); |
- if (index < 0) { |
- SetFlag(kDependsOnInobjectFields); |
- } else { |
- SetFlag(kDependsOnBackingStoreFields); |
+ if (lookup.IsProperty()) { |
+ switch (lookup.type()) { |
+ case FIELD: { |
+ int index = lookup.GetLocalFieldIndexFromMap(*map); |
+ if (index < 0) { |
+ SetFlag(kDependsOnInobjectFields); |
+ } else { |
+ SetFlag(kDependsOnBackingStoreFields); |
+ } |
+ types_.Add(types->at(i)); |
+ break; |
+ } |
+ case CONSTANT_FUNCTION: |
+ types_.Add(types->at(i)); |
+ break; |
+ default: |
+ break; |
} |
} |
} |