| 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 6040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6051 #ifdef DART_PRECOMPILED_RUNTIME | 6051 #ifdef DART_PRECOMPILED_RUNTIME |
| 6052 Dart_KernelCompilationResult result; | 6052 Dart_KernelCompilationResult result; |
| 6053 result.status = Dart_KernelCompilationStatus_Unknown; | 6053 result.status = Dart_KernelCompilationStatus_Unknown; |
| 6054 result.error = strdup("Dart_CompileToKernel is unsupported."); | 6054 result.error = strdup("Dart_CompileToKernel is unsupported."); |
| 6055 return result; | 6055 return result; |
| 6056 #else | 6056 #else |
| 6057 return KernelIsolate::CompileToKernel(script_uri); | 6057 return KernelIsolate::CompileToKernel(script_uri); |
| 6058 #endif | 6058 #endif |
| 6059 } | 6059 } |
| 6060 | 6060 |
| 6061 DART_EXPORT Dart_KernelCompilationResult |
| 6062 Dart_CompileSourcesToKernel(const char* script_uri, |
| 6063 int source_files_count, |
| 6064 Dart_SourceFile sources[]) { |
| 6065 #ifdef DART_PRECOMPILED_RUNTIME |
| 6066 Dart_KernelCompilationResult result; |
| 6067 result.status = Dart_KernelCompilationStatus_Unknown; |
| 6068 result.error = strdup("Dart_CompileSourcesToKernel is unsupported."); |
| 6069 return result; |
| 6070 #else |
| 6071 return KernelIsolate::CompileToKernel(script_uri, source_files_count, |
| 6072 sources); |
| 6073 #endif |
| 6074 } |
| 6075 |
| 6061 // --- Service support --- | 6076 // --- Service support --- |
| 6062 | 6077 |
| 6063 DART_EXPORT bool Dart_IsServiceIsolate(Dart_Isolate isolate) { | 6078 DART_EXPORT bool Dart_IsServiceIsolate(Dart_Isolate isolate) { |
| 6064 Isolate* iso = reinterpret_cast<Isolate*>(isolate); | 6079 Isolate* iso = reinterpret_cast<Isolate*>(isolate); |
| 6065 return ServiceIsolate::IsServiceIsolate(iso); | 6080 return ServiceIsolate::IsServiceIsolate(iso); |
| 6066 } | 6081 } |
| 6067 | 6082 |
| 6068 | 6083 |
| 6069 DART_EXPORT Dart_Port Dart_ServiceWaitForLoadPort() { | 6084 DART_EXPORT Dart_Port Dart_ServiceWaitForLoadPort() { |
| 6070 return ServiceIsolate::WaitForLoadPort(); | 6085 return ServiceIsolate::WaitForLoadPort(); |
| (...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6859 } | 6874 } |
| 6860 | 6875 |
| 6861 | 6876 |
| 6862 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { | 6877 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { |
| 6863 #ifndef PRODUCT | 6878 #ifndef PRODUCT |
| 6864 Profiler::DumpStackTrace(context); | 6879 Profiler::DumpStackTrace(context); |
| 6865 #endif | 6880 #endif |
| 6866 } | 6881 } |
| 6867 | 6882 |
| 6868 } // namespace dart | 6883 } // namespace dart |
| OLD | NEW |