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/atomic.h" | 10 #include "vm/atomic.h" |
(...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1025 IsolateSpawnState(Dart_Port parent_port, | 1025 IsolateSpawnState(Dart_Port parent_port, |
1026 const Function& func, | 1026 const Function& func, |
1027 const Instance& message, | 1027 const Instance& message, |
1028 bool paused, | 1028 bool paused, |
1029 bool errorsAreFatal, | 1029 bool errorsAreFatal, |
1030 Dart_Port onExit, | 1030 Dart_Port onExit, |
1031 Dart_Port onError); | 1031 Dart_Port onError); |
1032 IsolateSpawnState(Dart_Port parent_port, | 1032 IsolateSpawnState(Dart_Port parent_port, |
1033 const char* script_url, | 1033 const char* script_url, |
1034 const char* package_root, | 1034 const char* package_root, |
| 1035 const char** package_map, |
1035 const Instance& args, | 1036 const Instance& args, |
1036 const Instance& message, | 1037 const Instance& message, |
1037 bool paused, | 1038 bool paused, |
1038 bool errorsAreFatal, | 1039 bool errorsAreFatal, |
1039 Dart_Port onExit, | 1040 Dart_Port onExit, |
1040 Dart_Port onError); | 1041 Dart_Port onError); |
1041 ~IsolateSpawnState(); | 1042 ~IsolateSpawnState(); |
1042 | 1043 |
1043 Isolate* isolate() const { return isolate_; } | 1044 Isolate* isolate() const { return isolate_; } |
1044 void set_isolate(Isolate* value) { isolate_ = value; } | 1045 void set_isolate(Isolate* value) { isolate_ = value; } |
1045 | 1046 |
1046 Dart_Port parent_port() const { return parent_port_; } | 1047 Dart_Port parent_port() const { return parent_port_; } |
1047 Dart_Port on_exit_port() const { return on_exit_port_; } | 1048 Dart_Port on_exit_port() const { return on_exit_port_; } |
1048 Dart_Port on_error_port() const { return on_error_port_; } | 1049 Dart_Port on_error_port() const { return on_error_port_; } |
1049 char* script_url() const { return script_url_; } | 1050 const char* script_url() const { return script_url_; } |
1050 char* package_root() const { return package_root_; } | 1051 const char* package_root() const { return package_root_; } |
1051 char* library_url() const { return library_url_; } | 1052 const char** package_map() const { return package_map_; } |
1052 char* class_name() const { return class_name_; } | 1053 const char* library_url() const { return library_url_; } |
1053 char* function_name() const { return function_name_; } | 1054 const char* class_name() const { return class_name_; } |
| 1055 const char* function_name() const { return function_name_; } |
1054 bool is_spawn_uri() const { return library_url_ == NULL; } | 1056 bool is_spawn_uri() const { return library_url_ == NULL; } |
1055 bool paused() const { return paused_; } | 1057 bool paused() const { return paused_; } |
1056 bool errors_are_fatal() const { return errors_are_fatal_; } | 1058 bool errors_are_fatal() const { return errors_are_fatal_; } |
1057 Isolate::Flags* isolate_flags() { return &isolate_flags_; } | 1059 Isolate::Flags* isolate_flags() { return &isolate_flags_; } |
1058 | 1060 |
1059 RawObject* ResolveFunction(); | 1061 RawObject* ResolveFunction(); |
1060 RawInstance* BuildArgs(Thread* thread); | 1062 RawInstance* BuildArgs(Thread* thread); |
1061 RawInstance* BuildMessage(Thread* thread); | 1063 RawInstance* BuildMessage(Thread* thread); |
1062 void Cleanup(); | 1064 void Cleanup(); |
1063 | 1065 |
1064 private: | 1066 private: |
1065 Isolate* isolate_; | 1067 Isolate* isolate_; |
1066 Dart_Port parent_port_; | 1068 Dart_Port parent_port_; |
1067 Dart_Port on_exit_port_; | 1069 Dart_Port on_exit_port_; |
1068 Dart_Port on_error_port_; | 1070 Dart_Port on_error_port_; |
1069 char* script_url_; | 1071 const char* script_url_; |
1070 char* package_root_; | 1072 const char* package_root_; |
1071 char* library_url_; | 1073 const char** package_map_; |
1072 char* class_name_; | 1074 const char* library_url_; |
1073 char* function_name_; | 1075 const char* class_name_; |
| 1076 const char* function_name_; |
1074 uint8_t* serialized_args_; | 1077 uint8_t* serialized_args_; |
1075 intptr_t serialized_args_len_; | 1078 intptr_t serialized_args_len_; |
1076 uint8_t* serialized_message_; | 1079 uint8_t* serialized_message_; |
1077 intptr_t serialized_message_len_; | 1080 intptr_t serialized_message_len_; |
1078 Isolate::Flags isolate_flags_; | 1081 Isolate::Flags isolate_flags_; |
1079 bool paused_; | 1082 bool paused_; |
1080 bool errors_are_fatal_; | 1083 bool errors_are_fatal_; |
1081 }; | 1084 }; |
1082 | 1085 |
1083 } // namespace dart | 1086 } // namespace dart |
1084 | 1087 |
1085 #endif // VM_ISOLATE_H_ | 1088 #endif // VM_ISOLATE_H_ |
OLD | NEW |