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

Side by Side Diff: runtime/include/dart_api.h

Issue 8713012: Introduce Dart_SetVMFlags API function. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Force atomicity. Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 #ifndef INCLUDE_DART_API_H_ 5 #ifndef INCLUDE_DART_API_H_
6 #define INCLUDE_DART_API_H_ 6 #define INCLUDE_DART_API_H_
7 7
8 /** \mainpage Dart Embedding API Reference 8 /** \mainpage Dart Embedding API Reference
9 * 9 *
10 * Dart is a class-based programming language for creating structured 10 * Dart is a class-based programming language for creating structured
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 * embedder-specific data created during the initialization of this 240 * embedder-specific data created during the initialization of this
241 * isolate. This data will, in turn, be passed by the VM to all 241 * isolate. This data will, in turn, be passed by the VM to all
242 * isolates spawned from the isolate currently being initialized. 242 * isolates spawned from the isolate currently being initialized.
243 */ 243 */
244 typedef void* (*Dart_IsolateInitCallback)(void* embedder_data); 244 typedef void* (*Dart_IsolateInitCallback)(void* embedder_data);
245 // TODO(iposva): Pass a specification of the app file being spawned. 245 // TODO(iposva): Pass a specification of the app file being spawned.
246 // TODO(turnidge): We don't actually shut down the isolate on NULL yet. 246 // TODO(turnidge): We don't actually shut down the isolate on NULL yet.
247 // TODO(turnidge): Should we separate the two return values? 247 // TODO(turnidge): Should we separate the two return values?
248 248
249 /** 249 /**
250 * Initializes the VM with the given commmand line flags. 250 * Initializes the VM.
251 * 251 *
252 * \param argc The length of the arguments array.
253 * \param argv An array of arguments.
254 * \param callback A function to be called during isolate creation. 252 * \param callback A function to be called during isolate creation.
255 * See Dart_IsolateInitCallback. 253 * See Dart_IsolateInitCallback.
256 * 254 *
257 * \return True if initialization is successful. 255 * \return True if initialization is successful.
258 */ 256 */
259 DART_EXPORT bool Dart_Initialize(int argc, const char** argv, 257 DART_EXPORT bool Dart_Initialize(Dart_IsolateInitCallback callback);
260 Dart_IsolateInitCallback callback); 258
259 /**
260 * Sets command line flags. Should be called before Dart_Initialize.
261 *
262 * \param argc The length of the arguments array.
263 * \param argv An array of arguments.
264 */
265 DART_EXPORT void Dart_SetVMFlags(int argc, const char** argv);
siva 2011/11/30 19:09:38 Please make this also return bool, so that we have
podivilov 2011/12/01 11:10:22 Done.
261 266
262 /** 267 /**
263 * Returns true if the named VM flag is set. 268 * Returns true if the named VM flag is set.
264 */ 269 */
265 DART_EXPORT bool Dart_IsVMFlagSet(const char* flag_name); 270 DART_EXPORT bool Dart_IsVMFlagSet(const char* flag_name);
266 271
267 // --- Isolates --- 272 // --- Isolates ---
268 273
269 /** 274 /**
270 * An isolate is the unit of concurrency in Dart. Each isolate has 275 * An isolate is the unit of concurrency in Dart. Each isolate has
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after
1228 1233
1229 // --- Profiling support ---- 1234 // --- Profiling support ----
1230 1235
1231 // External pprof support for gathering and dumping symbolic 1236 // External pprof support for gathering and dumping symbolic
1232 // information that can be used for better profile reports for 1237 // information that can be used for better profile reports for
1233 // dynamically generated code. 1238 // dynamically generated code.
1234 DART_EXPORT void Dart_InitPprofSupport(); 1239 DART_EXPORT void Dart_InitPprofSupport();
1235 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); 1240 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size);
1236 1241
1237 #endif // INCLUDE_DART_API_H_ 1242 #endif // INCLUDE_DART_API_H_
OLDNEW
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/vm/dart.h » ('j') | runtime/vm/dart.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698