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

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

Issue 1852393004: Fix background compilation issues when creating snapshots. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: more Created 4 years, 8 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
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/heap.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1465 matching lines...) Expand 10 before | Expand all | Expand 10 after
1476 } 1476 }
1477 if (isolate_snapshot_size == NULL) { 1477 if (isolate_snapshot_size == NULL) {
1478 RETURN_NULL_ERROR(isolate_snapshot_size); 1478 RETURN_NULL_ERROR(isolate_snapshot_size);
1479 } 1479 }
1480 // Finalize all classes if needed. 1480 // Finalize all classes if needed.
1481 Dart_Handle state = Api::CheckAndFinalizePendingClasses(T); 1481 Dart_Handle state = Api::CheckAndFinalizePendingClasses(T);
1482 if (::Dart_IsError(state)) { 1482 if (::Dart_IsError(state)) {
1483 return state; 1483 return state;
1484 } 1484 }
1485 I->heap()->CollectAllGarbage(); 1485 I->heap()->CollectAllGarbage();
1486 I->StopBackgroundCompiler();
1487
1486 #if defined(DEBUG) 1488 #if defined(DEBUG)
1487 FunctionVisitor check_canonical(T); 1489 FunctionVisitor check_canonical(T);
1488 I->heap()->IterateObjects(&check_canonical); 1490 I->heap()->IterateObjects(&check_canonical);
1489 #endif // #if defined(DEBUG). 1491 #endif // #if defined(DEBUG).
1490 1492
1491 FullSnapshotWriter writer(vm_isolate_snapshot_buffer, 1493 FullSnapshotWriter writer(vm_isolate_snapshot_buffer,
1492 isolate_snapshot_buffer, 1494 isolate_snapshot_buffer,
1493 NULL, /* instructions_snapshot_buffer */ 1495 NULL, /* instructions_snapshot_buffer */
1494 ApiReallocate, 1496 ApiReallocate,
1495 false, /* snapshot_code */ 1497 false, /* snapshot_code */
(...skipping 4615 matching lines...) Expand 10 before | Expand all | Expand 10 after
6111 return Api::Success(); 6113 return Api::Success();
6112 } 6114 }
6113 #endif // DART_PRECOMPILER 6115 #endif // DART_PRECOMPILER
6114 6116
6115 6117
6116 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { 6118 DART_EXPORT bool Dart_IsRunningPrecompiledCode() {
6117 return Dart::IsRunningPrecompiledCode(); 6119 return Dart::IsRunningPrecompiledCode();
6118 } 6120 }
6119 6121
6120 } // namespace dart 6122 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698