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

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: Comments addressed. 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
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/vm/dart.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 * successful and true if successful. The embedder is responsible for 239 * successful and true if successful. The embedder is responsible for
240 * maintaining consistency in the case of errors (e.g: isolate is created, 240 * maintaining consistency in the case of errors (e.g: isolate is created,
241 * but loading of scripts fails then the embedder should ensure that 241 * but loading of scripts fails then the embedder should ensure that
242 * Dart_ShutdownIsolate is called on the isolate). 242 * Dart_ShutdownIsolate is called on the isolate).
243 * In the case of errors the caller is responsible for freeing the buffer 243 * In the case of errors the caller is responsible for freeing the buffer
244 * returned in error containing an error string. 244 * returned in error containing an error string.
245 */ 245 */
246 typedef bool (*Dart_IsolateCreateCallback)(void* callback_data, char** error); 246 typedef bool (*Dart_IsolateCreateCallback)(void* callback_data, char** error);
247 247
248 /** 248 /**
249 * Initializes the VM with the given commmand line flags. 249 * Initializes the VM.
250 * 250 *
251 * \param argc The length of the arguments array.
252 * \param argv An array of arguments.
253 * \param callback A function to be called during isolate creation. 251 * \param callback A function to be called during isolate creation.
254 * See Dart_IsolateCreateCallback. 252 * See Dart_IsolateCreateCallback.
255 * 253 *
256 * \return True if initialization is successful. 254 * \return True if initialization is successful.
257 */ 255 */
258 DART_EXPORT bool Dart_Initialize(int argc, const char** argv, 256 DART_EXPORT bool Dart_Initialize(Dart_IsolateCreateCallback callback);
259 Dart_IsolateCreateCallback callback); 257
258 /**
259 * Sets command line flags. Should be called before Dart_Initialize.
260 *
261 * \param argc The length of the arguments array.
262 * \param argv An array of arguments.
263 *
264 * \return True if VM flags set successfully.
265 */
266 DART_EXPORT bool Dart_SetVMFlags(int argc, const char** argv);
260 267
261 /** 268 /**
262 * Returns true if the named VM flag is set. 269 * Returns true if the named VM flag is set.
263 */ 270 */
264 DART_EXPORT bool Dart_IsVMFlagSet(const char* flag_name); 271 DART_EXPORT bool Dart_IsVMFlagSet(const char* flag_name);
265 272
266 // --- Isolates --- 273 // --- Isolates ---
267 274
268 /** 275 /**
269 * An isolate is the unit of concurrency in Dart. Each isolate has 276 * An isolate is the unit of concurrency in Dart. Each isolate has
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after
1227 1234
1228 // --- Profiling support ---- 1235 // --- Profiling support ----
1229 1236
1230 // External pprof support for gathering and dumping symbolic 1237 // External pprof support for gathering and dumping symbolic
1231 // information that can be used for better profile reports for 1238 // information that can be used for better profile reports for
1232 // dynamically generated code. 1239 // dynamically generated code.
1233 DART_EXPORT void Dart_InitPprofSupport(); 1240 DART_EXPORT void Dart_InitPprofSupport();
1234 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); 1241 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size);
1235 1242
1236 #endif // INCLUDE_DART_API_H_ 1243 #endif // INCLUDE_DART_API_H_
OLDNEW
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/vm/dart.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698