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

Unified Diff: runtime/include/dart_api.h

Issue 1373873004: Make --noopt behave like an in-place precompilation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: sync + enable checked mode 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/bin/main.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/include/dart_api.h
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index 031b8c542a8e8097263c00e966fad3e18671fd51..ae9e1d20623b82f154ffaa17004c09cd2c9e17c2 100755
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -2877,8 +2877,29 @@ typedef struct {
} Dart_QualifiedFunctionName;
+/**
+ * Compiles all functions reachable from the provided entry points and marks
+ * the isolate to disallow future compilation.
+ *
+ * \param entry_points A list of functions that may be invoked through the
+ * embedding API, e.g. Dart_Invoke/GetField/SetField/New/InvokeClosure.
+ *
+ * \param reset_fields Controls whether static fields are reset. Fields without
+ * an initializer will be set to null, and fields with an initializer will have
+ * their initializer run the next time they are accessed.
+ *
+ * reset_fields is true when we are about to create a precompilated snapshot.
+ * Some fields are already been initialized as part of the loading logic, and
+ * we want them to be reinitialized in the new process that will load the
+ * snapshot. reset_fields is false for --noopt, which will continue running in
+ * the same process.
+ *
+ * \return An error handle if a compilation error or runtime error running const
+ * constructors was encountered.
+ */
DART_EXPORT Dart_Handle Dart_Precompile(
- Dart_QualifiedFunctionName entry_points[]);
+ Dart_QualifiedFunctionName entry_points[],
+ bool reset_fields);
DART_EXPORT Dart_Handle Dart_CreatePrecompiledSnapshot(
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698