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

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

Issue 1221503004: Reclaim the CreatedFromSnapshot bit and use it to indicate VM Heap object (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address-code-review-comments Created 5 years, 4 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 | « no previous file | runtime/vm/object.h » ('j') | 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/dart_api_message.h" 5 #include "vm/dart_api_message.h"
6 #include "vm/object.h" 6 #include "vm/object.h"
7 #include "vm/snapshot_ids.h" 7 #include "vm/snapshot_ids.h"
8 #include "vm/symbols.h" 8 #include "vm/symbols.h"
9 #include "vm/unicode.h" 9 #include "vm/unicode.h"
10 10
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 } 528 }
529 // No other VM isolate objects are supported. 529 // No other VM isolate objects are supported.
530 return AllocateDartCObjectNull(); 530 return AllocateDartCObjectNull();
531 } 531 }
532 532
533 533
534 Dart_CObject* ApiMessageReader::ReadInternalVMObject(intptr_t class_id, 534 Dart_CObject* ApiMessageReader::ReadInternalVMObject(intptr_t class_id,
535 intptr_t object_id) { 535 intptr_t object_id) {
536 switch (class_id) { 536 switch (class_id) {
537 case kClassCid: { 537 case kClassCid: {
538 Read<bool>(); // Consume the is_in_fullsnapshot indicator.
538 Dart_CObject_Internal* object = AllocateDartCObjectClass(); 539 Dart_CObject_Internal* object = AllocateDartCObjectClass();
539 AddBackRef(object_id, object, kIsDeserialized); 540 AddBackRef(object_id, object, kIsDeserialized);
540 object->internal.as_class.library_url = ReadObjectImpl(); 541 object->internal.as_class.library_url = ReadObjectImpl();
541 ASSERT(object->internal.as_class.library_url->type == 542 ASSERT(object->internal.as_class.library_url->type ==
542 Dart_CObject_kString); 543 Dart_CObject_kString);
543 object->internal.as_class.class_name = ReadObjectImpl(); 544 object->internal.as_class.class_name = ReadObjectImpl();
544 ASSERT(object->internal.as_class.class_name->type == 545 ASSERT(object->internal.as_class.class_name->type ==
545 Dart_CObject_kString); 546 Dart_CObject_kString);
546 return object; 547 return object;
547 } 548 }
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
1315 if (!success) { 1316 if (!success) {
1316 UnmarkAllCObjects(object); 1317 UnmarkAllCObjects(object);
1317 return false; 1318 return false;
1318 } 1319 }
1319 } 1320 }
1320 UnmarkAllCObjects(object); 1321 UnmarkAllCObjects(object);
1321 return true; 1322 return true;
1322 } 1323 }
1323 1324
1324 } // namespace dart 1325 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698