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/base/lazy-instance.h" | 8 #include "src/base/lazy-instance.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/compiler/common-operator.h" | 10 #include "src/compiler/common-operator.h" |
(...skipping 1847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1858 Type* Typer::Visitor::TypeTruncateFloat64ToInt32(Node* node) { | 1858 Type* Typer::Visitor::TypeTruncateFloat64ToInt32(Node* node) { |
1859 return Type::Intersect(Type::Signed32(), Type::UntaggedSigned32(), zone()); | 1859 return Type::Intersect(Type::Signed32(), Type::UntaggedSigned32(), zone()); |
1860 } | 1860 } |
1861 | 1861 |
1862 | 1862 |
1863 Type* Typer::Visitor::TypeTruncateInt64ToInt32(Node* node) { | 1863 Type* Typer::Visitor::TypeTruncateInt64ToInt32(Node* node) { |
1864 return Type::Intersect(Type::Signed32(), Type::UntaggedSigned32(), zone()); | 1864 return Type::Intersect(Type::Signed32(), Type::UntaggedSigned32(), zone()); |
1865 } | 1865 } |
1866 | 1866 |
1867 | 1867 |
| 1868 Type* Typer::Visitor::TypeTruncateInt64ToFloat64(Node* node) { |
| 1869 return Type::Intersect(Type::Internal(), Type::UntaggedFloat64(), zone()); |
| 1870 } |
| 1871 |
| 1872 |
1868 Type* Typer::Visitor::TypeFloat32Add(Node* node) { return Type::Number(); } | 1873 Type* Typer::Visitor::TypeFloat32Add(Node* node) { return Type::Number(); } |
1869 | 1874 |
1870 | 1875 |
1871 Type* Typer::Visitor::TypeFloat32Sub(Node* node) { return Type::Number(); } | 1876 Type* Typer::Visitor::TypeFloat32Sub(Node* node) { return Type::Number(); } |
1872 | 1877 |
1873 | 1878 |
1874 Type* Typer::Visitor::TypeFloat32Mul(Node* node) { return Type::Number(); } | 1879 Type* Typer::Visitor::TypeFloat32Mul(Node* node) { return Type::Number(); } |
1875 | 1880 |
1876 | 1881 |
1877 Type* Typer::Visitor::TypeFloat32Div(Node* node) { return Type::Number(); } | 1882 Type* Typer::Visitor::TypeFloat32Div(Node* node) { return Type::Number(); } |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2077 } | 2082 } |
2078 if (Type::IsInteger(*value)) { | 2083 if (Type::IsInteger(*value)) { |
2079 return Type::Range(value->Number(), value->Number(), zone()); | 2084 return Type::Range(value->Number(), value->Number(), zone()); |
2080 } | 2085 } |
2081 return Type::Constant(value, zone()); | 2086 return Type::Constant(value, zone()); |
2082 } | 2087 } |
2083 | 2088 |
2084 } // namespace compiler | 2089 } // namespace compiler |
2085 } // namespace internal | 2090 } // namespace internal |
2086 } // namespace v8 | 2091 } // namespace v8 |
OLD | NEW |