Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(384)

Side by Side Diff: runtime/vm/dart_api_impl.cc

Issue 2993013002: Introduce IKG into kernel-service to support incremental compilation. (Closed)
Patch Set: Use new acceptDelta api. Safe guard against no thread/isolate Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 5865 matching lines...) Expand 10 before | Expand all | Expand 10 after
5876 result.error = strdup("Dart_CompileToKernel is unsupported."); 5876 result.error = strdup("Dart_CompileToKernel is unsupported.");
5877 return result; 5877 return result;
5878 #else 5878 #else
5879 return KernelIsolate::CompileToKernel(script_uri); 5879 return KernelIsolate::CompileToKernel(script_uri);
5880 #endif 5880 #endif
5881 } 5881 }
5882 5882
5883 DART_EXPORT Dart_KernelCompilationResult 5883 DART_EXPORT Dart_KernelCompilationResult
5884 Dart_CompileSourcesToKernel(const char* script_uri, 5884 Dart_CompileSourcesToKernel(const char* script_uri,
5885 int source_files_count, 5885 int source_files_count,
5886 Dart_SourceFile sources[]) { 5886 Dart_SourceFile sources[],
5887 bool incremental_compile) {
5887 #ifdef DART_PRECOMPILED_RUNTIME 5888 #ifdef DART_PRECOMPILED_RUNTIME
5888 Dart_KernelCompilationResult result; 5889 Dart_KernelCompilationResult result;
5889 result.status = Dart_KernelCompilationStatus_Unknown; 5890 result.status = Dart_KernelCompilationStatus_Unknown;
5890 result.error = strdup("Dart_CompileSourcesToKernel is unsupported."); 5891 result.error = strdup("Dart_CompileSourcesToKernel is unsupported.");
5891 return result; 5892 return result;
5892 #else 5893 #else
5893 return KernelIsolate::CompileToKernel(script_uri, source_files_count, 5894 return KernelIsolate::CompileToKernel(script_uri, source_files_count, sources,
5894 sources); 5895 incremental_compile);
5895 #endif 5896 #endif
5896 } 5897 }
5897 5898
5898 // --- Service support --- 5899 // --- Service support ---
5899 5900
5900 DART_EXPORT bool Dart_IsServiceIsolate(Dart_Isolate isolate) { 5901 DART_EXPORT bool Dart_IsServiceIsolate(Dart_Isolate isolate) {
5901 Isolate* iso = reinterpret_cast<Isolate*>(isolate); 5902 Isolate* iso = reinterpret_cast<Isolate*>(isolate);
5902 return ServiceIsolate::IsServiceIsolate(iso); 5903 return ServiceIsolate::IsServiceIsolate(iso);
5903 } 5904 }
5904 5905
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
6782 #endif 6783 #endif
6783 } 6784 }
6784 6785
6785 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { 6786 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) {
6786 #ifndef PRODUCT 6787 #ifndef PRODUCT
6787 Profiler::DumpStackTrace(context); 6788 Profiler::DumpStackTrace(context);
6788 #endif 6789 #endif
6789 } 6790 }
6790 6791
6791 } // namespace dart 6792 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698