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

Unified Diff: lib/integers.cc

Issue 12052033: Added macros OBJECT_IMPLEMENTATION and FINAL_OBJECT_IMPLEMENTATION (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 7 years, 11 months 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
« no previous file with comments | « lib/byte_array.cc ('k') | lib/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/integers.cc
===================================================================
--- lib/integers.cc (revision 17436)
+++ lib/integers.cc (working copy)
@@ -22,14 +22,12 @@
// when it could have been a Smi.
static bool CheckInteger(const Integer& i) {
if (i.IsBigint()) {
- Bigint& bigint = Bigint::Handle();
- bigint |= i.raw();
+ const Bigint& bigint = Bigint::Cast(i);
return !BigintOperations::FitsIntoSmi(bigint) &&
!BigintOperations::FitsIntoMint(bigint);
}
if (i.IsMint()) {
- Mint& mint = Mint::Handle();
- mint |= i.raw();
+ const Mint& mint = Mint::Cast(i);
return !Smi::IsValid64(mint.value());
}
return true;
@@ -217,8 +215,7 @@
Exceptions::ThrowByType(Exceptions::kArgument, args);
}
if (value.IsSmi()) {
- Smi& smi_value = Smi::Handle();
- smi_value |= value.raw();
+ const Smi& smi_value = Smi::Cast(value);
return smi_value.ShiftOp(kind, amount);
}
Bigint& big_value = Bigint::Handle();
@@ -240,7 +237,7 @@
}
} else {
ASSERT(value.IsBigint());
- big_value |= value.raw();
+ big_value = Bigint::Cast(value).raw();
}
switch (kind) {
case Token::kSHL:
« no previous file with comments | « lib/byte_array.cc ('k') | lib/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698