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

Side by Side Diff: runtime/vm/raw_object_snapshot.cc

Issue 2014913002: Tree-shaker: drop imports/exports in a way that doesn't break the vm-service. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 reader->Read<bool>()); 1293 reader->Read<bool>());
1294 prefix.StoreNonPointer(&prefix.raw_ptr()->is_loaded_, reader->Read<bool>()); 1294 prefix.StoreNonPointer(&prefix.raw_ptr()->is_loaded_, reader->Read<bool>());
1295 1295
1296 // Set all the object fields. 1296 // Set all the object fields.
1297 READ_OBJECT_FIELDS(prefix, 1297 READ_OBJECT_FIELDS(prefix,
1298 prefix.raw()->from(), 1298 prefix.raw()->from(),
1299 prefix.raw()->to_snapshot(kind), 1299 prefix.raw()->to_snapshot(kind),
1300 kAsReference); 1300 kAsReference);
1301 if (kind == Snapshot::kAppNoJIT) { 1301 if (kind == Snapshot::kAppNoJIT) {
1302 prefix.StorePointer(&prefix.raw_ptr()->imports_, 1302 prefix.StorePointer(&prefix.raw_ptr()->imports_,
1303 Array::null()); 1303 Object::empty_array().raw());
1304 } 1304 }
1305 prefix.StorePointer(&prefix.raw_ptr()->dependent_code_, 1305 prefix.StorePointer(&prefix.raw_ptr()->dependent_code_,
1306 Array::null()); 1306 Array::null());
1307 1307
1308 return prefix.raw(); 1308 return prefix.raw();
1309 } 1309 }
1310 1310
1311 1311
1312 void RawLibraryPrefix::WriteTo(SnapshotWriter* writer, 1312 void RawLibraryPrefix::WriteTo(SnapshotWriter* writer,
1313 intptr_t object_id, 1313 intptr_t object_id,
(...skipping 2466 matching lines...) Expand 10 before | Expand all | Expand 10 after
3780 // We do not allow objects with native fields in an isolate message. 3780 // We do not allow objects with native fields in an isolate message.
3781 writer->SetWriteException(Exceptions::kArgument, 3781 writer->SetWriteException(Exceptions::kArgument,
3782 "Illegal argument in isolate message" 3782 "Illegal argument in isolate message"
3783 " : (object is a UserTag)"); 3783 " : (object is a UserTag)");
3784 } else { 3784 } else {
3785 UNREACHABLE(); 3785 UNREACHABLE();
3786 } 3786 }
3787 } 3787 }
3788 3788
3789 } // namespace dart 3789 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698