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

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

Issue 1944213002: Support for taking full snapshots from 'dart', not just 'dart_bootstrap'. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 "lib/stacktrace.h" 10 #include "lib/stacktrace.h"
(...skipping 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after
1490 1490
1491 #if defined(DEBUG) 1491 #if defined(DEBUG)
1492 FunctionVisitor check_canonical(T); 1492 FunctionVisitor check_canonical(T);
1493 I->heap()->IterateObjects(&check_canonical); 1493 I->heap()->IterateObjects(&check_canonical);
1494 #endif // #if defined(DEBUG). 1494 #endif // #if defined(DEBUG).
1495 1495
1496 FullSnapshotWriter writer(Snapshot::kCore, 1496 FullSnapshotWriter writer(Snapshot::kCore,
1497 vm_isolate_snapshot_buffer, 1497 vm_isolate_snapshot_buffer,
1498 isolate_snapshot_buffer, 1498 isolate_snapshot_buffer,
1499 ApiReallocate, 1499 ApiReallocate,
1500 NULL, /* instructions_writer */ 1500 NULL /* instructions_writer */);
1501 true /* vm_isolate_is_symbolic */);
1502 writer.WriteFullSnapshot(); 1501 writer.WriteFullSnapshot();
1503 *vm_isolate_snapshot_size = writer.VmIsolateSnapshotSize(); 1502 *vm_isolate_snapshot_size = writer.VmIsolateSnapshotSize();
1504 *isolate_snapshot_size = writer.IsolateSnapshotSize(); 1503 *isolate_snapshot_size = writer.IsolateSnapshotSize();
1505 return Api::Success(); 1504 return Api::Success();
1506 } 1505 }
1507 1506
1508 1507
1509 static Dart_Handle createLibrarySnapshot(Dart_Handle library, 1508 static Dart_Handle createLibrarySnapshot(Dart_Handle library,
1510 uint8_t** buffer, 1509 uint8_t** buffer,
1511 intptr_t* size) { 1510 intptr_t* size) {
(...skipping 4681 matching lines...) Expand 10 before | Expand all | Expand 10 after
6193 return Api::Success(); 6192 return Api::Success();
6194 } 6193 }
6195 #endif // DART_PRECOMPILER 6194 #endif // DART_PRECOMPILER
6196 6195
6197 6196
6198 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { 6197 DART_EXPORT bool Dart_IsRunningPrecompiledCode() {
6199 return Dart::IsRunningPrecompiledCode(); 6198 return Dart::IsRunningPrecompiledCode();
6200 } 6199 }
6201 6200
6202 } // namespace dart 6201 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/snapshot.h » ('j') | runtime/vm/snapshot.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698