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

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

Issue 151773006: Write the type arguments instantiations field to full snapshots only. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/raw_object_snapshot.cc » ('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/bigint_operations.h" 5 #include "vm/bigint_operations.h"
6 #include "vm/dart_api_message.h" 6 #include "vm/dart_api_message.h"
7 #include "vm/object.h" 7 #include "vm/object.h"
8 #include "vm/snapshot_ids.h" 8 #include "vm/snapshot_ids.h"
9 #include "vm/symbols.h" 9 #include "vm/symbols.h"
10 #include "vm/unicode.h" 10 #include "vm/unicode.h"
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 Dart_CObject_kString); 480 Dart_CObject_kString);
481 return object; 481 return object;
482 } 482 }
483 case kTypeArgumentsCid: { 483 case kTypeArgumentsCid: {
484 // TODO(sjesse): Remove this when message serialization format is 484 // TODO(sjesse): Remove this when message serialization format is
485 // updated (currently length is leaked). 485 // updated (currently length is leaked).
486 Dart_CObject* value = &type_arguments_marker; 486 Dart_CObject* value = &type_arguments_marker;
487 AddBackRef(object_id, value, kIsDeserialized); 487 AddBackRef(object_id, value, kIsDeserialized);
488 Dart_CObject* length = ReadObjectImpl(); 488 Dart_CObject* length = ReadObjectImpl();
489 ASSERT(length->type == Dart_CObject_kInt32); 489 ASSERT(length->type == Dart_CObject_kInt32);
490 ReadObjectImpl(); // Read and skip instantiations_ field. 490 // The instantiations_ field is only written to a full snapshot.
491 for (int i = 0; i < length->value.as_int32; i++) { 491 for (int i = 0; i < length->value.as_int32; i++) {
492 Dart_CObject* type = ReadObjectImpl(); 492 Dart_CObject* type = ReadObjectImpl();
493 if (type != &dynamic_type_marker) { 493 if (type != &dynamic_type_marker) {
494 return AllocateDartCObjectUnsupported(); 494 return AllocateDartCObjectUnsupported();
495 } 495 }
496 } 496 }
497 return value; 497 return value;
498 } 498 }
499 case kTypeParameterCid: { 499 case kTypeParameterCid: {
500 // TODO(sgjesse): Fix this workaround ignoring the type parameter. 500 // TODO(sgjesse): Fix this workaround ignoring the type parameter.
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
1173 if (!success) { 1173 if (!success) {
1174 UnmarkAllCObjects(object); 1174 UnmarkAllCObjects(object);
1175 return false; 1175 return false;
1176 } 1176 }
1177 } 1177 }
1178 UnmarkAllCObjects(object); 1178 UnmarkAllCObjects(object);
1179 return true; 1179 return true;
1180 } 1180 }
1181 1181
1182 } // namespace dart 1182 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698