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

Unified Diff: src/compiler/typer.cc

Issue 2433863002: Merged: [turbofan] Fix return value of Array.prototype.push. (Closed)
Patch Set: Created 4 years, 2 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 | « src/compiler/js-builtin-reducer.cc ('k') | test/mjsunit/regress/regress-crbug-656037.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/typer.cc
diff --git a/src/compiler/typer.cc b/src/compiler/typer.cc
index 15bc6dfba24becd2388b947c295f72ebc44ad7bd..a5c6bab9692c956369a02b92e401121bdb7db6ba 100644
--- a/src/compiler/typer.cc
+++ b/src/compiler/typer.cc
@@ -1374,6 +1374,8 @@ Type* Typer::Visitor::JSCallFunctionTyper(Type* fun, Typer* t) {
case kArrayIndexOf:
case kArrayLastIndexOf:
return Type::Range(-1, kMaxSafeInteger, t->zone());
+ case kArrayPush:
+ return t->cache_.kPositiveSafeInteger;
// Object functions.
case kObjectHasOwnProperty:
return Type::Boolean();
« no previous file with comments | « src/compiler/js-builtin-reducer.cc ('k') | test/mjsunit/regress/regress-crbug-656037.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698