| 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 6027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6038 #ifdef DART_PRECOMPILED_RUNTIME | 6038 #ifdef DART_PRECOMPILED_RUNTIME |
| 6039 Dart_KernelCompilationResult result; | 6039 Dart_KernelCompilationResult result; |
| 6040 result.status = Dart_KernelCompilationStatus_Unknown; | 6040 result.status = Dart_KernelCompilationStatus_Unknown; |
| 6041 result.error = strdup("Dart_CompileToKernel is unsupported."); | 6041 result.error = strdup("Dart_CompileToKernel is unsupported."); |
| 6042 return result; | 6042 return result; |
| 6043 #else | 6043 #else |
| 6044 return KernelIsolate::CompileToKernel(script_uri); | 6044 return KernelIsolate::CompileToKernel(script_uri); |
| 6045 #endif | 6045 #endif |
| 6046 } | 6046 } |
| 6047 | 6047 |
| 6048 DART_EXPORT Dart_KernelCompilationResult | |
| 6049 Dart_CompileSourcesToKernel(const char* script_uri, | |
| 6050 int source_files_count, | |
| 6051 Dart_SourceFile sources[]) { | |
| 6052 #ifdef DART_PRECOMPILED_RUNTIME | |
| 6053 Dart_KernelCompilationResult result; | |
| 6054 result.status = Dart_KernelCompilationStatus_Unknown; | |
| 6055 result.error = strdup("Dart_CompileSourcesToKernel is unsupported."); | |
| 6056 return result; | |
| 6057 #else | |
| 6058 return KernelIsolate::CompileToKernel(script_uri, source_files_count, | |
| 6059 sources); | |
| 6060 #endif | |
| 6061 } | |
| 6062 | |
| 6063 // --- Service support --- | 6048 // --- Service support --- |
| 6064 | 6049 |
| 6065 DART_EXPORT bool Dart_IsServiceIsolate(Dart_Isolate isolate) { | 6050 DART_EXPORT bool Dart_IsServiceIsolate(Dart_Isolate isolate) { |
| 6066 Isolate* iso = reinterpret_cast<Isolate*>(isolate); | 6051 Isolate* iso = reinterpret_cast<Isolate*>(isolate); |
| 6067 return ServiceIsolate::IsServiceIsolate(iso); | 6052 return ServiceIsolate::IsServiceIsolate(iso); |
| 6068 } | 6053 } |
| 6069 | 6054 |
| 6070 | 6055 |
| 6071 DART_EXPORT Dart_Port Dart_ServiceWaitForLoadPort() { | 6056 DART_EXPORT Dart_Port Dart_ServiceWaitForLoadPort() { |
| 6072 return ServiceIsolate::WaitForLoadPort(); | 6057 return ServiceIsolate::WaitForLoadPort(); |
| (...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6861 } | 6846 } |
| 6862 | 6847 |
| 6863 | 6848 |
| 6864 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { | 6849 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { |
| 6865 #ifndef PRODUCT | 6850 #ifndef PRODUCT |
| 6866 Profiler::DumpStackTrace(context); | 6851 Profiler::DumpStackTrace(context); |
| 6867 #endif | 6852 #endif |
| 6868 } | 6853 } |
| 6869 | 6854 |
| 6870 } // namespace dart | 6855 } // namespace dart |
| OLD | NEW |