Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(846)

Unified Diff: runtime/vm/object.cc

Issue 88983004: Support Bigint parameters in Int32x4 constructor (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« runtime/vm/object.h ('K') | « runtime/vm/object.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 82aed25681b2f2212561c6c3452b3ceb78d5d780..a7c1d931b70b065583d6114ebeef7574d0ee99d6 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -12821,6 +12821,12 @@ int64_t Integer::AsInt64Value() const {
}
+int32_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 {
}
+int32_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 {
}
+int32_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 {
}
+int32_t Bigint::AsTruncatedUint32Value() const {
+ return BigintOperations::TruncateToUint32(*this);
+}
+
+
// For positive values: Smi < Mint < Bigint.
int Bigint::CompareWith(const Integer& other) const {
ASSERT(!FitsIntoSmi(*this));
« runtime/vm/object.h ('K') | « runtime/vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698