OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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/clustered_snapshot.h" | 5 #include "vm/clustered_snapshot.h" |
6 | 6 |
7 #include "platform/assert.h" | 7 #include "platform/assert.h" |
8 #include "vm/bootstrap.h" | 8 #include "vm/bootstrap.h" |
9 #include "vm/class_finalizer.h" | 9 #include "vm/class_finalizer.h" |
10 #include "vm/dart.h" | 10 #include "vm/dart.h" |
(...skipping 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1565 s->Push(code->ptr()->object_pool_); | 1565 s->Push(code->ptr()->object_pool_); |
1566 s->Push(code->ptr()->owner_); | 1566 s->Push(code->ptr()->owner_); |
1567 s->Push(code->ptr()->exception_handlers_); | 1567 s->Push(code->ptr()->exception_handlers_); |
1568 s->Push(code->ptr()->pc_descriptors_); | 1568 s->Push(code->ptr()->pc_descriptors_); |
1569 #if defined(DART_PRECOMPILED_RUNTIME) || defined(DART_PRECOMPILER) | 1569 #if defined(DART_PRECOMPILED_RUNTIME) || defined(DART_PRECOMPILER) |
1570 s->Push(code->ptr()->catch_entry_.catch_entry_state_maps_); | 1570 s->Push(code->ptr()->catch_entry_.catch_entry_state_maps_); |
1571 #else | 1571 #else |
1572 s->Push(code->ptr()->catch_entry_.variables_); | 1572 s->Push(code->ptr()->catch_entry_.variables_); |
1573 #endif | 1573 #endif |
1574 s->Push(code->ptr()->stackmaps_); | 1574 s->Push(code->ptr()->stackmaps_); |
1575 s->Push(code->ptr()->inlined_id_to_function_); | 1575 if (!FLAG_dwarf_stack_traces) { |
1576 s->Push(code->ptr()->code_source_map_); | 1576 s->Push(code->ptr()->inlined_id_to_function_); |
| 1577 s->Push(code->ptr()->code_source_map_); |
| 1578 } |
1577 if (s->kind() != Snapshot::kAppAOT) { | 1579 if (s->kind() != Snapshot::kAppAOT) { |
1578 s->Push(code->ptr()->await_token_positions_); | 1580 s->Push(code->ptr()->await_token_positions_); |
1579 } | 1581 } |
1580 | 1582 |
1581 if (s->kind() == Snapshot::kAppJIT) { | 1583 if (s->kind() == Snapshot::kAppJIT) { |
1582 s->Push(code->ptr()->deopt_info_array_); | 1584 s->Push(code->ptr()->deopt_info_array_); |
1583 s->Push(code->ptr()->static_calls_target_table_); | 1585 s->Push(code->ptr()->static_calls_target_table_); |
1584 NOT_IN_PRODUCT(s->Push(code->ptr()->return_address_metadata_)); | 1586 NOT_IN_PRODUCT(s->Push(code->ptr()->return_address_metadata_)); |
1585 } | 1587 } |
1586 } | 1588 } |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1627 s->WriteRef(code->ptr()->object_pool_); | 1629 s->WriteRef(code->ptr()->object_pool_); |
1628 s->WriteRef(code->ptr()->owner_); | 1630 s->WriteRef(code->ptr()->owner_); |
1629 s->WriteRef(code->ptr()->exception_handlers_); | 1631 s->WriteRef(code->ptr()->exception_handlers_); |
1630 s->WriteRef(code->ptr()->pc_descriptors_); | 1632 s->WriteRef(code->ptr()->pc_descriptors_); |
1631 #if defined(DART_PRECOMPILED_RUNTIME) || defined(DART_PRECOMPILER) | 1633 #if defined(DART_PRECOMPILED_RUNTIME) || defined(DART_PRECOMPILER) |
1632 s->WriteRef(code->ptr()->catch_entry_.catch_entry_state_maps_); | 1634 s->WriteRef(code->ptr()->catch_entry_.catch_entry_state_maps_); |
1633 #else | 1635 #else |
1634 s->WriteRef(code->ptr()->catch_entry_.variables_); | 1636 s->WriteRef(code->ptr()->catch_entry_.variables_); |
1635 #endif | 1637 #endif |
1636 s->WriteRef(code->ptr()->stackmaps_); | 1638 s->WriteRef(code->ptr()->stackmaps_); |
1637 s->WriteRef(code->ptr()->inlined_id_to_function_); | 1639 if (FLAG_dwarf_stack_traces) { |
1638 s->WriteRef(code->ptr()->code_source_map_); | 1640 s->WriteRef(Array::null()); |
| 1641 s->WriteRef(CodeSourceMap::null()); |
| 1642 } else { |
| 1643 s->WriteRef(code->ptr()->inlined_id_to_function_); |
| 1644 s->WriteRef(code->ptr()->code_source_map_); |
| 1645 } |
1639 if (s->kind() != Snapshot::kAppAOT) { | 1646 if (s->kind() != Snapshot::kAppAOT) { |
1640 s->WriteRef(code->ptr()->await_token_positions_); | 1647 s->WriteRef(code->ptr()->await_token_positions_); |
1641 } | 1648 } |
1642 | |
1643 | |
1644 if (s->kind() == Snapshot::kAppJIT) { | 1649 if (s->kind() == Snapshot::kAppJIT) { |
1645 s->WriteRef(code->ptr()->deopt_info_array_); | 1650 s->WriteRef(code->ptr()->deopt_info_array_); |
1646 s->WriteRef(code->ptr()->static_calls_target_table_); | 1651 s->WriteRef(code->ptr()->static_calls_target_table_); |
1647 NOT_IN_PRODUCT(s->WriteRef(code->ptr()->return_address_metadata_)); | 1652 NOT_IN_PRODUCT(s->WriteRef(code->ptr()->return_address_metadata_)); |
1648 } | 1653 } |
1649 | 1654 |
1650 s->Write<int32_t>(code->ptr()->state_bits_); | 1655 s->Write<int32_t>(code->ptr()->state_bits_); |
1651 } | 1656 } |
1652 } | 1657 } |
1653 | 1658 |
(...skipping 3887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5541 thread_->isolate()->SetupImagePage(data_buffer_, | 5546 thread_->isolate()->SetupImagePage(data_buffer_, |
5542 /* is_executable */ false); | 5547 /* is_executable */ false); |
5543 } | 5548 } |
5544 | 5549 |
5545 deserializer.ReadIsolateSnapshot(thread_->isolate()->object_store()); | 5550 deserializer.ReadIsolateSnapshot(thread_->isolate()->object_store()); |
5546 | 5551 |
5547 return ApiError::null(); | 5552 return ApiError::null(); |
5548 } | 5553 } |
5549 | 5554 |
5550 } // namespace dart | 5555 } // namespace dart |
OLD | NEW |