| 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 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1572 | 1572 |
| 1573 return unary_checks().HasReceiverClassId(value_cid) ? NULL : this; | 1573 return unary_checks().HasReceiverClassId(value_cid) ? NULL : this; |
| 1574 } | 1574 } |
| 1575 | 1575 |
| 1576 | 1576 |
| 1577 Instruction* GuardFieldInstr::Canonicalize(FlowGraph* flow_graph) { | 1577 Instruction* GuardFieldInstr::Canonicalize(FlowGraph* flow_graph) { |
| 1578 if (field().guarded_cid() == kDynamicCid) { | 1578 if (field().guarded_cid() == kDynamicCid) { |
| 1579 return NULL; // Nothing to guard. | 1579 return NULL; // Nothing to guard. |
| 1580 } | 1580 } |
| 1581 | 1581 |
| 1582 if (field().guarded_list_length() != Field::kNoFixedLength) { |
| 1583 // We are still guarding the list length. |
| 1584 return this; |
| 1585 } |
| 1586 |
| 1582 if (field().is_nullable() && value()->Type()->IsNull()) { | 1587 if (field().is_nullable() && value()->Type()->IsNull()) { |
| 1583 return NULL; | 1588 return NULL; |
| 1584 } | 1589 } |
| 1585 | 1590 |
| 1586 const intptr_t cid = field().is_nullable() ? value()->Type()->ToNullableCid() | 1591 const intptr_t cid = field().is_nullable() ? value()->Type()->ToNullableCid() |
| 1587 : value()->Type()->ToCid(); | 1592 : value()->Type()->ToCid(); |
| 1588 if (field().guarded_cid() == cid) { | 1593 if (field().guarded_cid() == cid) { |
| 1589 return NULL; // Value is guaranteed to have this cid. | 1594 return NULL; // Value is guaranteed to have this cid. |
| 1590 } | 1595 } |
| 1591 | 1596 |
| (...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2663 return kCosRuntimeEntry; | 2668 return kCosRuntimeEntry; |
| 2664 default: | 2669 default: |
| 2665 UNREACHABLE(); | 2670 UNREACHABLE(); |
| 2666 } | 2671 } |
| 2667 return kSinRuntimeEntry; | 2672 return kSinRuntimeEntry; |
| 2668 } | 2673 } |
| 2669 | 2674 |
| 2670 #undef __ | 2675 #undef __ |
| 2671 | 2676 |
| 2672 } // namespace dart | 2677 } // namespace dart |
| OLD | NEW |