| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/dart_entry.h" | 8 #include "vm/dart_entry.h" |
| 9 #include "vm/flow_graph_allocator.h" | 9 #include "vm/flow_graph_allocator.h" |
| 10 #include "vm/flow_graph_builder.h" | 10 #include "vm/flow_graph_builder.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 } | 65 } |
| 66 | 66 |
| 67 | 67 |
| 68 bool CheckArrayBoundInstr::AttributesEqual(Definition* other) const { | 68 bool CheckArrayBoundInstr::AttributesEqual(Definition* other) const { |
| 69 CheckArrayBoundInstr* other_check = other->AsCheckArrayBound(); | 69 CheckArrayBoundInstr* other_check = other->AsCheckArrayBound(); |
| 70 ASSERT(other_check != NULL); | 70 ASSERT(other_check != NULL); |
| 71 return array_type() == other_check->array_type(); | 71 return array_type() == other_check->array_type(); |
| 72 } | 72 } |
| 73 | 73 |
| 74 | 74 |
| 75 bool LoadVMFieldInstr::AttributesEqual(Definition* other) const { |
| 76 LoadVMFieldInstr* other_load = other->AsLoadVMField(); |
| 77 ASSERT(other_load != NULL); |
| 78 ASSERT((offset_in_bytes() != other_load->offset_in_bytes()) || |
| 79 ((immutable_ == other_load->immutable_) && |
| 80 (ResultCid() == other_load->ResultCid()))); |
| 81 return offset_in_bytes() == other_load->offset_in_bytes(); |
| 82 } |
| 83 |
| 84 |
| 75 // Returns true if the value represents a constant. | 85 // Returns true if the value represents a constant. |
| 76 bool Value::BindsToConstant() const { | 86 bool Value::BindsToConstant() const { |
| 77 return definition()->IsConstant(); | 87 return definition()->IsConstant(); |
| 78 } | 88 } |
| 79 | 89 |
| 80 | 90 |
| 81 // Returns true if the value represents constant null. | 91 // Returns true if the value represents constant null. |
| 82 bool Value::BindsToConstantNull() const { | 92 bool Value::BindsToConstantNull() const { |
| 83 ConstantInstr* constant = definition()->AsConstant(); | 93 ConstantInstr* constant = definition()->AsConstant(); |
| 84 return (constant != NULL) && constant->value().IsNull(); | 94 return (constant != NULL) && constant->value().IsNull(); |
| (...skipping 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1654 value->set_use_index(use_index++); | 1664 value->set_use_index(use_index++); |
| 1655 value->AddToEnvUseList(); | 1665 value->AddToEnvUseList(); |
| 1656 } | 1666 } |
| 1657 instr->set_env(copy); | 1667 instr->set_env(copy); |
| 1658 } | 1668 } |
| 1659 | 1669 |
| 1660 | 1670 |
| 1661 #undef __ | 1671 #undef __ |
| 1662 | 1672 |
| 1663 } // namespace dart | 1673 } // namespace dart |
| OLD | NEW |