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

Unified Diff: src/hydrogen.cc

Issue 751513002: Assert to protect against polymorphic string loads fires on valid stores. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years, 1 month 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-435477.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 21ef8c019fb410b26214f1751c53e27e3a8579fb..c479b907178342b42555a021cb4cd1986685ff1a 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -7094,7 +7094,9 @@ HValue* HOptimizedGraphBuilder::HandlePolymorphicElementAccess(
MapHandleList possible_transitioned_maps(maps->length());
for (int i = 0; i < maps->length(); ++i) {
Handle<Map> map = maps->at(i);
- DCHECK(!map->IsStringMap());
+ // Loads from strings or loads with a mix of string and non-string maps
+ // shouldn't be handled polymorphically.
+ DCHECK(access_type != LOAD || !map->IsStringMap());
ElementsKind elements_kind = map->elements_kind();
if (CanInlineElementAccess(map) && IsFastElementsKind(elements_kind) &&
elements_kind != GetInitialFastElementsKind()) {
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-435477.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698