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

Unified Diff: vm/raw_object_snapshot.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 | « vm/raw_object.cc ('k') | vm/snapshot_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/raw_object_snapshot.cc
===================================================================
--- vm/raw_object_snapshot.cc (revision 4707)
+++ vm/raw_object_snapshot.cc (working copy)
@@ -1181,8 +1181,18 @@
writer->WriteObjectHeader(ObjectStore::kBigintClass, ptr()->tags_);
// Write out the bigint value as a HEXCstring.
- ptr()->bn_.d = ptr()->data_;
- const char* str = BigintOperations::ToHexCString(&ptr()->bn_, &ZoneAllocator);
+ intptr_t length = ptr()->signed_length_;
+ bool is_negative = false;
+ if (length <= 0) {
+ length = -length;
+ is_negative = true;
+ }
+ uword data_start = reinterpret_cast<uword>(ptr()) + sizeof(RawBigint);
+ const char* str = BigintOperations::ToHexCString(
+ length,
+ is_negative,
+ reinterpret_cast<void*>(data_start),
+ &ZoneAllocator);
bool neg = false;
if (*str == '-') {
neg = true;
« no previous file with comments | « vm/raw_object.cc ('k') | vm/snapshot_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698