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

Unified Diff: src/hydrogen.cc

Issue 313233005: Fix missing smi check in inlined indexOf/lastIndexOf. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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-crbug-382513.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 1e623afc81fa7eba25ecef8081b850efd70f672f..df83f040e49d9d7c237d2093332825c837d20324 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -8538,7 +8538,8 @@ HValue* HOptimizedGraphBuilder::BuildArrayIndexOf(HValue* receiver,
elements, index, static_cast<HValue*>(NULL),
kind, ALLOW_RETURN_HOLE);
IfBuilder if_issame(this);
- HCompareMap* issame = if_issame.If<HCompareMap>(
+ if_issame.IfNot<HIsSmiAndBranch>(element);
+ HCompareMap* issame = if_issame.AndIf<HCompareMap>(
element, isolate()->factory()->heap_number_map());
if_issame.And();
HValue* number = Add<HLoadNamedField>(
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-382513.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698