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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/typer.h" 5 #include "src/compiler/typer.h"
6 6
7 #include <iomanip> 7 #include <iomanip>
8 8
9 #include "src/base/flags.h" 9 #include "src/base/flags.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after
1367 case kStringToUpperCase: 1367 case kStringToUpperCase:
1368 return Type::String(); 1368 return Type::String();
1369 1369
1370 case kStringIteratorNext: 1370 case kStringIteratorNext:
1371 return Type::OtherObject(); 1371 return Type::OtherObject();
1372 1372
1373 // Array functions. 1373 // Array functions.
1374 case kArrayIndexOf: 1374 case kArrayIndexOf:
1375 case kArrayLastIndexOf: 1375 case kArrayLastIndexOf:
1376 return Type::Range(-1, kMaxSafeInteger, t->zone()); 1376 return Type::Range(-1, kMaxSafeInteger, t->zone());
1377 case kArrayPush:
1378 return t->cache_.kPositiveSafeInteger;
1377 // Object functions. 1379 // Object functions.
1378 case kObjectHasOwnProperty: 1380 case kObjectHasOwnProperty:
1379 return Type::Boolean(); 1381 return Type::Boolean();
1380 // Global functions. 1382 // Global functions.
1381 case kGlobalDecodeURI: 1383 case kGlobalDecodeURI:
1382 case kGlobalDecodeURIComponent: 1384 case kGlobalDecodeURIComponent:
1383 case kGlobalEncodeURI: 1385 case kGlobalEncodeURI:
1384 case kGlobalEncodeURIComponent: 1386 case kGlobalEncodeURIComponent:
1385 case kGlobalEscape: 1387 case kGlobalEscape:
1386 case kGlobalUnescape: 1388 case kGlobalUnescape:
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
1738 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { 1740 Type* Typer::Visitor::TypeConstant(Handle<Object> value) {
1739 if (Type::IsInteger(*value)) { 1741 if (Type::IsInteger(*value)) {
1740 return Type::Range(value->Number(), value->Number(), zone()); 1742 return Type::Range(value->Number(), value->Number(), zone());
1741 } 1743 }
1742 return Type::Constant(value, zone()); 1744 return Type::Constant(value, zone());
1743 } 1745 }
1744 1746
1745 } // namespace compiler 1747 } // namespace compiler
1746 } // namespace internal 1748 } // namespace internal
1747 } // namespace v8 1749 } // namespace v8
OLDNEW
« 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