Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index 7c9c88260657b0507ab8d9ccc8b8c9dd458ae9b1..2c6a916b04c1aa14a6165f829214161da009ce74 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -2359,10 +2359,15 @@ void LCodeGen::EmitPushTaggedOperand(LOperand* operand) { |
// Check for cases where EmitLoadFieldOrConstantFunction needs to walk the |
// prototype chain, which causes unbounded code generation. |
-static bool CompactEmit( |
- SmallMapList* list, Handle<String> name, int i, Isolate* isolate) { |
- LookupResult lookup(isolate); |
+static bool CompactEmit(SmallMapList* list, |
+ Handle<String> name, |
+ int i, |
+ Isolate* isolate) { |
Handle<Map> map = list->at(i); |
+ // If the map has ElementsKind transitions, we will generate map checks |
+ // for each kind in __ CompareMap(..., ALLOW_ELEMENTS_TRANSITION_MAPS). |
+ if (map->elements_transition_map() != NULL) return false; |
+ LookupResult lookup(isolate); |
map->LookupInDescriptors(NULL, *name, &lookup); |
return lookup.IsFound() && |
(lookup.type() == FIELD || lookup.type() == CONSTANT_FUNCTION); |