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/snapshot.h" | 5 #include "vm/snapshot.h" |
6 | 6 |
7 #include "platform/assert.h" | 7 #include "platform/assert.h" |
8 #include "vm/bigint_operations.h" | 8 #include "vm/bigint_operations.h" |
9 #include "vm/bootstrap.h" | 9 #include "vm/bootstrap.h" |
10 #include "vm/class_finalizer.h" | 10 #include "vm/class_finalizer.h" |
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
967 if (id == kClassCid) { | 967 if (id == kClassCid) { |
968 RawClass* raw_class = reinterpret_cast<RawClass*>(rawobj); | 968 RawClass* raw_class = reinterpret_cast<RawClass*>(rawobj); |
969 intptr_t class_id = raw_class->ptr()->id_; | 969 intptr_t class_id = raw_class->ptr()->id_; |
970 if (IsSingletonClassId(class_id)) { | 970 if (IsSingletonClassId(class_id)) { |
971 intptr_t object_id = ObjectIdFromClassId(class_id); | 971 intptr_t object_id = ObjectIdFromClassId(class_id); |
972 WriteVMIsolateObject(object_id); | 972 WriteVMIsolateObject(object_id); |
973 return; | 973 return; |
974 } | 974 } |
975 } | 975 } |
976 | 976 |
| 977 |
977 // Check it is a predefined symbol in the VM isolate. | 978 // Check it is a predefined symbol in the VM isolate. |
978 id = Symbols::LookupVMSymbol(rawobj); | 979 id = Symbols::LookupVMSymbol(rawobj); |
979 if (id != kInvalidIndex) { | 980 if (id != kInvalidIndex) { |
980 WriteVMIsolateObject(id); | 981 WriteVMIsolateObject(id); |
981 return; | 982 return; |
982 } | 983 } |
983 | 984 |
984 UNREACHABLE(); | 985 UNREACHABLE(); |
985 } | 986 } |
986 | 987 |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1518 NoGCScope no_gc; | 1519 NoGCScope no_gc; |
1519 WriteObject(obj.raw()); | 1520 WriteObject(obj.raw()); |
1520 UnmarkAll(); | 1521 UnmarkAll(); |
1521 } else { | 1522 } else { |
1522 ThrowException(exception_type(), exception_msg()); | 1523 ThrowException(exception_type(), exception_msg()); |
1523 } | 1524 } |
1524 } | 1525 } |
1525 | 1526 |
1526 | 1527 |
1527 } // namespace dart | 1528 } // namespace dart |
OLD | NEW |