Chromium Code Reviews| Index: runtime/vm/intermediate_language.cc |
| =================================================================== |
| --- runtime/vm/intermediate_language.cc (revision 22973) |
| +++ runtime/vm/intermediate_language.cc (working copy) |
| @@ -4,6 +4,7 @@ |
| #include "vm/intermediate_language.h" |
| +#include "vm/bigint_operations.h" |
| #include "vm/bit_vector.h" |
| #include "vm/dart_entry.h" |
| #include "vm/flow_graph_allocator.h" |
| @@ -193,6 +194,16 @@ |
| } |
| +ConstantInstr::ConstantInstr(const Object& value) : value_(value) { |
| + // 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.
|
| + ASSERT(!value.IsBigint() || |
| + !BigintOperations::FitsIntoSmi(Bigint::Cast(value))); |
| + ASSERT(!value.IsBigint() || |
| + !BigintOperations::FitsIntoInt64(Bigint::Cast(value))); |
| + ASSERT(!value.IsMint() || !Smi::IsValid64(Mint::Cast(value).AsInt64Value())); |
| +} |
| + |
| + |
| bool ConstantInstr::AttributesEqual(Instruction* other) const { |
| ConstantInstr* other_constant = other->AsConstant(); |
| ASSERT(other_constant != NULL); |