| 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 10 matching lines...) Expand all Loading... |
| 21 #include "vm/native_message_handler.h" | 21 #include "vm/native_message_handler.h" |
| 22 #include "vm/object.h" | 22 #include "vm/object.h" |
| 23 #include "vm/object_store.h" | 23 #include "vm/object_store.h" |
| 24 #include "vm/port.h" | 24 #include "vm/port.h" |
| 25 #include "vm/resolver.h" | 25 #include "vm/resolver.h" |
| 26 #include "vm/stack_frame.h" | 26 #include "vm/stack_frame.h" |
| 27 #include "vm/symbols.h" | 27 #include "vm/symbols.h" |
| 28 #include "vm/timer.h" | 28 #include "vm/timer.h" |
| 29 #include "vm/unicode.h" | 29 #include "vm/unicode.h" |
| 30 #include "vm/verifier.h" | 30 #include "vm/verifier.h" |
| 31 #include "vm/version.h" |
| 31 | 32 |
| 32 namespace dart { | 33 namespace dart { |
| 33 | 34 |
| 34 DECLARE_FLAG(bool, print_class_table); | 35 DECLARE_FLAG(bool, print_class_table); |
| 35 DECLARE_FLAG(bool, use_cha); | 36 DECLARE_FLAG(bool, use_cha); |
| 36 | 37 |
| 37 ThreadLocalKey Api::api_native_key_ = Thread::kUnsetThreadLocalKey; | 38 ThreadLocalKey Api::api_native_key_ = Thread::kUnsetThreadLocalKey; |
| 38 | 39 |
| 39 | 40 |
| 40 const char* CanonicalFunction(const char* func) { | 41 const char* CanonicalFunction(const char* func) { |
| (...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 722 CHECK_ISOLATE(isolate); | 723 CHECK_ISOLATE(isolate); |
| 723 if (callback == NULL) { | 724 if (callback == NULL) { |
| 724 RETURN_NULL_ERROR(callback); | 725 RETURN_NULL_ERROR(callback); |
| 725 } | 726 } |
| 726 isolate->heap()->Profile(callback, stream); | 727 isolate->heap()->Profile(callback, stream); |
| 727 return Api::Success(isolate); | 728 return Api::Success(isolate); |
| 728 } | 729 } |
| 729 | 730 |
| 730 // --- Initialization and Globals --- | 731 // --- Initialization and Globals --- |
| 731 | 732 |
| 733 DART_EXPORT const char* Dart_VersionString() { |
| 734 return Version::String(); |
| 735 } |
| 732 | 736 |
| 733 DART_EXPORT bool Dart_Initialize(Dart_IsolateCreateCallback create, | 737 DART_EXPORT bool Dart_Initialize(Dart_IsolateCreateCallback create, |
| 734 Dart_IsolateInterruptCallback interrupt, | 738 Dart_IsolateInterruptCallback interrupt, |
| 735 Dart_IsolateShutdownCallback shutdown) { | 739 Dart_IsolateShutdownCallback shutdown) { |
| 736 return Dart::InitOnce(create, interrupt, shutdown); | 740 return Dart::InitOnce(create, interrupt, shutdown); |
| 737 } | 741 } |
| 738 | 742 |
| 739 DART_EXPORT bool Dart_SetVMFlags(int argc, const char** argv) { | 743 DART_EXPORT bool Dart_SetVMFlags(int argc, const char** argv) { |
| 740 return Flags::ProcessCommandLineFlags(argc, argv); | 744 return Flags::ProcessCommandLineFlags(argc, argv); |
| 741 } | 745 } |
| (...skipping 3755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4497 } | 4501 } |
| 4498 { | 4502 { |
| 4499 NoGCScope no_gc; | 4503 NoGCScope no_gc; |
| 4500 RawObject* raw_obj = obj.raw(); | 4504 RawObject* raw_obj = obj.raw(); |
| 4501 isolate->heap()->SetPeer(raw_obj, peer); | 4505 isolate->heap()->SetPeer(raw_obj, peer); |
| 4502 } | 4506 } |
| 4503 return Api::Success(isolate); | 4507 return Api::Success(isolate); |
| 4504 } | 4508 } |
| 4505 | 4509 |
| 4506 } // namespace dart | 4510 } // namespace dart |
| OLD | NEW |