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 <limits> | 7 #include <limits> |
8 | 8 |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/compiler/graph-inl.h" | 10 #include "src/compiler/graph-inl.h" |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 undefined_or_number = Type::Union(Type::Undefined(), Type::Number(), zone); | 182 undefined_or_number = Type::Union(Type::Undefined(), Type::Number(), zone); |
183 singleton_false = Type::Constant(f->false_value(), zone); | 183 singleton_false = Type::Constant(f->false_value(), zone); |
184 singleton_true = Type::Constant(f->true_value(), zone); | 184 singleton_true = Type::Constant(f->true_value(), zone); |
185 singleton_zero = Type::Range(zero, zero, zone); | 185 singleton_zero = Type::Range(zero, zero, zone); |
186 singleton_one = Type::Range(one, one, zone); | 186 singleton_one = Type::Range(one, one, zone); |
187 zero_or_one = Type::Union(singleton_zero, singleton_one, zone); | 187 zero_or_one = Type::Union(singleton_zero, singleton_one, zone); |
188 zeroish = Type::Union(singleton_zero, nan_or_minuszero, zone); | 188 zeroish = Type::Union(singleton_zero, nan_or_minuszero, zone); |
189 signed32ish = Type::Union(signed32, truncating_to_zero, zone); | 189 signed32ish = Type::Union(signed32, truncating_to_zero, zone); |
190 unsigned32ish = Type::Union(unsigned32, truncating_to_zero, zone); | 190 unsigned32ish = Type::Union(unsigned32, truncating_to_zero, zone); |
191 falsish = Type::Union(Type::Undetectable(), | 191 falsish = Type::Union(Type::Undetectable(), |
192 Type::Union(zeroish, undefined_or_null, zone), zone); | 192 Type::Union(Type::Union(singleton_false, zeroish, zone), |
| 193 undefined_or_null, zone), |
| 194 zone); |
193 integer = Type::Range(minusinfinity, infinity, zone); | 195 integer = Type::Range(minusinfinity, infinity, zone); |
194 weakint = Type::Union(integer, nan_or_minuszero, zone); | 196 weakint = Type::Union(integer, nan_or_minuszero, zone); |
195 | 197 |
196 number_fun0_ = Type::Function(number, zone); | 198 number_fun0_ = Type::Function(number, zone); |
197 number_fun1_ = Type::Function(number, number, zone); | 199 number_fun1_ = Type::Function(number, number, zone); |
198 number_fun2_ = Type::Function(number, number, number, zone); | 200 number_fun2_ = Type::Function(number, number, number, zone); |
199 | 201 |
200 weakint_fun1_ = Type::Function(weakint, number, zone); | 202 weakint_fun1_ = Type::Function(weakint, number, zone); |
201 random_fun_ = Type::Function(Type::OrderedNumber(), zone); | 203 random_fun_ = Type::Function(Type::OrderedNumber(), zone); |
202 | 204 |
(...skipping 1898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2101 // TODO(rossberg): Do we want some ClampedArray type to express this? | 2103 // TODO(rossberg): Do we want some ClampedArray type to express this? |
2102 break; | 2104 break; |
2103 } | 2105 } |
2104 } | 2106 } |
2105 return Type::Constant(value, zone()); | 2107 return Type::Constant(value, zone()); |
2106 } | 2108 } |
2107 | 2109 |
2108 } // namespace compiler | 2110 } // namespace compiler |
2109 } // namespace internal | 2111 } // namespace internal |
2110 } // namespace v8 | 2112 } // namespace v8 |
OLD | NEW |