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 "src/base/flags.h" | 7 #include "src/base/flags.h" |
8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
9 #include "src/compilation-dependencies.h" | 9 #include "src/compilation-dependencies.h" |
10 #include "src/compiler/common-operator.h" | 10 #include "src/compiler/common-operator.h" |
(...skipping 2182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2193 Type* Typer::Visitor::TypeTruncateFloat64ToInt32(Node* node) { | 2193 Type* Typer::Visitor::TypeTruncateFloat64ToInt32(Node* node) { |
2194 return Type::Intersect(Type::Signed32(), Type::UntaggedIntegral32(), zone()); | 2194 return Type::Intersect(Type::Signed32(), Type::UntaggedIntegral32(), zone()); |
2195 } | 2195 } |
2196 | 2196 |
2197 | 2197 |
2198 Type* Typer::Visitor::TypeTruncateInt64ToInt32(Node* node) { | 2198 Type* Typer::Visitor::TypeTruncateInt64ToInt32(Node* node) { |
2199 return Type::Intersect(Type::Signed32(), Type::UntaggedIntegral32(), zone()); | 2199 return Type::Intersect(Type::Signed32(), Type::UntaggedIntegral32(), zone()); |
2200 } | 2200 } |
2201 | 2201 |
2202 | 2202 |
| 2203 Type* Typer::Visitor::TypeRoundInt32ToFloat32(Node* node) { |
| 2204 return Type::Intersect(Type::PlainNumber(), Type::UntaggedFloat32(), zone()); |
| 2205 } |
| 2206 |
| 2207 |
2203 Type* Typer::Visitor::TypeRoundInt64ToFloat32(Node* node) { | 2208 Type* Typer::Visitor::TypeRoundInt64ToFloat32(Node* node) { |
2204 return Type::Intersect(Type::PlainNumber(), Type::UntaggedFloat32(), zone()); | 2209 return Type::Intersect(Type::PlainNumber(), Type::UntaggedFloat32(), zone()); |
2205 } | 2210 } |
2206 | 2211 |
2207 | 2212 |
2208 Type* Typer::Visitor::TypeRoundInt64ToFloat64(Node* node) { | 2213 Type* Typer::Visitor::TypeRoundInt64ToFloat64(Node* node) { |
2209 return Type::Intersect(Type::PlainNumber(), Type::UntaggedFloat64(), zone()); | 2214 return Type::Intersect(Type::PlainNumber(), Type::UntaggedFloat64(), zone()); |
2210 } | 2215 } |
2211 | 2216 |
2212 | 2217 |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2431 } | 2436 } |
2432 if (Type::IsInteger(*value)) { | 2437 if (Type::IsInteger(*value)) { |
2433 return Type::Range(value->Number(), value->Number(), zone()); | 2438 return Type::Range(value->Number(), value->Number(), zone()); |
2434 } | 2439 } |
2435 return Type::Constant(value, zone()); | 2440 return Type::Constant(value, zone()); |
2436 } | 2441 } |
2437 | 2442 |
2438 } // namespace compiler | 2443 } // namespace compiler |
2439 } // namespace internal | 2444 } // namespace internal |
2440 } // namespace v8 | 2445 } // namespace v8 |
OLD | NEW |