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

Unified Diff: lib/integers.cc

Issue 9481019: Changes to get rid of dependency on openssl in the dart VM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 10 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 | « bin/bin.gypi ('k') | platform/globals.h » ('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 4707)
+++ lib/integers.cc (working copy)
@@ -34,8 +34,8 @@
big_value ^= value.raw();
if (BigintOperations::FitsIntoSmi(big_value)) {
return BigintOperations::ToSmi(big_value);
- } else if (BigintOperations::FitsIntoInt64(big_value)) {
- return Mint::New(BigintOperations::ToInt64(big_value));
+ } else if (BigintOperations::FitsIntoMint(big_value)) {
+ return Mint::New(BigintOperations::ToMint(big_value));
} else {
return big_value.raw();
}
@@ -105,22 +105,6 @@
default:
UNIMPLEMENTED();
}
- } else if (op1_int.IsSmi()) {
- return IntegerBitOperation(kind, op2_int, op1_int);
- } else if (op2_int.IsSmi()) {
- Bigint& op1 = Bigint::Handle(AsBigint(op1_int));
- Smi& op2 = Smi::Handle();
- op2 ^= op2_int.raw();
- switch (kind) {
- case Token::kBIT_AND:
- return BigintOperations::BitAndWithSmi(op1, op2);
- case Token::kBIT_OR:
- return BigintOperations::BitOrWithSmi(op1, op2);
- case Token::kBIT_XOR:
- return BigintOperations::BitXorWithSmi(op1, op2);
- default:
- UNIMPLEMENTED();
- }
} else {
Bigint& op1 = Bigint::Handle(AsBigint(op1_int));
Bigint& op2 = Bigint::Handle(AsBigint(op2_int));
@@ -146,7 +130,7 @@
Bigint& bigint = Bigint::Handle();
bigint ^= i.raw();
return !BigintOperations::FitsIntoSmi(bigint) &&
- !BigintOperations::FitsIntoInt64(bigint);
+ !BigintOperations::FitsIntoMint(bigint);
}
if (i.IsMint()) {
Mint& mint = Mint::Handle();
« no previous file with comments | « bin/bin.gypi ('k') | platform/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698