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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 1359963002: Let the embedder provide entry points to Dart_Precompile. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/include/dart_api.h ('k') | runtime/vm/precompiler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 9271c745302295db60ba0b1298ec281967a22782..67fe4681094e2e99fa6cb9a20625c7e044e815c3 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -5930,26 +5930,19 @@ DART_EXPORT Dart_Handle Dart_TimelineAsyncEnd(const char* label,
}
-static void Precompile(Isolate* isolate, Dart_Handle* result) {
- ASSERT(isolate != NULL);
- const Error& error = Error::Handle(isolate, Precompiler::CompileAll());
- if (error.IsNull()) {
- *result = Api::Success();
- } else {
- *result = Api::NewHandle(isolate, error.raw());
- }
-}
-
-
-DART_EXPORT Dart_Handle Dart_Precompile() {
+DART_EXPORT Dart_Handle Dart_Precompile(
+ Dart_QualifiedFunctionName entry_points[]) {
DARTSCOPE(Thread::Current());
Dart_Handle result = Api::CheckAndFinalizePendingClasses(I);
if (::Dart_IsError(result)) {
return result;
}
CHECK_CALLBACK_STATE(I);
- Precompile(I, &result);
- return result;
+ const Error& error = Error::Handle(Precompiler::CompileAll(entry_points));
+ if (!error.IsNull()) {
+ return Api::NewHandle(I, error.raw());
+ }
+ return Api::Success();
}
« no previous file with comments | « runtime/include/dart_api.h ('k') | runtime/vm/precompiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698