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 #ifndef VM_ISOLATE_H_ | 5 #ifndef VM_ISOLATE_H_ |
6 #define VM_ISOLATE_H_ | 6 #define VM_ISOLATE_H_ |
7 | 7 |
8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "vm/base_isolate.h" | 10 #include "vm/base_isolate.h" |
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
819 }; | 819 }; |
820 | 820 |
821 | 821 |
822 class IsolateSpawnState { | 822 class IsolateSpawnState { |
823 public: | 823 public: |
824 IsolateSpawnState(Dart_Port parent_port, | 824 IsolateSpawnState(Dart_Port parent_port, |
825 const Function& func, | 825 const Function& func, |
826 const Instance& message); | 826 const Instance& message); |
827 IsolateSpawnState(Dart_Port parent_port, | 827 IsolateSpawnState(Dart_Port parent_port, |
828 const char* script_url, | 828 const char* script_url, |
829 const char* package_root, | |
830 const Instance& args, | 829 const Instance& args, |
831 const Instance& message); | 830 const Instance& message); |
832 ~IsolateSpawnState(); | 831 ~IsolateSpawnState(); |
833 | 832 |
834 Isolate* isolate() const { return isolate_; } | 833 Isolate* isolate() const { return isolate_; } |
835 void set_isolate(Isolate* value) { isolate_ = value; } | 834 void set_isolate(Isolate* value) { isolate_ = value; } |
836 | 835 |
837 Dart_Port parent_port() const { return parent_port_; } | 836 Dart_Port parent_port() const { return parent_port_; } |
838 char* script_url() const { return script_url_; } | 837 char* script_url() const { return script_url_; } |
839 char* package_root() const { return package_root_; } | |
840 char* library_url() const { return library_url_; } | 838 char* library_url() const { return library_url_; } |
841 char* class_name() const { return class_name_; } | 839 char* class_name() const { return class_name_; } |
842 char* function_name() const { return function_name_; } | 840 char* function_name() const { return function_name_; } |
843 char* exception_callback_name() const { return exception_callback_name_; } | 841 char* exception_callback_name() const { return exception_callback_name_; } |
844 bool is_spawn_uri() const { return library_url_ == NULL; } | 842 bool is_spawn_uri() const { return library_url_ == NULL; } |
845 | 843 |
846 RawObject* ResolveFunction(); | 844 RawObject* ResolveFunction(); |
847 RawInstance* BuildArgs(); | 845 RawInstance* BuildArgs(); |
848 RawInstance* BuildMessage(); | 846 RawInstance* BuildMessage(); |
849 void Cleanup(); | 847 void Cleanup(); |
850 | 848 |
851 private: | 849 private: |
852 Isolate* isolate_; | 850 Isolate* isolate_; |
853 Dart_Port parent_port_; | 851 Dart_Port parent_port_; |
854 char* script_url_; | 852 char* script_url_; |
855 char* package_root_; | |
856 char* library_url_; | 853 char* library_url_; |
857 char* class_name_; | 854 char* class_name_; |
858 char* function_name_; | 855 char* function_name_; |
859 char* exception_callback_name_; | 856 char* exception_callback_name_; |
860 uint8_t* serialized_args_; | 857 uint8_t* serialized_args_; |
861 intptr_t serialized_args_len_; | 858 intptr_t serialized_args_len_; |
862 uint8_t* serialized_message_; | 859 uint8_t* serialized_message_; |
863 intptr_t serialized_message_len_; | 860 intptr_t serialized_message_len_; |
864 }; | 861 }; |
865 | 862 |
866 } // namespace dart | 863 } // namespace dart |
867 | 864 |
868 #endif // VM_ISOLATE_H_ | 865 #endif // VM_ISOLATE_H_ |
OLD | NEW |