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

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

Issue 2434753002: 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 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after
1345 case kStringConcat: 1345 case kStringConcat:
1346 case kStringFromCharCode: 1346 case kStringFromCharCode:
1347 case kStringSubstr: 1347 case kStringSubstr:
1348 case kStringToLowerCase: 1348 case kStringToLowerCase:
1349 case kStringToUpperCase: 1349 case kStringToUpperCase:
1350 return Type::String(); 1350 return Type::String();
1351 // Array functions. 1351 // Array functions.
1352 case kArrayIndexOf: 1352 case kArrayIndexOf:
1353 case kArrayLastIndexOf: 1353 case kArrayLastIndexOf:
1354 return Type::Range(-1, kMaxSafeInteger, t->zone()); 1354 return Type::Range(-1, kMaxSafeInteger, t->zone());
1355 case kArrayPush:
1356 return t->cache_.kPositiveSafeInteger;
1355 // Object functions. 1357 // Object functions.
1356 case kObjectHasOwnProperty: 1358 case kObjectHasOwnProperty:
1357 return Type::Boolean(); 1359 return Type::Boolean();
1358 // Global functions. 1360 // Global functions.
1359 case kGlobalDecodeURI: 1361 case kGlobalDecodeURI:
1360 case kGlobalDecodeURIComponent: 1362 case kGlobalDecodeURIComponent:
1361 case kGlobalEncodeURI: 1363 case kGlobalEncodeURI:
1362 case kGlobalEncodeURIComponent: 1364 case kGlobalEncodeURIComponent:
1363 case kGlobalEscape: 1365 case kGlobalEscape:
1364 case kGlobalUnescape: 1366 case kGlobalUnescape:
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
2343 } 2345 }
2344 if (Type::IsInteger(*value)) { 2346 if (Type::IsInteger(*value)) {
2345 return Type::Range(value->Number(), value->Number(), zone()); 2347 return Type::Range(value->Number(), value->Number(), zone());
2346 } 2348 }
2347 return Type::Constant(value, zone()); 2349 return Type::Constant(value, zone());
2348 } 2350 }
2349 2351
2350 } // namespace compiler 2352 } // namespace compiler
2351 } // namespace internal 2353 } // namespace internal
2352 } // namespace v8 2354 } // 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