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