Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1151)

Side by Side Diff: runtime/vm/isolate.h

Issue 507913003: Create isolates in a separate thread. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/lib/isolate_patch.dart ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 Isolate* saved_isolate_; 800 Isolate* saved_isolate_;
801 uword saved_stack_limit_; 801 uword saved_stack_limit_;
802 802
803 DISALLOW_COPY_AND_ASSIGN(SwitchIsolateScope); 803 DISALLOW_COPY_AND_ASSIGN(SwitchIsolateScope);
804 }; 804 };
805 805
806 806
807 class IsolateSpawnState { 807 class IsolateSpawnState {
808 public: 808 public:
809 IsolateSpawnState(Dart_Port parent_port, 809 IsolateSpawnState(Dart_Port parent_port,
810 void* init_data,
810 const Function& func, 811 const Function& func,
811 const Instance& message); 812 const Instance& message);
812 IsolateSpawnState(Dart_Port parent_port, 813 IsolateSpawnState(Dart_Port parent_port,
814 void* init_data,
813 const char* script_url, 815 const char* script_url,
814 const Instance& args, 816 const Instance& args,
815 const Instance& message); 817 const Instance& message);
816 ~IsolateSpawnState(); 818 ~IsolateSpawnState();
817 819
818 Isolate* isolate() const { return isolate_; } 820 Isolate* isolate() const { return isolate_; }
819 void set_isolate(Isolate* value) { isolate_ = value; } 821 void set_isolate(Isolate* value) { isolate_ = value; }
820 822
821 Dart_Port parent_port() const { return parent_port_; } 823 Dart_Port parent_port() const { return parent_port_; }
824 void* init_data() const { return init_data_; }
822 char* script_url() const { return script_url_; } 825 char* script_url() const { return script_url_; }
823 char* library_url() const { return library_url_; } 826 char* library_url() const { return library_url_; }
824 char* class_name() const { return class_name_; } 827 char* class_name() const { return class_name_; }
825 char* function_name() const { return function_name_; } 828 char* function_name() const { return function_name_; }
826 char* exception_callback_name() const { return exception_callback_name_; } 829 char* exception_callback_name() const { return exception_callback_name_; }
827 bool is_spawn_uri() const { return library_url_ == NULL; } 830 bool is_spawn_uri() const { return library_url_ == NULL; }
828 831
829 RawObject* ResolveFunction(); 832 RawObject* ResolveFunction();
830 RawInstance* BuildArgs(); 833 RawInstance* BuildArgs();
831 RawInstance* BuildMessage(); 834 RawInstance* BuildMessage();
832 void Cleanup(); 835 void Cleanup();
833 836
834 private: 837 private:
835 Isolate* isolate_; 838 Isolate* isolate_;
836 Dart_Port parent_port_; 839 Dart_Port parent_port_;
840 void* init_data_;
837 char* script_url_; 841 char* script_url_;
838 char* library_url_; 842 char* library_url_;
839 char* class_name_; 843 char* class_name_;
840 char* function_name_; 844 char* function_name_;
841 char* exception_callback_name_; 845 char* exception_callback_name_;
842 uint8_t* serialized_args_; 846 uint8_t* serialized_args_;
843 intptr_t serialized_args_len_; 847 intptr_t serialized_args_len_;
844 uint8_t* serialized_message_; 848 uint8_t* serialized_message_;
845 intptr_t serialized_message_len_; 849 intptr_t serialized_message_len_;
846 }; 850 };
847 851
848 } // namespace dart 852 } // namespace dart
849 853
850 #endif // VM_ISOLATE_H_ 854 #endif // VM_ISOLATE_H_
OLDNEW
« no previous file with comments | « runtime/lib/isolate_patch.dart ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698