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/bigint_operations.h" | 5 #include "vm/bigint_operations.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 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 if (kind == Snapshot::kFull) { | 453 if (kind == Snapshot::kFull) { |
454 *reader->ArrayHandle() ^= reader->ReadObjectImpl(); | 454 *reader->ArrayHandle() ^= reader->ReadObjectImpl(); |
455 type_arguments.set_instantiations(*reader->ArrayHandle()); | 455 type_arguments.set_instantiations(*reader->ArrayHandle()); |
456 } else { | 456 } else { |
457 type_arguments.set_instantiations(Object::zero_array()); | 457 type_arguments.set_instantiations(Object::zero_array()); |
458 } | 458 } |
459 | 459 |
460 // Now set all the type fields. | 460 // Now set all the type fields. |
461 for (intptr_t i = 0; i < len; i++) { | 461 for (intptr_t i = 0; i < len; i++) { |
462 *reader->TypeHandle() ^= reader->ReadObjectImpl(); | 462 *reader->TypeHandle() ^= reader->ReadObjectImpl(); |
463 type_arguments.set_type_at(i, *reader->TypeHandle()); | 463 type_arguments.SetTypeAt(i, *reader->TypeHandle()); |
464 } | 464 } |
465 | 465 |
466 // If object needs to be a canonical object, Canonicalize it. | 466 // If object needs to be a canonical object, Canonicalize it. |
467 // When reading a full snapshot we don't need to canonicalize the object | 467 // When reading a full snapshot we don't need to canonicalize the object |
468 // as it would already be a canonical object. | 468 // as it would already be a canonical object. |
469 // When reading a script snapshot we need to canonicalize only those object | 469 // When reading a script snapshot we need to canonicalize only those object |
470 // references that are objects from the core library (loaded from a | 470 // references that are objects from the core library (loaded from a |
471 // full snapshot). Objects that are only in the script need not be | 471 // full snapshot). Objects that are only in the script need not be |
472 // canonicalized as they are already canonical. | 472 // canonicalized as they are already canonical. |
473 // When reading a message snapshot we always have to canonicalize the object. | 473 // When reading a message snapshot we always have to canonicalize the object. |
(...skipping 2213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2687 // We do not allow objects with native fields in an isolate message. | 2687 // We do not allow objects with native fields in an isolate message. |
2688 writer->SetWriteException(Exceptions::kArgument, | 2688 writer->SetWriteException(Exceptions::kArgument, |
2689 "Illegal argument in isolate message" | 2689 "Illegal argument in isolate message" |
2690 " : (object is a MirrorReference)"); | 2690 " : (object is a MirrorReference)"); |
2691 } else { | 2691 } else { |
2692 UNREACHABLE(); | 2692 UNREACHABLE(); |
2693 } | 2693 } |
2694 } | 2694 } |
2695 | 2695 |
2696 } // namespace dart | 2696 } // namespace dart |
OLD | NEW |