Index: runtime/vm/dart_api_impl.cc |
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc |
index 4bc1125f23058b732b486cee122f850f03dd89db..f02da77da38680860a5659751abef9f341ded32f 100644 |
--- a/runtime/vm/dart_api_impl.cc |
+++ b/runtime/vm/dart_api_impl.cc |
@@ -5868,21 +5868,38 @@ Dart_CompileToKernel(const char* script_uri) { |
#endif |
} |
-DART_EXPORT Dart_KernelCompilationResult |
-Dart_CompileSourcesToKernel(const char* script_uri, |
- int source_files_count, |
- Dart_SourceFile sources[]) { |
+static Dart_KernelCompilationResult CompileSourcesToKernel( |
+ const char* script_uri, |
+ int source_files_count, |
+ Dart_SourceFile sources[], |
+ bool incremental) { |
#ifdef DART_PRECOMPILED_RUNTIME |
Dart_KernelCompilationResult result; |
result.status = Dart_KernelCompilationStatus_Unknown; |
result.error = strdup("Dart_CompileSourcesToKernel is unsupported."); |
return result; |
#else |
- return KernelIsolate::CompileToKernel(script_uri, source_files_count, |
- sources); |
+ return KernelIsolate::CompileToKernel(script_uri, source_files_count, sources, |
+ incremental); |
#endif |
} |
+DART_EXPORT Dart_KernelCompilationResult |
+Dart_CompileSourcesToKernel(const char* script_uri, |
+ int source_files_count, |
+ Dart_SourceFile sources[]) { |
+ return CompileSourcesToKernel(script_uri, source_files_count, sources, |
+ false /* incremental */); |
+} |
+ |
+DART_EXPORT Dart_KernelCompilationResult |
+Dart_IncrementallyCompileSourcesToKernel(const char* script_uri, |
+ int source_files_count, |
+ Dart_SourceFile sources[]) { |
+ return CompileSourcesToKernel(script_uri, source_files_count, sources, |
+ true /* incremental */); |
+} |
+ |
// --- Service support --- |
DART_EXPORT bool Dart_IsServiceIsolate(Dart_Isolate isolate) { |