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

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

Issue 1948183002: Add Dart_IsPrecompiledRuntime to help simplify logic in embedders that conditionally use precompila… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: sync 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
« no previous file with comments | « runtime/include/dart_api.h ('k') | no next file » | 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 6282 matching lines...) Expand 10 before | Expand all | Expand 10 after
6293 *rodata_blob_size = instructions_writer.RodataBlobSize(); 6293 *rodata_blob_size = instructions_writer.RodataBlobSize();
6294 6294
6295 return Api::Success(); 6295 return Api::Success();
6296 } 6296 }
6297 6297
6298 6298
6299 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { 6299 DART_EXPORT bool Dart_IsRunningPrecompiledCode() {
6300 return Snapshot::IncludesCode(Dart::snapshot_kind()); 6300 return Snapshot::IncludesCode(Dart::snapshot_kind());
6301 } 6301 }
6302 6302
6303
6304 DART_EXPORT bool Dart_IsPrecompiledRuntime() {
6305 #if defined(DART_PRECOMPILED_RUNTIME)
6306 return true;
6307 #else
6308 return false;
6309 #endif
6310 }
6311
6303 } // namespace dart 6312 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/include/dart_api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698