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

Unified Diff: runtime/vm/snapshot.cc

Issue 509153003: New bigint implementation in the vm. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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
Index: runtime/vm/snapshot.cc
===================================================================
--- runtime/vm/snapshot.cc (revision 40060)
+++ runtime/vm/snapshot.cc (working copy)
@@ -5,7 +5,6 @@
#include "vm/snapshot.h"
#include "platform/assert.h"
-#include "vm/bigint_operations.h"
#include "vm/bootstrap.h"
#include "vm/class_finalizer.h"
#include "vm/exceptions.h"
@@ -156,7 +155,7 @@
intptr_t BaseReader::ReadSmiValue() {
- return Smi::Value(ReadAsSmi());
+ return Smi::Value(ReadAsSmi());
}
@@ -617,19 +616,6 @@
}
-RawBigint* SnapshotReader::NewBigint(const char* hex_string) {
- ASSERT(kind_ == Snapshot::kFull);
- ASSERT(isolate()->no_gc_scope_depth() != 0);
- intptr_t bigint_length = BigintOperations::ComputeChunkLength(hex_string);
- RawBigint* obj = reinterpret_cast<RawBigint*>(
- AllocateUninitialized(kBigintCid, Bigint::InstanceSize(bigint_length)));
- obj->ptr()->allocated_length_ = bigint_length;
- obj->ptr()->signed_length_ = bigint_length;
- BigintOperations::FromHexCString(hex_string, Bigint::Handle(obj));
- return obj;
-}
-
-
RawDouble* SnapshotReader::NewDouble(double value) {
ASSERT(kind_ == Snapshot::kFull);
ASSERT(isolate()->no_gc_scope_depth() != 0);
@@ -658,6 +644,11 @@
AllocateUninitialized(k##type##Cid, type::InstanceSize())); \
+RawBigint* SnapshotReader::NewBigint() {
+ ALLOC_NEW_OBJECT(Bigint);
+}
+
+
RawUnresolvedClass* SnapshotReader::NewUnresolvedClass() {
ALLOC_NEW_OBJECT(UnresolvedClass);
}

Powered by Google App Engine
This is Rietveld 408576698