| 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/bigint_operations.h" | 10 #include "vm/bigint_operations.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 #include "vm/version.h" | 37 #include "vm/version.h" |
| 38 | 38 |
| 39 namespace dart { | 39 namespace dart { |
| 40 | 40 |
| 41 DECLARE_FLAG(bool, print_class_table); | 41 DECLARE_FLAG(bool, print_class_table); |
| 42 DECLARE_FLAG(bool, verify_handles); | 42 DECLARE_FLAG(bool, verify_handles); |
| 43 DEFINE_FLAG(bool, check_function_fingerprints, false, | 43 DEFINE_FLAG(bool, check_function_fingerprints, false, |
| 44 "Check function fingerprints"); | 44 "Check function fingerprints"); |
| 45 DEFINE_FLAG(bool, trace_api, false, | 45 DEFINE_FLAG(bool, trace_api, false, |
| 46 "Trace invocation of API calls (debug mode only)"); | 46 "Trace invocation of API calls (debug mode only)"); |
| 47 DEFINE_FLAG(bool, load_async, true, "load source code asynchronously"); |
| 47 | 48 |
| 48 ThreadLocalKey Api::api_native_key_ = Thread::kUnsetThreadLocalKey; | 49 ThreadLocalKey Api::api_native_key_ = Thread::kUnsetThreadLocalKey; |
| 49 Dart_Handle Api::true_handle_ = NULL; | 50 Dart_Handle Api::true_handle_ = NULL; |
| 50 Dart_Handle Api::false_handle_ = NULL; | 51 Dart_Handle Api::false_handle_ = NULL; |
| 51 Dart_Handle Api::null_handle_ = NULL; | 52 Dart_Handle Api::null_handle_ = NULL; |
| 52 | 53 |
| 53 | 54 |
| 54 const char* CanonicalFunction(const char* func) { | 55 const char* CanonicalFunction(const char* func) { |
| 55 if (strncmp(func, "dart::", 6) == 0) { | 56 if (strncmp(func, "dart::", 6) == 0) { |
| 56 return func + 6; | 57 return func + 6; |
| (...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1186 return true; | 1187 return true; |
| 1187 } | 1188 } |
| 1188 | 1189 |
| 1189 | 1190 |
| 1190 DART_EXPORT bool Dart_SetVMFlags(int argc, const char** argv) { | 1191 DART_EXPORT bool Dart_SetVMFlags(int argc, const char** argv) { |
| 1191 return Flags::ProcessCommandLineFlags(argc, argv); | 1192 return Flags::ProcessCommandLineFlags(argc, argv); |
| 1192 } | 1193 } |
| 1193 | 1194 |
| 1194 | 1195 |
| 1195 DART_EXPORT bool Dart_IsVMFlagSet(const char* flag_name) { | 1196 DART_EXPORT bool Dart_IsVMFlagSet(const char* flag_name) { |
| 1196 if (Flags::Lookup(flag_name) != NULL) { | 1197 return Flags::IsSet(flag_name); |
| 1197 return true; | |
| 1198 } | |
| 1199 return false; | |
| 1200 } | 1198 } |
| 1201 | 1199 |
| 1202 | 1200 |
| 1203 // --- Isolates --- | 1201 // --- Isolates --- |
| 1204 | 1202 |
| 1205 static char* BuildIsolateName(const char* script_uri, | 1203 static char* BuildIsolateName(const char* script_uri, |
| 1206 const char* main) { | 1204 const char* main) { |
| 1207 if (script_uri == NULL) { | 1205 if (script_uri == NULL) { |
| 1208 // Just use the main as the name. | 1206 // Just use the main as the name. |
| 1209 if (main == NULL) { | 1207 if (main == NULL) { |
| (...skipping 3841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5051 | 5049 |
| 5052 | 5050 |
| 5053 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( | 5051 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( |
| 5054 const char* name, | 5052 const char* name, |
| 5055 Dart_ServiceRequestCallback callback, | 5053 Dart_ServiceRequestCallback callback, |
| 5056 void* user_data) { | 5054 void* user_data) { |
| 5057 Service::RegisterRootEmbedderCallback(name, callback, user_data); | 5055 Service::RegisterRootEmbedderCallback(name, callback, user_data); |
| 5058 } | 5056 } |
| 5059 | 5057 |
| 5060 } // namespace dart | 5058 } // namespace dart |
| OLD | NEW |