OLD | NEW |
---|---|
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/native_entry.h" | 5 #include "vm/native_entry.h" |
6 #include "vm/object.h" | 6 #include "vm/object.h" |
7 #include "vm/object_store.h" | 7 #include "vm/object_store.h" |
8 #include "vm/snapshot.h" | 8 #include "vm/snapshot.h" |
9 #include "vm/stub_code.h" | 9 #include "vm/stub_code.h" |
10 #include "vm/symbols.h" | 10 #include "vm/symbols.h" |
(...skipping 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1278 | 1278 |
1279 // Instructions will be written pre-marked and in the VM heap. Write out | 1279 // Instructions will be written pre-marked and in the VM heap. Write out |
1280 // the tags we expect to find when reading the snapshot for a sanity check | 1280 // the tags we expect to find when reading the snapshot for a sanity check |
1281 // that our offsets/alignment didn't get out of sync. | 1281 // that our offsets/alignment didn't get out of sync. |
1282 uword written_tags = writer->GetObjectTags(this); | 1282 uword written_tags = writer->GetObjectTags(this); |
1283 written_tags = RawObject::VMHeapObjectTag::update(true, written_tags); | 1283 written_tags = RawObject::VMHeapObjectTag::update(true, written_tags); |
1284 written_tags = RawObject::MarkBit::update(true, written_tags); | 1284 written_tags = RawObject::MarkBit::update(true, written_tags); |
1285 writer->Write<intptr_t>(written_tags); | 1285 writer->Write<intptr_t>(written_tags); |
1286 | 1286 |
1287 writer->Write<int32_t>(writer->GetInstructionsId(this)); | 1287 writer->Write<int32_t>(writer->GetInstructionsId(this)); |
1288 writer->WriteObjectImpl(ptr()->code_, kAsReference); | |
rmacnak
2015/09/29 16:50:12
Remove.
Cutch
2015/09/29 23:24:29
Done.
| |
1288 } | 1289 } |
1289 | 1290 |
1290 | 1291 |
1291 RawObjectPool* ObjectPool::ReadFrom(SnapshotReader* reader, | 1292 RawObjectPool* ObjectPool::ReadFrom(SnapshotReader* reader, |
1292 intptr_t object_id, | 1293 intptr_t object_id, |
1293 intptr_t tags, | 1294 intptr_t tags, |
1294 Snapshot::Kind kind) { | 1295 Snapshot::Kind kind) { |
1295 ASSERT(reader->snapshot_code()); | 1296 ASSERT(reader->snapshot_code()); |
1296 ASSERT(kind == Snapshot::kFull); | 1297 ASSERT(kind == Snapshot::kFull); |
1297 | 1298 |
(...skipping 1985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3283 // We do not allow objects with native fields in an isolate message. | 3284 // We do not allow objects with native fields in an isolate message. |
3284 writer->SetWriteException(Exceptions::kArgument, | 3285 writer->SetWriteException(Exceptions::kArgument, |
3285 "Illegal argument in isolate message" | 3286 "Illegal argument in isolate message" |
3286 " : (object is a UserTag)"); | 3287 " : (object is a UserTag)"); |
3287 } else { | 3288 } else { |
3288 UNREACHABLE(); | 3289 UNREACHABLE(); |
3289 } | 3290 } |
3290 } | 3291 } |
3291 | 3292 |
3292 } // namespace dart | 3293 } // namespace dart |
OLD | NEW |