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 1330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1341 case kMathAtan2: | 1341 case kMathAtan2: |
1342 case kMathPow: | 1342 case kMathPow: |
1343 case kMathMax: | 1343 case kMathMax: |
1344 case kMathMin: | 1344 case kMathMin: |
1345 return Type::Number(); | 1345 return Type::Number(); |
1346 case kMathImul: | 1346 case kMathImul: |
1347 return Type::Signed32(); | 1347 return Type::Signed32(); |
1348 case kMathClz32: | 1348 case kMathClz32: |
1349 return t->cache_.kZeroToThirtyTwo; | 1349 return t->cache_.kZeroToThirtyTwo; |
1350 // Date functions. | 1350 // Date functions. |
| 1351 case kDateNow: |
| 1352 return t->cache_.kTimeValueType; |
1351 case kDateGetDate: | 1353 case kDateGetDate: |
1352 return t->cache_.kJSDateDayType; | 1354 return t->cache_.kJSDateDayType; |
1353 case kDateGetDay: | 1355 case kDateGetDay: |
1354 return t->cache_.kJSDateWeekdayType; | 1356 return t->cache_.kJSDateWeekdayType; |
1355 case kDateGetFullYear: | 1357 case kDateGetFullYear: |
1356 return t->cache_.kJSDateYearType; | 1358 return t->cache_.kJSDateYearType; |
1357 case kDateGetHours: | 1359 case kDateGetHours: |
1358 return t->cache_.kJSDateHourType; | 1360 return t->cache_.kJSDateHourType; |
1359 case kDateGetMilliseconds: | 1361 case kDateGetMilliseconds: |
1360 return Type::Union(Type::Range(0.0, 999.0, t->zone()), Type::NaN(), | 1362 return Type::Union(Type::Range(0.0, 999.0, t->zone()), Type::NaN(), |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1775 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { | 1777 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { |
1776 if (Type::IsInteger(*value)) { | 1778 if (Type::IsInteger(*value)) { |
1777 return Type::Range(value->Number(), value->Number(), zone()); | 1779 return Type::Range(value->Number(), value->Number(), zone()); |
1778 } | 1780 } |
1779 return Type::NewConstant(value, zone()); | 1781 return Type::NewConstant(value, zone()); |
1780 } | 1782 } |
1781 | 1783 |
1782 } // namespace compiler | 1784 } // namespace compiler |
1783 } // namespace internal | 1785 } // namespace internal |
1784 } // namespace v8 | 1786 } // namespace v8 |
OLD | NEW |