OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 "platform/assert.h" | 7 #include "platform/assert.h" |
8 #include "vm/bigint_operations.h" | 8 #include "vm/bigint_operations.h" |
9 #include "vm/class_finalizer.h" | 9 #include "vm/class_finalizer.h" |
10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
738 DART_EXPORT const char* Dart_VersionString() { | 738 DART_EXPORT const char* Dart_VersionString() { |
739 return Version::String(); | 739 return Version::String(); |
740 } | 740 } |
741 | 741 |
742 DART_EXPORT bool Dart_Initialize( | 742 DART_EXPORT bool Dart_Initialize( |
743 Dart_IsolateCreateCallback create, | 743 Dart_IsolateCreateCallback create, |
744 Dart_IsolateInterruptCallback interrupt, | 744 Dart_IsolateInterruptCallback interrupt, |
745 Dart_IsolateUnhandledExceptionCallback unhandled, | 745 Dart_IsolateUnhandledExceptionCallback unhandled, |
746 Dart_IsolateShutdownCallback shutdown, | 746 Dart_IsolateShutdownCallback shutdown, |
747 Dart_FileOpenCallback file_open, | 747 Dart_FileOpenCallback file_open, |
748 Dart_FileReadCallback file_read, | |
749 Dart_FileWriteCallback file_write, | 748 Dart_FileWriteCallback file_write, |
750 Dart_FileCloseCallback file_close) { | 749 Dart_FileCloseCallback file_close) { |
751 const char* err_msg = Dart::InitOnce(create, interrupt, unhandled, shutdown, | 750 const char* err_msg = Dart::InitOnce(create, interrupt, unhandled, shutdown, |
752 file_open, file_read, file_write, | 751 file_open, file_write, file_close); |
753 file_close); | |
754 if (err_msg != NULL) { | 752 if (err_msg != NULL) { |
755 OS::PrintErr("Dart_Initialize: %s\n", err_msg); | 753 OS::PrintErr("Dart_Initialize: %s\n", err_msg); |
756 return false; | 754 return false; |
757 } | 755 } |
758 return true; | 756 return true; |
759 } | 757 } |
760 | 758 |
761 DART_EXPORT bool Dart_SetVMFlags(int argc, const char** argv) { | 759 DART_EXPORT bool Dart_SetVMFlags(int argc, const char** argv) { |
762 return Flags::ProcessCommandLineFlags(argc, argv); | 760 return Flags::ProcessCommandLineFlags(argc, argv); |
763 } | 761 } |
(...skipping 4084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4848 } | 4846 } |
4849 { | 4847 { |
4850 NoGCScope no_gc; | 4848 NoGCScope no_gc; |
4851 RawObject* raw_obj = obj.raw(); | 4849 RawObject* raw_obj = obj.raw(); |
4852 isolate->heap()->SetPeer(raw_obj, peer); | 4850 isolate->heap()->SetPeer(raw_obj, peer); |
4853 } | 4851 } |
4854 return Api::Success(isolate); | 4852 return Api::Success(isolate); |
4855 } | 4853 } |
4856 | 4854 |
4857 } // namespace dart | 4855 } // namespace dart |
OLD | NEW |