| 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 1425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1436 &result.raw_ptr()->exception_handlers_), | 1436 &result.raw_ptr()->exception_handlers_), |
| 1437 reader->PassiveObjectHandle()->raw()); | 1437 reader->PassiveObjectHandle()->raw()); |
| 1438 | 1438 |
| 1439 (*reader->PassiveObjectHandle()) ^= reader->ReadObjectImpl(kAsReference); | 1439 (*reader->PassiveObjectHandle()) ^= reader->ReadObjectImpl(kAsReference); |
| 1440 result.StorePointer(reinterpret_cast<RawObject*const*>( | 1440 result.StorePointer(reinterpret_cast<RawObject*const*>( |
| 1441 &result.raw_ptr()->pc_descriptors_), | 1441 &result.raw_ptr()->pc_descriptors_), |
| 1442 reader->PassiveObjectHandle()->raw()); | 1442 reader->PassiveObjectHandle()->raw()); |
| 1443 | 1443 |
| 1444 (*reader->PassiveObjectHandle()) ^= reader->ReadObjectImpl(kAsReference); | 1444 (*reader->PassiveObjectHandle()) ^= reader->ReadObjectImpl(kAsReference); |
| 1445 result.StorePointer(reinterpret_cast<RawObject*const*>( | 1445 result.StorePointer(reinterpret_cast<RawObject*const*>( |
| 1446 &result.raw_ptr()->code_source_map_), | |
| 1447 reader->PassiveObjectHandle()->raw()); | |
| 1448 | |
| 1449 (*reader->PassiveObjectHandle()) ^= reader->ReadObjectImpl(kAsReference); | |
| 1450 result.StorePointer(reinterpret_cast<RawObject*const*>( | |
| 1451 &result.raw_ptr()->stackmaps_), | 1446 &result.raw_ptr()->stackmaps_), |
| 1452 reader->PassiveObjectHandle()->raw()); | 1447 reader->PassiveObjectHandle()->raw()); |
| 1453 | 1448 |
| 1454 result.StorePointer(&result.raw_ptr()->deopt_info_array_, | 1449 result.StorePointer(&result.raw_ptr()->deopt_info_array_, |
| 1455 Array::null()); | 1450 Array::null()); |
| 1456 result.StorePointer(&result.raw_ptr()->static_calls_target_table_, | 1451 result.StorePointer(&result.raw_ptr()->static_calls_target_table_, |
| 1457 Array::null()); | 1452 Array::null()); |
| 1458 result.StorePointer(&result.raw_ptr()->var_descriptors_, | 1453 result.StorePointer(&result.raw_ptr()->var_descriptors_, |
| 1459 LocalVarDescriptors::null()); | 1454 LocalVarDescriptors::null()); |
| 1460 result.StorePointer(&result.raw_ptr()->inlined_metadata_, | 1455 result.StorePointer(&result.raw_ptr()->inlined_metadata_, |
| 1461 Array::null()); | 1456 Array::null()); |
| 1457 result.StorePointer(&result.raw_ptr()->code_source_map_, |
| 1458 CodeSourceMap::null()); |
| 1462 result.StorePointer(&result.raw_ptr()->comments_, | 1459 result.StorePointer(&result.raw_ptr()->comments_, |
| 1463 Array::null()); | 1460 Array::null()); |
| 1464 result.StorePointer(&result.raw_ptr()->return_address_metadata_, | 1461 result.StorePointer(&result.raw_ptr()->return_address_metadata_, |
| 1465 Object::null()); | 1462 Object::null()); |
| 1466 | 1463 |
| 1467 return result.raw(); | 1464 return result.raw(); |
| 1468 } | 1465 } |
| 1469 | 1466 |
| 1470 | 1467 |
| 1471 void RawCode::WriteTo(SnapshotWriter* writer, | 1468 void RawCode::WriteTo(SnapshotWriter* writer, |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1513 intptr_t instructions_size = Utils::RoundUp(instr->size_, | 1510 intptr_t instructions_size = Utils::RoundUp(instr->size_, |
| 1514 OS::PreferredCodeAlignment()); | 1511 OS::PreferredCodeAlignment()); |
| 1515 uword check = Checksum(entry, instructions_size); | 1512 uword check = Checksum(entry, instructions_size); |
| 1516 writer->Write<uword>(check); | 1513 writer->Write<uword>(check); |
| 1517 #endif | 1514 #endif |
| 1518 | 1515 |
| 1519 writer->WriteObjectImpl(ptr()->object_pool_, kAsReference); | 1516 writer->WriteObjectImpl(ptr()->object_pool_, kAsReference); |
| 1520 writer->WriteObjectImpl(ptr()->owner_, kAsReference); | 1517 writer->WriteObjectImpl(ptr()->owner_, kAsReference); |
| 1521 writer->WriteObjectImpl(ptr()->exception_handlers_, kAsReference); | 1518 writer->WriteObjectImpl(ptr()->exception_handlers_, kAsReference); |
| 1522 writer->WriteObjectImpl(ptr()->pc_descriptors_, kAsReference); | 1519 writer->WriteObjectImpl(ptr()->pc_descriptors_, kAsReference); |
| 1523 writer->WriteObjectImpl(ptr()->code_source_map_, kAsReference); | |
| 1524 writer->WriteObjectImpl(ptr()->stackmaps_, kAsReference); | 1520 writer->WriteObjectImpl(ptr()->stackmaps_, kAsReference); |
| 1525 } | 1521 } |
| 1526 | 1522 |
| 1527 | 1523 |
| 1528 RawInstructions* Instructions::ReadFrom(SnapshotReader* reader, | 1524 RawInstructions* Instructions::ReadFrom(SnapshotReader* reader, |
| 1529 intptr_t object_id, | 1525 intptr_t object_id, |
| 1530 intptr_t tags, | 1526 intptr_t tags, |
| 1531 Snapshot::Kind kind, | 1527 Snapshot::Kind kind, |
| 1532 bool as_reference) { | 1528 bool as_reference) { |
| 1533 UNREACHABLE(); | 1529 UNREACHABLE(); |
| (...skipping 2250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3784 // We do not allow objects with native fields in an isolate message. | 3780 // We do not allow objects with native fields in an isolate message. |
| 3785 writer->SetWriteException(Exceptions::kArgument, | 3781 writer->SetWriteException(Exceptions::kArgument, |
| 3786 "Illegal argument in isolate message" | 3782 "Illegal argument in isolate message" |
| 3787 " : (object is a UserTag)"); | 3783 " : (object is a UserTag)"); |
| 3788 } else { | 3784 } else { |
| 3789 UNREACHABLE(); | 3785 UNREACHABLE(); |
| 3790 } | 3786 } |
| 3791 } | 3787 } |
| 3792 | 3788 |
| 3793 } // namespace dart | 3789 } // namespace dart |
| OLD | NEW |