Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index 9a2072ec9f054cfc311f0265c41fb07ead0f124b..396e98a7f931cd824e516d3faef20a94c1ec97e0 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -6408,7 +6408,8 @@ bool HOptimizedGraphBuilder::TryStorePolymorphicAsMonomorphic( |
AddInstruction(HCheckMaps::New(object, types, zone())); |
HInstruction* store; |
CHECK_ALIVE_OR_RETURN( |
- store = BuildStoreNamedField(object, name, value, types->at(0), &lookup), |
+ store = BuildStoreNamedField( |
+ object, name, value, types->at(count - 1), &lookup), |
true); |
Push(value); |
store->set_position(expr->position()); |