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

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

Issue 8713012: Introduce Dart_SetVMFlags API function. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' 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/vm/dart.cc ('k') | no next file » | 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 #include "include/dart_api.h" 5 #include "include/dart_api.h"
6 6
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/class_finalizer.h" 8 #include "vm/class_finalizer.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart.h" 10 #include "vm/dart.h"
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 DART_EXPORT Dart_Handle Dart_MakePersistentHandle(Dart_Handle object) { 456 DART_EXPORT Dart_Handle Dart_MakePersistentHandle(Dart_Handle object) {
457 UNIMPLEMENTED(); 457 UNIMPLEMENTED();
458 return NULL; 458 return NULL;
459 } 459 }
460 460
461 461
462 // --- Initialization and Globals --- 462 // --- Initialization and Globals ---
463 463
464 464
465 // TODO(iposva): This is a placeholder for the eventual external Dart API. 465 // TODO(iposva): This is a placeholder for the eventual external Dart API.
466 DART_EXPORT bool Dart_Initialize(int argc, 466 DART_EXPORT bool Dart_Initialize(Dart_IsolateInitCallback callback) {
467 const char** argv, 467 return Dart::InitOnce(callback);
468 Dart_IsolateInitCallback callback) {
469 return Dart::InitOnce(argc, argv, callback);
470 } 468 }
471 469
470 DART_EXPORT void Dart_SetVMFlags(int argc, const char** argv) {
471 Flags::ProcessCommandLineFlags(argc, argv);
siva 2011/11/29 19:08:43 Currently we ensure that Dart_Initialize is called
podivilov 2011/11/30 11:50:36 Done.
472 }
472 473
473 DART_EXPORT bool Dart_IsVMFlagSet(const char* flag_name) { 474 DART_EXPORT bool Dart_IsVMFlagSet(const char* flag_name) {
474 if (Flags::Lookup(flag_name) != NULL) { 475 if (Flags::Lookup(flag_name) != NULL) {
475 return true; 476 return true;
476 } 477 }
477 return false; 478 return false;
478 } 479 }
479 480
480 481
481 // --- Isolates --- 482 // --- Isolates ---
(...skipping 1815 matching lines...) Expand 10 before | Expand all | Expand 10 after
2297 } 2298 }
2298 delete debug_region; 2299 delete debug_region;
2299 } else { 2300 } else {
2300 *buffer = NULL; 2301 *buffer = NULL;
2301 *buffer_size = 0; 2302 *buffer_size = 0;
2302 } 2303 }
2303 } 2304 }
2304 2305
2305 2306
2306 } // namespace dart 2307 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698