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

Unified Diff: src/hydrogen.cc

Issue 16875008: Fix using monomorphic store instruction for polymorphic stores. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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-polymorphic-store.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 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());
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-polymorphic-store.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698