| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 isolate->heap()->Profile(callback, stream); | 729 isolate->heap()->Profile(callback, stream); |
| 730 return Api::Success(isolate); | 730 return Api::Success(isolate); |
| 731 } | 731 } |
| 732 | 732 |
| 733 // --- Initialization and Globals --- | 733 // --- Initialization and Globals --- |
| 734 | 734 |
| 735 DART_EXPORT const char* Dart_VersionString() { | 735 DART_EXPORT const char* Dart_VersionString() { |
| 736 return Version::String(); | 736 return Version::String(); |
| 737 } | 737 } |
| 738 | 738 |
| 739 DART_EXPORT bool Dart_Initialize(Dart_IsolateCreateCallback create, | 739 DART_EXPORT bool Dart_Initialize( |
| 740 Dart_IsolateInterruptCallback interrupt, | 740 Dart_IsolateCreateCallback create, |
| 741 Dart_IsolateShutdownCallback shutdown) { | 741 Dart_IsolateInterruptCallback interrupt, |
| 742 const char* err_msg = Dart::InitOnce(create, interrupt, shutdown); | 742 Dart_IsolateUnhandledExceptionCallback unhandled, |
| 743 Dart_IsolateShutdownCallback shutdown) { |
| 744 const char* err_msg = Dart::InitOnce(create, interrupt, unhandled, shutdown); |
| 743 if (err_msg != NULL) { | 745 if (err_msg != NULL) { |
| 744 OS::PrintErr("Dart_Initialize: %s\n", err_msg); | 746 OS::PrintErr("Dart_Initialize: %s\n", err_msg); |
| 745 return false; | 747 return false; |
| 746 } | 748 } |
| 747 return true; | 749 return true; |
| 748 } | 750 } |
| 749 | 751 |
| 750 DART_EXPORT bool Dart_SetVMFlags(int argc, const char** argv) { | 752 DART_EXPORT bool Dart_SetVMFlags(int argc, const char** argv) { |
| 751 return Flags::ProcessCommandLineFlags(argc, argv); | 753 return Flags::ProcessCommandLineFlags(argc, argv); |
| 752 } | 754 } |
| (...skipping 3744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4497 } | 4499 } |
| 4498 { | 4500 { |
| 4499 NoGCScope no_gc; | 4501 NoGCScope no_gc; |
| 4500 RawObject* raw_obj = obj.raw(); | 4502 RawObject* raw_obj = obj.raw(); |
| 4501 isolate->heap()->SetPeer(raw_obj, peer); | 4503 isolate->heap()->SetPeer(raw_obj, peer); |
| 4502 } | 4504 } |
| 4503 return Api::Success(isolate); | 4505 return Api::Success(isolate); |
| 4504 } | 4506 } |
| 4505 | 4507 |
| 4506 } // namespace dart | 4508 } // namespace dart |
| OLD | NEW |