| 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/bigint_operations.h" | 7 #include "vm/bigint_operations.h" |
| 8 #include "vm/bit_vector.h" | 8 #include "vm/bit_vector.h" |
| 9 #include "vm/dart_entry.h" | 9 #include "vm/dart_entry.h" |
| 10 #include "vm/flow_graph_allocator.h" | 10 #include "vm/flow_graph_allocator.h" |
| (...skipping 1522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1533 (cid == kMintCid) || | 1533 (cid == kMintCid) || |
| 1534 (cid == kBigintCid) || | 1534 (cid == kBigintCid) || |
| 1535 (cid == kDoubleCid); | 1535 (cid == kDoubleCid); |
| 1536 } | 1536 } |
| 1537 | 1537 |
| 1538 | 1538 |
| 1539 static bool MaybeNumber(CompileType* type) { | 1539 static bool MaybeNumber(CompileType* type) { |
| 1540 ASSERT(Type::Handle(Type::Number()).IsMoreSpecificThan( | 1540 ASSERT(Type::Handle(Type::Number()).IsMoreSpecificThan( |
| 1541 Type::Handle(Type::Number()), NULL)); | 1541 Type::Handle(Type::Number()), NULL)); |
| 1542 return type->ToAbstractType()->IsDynamicType() | 1542 return type->ToAbstractType()->IsDynamicType() |
| 1543 || type->ToAbstractType()->IsTypeParameter() |
| 1543 || type->IsMoreSpecificThan(Type::Handle(Type::Number())); | 1544 || type->IsMoreSpecificThan(Type::Handle(Type::Number())); |
| 1544 } | 1545 } |
| 1545 | 1546 |
| 1546 | 1547 |
| 1547 // Returns a replacement for a strict comparison and signals if the result has | 1548 // Returns a replacement for a strict comparison and signals if the result has |
| 1548 // to be negated. | 1549 // to be negated. |
| 1549 static Definition* CanonicalizeStrictCompare(StrictCompareInstr* compare, | 1550 static Definition* CanonicalizeStrictCompare(StrictCompareInstr* compare, |
| 1550 bool* negated) { | 1551 bool* negated) { |
| 1551 // Use propagated cid and type information to eliminate number checks. | 1552 // Use propagated cid and type information to eliminate number checks. |
| 1552 // If one of the inputs is not a boxable number (Mint, Double, Bigint), or | 1553 // If one of the inputs is not a boxable number (Mint, Double, Bigint), or |
| (...skipping 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2800 return kCosRuntimeEntry; | 2801 return kCosRuntimeEntry; |
| 2801 default: | 2802 default: |
| 2802 UNREACHABLE(); | 2803 UNREACHABLE(); |
| 2803 } | 2804 } |
| 2804 return kSinRuntimeEntry; | 2805 return kSinRuntimeEntry; |
| 2805 } | 2806 } |
| 2806 | 2807 |
| 2807 #undef __ | 2808 #undef __ |
| 2808 | 2809 |
| 2809 } // namespace dart | 2810 } // namespace dart |
| OLD | NEW |