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

Unified Diff: runtime/vm/snapshot.cc

Issue 2005723004: Fraction class prototype and test (not to be committed). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: work in progress Created 4 years, 5 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 | « runtime/vm/snapshot.h ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/snapshot.cc
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc
index 41959955949172ca7d6645626533c034a5227e5f..5baf6f4749594d1433893215a76a9d42eeff9d26 100644
--- a/runtime/vm/snapshot.cc
+++ b/runtime/vm/snapshot.cc
@@ -354,6 +354,7 @@ void SnapshotReader::SetReadException(const char* msg) {
result = DartLibraryCalls::InstanceCreate(library,
Symbols::ArgumentError(),
Symbols::Dot(),
+ false, // Not a factory.
args);
const Stacktrace& stacktrace = Stacktrace::Handle(zone());
const UnhandledException& error = UnhandledException::Handle(
@@ -890,7 +891,7 @@ RawTypedData* SnapshotReader::NewTypedData(intptr_t class_id, intptr_t len) {
#define ALLOC_NEW_OBJECT(type) \
- ASSERT(Snapshot::IsFull(kind_)); \
+ ASSERT(Snapshot::IsFull(kind_)); \
ASSERT_NO_SAFEPOINT_SCOPE(); \
return reinterpret_cast<Raw##type*>( \
AllocateUninitialized(k##type##Cid, type::InstanceSize())); \
@@ -901,6 +902,11 @@ RawBigint* SnapshotReader::NewBigint() {
}
+RawFraction* SnapshotReader::NewFraction() {
+ ALLOC_NEW_OBJECT(Fraction);
+}
+
+
RawUnresolvedClass* SnapshotReader::NewUnresolvedClass() {
ALLOC_NEW_OBJECT(UnresolvedClass);
}
@@ -1696,6 +1702,7 @@ uword SnapshotWriter::GetObjectTags(RawObject* raw) {
V(Mint) \
V(Bigint) \
V(Double) \
+ V(Fraction) \
V(ImmutableArray) \
#define VM_OBJECT_WRITE(clazz) \
« no previous file with comments | « runtime/vm/snapshot.h ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698