| 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 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1317 case kMathFround: | 1317 case kMathFround: |
| 1318 case kMathLog: | 1318 case kMathLog: |
| 1319 case kMathLog1p: | 1319 case kMathLog1p: |
| 1320 case kMathLog10: | 1320 case kMathLog10: |
| 1321 case kMathLog2: | 1321 case kMathLog2: |
| 1322 case kMathSin: | 1322 case kMathSin: |
| 1323 case kMathSqrt: | 1323 case kMathSqrt: |
| 1324 case kMathTan: | 1324 case kMathTan: |
| 1325 return Type::Number(); | 1325 return Type::Number(); |
| 1326 case kMathSign: | 1326 case kMathSign: |
| 1327 return t->cache_.kMinusOneToOne; | 1327 return t->cache_.kMinusOneToOneOrMinusZeroOrNaN; |
| 1328 // Binary math functions. | 1328 // Binary math functions. |
| 1329 case kMathAtan2: | 1329 case kMathAtan2: |
| 1330 case kMathPow: | 1330 case kMathPow: |
| 1331 case kMathMax: | 1331 case kMathMax: |
| 1332 case kMathMin: | 1332 case kMathMin: |
| 1333 return Type::Number(); | 1333 return Type::Number(); |
| 1334 case kMathImul: | 1334 case kMathImul: |
| 1335 return Type::Signed32(); | 1335 return Type::Signed32(); |
| 1336 case kMathClz32: | 1336 case kMathClz32: |
| 1337 return t->cache_.kZeroToThirtyTwo; | 1337 return t->cache_.kZeroToThirtyTwo; |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1719 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { | 1719 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { |
| 1720 if (Type::IsInteger(*value)) { | 1720 if (Type::IsInteger(*value)) { |
| 1721 return Type::Range(value->Number(), value->Number(), zone()); | 1721 return Type::Range(value->Number(), value->Number(), zone()); |
| 1722 } | 1722 } |
| 1723 return Type::Constant(value, zone()); | 1723 return Type::Constant(value, zone()); |
| 1724 } | 1724 } |
| 1725 | 1725 |
| 1726 } // namespace compiler | 1726 } // namespace compiler |
| 1727 } // namespace internal | 1727 } // namespace internal |
| 1728 } // namespace v8 | 1728 } // namespace v8 |
| OLD | NEW |