| 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 "lib/stacktrace.h" | 10 #include "lib/stacktrace.h" |
| (...skipping 5870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5881 } | 5881 } |
| 5882 lib.set_native_entry_resolver(resolver); | 5882 lib.set_native_entry_resolver(resolver); |
| 5883 lib.set_native_entry_symbol_resolver(symbol); | 5883 lib.set_native_entry_symbol_resolver(symbol); |
| 5884 return Api::Success(); | 5884 return Api::Success(); |
| 5885 } | 5885 } |
| 5886 | 5886 |
| 5887 | 5887 |
| 5888 DART_EXPORT Dart_Handle | 5888 DART_EXPORT Dart_Handle |
| 5889 Dart_GetNativeResolver(Dart_Handle library, | 5889 Dart_GetNativeResolver(Dart_Handle library, |
| 5890 Dart_NativeEntryResolver* resolver) { | 5890 Dart_NativeEntryResolver* resolver) { |
| 5891 if (resolver == NULL) { |
| 5892 RETURN_NULL_ERROR(resolver); |
| 5893 } |
| 5891 *resolver = NULL; | 5894 *resolver = NULL; |
| 5892 DARTSCOPE(Thread::Current()); | 5895 DARTSCOPE(Thread::Current()); |
| 5893 const Library& lib = Api::UnwrapLibraryHandle(Z, library); | 5896 const Library& lib = Api::UnwrapLibraryHandle(Z, library); |
| 5894 if (lib.IsNull()) { | 5897 if (lib.IsNull()) { |
| 5895 RETURN_TYPE_ERROR(Z, library, Library); | 5898 RETURN_TYPE_ERROR(Z, library, Library); |
| 5896 } | 5899 } |
| 5897 *resolver = lib.native_entry_resolver(); | 5900 *resolver = lib.native_entry_resolver(); |
| 5898 return Api::Success(); | 5901 return Api::Success(); |
| 5899 } | 5902 } |
| 5900 | 5903 |
| 5901 | 5904 |
| 5902 DART_EXPORT Dart_Handle Dart_GetNativeSymbol(Dart_Handle library, | 5905 DART_EXPORT Dart_Handle Dart_GetNativeSymbol(Dart_Handle library, |
| 5903 Dart_NativeEntrySymbol* resolver) { | 5906 Dart_NativeEntrySymbol* resolver) { |
| 5907 if (resolver == NULL) { |
| 5908 RETURN_NULL_ERROR(resolver); |
| 5909 } |
| 5904 *resolver = NULL; | 5910 *resolver = NULL; |
| 5905 DARTSCOPE(Thread::Current()); | 5911 DARTSCOPE(Thread::Current()); |
| 5906 const Library& lib = Api::UnwrapLibraryHandle(Z, library); | 5912 const Library& lib = Api::UnwrapLibraryHandle(Z, library); |
| 5907 if (lib.IsNull()) { | 5913 if (lib.IsNull()) { |
| 5908 RETURN_TYPE_ERROR(Z, library, Library); | 5914 RETURN_TYPE_ERROR(Z, library, Library); |
| 5909 } | 5915 } |
| 5910 *resolver = lib.native_entry_symbol_resolver(); | 5916 *resolver = lib.native_entry_symbol_resolver(); |
| 5911 return Api::Success(); | 5917 return Api::Success(); |
| 5912 } | 5918 } |
| 5913 | 5919 |
| (...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6644 | 6650 |
| 6645 DART_EXPORT bool Dart_IsPrecompiledRuntime() { | 6651 DART_EXPORT bool Dart_IsPrecompiledRuntime() { |
| 6646 #if defined(DART_PRECOMPILED_RUNTIME) | 6652 #if defined(DART_PRECOMPILED_RUNTIME) |
| 6647 return true; | 6653 return true; |
| 6648 #else | 6654 #else |
| 6649 return false; | 6655 return false; |
| 6650 #endif | 6656 #endif |
| 6651 } | 6657 } |
| 6652 | 6658 |
| 6653 } // namespace dart | 6659 } // namespace dart |
| OLD | NEW |