Chromium Code Reviews| 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_)); | |
|
srdjan
2012/09/12 07:06:40
Also assert that result_cid is the same if offset
Florian Schneider
2012/09/12 08:27:29
Done.
| |
| 80 return offset_in_bytes() == other_load->offset_in_bytes(); | |
| 81 } | |
| 82 | |
| 83 | |
| 75 // Returns true if the value represents a constant. | 84 // Returns true if the value represents a constant. |
| 76 bool Value::BindsToConstant() const { | 85 bool Value::BindsToConstant() const { |
| 77 return definition()->IsConstant(); | 86 return definition()->IsConstant(); |
| 78 } | 87 } |
| 79 | 88 |
| 80 | 89 |
| 81 // Returns true if the value represents constant null. | 90 // Returns true if the value represents constant null. |
| 82 bool Value::BindsToConstantNull() const { | 91 bool Value::BindsToConstantNull() const { |
| 83 ConstantInstr* constant = definition()->AsConstant(); | 92 ConstantInstr* constant = definition()->AsConstant(); |
| 84 return (constant != NULL) && constant->value().IsNull(); | 93 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++); | 1663 value->set_use_index(use_index++); |
| 1655 value->AddToEnvUseList(); | 1664 value->AddToEnvUseList(); |
| 1656 } | 1665 } |
| 1657 instr->set_env(copy); | 1666 instr->set_env(copy); |
| 1658 } | 1667 } |
| 1659 | 1668 |
| 1660 | 1669 |
| 1661 #undef __ | 1670 #undef __ |
| 1662 | 1671 |
| 1663 } // namespace dart | 1672 } // namespace dart |
| OLD | NEW |