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 "lib/stacktrace.h" | 9 #include "lib/stacktrace.h" |
10 #include "platform/assert.h" | 10 #include "platform/assert.h" |
(...skipping 5871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5882 result.error = strdup("Dart_CompileToKernel is unsupported."); | 5882 result.error = strdup("Dart_CompileToKernel is unsupported."); |
5883 return result; | 5883 return result; |
5884 #else | 5884 #else |
5885 return KernelIsolate::CompileToKernel(script_uri); | 5885 return KernelIsolate::CompileToKernel(script_uri); |
5886 #endif | 5886 #endif |
5887 } | 5887 } |
5888 | 5888 |
5889 DART_EXPORT Dart_KernelCompilationResult | 5889 DART_EXPORT Dart_KernelCompilationResult |
5890 Dart_CompileSourcesToKernel(const char* script_uri, | 5890 Dart_CompileSourcesToKernel(const char* script_uri, |
5891 int source_files_count, | 5891 int source_files_count, |
5892 Dart_SourceFile sources[], | 5892 Dart_SourceFile sources[]) { |
5893 bool incremental_compile) { | |
5894 #ifdef DART_PRECOMPILED_RUNTIME | 5893 #ifdef DART_PRECOMPILED_RUNTIME |
5895 Dart_KernelCompilationResult result; | 5894 Dart_KernelCompilationResult result; |
5896 result.status = Dart_KernelCompilationStatus_Unknown; | 5895 result.status = Dart_KernelCompilationStatus_Unknown; |
5897 result.error = strdup("Dart_CompileSourcesToKernel is unsupported."); | 5896 result.error = strdup("Dart_CompileSourcesToKernel is unsupported."); |
5898 return result; | 5897 return result; |
5899 #else | 5898 #else |
5900 return KernelIsolate::CompileToKernel(script_uri, source_files_count, sources, | 5899 return KernelIsolate::CompileToKernel(script_uri, source_files_count, |
5901 incremental_compile); | 5900 sources); |
5902 #endif | 5901 #endif |
5903 } | 5902 } |
5904 | 5903 |
5905 // --- Service support --- | 5904 // --- Service support --- |
5906 | 5905 |
5907 DART_EXPORT bool Dart_IsServiceIsolate(Dart_Isolate isolate) { | 5906 DART_EXPORT bool Dart_IsServiceIsolate(Dart_Isolate isolate) { |
5908 Isolate* iso = reinterpret_cast<Isolate*>(isolate); | 5907 Isolate* iso = reinterpret_cast<Isolate*>(isolate); |
5909 return ServiceIsolate::IsServiceIsolate(iso); | 5908 return ServiceIsolate::IsServiceIsolate(iso); |
5910 } | 5909 } |
5911 | 5910 |
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6789 #endif | 6788 #endif |
6790 } | 6789 } |
6791 | 6790 |
6792 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { | 6791 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { |
6793 #ifndef PRODUCT | 6792 #ifndef PRODUCT |
6794 Profiler::DumpStackTrace(context); | 6793 Profiler::DumpStackTrace(context); |
6795 #endif | 6794 #endif |
6796 } | 6795 } |
6797 | 6796 |
6798 } // namespace dart | 6797 } // namespace dart |
OLD | NEW |