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/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 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1277 uint8_t* data = object->value.as_external_typed_data.data; | 1277 uint8_t* data = object->value.as_external_typed_data.data; |
1278 void* peer = object->value.as_external_typed_data.peer; | 1278 void* peer = object->value.as_external_typed_data.peer; |
1279 Dart_WeakPersistentHandleFinalizer callback = | 1279 Dart_WeakPersistentHandleFinalizer callback = |
1280 object->value.as_external_typed_data.callback; | 1280 object->value.as_external_typed_data.callback; |
1281 WriteSmi(length); | 1281 WriteSmi(length); |
1282 WriteRawPointerValue(reinterpret_cast<intptr_t>(data)); | 1282 WriteRawPointerValue(reinterpret_cast<intptr_t>(data)); |
1283 WriteRawPointerValue(reinterpret_cast<intptr_t>(peer)); | 1283 WriteRawPointerValue(reinterpret_cast<intptr_t>(peer)); |
1284 WriteRawPointerValue(reinterpret_cast<intptr_t>(callback)); | 1284 WriteRawPointerValue(reinterpret_cast<intptr_t>(callback)); |
1285 break; | 1285 break; |
1286 } | 1286 } |
| 1287 case Dart_CObject_kSendPort: { |
| 1288 WriteInlinedHeader(object); |
| 1289 WriteIndexedObject(kSendPortCid); |
| 1290 WriteTags(0); |
| 1291 Write<int64_t>(object->value.as_send_port.id); |
| 1292 Write<uint64_t>(object->value.as_send_port.origin_id); |
| 1293 break; |
| 1294 } |
1287 case Dart_CObject_kCapability: { | 1295 case Dart_CObject_kCapability: { |
1288 WriteInlinedHeader(object); | 1296 WriteInlinedHeader(object); |
1289 WriteIndexedObject(kCapabilityCid); | 1297 WriteIndexedObject(kCapabilityCid); |
1290 WriteTags(0); | 1298 WriteTags(0); |
1291 Write<uint64_t>(object->value.as_capability.id); | 1299 Write<uint64_t>(object->value.as_capability.id); |
1292 break; | 1300 break; |
1293 } | 1301 } |
1294 default: | 1302 default: |
1295 UNREACHABLE(); | 1303 UNREACHABLE(); |
1296 } | 1304 } |
(...skipping 16 matching lines...) Expand all Loading... |
1313 if (!success) { | 1321 if (!success) { |
1314 UnmarkAllCObjects(object); | 1322 UnmarkAllCObjects(object); |
1315 return false; | 1323 return false; |
1316 } | 1324 } |
1317 } | 1325 } |
1318 UnmarkAllCObjects(object); | 1326 UnmarkAllCObjects(object); |
1319 return true; | 1327 return true; |
1320 } | 1328 } |
1321 | 1329 |
1322 } // namespace dart | 1330 } // namespace dart |
OLD | NEW |