| 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/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 3351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3362 | 3362 |
| 3363 RawWeakProperty* WeakProperty::ReadFrom(SnapshotReader* reader, | 3363 RawWeakProperty* WeakProperty::ReadFrom(SnapshotReader* reader, |
| 3364 intptr_t object_id, | 3364 intptr_t object_id, |
| 3365 intptr_t tags, | 3365 intptr_t tags, |
| 3366 Snapshot::Kind kind, | 3366 Snapshot::Kind kind, |
| 3367 bool as_reference) { | 3367 bool as_reference) { |
| 3368 ASSERT(reader != NULL); | 3368 ASSERT(reader != NULL); |
| 3369 | 3369 |
| 3370 // Allocate the weak property object. | 3370 // Allocate the weak property object. |
| 3371 WeakProperty& weak_property = WeakProperty::ZoneHandle( | 3371 WeakProperty& weak_property = WeakProperty::ZoneHandle( |
| 3372 reader->zone(), WeakProperty::New(HEAP_SPACE(kind))); | 3372 reader->zone(), NEW_OBJECT(WeakProperty)); |
| 3373 reader->AddBackRef(object_id, &weak_property, kIsDeserialized); | 3373 reader->AddBackRef(object_id, &weak_property, kIsDeserialized); |
| 3374 | 3374 |
| 3375 // Set all the object fields. | 3375 // Set all the object fields. |
| 3376 READ_OBJECT_FIELDS(weak_property, | 3376 READ_OBJECT_FIELDS(weak_property, |
| 3377 weak_property.raw()->from(), weak_property.raw()->to(), | 3377 weak_property.raw()->from(), weak_property.raw()->to(), |
| 3378 kAsReference); | 3378 kAsReference); |
| 3379 | 3379 |
| 3380 return weak_property.raw(); | 3380 return weak_property.raw(); |
| 3381 } | 3381 } |
| 3382 | 3382 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3443 // We do not allow objects with native fields in an isolate message. | 3443 // We do not allow objects with native fields in an isolate message. |
| 3444 writer->SetWriteException(Exceptions::kArgument, | 3444 writer->SetWriteException(Exceptions::kArgument, |
| 3445 "Illegal argument in isolate message" | 3445 "Illegal argument in isolate message" |
| 3446 " : (object is a UserTag)"); | 3446 " : (object is a UserTag)"); |
| 3447 } else { | 3447 } else { |
| 3448 UNREACHABLE(); | 3448 UNREACHABLE(); |
| 3449 } | 3449 } |
| 3450 } | 3450 } |
| 3451 | 3451 |
| 3452 } // namespace dart | 3452 } // namespace dart |
| OLD | NEW |