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

Unified Diff: vm/snapshot.cc

Issue 9835074: Fix for issue 2233 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 9 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/snapshot.h ('k') | vm/snapshot_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/snapshot.cc
===================================================================
--- vm/snapshot.cc (revision 5801)
+++ vm/snapshot.cc (working copy)
@@ -5,6 +5,7 @@
#include "vm/snapshot.h"
#include "platform/assert.h"
+#include "vm/bigint_operations.h"
#include "vm/bootstrap.h"
#include "vm/exceptions.h"
#include "vm/heap.h"
@@ -243,6 +244,18 @@
}
+RawBigint* SnapshotReader::NewBigint(const char* hex_string) {
+ ASSERT(kind_ == Snapshot::kFull);
+ ASSERT(isolate()->no_gc_scope_depth() != 0);
+ cls_ = object_store()->bigint_class();
+ intptr_t bigint_length = BigintOperations::ComputeChunkLength(hex_string);
+ const Bigint& result = Bigint::Handle(reinterpret_cast<RawBigint*>(
+ AllocateUninitialized(cls_, Bigint::InstanceSize(bigint_length))));
+ BigintOperations::FromHexCString(hex_string, result);
+ return result.raw();
+}
+
+
RawDouble* SnapshotReader::NewDouble(double value) {
ASSERT(kind_ == Snapshot::kFull);
ASSERT(isolate()->no_gc_scope_depth() != 0);
« no previous file with comments | « vm/snapshot.h ('k') | vm/snapshot_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698