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 1523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1534 isolate->heap()->CollectAllGarbage(); | 1534 isolate->heap()->CollectAllGarbage(); |
1535 #if defined(DEBUG) | 1535 #if defined(DEBUG) |
1536 FunctionVisitor check_canonical(isolate); | 1536 FunctionVisitor check_canonical(isolate); |
1537 isolate->heap()->IterateObjects(&check_canonical); | 1537 isolate->heap()->IterateObjects(&check_canonical); |
1538 #endif // #if defined(DEBUG). | 1538 #endif // #if defined(DEBUG). |
1539 | 1539 |
1540 // Since this is only a snapshot the root library should not be set. | 1540 // Since this is only a snapshot the root library should not be set. |
1541 isolate->object_store()->set_root_library(Library::Handle(isolate)); | 1541 isolate->object_store()->set_root_library(Library::Handle(isolate)); |
1542 FullSnapshotWriter writer(vm_isolate_snapshot_buffer, | 1542 FullSnapshotWriter writer(vm_isolate_snapshot_buffer, |
1543 isolate_snapshot_buffer, | 1543 isolate_snapshot_buffer, |
| 1544 NULL, /* instructions_snapshot_buffer */ |
1544 ApiReallocate, | 1545 ApiReallocate, |
1545 false /* snapshot_code */); | 1546 false, /* snapshot_code */ |
| 1547 true /* vm_isolate_is_symbolic */); |
1546 writer.WriteFullSnapshot(); | 1548 writer.WriteFullSnapshot(); |
1547 *vm_isolate_snapshot_size = writer.VmIsolateSnapshotSize(); | 1549 *vm_isolate_snapshot_size = writer.VmIsolateSnapshotSize(); |
1548 *isolate_snapshot_size = writer.IsolateSnapshotSize(); | 1550 *isolate_snapshot_size = writer.IsolateSnapshotSize(); |
1549 return Api::Success(); | 1551 return Api::Success(); |
1550 } | 1552 } |
1551 | 1553 |
1552 | 1554 |
1553 static Dart_Handle createLibrarySnapshot(Dart_Handle library, | 1555 static Dart_Handle createLibrarySnapshot(Dart_Handle library, |
1554 uint8_t** buffer, | 1556 uint8_t** buffer, |
1555 intptr_t* size) { | 1557 intptr_t* size) { |
(...skipping 4482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6038 ASSERT(stream != NULL); | 6040 ASSERT(stream != NULL); |
6039 TimelineEvent* event = stream->StartEvent(); | 6041 TimelineEvent* event = stream->StartEvent(); |
6040 if (event != NULL) { | 6042 if (event != NULL) { |
6041 event->AsyncEnd(label, async_id); | 6043 event->AsyncEnd(label, async_id); |
6042 event->Complete(); | 6044 event->Complete(); |
6043 } | 6045 } |
6044 return Api::Success(); | 6046 return Api::Success(); |
6045 } | 6047 } |
6046 | 6048 |
6047 } // namespace dart | 6049 } // namespace dart |
OLD | NEW |