Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(434)

Side by Side Diff: runtime/vm/dart_api_impl.cc

Issue 1318803002: Toward precompiled snapshots. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: READ_POINTERS Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698