| 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/cpu.h" | 8 #include "vm/cpu.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 2124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2135 } | 2135 } |
| 2136 | 2136 |
| 2137 return this; | 2137 return this; |
| 2138 } | 2138 } |
| 2139 | 2139 |
| 2140 | 2140 |
| 2141 Definition* BooleanNegateInstr::Canonicalize(FlowGraph* flow_graph) { | 2141 Definition* BooleanNegateInstr::Canonicalize(FlowGraph* flow_graph) { |
| 2142 Definition* defn = value()->definition(); | 2142 Definition* defn = value()->definition(); |
| 2143 if (defn->IsComparison() && defn->HasOnlyUse(value())) { | 2143 if (defn->IsComparison() && defn->HasOnlyUse(value())) { |
| 2144 // Comparisons always have a bool result. | 2144 // Comparisons always have a bool result. |
| 2145 ASSERT(value()->Type()->ToCid() == kBoolCid); | 2145 ASSERT(value()->definition()->Type()->ToCid() == kBoolCid); |
| 2146 defn->AsComparison()->NegateComparison(); | 2146 defn->AsComparison()->NegateComparison(); |
| 2147 return defn; | 2147 return defn; |
| 2148 } | 2148 } |
| 2149 return this; | 2149 return this; |
| 2150 } | 2150 } |
| 2151 | 2151 |
| 2152 | 2152 |
| 2153 static bool MayBeBoxableNumber(intptr_t cid) { | 2153 static bool MayBeBoxableNumber(intptr_t cid) { |
| 2154 return (cid == kDynamicCid) || | 2154 return (cid == kDynamicCid) || |
| 2155 (cid == kMintCid) || | 2155 (cid == kMintCid) || |
| (...skipping 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3434 case Token::kTRUNCDIV: return 0; | 3434 case Token::kTRUNCDIV: return 0; |
| 3435 case Token::kMOD: return 1; | 3435 case Token::kMOD: return 1; |
| 3436 default: UNIMPLEMENTED(); return -1; | 3436 default: UNIMPLEMENTED(); return -1; |
| 3437 } | 3437 } |
| 3438 } | 3438 } |
| 3439 | 3439 |
| 3440 | 3440 |
| 3441 #undef __ | 3441 #undef __ |
| 3442 | 3442 |
| 3443 } // namespace dart | 3443 } // namespace dart |
| OLD | NEW |