| 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 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1006 | 1006 |
| 1007 DISALLOW_COPY_AND_ASSIGN(SwitchIsolateScope); | 1007 DISALLOW_COPY_AND_ASSIGN(SwitchIsolateScope); |
| 1008 }; | 1008 }; |
| 1009 | 1009 |
| 1010 | 1010 |
| 1011 class IsolateSpawnState { | 1011 class IsolateSpawnState { |
| 1012 public: | 1012 public: |
| 1013 IsolateSpawnState(Dart_Port parent_port, | 1013 IsolateSpawnState(Dart_Port parent_port, |
| 1014 const Function& func, | 1014 const Function& func, |
| 1015 const Instance& message, | 1015 const Instance& message, |
| 1016 bool paused); | 1016 bool paused, |
| 1017 bool errorsAreFatal, |
| 1018 Dart_Port onExit, |
| 1019 Dart_Port onError); |
| 1017 IsolateSpawnState(Dart_Port parent_port, | 1020 IsolateSpawnState(Dart_Port parent_port, |
| 1018 const char* script_url, | 1021 const char* script_url, |
| 1019 const char* package_root, | 1022 const char* package_root, |
| 1020 const Instance& args, | 1023 const Instance& args, |
| 1021 const Instance& message, | 1024 const Instance& message, |
| 1022 bool paused); | 1025 bool paused, |
| 1026 bool errorsAreFatal, |
| 1027 Dart_Port onExit, |
| 1028 Dart_Port onError); |
| 1023 ~IsolateSpawnState(); | 1029 ~IsolateSpawnState(); |
| 1024 | 1030 |
| 1025 Isolate* isolate() const { return isolate_; } | 1031 Isolate* isolate() const { return isolate_; } |
| 1026 void set_isolate(Isolate* value) { isolate_ = value; } | 1032 void set_isolate(Isolate* value) { isolate_ = value; } |
| 1027 | 1033 |
| 1028 Dart_Port parent_port() const { return parent_port_; } | 1034 Dart_Port parent_port() const { return parent_port_; } |
| 1035 Dart_Port on_exit_port() const { return on_exit_port_; } |
| 1036 Dart_Port on_error_port() const { return on_error_port_; } |
| 1029 char* script_url() const { return script_url_; } | 1037 char* script_url() const { return script_url_; } |
| 1030 char* package_root() const { return package_root_; } | 1038 char* package_root() const { return package_root_; } |
| 1031 char* library_url() const { return library_url_; } | 1039 char* library_url() const { return library_url_; } |
| 1032 char* class_name() const { return class_name_; } | 1040 char* class_name() const { return class_name_; } |
| 1033 char* function_name() const { return function_name_; } | 1041 char* function_name() const { return function_name_; } |
| 1034 bool is_spawn_uri() const { return library_url_ == NULL; } | 1042 bool is_spawn_uri() const { return library_url_ == NULL; } |
| 1035 bool paused() const { return paused_; } | 1043 bool paused() const { return paused_; } |
| 1044 bool errors_are_fatal() const { return errors_are_fatal_; } |
| 1036 Isolate::Flags* isolate_flags() { return &isolate_flags_; } | 1045 Isolate::Flags* isolate_flags() { return &isolate_flags_; } |
| 1037 | 1046 |
| 1038 RawObject* ResolveFunction(); | 1047 RawObject* ResolveFunction(); |
| 1039 RawInstance* BuildArgs(Zone* zone); | 1048 RawInstance* BuildArgs(Zone* zone); |
| 1040 RawInstance* BuildMessage(Zone* zone); | 1049 RawInstance* BuildMessage(Zone* zone); |
| 1041 void Cleanup(); | 1050 void Cleanup(); |
| 1042 | 1051 |
| 1043 private: | 1052 private: |
| 1044 Isolate* isolate_; | 1053 Isolate* isolate_; |
| 1045 Dart_Port parent_port_; | 1054 Dart_Port parent_port_; |
| 1055 Dart_Port on_exit_port_; |
| 1056 Dart_Port on_error_port_; |
| 1046 char* script_url_; | 1057 char* script_url_; |
| 1047 char* package_root_; | 1058 char* package_root_; |
| 1048 char* library_url_; | 1059 char* library_url_; |
| 1049 char* class_name_; | 1060 char* class_name_; |
| 1050 char* function_name_; | 1061 char* function_name_; |
| 1051 uint8_t* serialized_args_; | 1062 uint8_t* serialized_args_; |
| 1052 intptr_t serialized_args_len_; | 1063 intptr_t serialized_args_len_; |
| 1053 uint8_t* serialized_message_; | 1064 uint8_t* serialized_message_; |
| 1054 intptr_t serialized_message_len_; | 1065 intptr_t serialized_message_len_; |
| 1055 Isolate::Flags isolate_flags_; | 1066 Isolate::Flags isolate_flags_; |
| 1056 bool paused_; | 1067 bool paused_; |
| 1068 bool errors_are_fatal_; |
| 1057 }; | 1069 }; |
| 1058 | 1070 |
| 1059 } // namespace dart | 1071 } // namespace dart |
| 1060 | 1072 |
| 1061 #endif // VM_ISOLATE_H_ | 1073 #endif // VM_ISOLATE_H_ |
| OLD | NEW |