OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 "include/dart_api.h" | 5 #include "include/dart_api.h" |
6 #include "include/dart_mirrors_api.h" | 6 #include "include/dart_mirrors_api.h" |
7 #include "include/dart_native_api.h" | 7 #include "include/dart_native_api.h" |
8 | 8 |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "vm/class_finalizer.h" | 10 #include "vm/class_finalizer.h" |
(...skipping 1510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1521 I->heap()->CollectAllGarbage(); | 1521 I->heap()->CollectAllGarbage(); |
1522 #if defined(DEBUG) | 1522 #if defined(DEBUG) |
1523 FunctionVisitor check_canonical(I); | 1523 FunctionVisitor check_canonical(I); |
1524 I->heap()->IterateObjects(&check_canonical); | 1524 I->heap()->IterateObjects(&check_canonical); |
1525 #endif // #if defined(DEBUG). | 1525 #endif // #if defined(DEBUG). |
1526 | 1526 |
1527 // Since this is only a snapshot the root library should not be set. | 1527 // Since this is only a snapshot the root library should not be set. |
1528 I->object_store()->set_root_library(Library::Handle(Z)); | 1528 I->object_store()->set_root_library(Library::Handle(Z)); |
1529 FullSnapshotWriter writer(vm_isolate_snapshot_buffer, | 1529 FullSnapshotWriter writer(vm_isolate_snapshot_buffer, |
1530 isolate_snapshot_buffer, | 1530 isolate_snapshot_buffer, |
| 1531 NULL, /* instructions_snapshot_buffer */ |
1531 ApiReallocate, | 1532 ApiReallocate, |
1532 false /* snapshot_code */); | 1533 false, /* snapshot_code */ |
| 1534 true /* vm_isolate_is_symbolic */); |
1533 writer.WriteFullSnapshot(); | 1535 writer.WriteFullSnapshot(); |
1534 *vm_isolate_snapshot_size = writer.VmIsolateSnapshotSize(); | 1536 *vm_isolate_snapshot_size = writer.VmIsolateSnapshotSize(); |
1535 *isolate_snapshot_size = writer.IsolateSnapshotSize(); | 1537 *isolate_snapshot_size = writer.IsolateSnapshotSize(); |
1536 return Api::Success(); | 1538 return Api::Success(); |
1537 } | 1539 } |
1538 | 1540 |
1539 | 1541 |
1540 static Dart_Handle createLibrarySnapshot(Dart_Handle library, | 1542 static Dart_Handle createLibrarySnapshot(Dart_Handle library, |
1541 uint8_t** buffer, | 1543 uint8_t** buffer, |
1542 intptr_t* size) { | 1544 intptr_t* size) { |
(...skipping 4318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5861 ASSERT(stream != NULL); | 5863 ASSERT(stream != NULL); |
5862 TimelineEvent* event = stream->StartEvent(); | 5864 TimelineEvent* event = stream->StartEvent(); |
5863 if (event != NULL) { | 5865 if (event != NULL) { |
5864 event->AsyncEnd(label, async_id); | 5866 event->AsyncEnd(label, async_id); |
5865 event->Complete(); | 5867 event->Complete(); |
5866 } | 5868 } |
5867 return Api::Success(); | 5869 return Api::Success(); |
5868 } | 5870 } |
5869 | 5871 |
5870 } // namespace dart | 5872 } // namespace dart |
OLD | NEW |