| Index: runtime/vm/object.cc
|
| diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
|
| index 82aed25681b2f2212561c6c3452b3ceb78d5d780..482412567e7c2219a01c29ae59038054e8bd10f7 100644
|
| --- a/runtime/vm/object.cc
|
| +++ b/runtime/vm/object.cc
|
| @@ -12821,6 +12821,12 @@ int64_t Integer::AsInt64Value() const {
|
| }
|
|
|
|
|
| +uint32_t Integer::AsTruncatedUint32Value() const {
|
| + UNIMPLEMENTED();
|
| + return 0;
|
| +}
|
| +
|
| +
|
| int Integer::CompareWith(const Integer& other) const {
|
| UNIMPLEMENTED();
|
| return 0;
|
| @@ -13090,6 +13096,11 @@ int64_t Smi::AsInt64Value() const {
|
| }
|
|
|
|
|
| +uint32_t Smi::AsTruncatedUint32Value() const {
|
| + return this->Value() & 0xFFFFFFFF;
|
| +}
|
| +
|
| +
|
| static bool FitsIntoSmi(const Integer& integer) {
|
| if (integer.IsSmi()) {
|
| return true;
|
| @@ -13223,6 +13234,11 @@ int64_t Mint::AsInt64Value() const {
|
| }
|
|
|
|
|
| +uint32_t Mint::AsTruncatedUint32Value() const {
|
| + return this->value() & 0xFFFFFFFF;
|
| +}
|
| +
|
| +
|
| int Mint::CompareWith(const Integer& other) const {
|
| ASSERT(!FitsIntoSmi(*this));
|
| if (other.IsMint() || other.IsSmi()) {
|
| @@ -13490,6 +13506,11 @@ int64_t Bigint::AsInt64Value() const {
|
| }
|
|
|
|
|
| +uint32_t Bigint::AsTruncatedUint32Value() const {
|
| + return BigintOperations::TruncateToUint32(*this);
|
| +}
|
| +
|
| +
|
| // For positive values: Smi < Mint < Bigint.
|
| int Bigint::CompareWith(const Integer& other) const {
|
| ASSERT(!FitsIntoSmi(*this));
|
|
|