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

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

Issue 456983002: Refactor isolate startup code in preparation for making isolate spawning more truly non-blocking. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 years, 4 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/vm/bootstrap_natives.h ('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 785 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 Isolate* new_isolate_; 796 Isolate* new_isolate_;
797 Isolate* saved_isolate_; 797 Isolate* saved_isolate_;
798 uword saved_stack_limit_; 798 uword saved_stack_limit_;
799 799
800 DISALLOW_COPY_AND_ASSIGN(SwitchIsolateScope); 800 DISALLOW_COPY_AND_ASSIGN(SwitchIsolateScope);
801 }; 801 };
802 802
803 803
804 class IsolateSpawnState { 804 class IsolateSpawnState {
805 public: 805 public:
806 explicit IsolateSpawnState(const Function& func); 806 IsolateSpawnState(Dart_Port parent_port,
807 explicit IsolateSpawnState(const char* script_url); 807 const Function& func,
808 const Instance& message);
809 IsolateSpawnState(Dart_Port parent_port,
810 const char* script_url,
811 const Instance& args,
812 const Instance& message);
808 ~IsolateSpawnState(); 813 ~IsolateSpawnState();
809 814
810 Isolate* isolate() const { return isolate_; } 815 Isolate* isolate() const { return isolate_; }
811 void set_isolate(Isolate* value) { isolate_ = value; } 816 void set_isolate(Isolate* value) { isolate_ = value; }
817
818 Dart_Port parent_port() const { return parent_port_; }
812 char* script_url() const { return script_url_; } 819 char* script_url() const { return script_url_; }
813 char* library_url() const { return library_url_; } 820 char* library_url() const { return library_url_; }
814 char* class_name() const { return class_name_; } 821 char* class_name() const { return class_name_; }
815 char* function_name() const { return function_name_; } 822 char* function_name() const { return function_name_; }
816 char* exception_callback_name() const { return exception_callback_name_; } 823 char* exception_callback_name() const { return exception_callback_name_; }
817 bool is_spawn_uri() const { return library_url_ == NULL; } 824 bool is_spawn_uri() const { return library_url_ == NULL; }
818 825
819 RawObject* ResolveFunction(); 826 RawObject* ResolveFunction();
827 RawInstance* BuildArgs();
828 RawInstance* BuildMessage();
820 void Cleanup(); 829 void Cleanup();
821 830
822 private: 831 private:
823 Isolate* isolate_; 832 Isolate* isolate_;
833 Dart_Port parent_port_;
824 char* script_url_; 834 char* script_url_;
825 char* library_url_; 835 char* library_url_;
826 char* class_name_; 836 char* class_name_;
827 char* function_name_; 837 char* function_name_;
828 char* exception_callback_name_; 838 char* exception_callback_name_;
839 uint8_t* serialized_args_;
840 intptr_t serialized_args_len_;
841 uint8_t* serialized_message_;
842 intptr_t serialized_message_len_;
829 }; 843 };
830 844
831 } // namespace dart 845 } // namespace dart
832 846
833 #endif // VM_ISOLATE_H_ 847 #endif // VM_ISOLATE_H_
OLDNEW
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698