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

Side by Side Diff: src/compiler/typer.cc

Issue 2425903002: [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 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1350 case kStringToUpperCase: 1350 case kStringToUpperCase:
1351 return Type::String(); 1351 return Type::String();
1352 1352
1353 case kStringIteratorNext: 1353 case kStringIteratorNext:
1354 return Type::OtherObject(); 1354 return Type::OtherObject();
1355 1355
1356 // Array functions. 1356 // Array functions.
1357 case kArrayIndexOf: 1357 case kArrayIndexOf:
1358 case kArrayLastIndexOf: 1358 case kArrayLastIndexOf:
1359 return Type::Range(-1, kMaxSafeInteger, t->zone()); 1359 return Type::Range(-1, kMaxSafeInteger, t->zone());
1360 case kArrayPush:
1361 return t->cache_.kPositiveSafeInteger;
1360 // Object functions. 1362 // Object functions.
1361 case kObjectHasOwnProperty: 1363 case kObjectHasOwnProperty:
1362 return Type::Boolean(); 1364 return Type::Boolean();
1363 // Global functions. 1365 // Global functions.
1364 case kGlobalDecodeURI: 1366 case kGlobalDecodeURI:
1365 case kGlobalDecodeURIComponent: 1367 case kGlobalDecodeURIComponent:
1366 case kGlobalEncodeURI: 1368 case kGlobalEncodeURI:
1367 case kGlobalEncodeURIComponent: 1369 case kGlobalEncodeURIComponent:
1368 case kGlobalEscape: 1370 case kGlobalEscape:
1369 case kGlobalUnescape: 1371 case kGlobalUnescape:
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1703 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { 1705 Type* Typer::Visitor::TypeConstant(Handle<Object> value) {
1704 if (Type::IsInteger(*value)) { 1706 if (Type::IsInteger(*value)) {
1705 return Type::Range(value->Number(), value->Number(), zone()); 1707 return Type::Range(value->Number(), value->Number(), zone());
1706 } 1708 }
1707 return Type::NewConstant(value, zone()); 1709 return Type::NewConstant(value, zone());
1708 } 1710 }
1709 1711
1710 } // namespace compiler 1712 } // namespace compiler
1711 } // namespace internal 1713 } // namespace internal
1712 } // namespace v8 1714 } // 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