| OLD | NEW |
| 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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 DART_EXPORT Dart_Handle Dart_MakePersistentHandle(Dart_Handle object) { | 513 DART_EXPORT Dart_Handle Dart_MakePersistentHandle(Dart_Handle object) { |
| 514 UNIMPLEMENTED(); | 514 UNIMPLEMENTED(); |
| 515 return NULL; | 515 return NULL; |
| 516 } | 516 } |
| 517 | 517 |
| 518 | 518 |
| 519 // --- Initialization and Globals --- | 519 // --- Initialization and Globals --- |
| 520 | 520 |
| 521 | 521 |
| 522 // TODO(iposva): This is a placeholder for the eventual external Dart API. | 522 // TODO(iposva): This is a placeholder for the eventual external Dart API. |
| 523 DART_EXPORT bool Dart_Initialize(int argc, | 523 DART_EXPORT bool Dart_Initialize(Dart_IsolateCreateCallback callback) { |
| 524 const char** argv, | 524 return Dart::InitOnce(callback); |
| 525 Dart_IsolateCreateCallback callback) { | |
| 526 return Dart::InitOnce(argc, argv, callback); | |
| 527 } | 525 } |
| 528 | 526 |
| 527 DART_EXPORT bool Dart_SetVMFlags(int argc, const char** argv) { |
| 528 return Flags::ProcessCommandLineFlags(argc, argv); |
| 529 } |
| 529 | 530 |
| 530 DART_EXPORT bool Dart_IsVMFlagSet(const char* flag_name) { | 531 DART_EXPORT bool Dart_IsVMFlagSet(const char* flag_name) { |
| 531 if (Flags::Lookup(flag_name) != NULL) { | 532 if (Flags::Lookup(flag_name) != NULL) { |
| 532 return true; | 533 return true; |
| 533 } | 534 } |
| 534 return false; | 535 return false; |
| 535 } | 536 } |
| 536 | 537 |
| 537 | 538 |
| 538 // --- Isolates --- | 539 // --- Isolates --- |
| (...skipping 1822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2361 } | 2362 } |
| 2362 delete debug_region; | 2363 delete debug_region; |
| 2363 } else { | 2364 } else { |
| 2364 *buffer = NULL; | 2365 *buffer = NULL; |
| 2365 *buffer_size = 0; | 2366 *buffer_size = 0; |
| 2366 } | 2367 } |
| 2367 } | 2368 } |
| 2368 | 2369 |
| 2369 | 2370 |
| 2370 } // namespace dart | 2371 } // namespace dart |
| OLD | NEW |