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

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

Issue 1731743003: Move precompilation-related flags to flags list. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: make print_stop_message default false to fix build Created 4 years, 9 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/constant_propagator.cc ('k') | runtime/vm/dart_api_impl_test.cc » ('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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "vm/unicode.h" 44 #include "vm/unicode.h"
45 #include "vm/verifier.h" 45 #include "vm/verifier.h"
46 #include "vm/version.h" 46 #include "vm/version.h"
47 47
48 namespace dart { 48 namespace dart {
49 49
50 // Facilitate quick access to the current zone once we have the curren thread. 50 // Facilitate quick access to the current zone once we have the curren thread.
51 #define Z (T->zone()) 51 #define Z (T->zone())
52 52
53 53
54 DECLARE_FLAG(bool, load_deferred_eagerly);
55 DECLARE_FLAG(bool, precompilation);
56 DECLARE_FLAG(bool, print_class_table); 54 DECLARE_FLAG(bool, print_class_table);
57 DECLARE_FLAG(bool, verify_handles); 55 DECLARE_FLAG(bool, verify_handles);
58 #if defined(DART_NO_SNAPSHOT) 56 #if defined(DART_NO_SNAPSHOT)
59 DEFINE_FLAG(bool, check_function_fingerprints, true, 57 DEFINE_FLAG(bool, check_function_fingerprints, true,
60 "Check function fingerprints"); 58 "Check function fingerprints");
61 #endif // defined(DART_NO_SNAPSHOT). 59 #endif // defined(DART_NO_SNAPSHOT).
62 DEFINE_FLAG(bool, verify_acquired_data, false, 60 DEFINE_FLAG(bool, verify_acquired_data, false,
63 "Verify correct API acquire/release of typed data."); 61 "Verify correct API acquire/release of typed data.");
64 62
65 ThreadLocalKey Api::api_native_key_ = kUnsetThreadLocalKey; 63 ThreadLocalKey Api::api_native_key_ = kUnsetThreadLocalKey;
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 Dart_IsolateCreateCallback create, 1138 Dart_IsolateCreateCallback create,
1141 Dart_IsolateInterruptCallback interrupt, 1139 Dart_IsolateInterruptCallback interrupt,
1142 Dart_IsolateUnhandledExceptionCallback unhandled, 1140 Dart_IsolateUnhandledExceptionCallback unhandled,
1143 Dart_IsolateShutdownCallback shutdown, 1141 Dart_IsolateShutdownCallback shutdown,
1144 Dart_FileOpenCallback file_open, 1142 Dart_FileOpenCallback file_open,
1145 Dart_FileReadCallback file_read, 1143 Dart_FileReadCallback file_read,
1146 Dart_FileWriteCallback file_write, 1144 Dart_FileWriteCallback file_write,
1147 Dart_FileCloseCallback file_close, 1145 Dart_FileCloseCallback file_close,
1148 Dart_EntropySource entropy_source, 1146 Dart_EntropySource entropy_source,
1149 Dart_GetVMServiceAssetsArchive get_service_assets) { 1147 Dart_GetVMServiceAssetsArchive get_service_assets) {
1150 if ((instructions_snapshot != NULL) && !FLAG_precompilation) { 1148 if ((instructions_snapshot != NULL) && !FLAG_precompiled_mode) {
1151 return strdup("Flag --precompilation was not specified."); 1149 return strdup("Flag --precompilation was not specified.");
1152 } 1150 }
1153 if (interrupt != NULL) { 1151 if (interrupt != NULL) {
1154 return strdup("Dart_Initialize: " 1152 return strdup("Dart_Initialize: "
1155 "Setting of interrupt callback is not supported."); 1153 "Setting of interrupt callback is not supported.");
1156 } 1154 }
1157 if (unhandled != NULL) { 1155 if (unhandled != NULL) {
1158 return strdup("Dart_Initialize: " 1156 return strdup("Dart_Initialize: "
1159 "Setting of unhandled exception callback is not supported."); 1157 "Setting of unhandled exception callback is not supported.");
1160 } 1158 }
(...skipping 4932 matching lines...) Expand 10 before | Expand all | Expand 10 after
6093 return 0; 6091 return 0;
6094 } 6092 }
6095 6093
6096 #else // DART_PRECOMPILER 6094 #else // DART_PRECOMPILER
6097 6095
6098 DART_EXPORT Dart_Handle Dart_Precompile( 6096 DART_EXPORT Dart_Handle Dart_Precompile(
6099 Dart_QualifiedFunctionName entry_points[], 6097 Dart_QualifiedFunctionName entry_points[],
6100 bool reset_fields) { 6098 bool reset_fields) {
6101 API_TIMELINE_BEGIN_END; 6099 API_TIMELINE_BEGIN_END;
6102 DARTSCOPE(Thread::Current()); 6100 DARTSCOPE(Thread::Current());
6103 if (!FLAG_precompilation) { 6101 if (!FLAG_precompiled_mode) {
6104 return Dart_NewApiError("Flag --precompilation was not specified."); 6102 return Dart_NewApiError("Flag --precompilation was not specified.");
6105 } 6103 }
6106 Dart_Handle result = Api::CheckAndFinalizePendingClasses(T); 6104 Dart_Handle result = Api::CheckAndFinalizePendingClasses(T);
6107 if (::Dart_IsError(result)) { 6105 if (::Dart_IsError(result)) {
6108 return result; 6106 return result;
6109 } 6107 }
6110 CHECK_CALLBACK_STATE(T); 6108 CHECK_CALLBACK_STATE(T);
6111 const Error& error = Error::Handle(Precompiler::CompileAll(entry_points, 6109 const Error& error = Error::Handle(Precompiler::CompileAll(entry_points,
6112 reset_fields)); 6110 reset_fields));
6113 if (!error.IsNull()) { 6111 if (!error.IsNull()) {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
6168 return Api::Success(); 6166 return Api::Success();
6169 } 6167 }
6170 #endif // DART_PRECOMPILER 6168 #endif // DART_PRECOMPILER
6171 6169
6172 6170
6173 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { 6171 DART_EXPORT bool Dart_IsRunningPrecompiledCode() {
6174 return Dart::IsRunningPrecompiledCode(); 6172 return Dart::IsRunningPrecompiledCode();
6175 } 6173 }
6176 6174
6177 } // namespace dart 6175 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/constant_propagator.cc ('k') | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698