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

Unified Diff: runtime/vm/snapshot_test.cc

Issue 1399663002: 1. Do not mark an object by storing the object id used during serialization in the object header. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: code-review-comments Created 5 years, 2 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.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/snapshot_test.cc
diff --git a/runtime/vm/snapshot_test.cc b/runtime/vm/snapshot_test.cc
index 6c04f3af2fb524f5a849a9a344f2b84dc7853bb5..51032964c47cb09de1988e8d30c872924cb6bfff 100644
--- a/runtime/vm/snapshot_test.cc
+++ b/runtime/vm/snapshot_test.cc
@@ -255,11 +255,11 @@ Dart_CObject* SerializeAndDeserializeMint(const Mint& mint) {
void CheckMint(int64_t value) {
+ ApiNativeScope scope;
StackZone zone(Thread::Current());
Mint& mint = Mint::Handle();
mint ^= Integer::New(value);
- ApiNativeScope scope;
Dart_CObject* mint_cobject = SerializeAndDeserializeMint(mint);
// On 64-bit platforms mints always require 64-bits as the smi range
// here covers most of the 64-bit range. On 32-bit platforms the smi
@@ -476,10 +476,10 @@ Dart_CObject* SerializeAndDeserializeBigint(const Bigint& bigint) {
void CheckBigint(const char* bigint_value) {
+ ApiNativeScope scope;
StackZone zone(Thread::Current());
Bigint& bigint = Bigint::Handle();
bigint ^= Bigint::NewFromCString(bigint_value);
- ApiNativeScope scope;
Dart_CObject* bigint_cobject = SerializeAndDeserializeBigint(bigint);
EXPECT_EQ(Dart_CObject_kBigint, bigint_cobject->type);
char* hex_value = TestCase::BigintToHexValue(bigint_cobject);
@@ -831,6 +831,7 @@ class TestSnapshotWriter : public SnapshotWriter {
static const intptr_t kInitialSize = 64 * KB;
TestSnapshotWriter(uint8_t** buffer, ReAlloc alloc)
: SnapshotWriter(Snapshot::kScript,
+ Thread::Current(),
buffer,
alloc,
kInitialSize,
@@ -839,7 +840,7 @@ class TestSnapshotWriter : public SnapshotWriter {
true, /* can_send_any_object */
false, /* snapshot_code */
true /* vm_isolate_is_symbolic */),
- forward_list_(kMaxPredefinedObjectIds) {
+ forward_list_(thread(), kMaxPredefinedObjectIds) {
ASSERT(buffer != NULL);
ASSERT(alloc != NULL);
}
@@ -848,7 +849,6 @@ class TestSnapshotWriter : public SnapshotWriter {
// Writes just a script object
void WriteScript(const Script& script) {
WriteObject(script.raw());
- UnmarkAll();
}
private:
« no previous file with comments | « runtime/vm/snapshot.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698