Chromium Code Reviews| 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/bit_vector.h" | 8 #include "vm/bit_vector.h" |
| 8 #include "vm/dart_entry.h" | 9 #include "vm/dart_entry.h" |
| 9 #include "vm/flow_graph_allocator.h" | 10 #include "vm/flow_graph_allocator.h" |
| 10 #include "vm/flow_graph_builder.h" | 11 #include "vm/flow_graph_builder.h" |
| 11 #include "vm/flow_graph_compiler.h" | 12 #include "vm/flow_graph_compiler.h" |
| 12 #include "vm/flow_graph_optimizer.h" | 13 #include "vm/flow_graph_optimizer.h" |
| 13 #include "vm/locations.h" | 14 #include "vm/locations.h" |
| 14 #include "vm/object.h" | 15 #include "vm/object.h" |
| 15 #include "vm/object_store.h" | 16 #include "vm/object_store.h" |
| 16 #include "vm/os.h" | 17 #include "vm/os.h" |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 186 } | 187 } |
| 187 | 188 |
| 188 | 189 |
| 189 bool LoadIndexedInstr::AttributesEqual(Instruction* other) const { | 190 bool LoadIndexedInstr::AttributesEqual(Instruction* other) const { |
| 190 LoadIndexedInstr* other_load = other->AsLoadIndexed(); | 191 LoadIndexedInstr* other_load = other->AsLoadIndexed(); |
| 191 ASSERT(other_load != NULL); | 192 ASSERT(other_load != NULL); |
| 192 return class_id() == other_load->class_id(); | 193 return class_id() == other_load->class_id(); |
| 193 } | 194 } |
| 194 | 195 |
| 195 | 196 |
| 197 ConstantInstr::ConstantInstr(const Object& value) : value_(value) { | |
| 198 // Check that the value is not an incorrect Integer presentation. | |
|
Kevin Millikin (Google)
2013/05/22 07:50:35
presentation ==> representation?
srdjan
2013/05/22 15:13:33
Done.
| |
| 199 ASSERT(!value.IsBigint() || | |
| 200 !BigintOperations::FitsIntoSmi(Bigint::Cast(value))); | |
| 201 ASSERT(!value.IsBigint() || | |
| 202 !BigintOperations::FitsIntoInt64(Bigint::Cast(value))); | |
| 203 ASSERT(!value.IsMint() || !Smi::IsValid64(Mint::Cast(value).AsInt64Value())); | |
| 204 } | |
| 205 | |
| 206 | |
| 196 bool ConstantInstr::AttributesEqual(Instruction* other) const { | 207 bool ConstantInstr::AttributesEqual(Instruction* other) const { |
| 197 ConstantInstr* other_constant = other->AsConstant(); | 208 ConstantInstr* other_constant = other->AsConstant(); |
| 198 ASSERT(other_constant != NULL); | 209 ASSERT(other_constant != NULL); |
| 199 return (value().raw() == other_constant->value().raw()); | 210 return (value().raw() == other_constant->value().raw()); |
| 200 } | 211 } |
| 201 | 212 |
| 202 | 213 |
| 203 // Returns true if the value represents a constant. | 214 // Returns true if the value represents a constant. |
| 204 bool Value::BindsToConstant() const { | 215 bool Value::BindsToConstant() const { |
| 205 return definition()->IsConstant(); | 216 return definition()->IsConstant(); |
| (...skipping 2233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2439 default: | 2450 default: |
| 2440 UNREACHABLE(); | 2451 UNREACHABLE(); |
| 2441 } | 2452 } |
| 2442 return kPowRuntimeEntry; | 2453 return kPowRuntimeEntry; |
| 2443 } | 2454 } |
| 2444 | 2455 |
| 2445 | 2456 |
| 2446 #undef __ | 2457 #undef __ |
| 2447 | 2458 |
| 2448 } // namespace dart | 2459 } // namespace dart |
| OLD | NEW |