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/js-graph.h" | 5 #include "src/compiler/js-graph.h" |
6 #include "src/compiler/js-typed-lowering.h" | 6 #include "src/compiler/js-typed-lowering.h" |
7 #include "src/compiler/machine-operator.h" | 7 #include "src/compiler/machine-operator.h" |
8 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
9 #include "src/compiler/opcodes.h" | 9 #include "src/compiler/opcodes.h" |
10 #include "src/compiler/operator-properties.h" | 10 #include "src/compiler/operator-properties.h" |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 Type::Integral32()}; | 212 Type::Integral32()}; |
213 | 213 |
214 | 214 |
215 static Type* kNumberTypes[] = { | 215 static Type* kNumberTypes[] = { |
216 Type::UnsignedSmall(), Type::Negative32(), Type::Unsigned31(), | 216 Type::UnsignedSmall(), Type::Negative32(), Type::Unsigned31(), |
217 Type::SignedSmall(), Type::Signed32(), Type::Unsigned32(), | 217 Type::SignedSmall(), Type::Signed32(), Type::Unsigned32(), |
218 Type::Integral32(), Type::MinusZero(), Type::NaN(), | 218 Type::Integral32(), Type::MinusZero(), Type::NaN(), |
219 Type::OrderedNumber(), Type::PlainNumber(), Type::Number()}; | 219 Type::OrderedNumber(), Type::PlainNumber(), Type::Number()}; |
220 | 220 |
221 | 221 |
222 static Type* kJSTypes[] = {Type::Undefined(), Type::Null(), Type::Boolean(), | |
223 Type::Number(), Type::String(), Type::Object()}; | |
224 | |
225 | |
226 static Type* I32Type(bool is_signed) { | 222 static Type* I32Type(bool is_signed) { |
227 return is_signed ? Type::Signed32() : Type::Unsigned32(); | 223 return is_signed ? Type::Signed32() : Type::Unsigned32(); |
228 } | 224 } |
229 | 225 |
230 | 226 |
231 static IrOpcode::Value NumberToI32(bool is_signed) { | 227 static IrOpcode::Value NumberToI32(bool is_signed) { |
232 return is_signed ? IrOpcode::kNumberToInt32 : IrOpcode::kNumberToUint32; | 228 return is_signed ? IrOpcode::kNumberToInt32 : IrOpcode::kNumberToUint32; |
233 } | 229 } |
234 | 230 |
235 | 231 |
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1254 CHECK_EQ(p1, r->InputAt(0)); | 1250 CHECK_EQ(p1, r->InputAt(0)); |
1255 CHECK_EQ(p0, r->InputAt(1)); | 1251 CHECK_EQ(p0, r->InputAt(1)); |
1256 } else { | 1252 } else { |
1257 CHECK_EQ(p0, r->InputAt(0)); | 1253 CHECK_EQ(p0, r->InputAt(0)); |
1258 CHECK_EQ(p1, r->InputAt(1)); | 1254 CHECK_EQ(p1, r->InputAt(1)); |
1259 } | 1255 } |
1260 } | 1256 } |
1261 } | 1257 } |
1262 } | 1258 } |
1263 } | 1259 } |
OLD | NEW |