| 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 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1369 Dart_Handle state = Api::CheckAndFinalizePendingClasses(T); | 1369 Dart_Handle state = Api::CheckAndFinalizePendingClasses(T); |
| 1370 if (::Dart_IsError(state)) { | 1370 if (::Dart_IsError(state)) { |
| 1371 return state; | 1371 return state; |
| 1372 } | 1372 } |
| 1373 I->heap()->CollectAllGarbage(); | 1373 I->heap()->CollectAllGarbage(); |
| 1374 #if defined(DEBUG) | 1374 #if defined(DEBUG) |
| 1375 FunctionVisitor check_canonical(T); | 1375 FunctionVisitor check_canonical(T); |
| 1376 I->heap()->IterateObjects(&check_canonical); | 1376 I->heap()->IterateObjects(&check_canonical); |
| 1377 #endif // #if defined(DEBUG). | 1377 #endif // #if defined(DEBUG). |
| 1378 | 1378 |
| 1379 // Since this is only a snapshot the root library should not be set. | |
| 1380 I->object_store()->set_root_library(Library::Handle(Z)); | |
| 1381 FullSnapshotWriter writer(vm_isolate_snapshot_buffer, | 1379 FullSnapshotWriter writer(vm_isolate_snapshot_buffer, |
| 1382 isolate_snapshot_buffer, | 1380 isolate_snapshot_buffer, |
| 1383 NULL, /* instructions_snapshot_buffer */ | 1381 NULL, /* instructions_snapshot_buffer */ |
| 1384 ApiReallocate, | 1382 ApiReallocate, |
| 1385 false, /* snapshot_code */ | 1383 false, /* snapshot_code */ |
| 1386 true /* vm_isolate_is_symbolic */); | 1384 true /* vm_isolate_is_symbolic */); |
| 1387 writer.WriteFullSnapshot(); | 1385 writer.WriteFullSnapshot(); |
| 1388 *vm_isolate_snapshot_size = writer.VmIsolateSnapshotSize(); | 1386 *vm_isolate_snapshot_size = writer.VmIsolateSnapshotSize(); |
| 1389 *isolate_snapshot_size = writer.IsolateSnapshotSize(); | 1387 *isolate_snapshot_size = writer.IsolateSnapshotSize(); |
| 1390 return Api::Success(); | 1388 return Api::Success(); |
| (...skipping 4578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5969 return Api::Success(); | 5967 return Api::Success(); |
| 5970 } | 5968 } |
| 5971 #endif // DART_PRECOMPILED_RUNTIME | 5969 #endif // DART_PRECOMPILED_RUNTIME |
| 5972 | 5970 |
| 5973 | 5971 |
| 5974 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { | 5972 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { |
| 5975 return Dart::IsRunningPrecompiledCode(); | 5973 return Dart::IsRunningPrecompiledCode(); |
| 5976 } | 5974 } |
| 5977 | 5975 |
| 5978 } // namespace dart | 5976 } // namespace dart |
| OLD | NEW |