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

Side by Side Diff: runtime/vm/bigint_operations.cc

Issue 9209001: Move utils.h and utils.cc from runtime/vm to runtime/platform (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addresed new comments from ager@ Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/assembler_x64.h ('k') | runtime/vm/bigint_store.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/bigint_operations.h" 5 #include "vm/bigint_operations.h"
6 6
7 #include <openssl/crypto.h> 7 #include <openssl/crypto.h>
8 8
9 #include "platform/utils.h"
9 #include "vm/bigint_store.h" 10 #include "vm/bigint_store.h"
10 #include "vm/double_internals.h" 11 #include "vm/double_internals.h"
11 #include "vm/exceptions.h" 12 #include "vm/exceptions.h"
12 #include "vm/utils.h"
13 #include "vm/zone.h" 13 #include "vm/zone.h"
14 14
15 namespace dart { 15 namespace dart {
16 16
17 bool Bigint::IsZero() const { return BN_is_zero(BNAddr()); } 17 bool Bigint::IsZero() const { return BN_is_zero(BNAddr()); }
18 bool Bigint::IsNegative() const { return !!BNAddr()->neg; } 18 bool Bigint::IsNegative() const { return !!BNAddr()->neg; }
19 19
20 20
21 void Bigint::SetSign(bool is_negative) const { 21 void Bigint::SetSign(bool is_negative) const {
22 BIGNUM* bn = MutableBNAddr(); 22 BIGNUM* bn = MutableBNAddr();
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 result.ToggleSign(); 627 result.ToggleSign();
628 return result.raw(); 628 return result.raw();
629 } 629 }
630 630
631 631
632 int BigintOperations::Compare(const Bigint& a, const Bigint& b) { 632 int BigintOperations::Compare(const Bigint& a, const Bigint& b) {
633 return BN_cmp(a.BNAddr(), b.BNAddr()); 633 return BN_cmp(a.BNAddr(), b.BNAddr());
634 } 634 }
635 635
636 } // namespace dart 636 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/assembler_x64.h ('k') | runtime/vm/bigint_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698