| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |