| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/intermediate_language.h" | 5 #include "vm/intermediate_language.h" |
| 6 | 6 |
| 7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
| 8 #include "vm/constant_propagator.h" | 8 #include "vm/constant_propagator.h" |
| 9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 2255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2266 (cid == kMintCid) || | 2266 (cid == kMintCid) || |
| 2267 (cid == kBigintCid) || | 2267 (cid == kBigintCid) || |
| 2268 (cid == kDoubleCid); | 2268 (cid == kDoubleCid); |
| 2269 } | 2269 } |
| 2270 | 2270 |
| 2271 | 2271 |
| 2272 static bool MaybeNumber(CompileType* type) { | 2272 static bool MaybeNumber(CompileType* type) { |
| 2273 ASSERT(Type::Handle(Type::Number()).IsMoreSpecificThan( | 2273 ASSERT(Type::Handle(Type::Number()).IsMoreSpecificThan( |
| 2274 Type::Handle(Type::Number()), NULL)); | 2274 Type::Handle(Type::Number()), NULL)); |
| 2275 return type->ToAbstractType()->IsDynamicType() | 2275 return type->ToAbstractType()->IsDynamicType() |
| 2276 || type->ToAbstractType()->IsObjectType() |
| 2276 || type->ToAbstractType()->IsTypeParameter() | 2277 || type->ToAbstractType()->IsTypeParameter() |
| 2277 || type->IsMoreSpecificThan(Type::Handle(Type::Number())); | 2278 || type->IsMoreSpecificThan(Type::Handle(Type::Number())); |
| 2278 } | 2279 } |
| 2279 | 2280 |
| 2280 | 2281 |
| 2281 // Returns a replacement for a strict comparison and signals if the result has | 2282 // Returns a replacement for a strict comparison and signals if the result has |
| 2282 // to be negated. | 2283 // to be negated. |
| 2283 static Definition* CanonicalizeStrictCompare(StrictCompareInstr* compare, | 2284 static Definition* CanonicalizeStrictCompare(StrictCompareInstr* compare, |
| 2284 bool* negated) { | 2285 bool* negated) { |
| 2285 // Use propagated cid and type information to eliminate number checks. | 2286 // Use propagated cid and type information to eliminate number checks. |
| (...skipping 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3586 case Token::kTRUNCDIV: return 0; | 3587 case Token::kTRUNCDIV: return 0; |
| 3587 case Token::kMOD: return 1; | 3588 case Token::kMOD: return 1; |
| 3588 default: UNIMPLEMENTED(); return -1; | 3589 default: UNIMPLEMENTED(); return -1; |
| 3589 } | 3590 } |
| 3590 } | 3591 } |
| 3591 | 3592 |
| 3592 | 3593 |
| 3593 #undef __ | 3594 #undef __ |
| 3594 | 3595 |
| 3595 } // namespace dart | 3596 } // namespace dart |
| OLD | NEW |