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

Unified Diff: runtime/vm/isolate.h

Issue 13452007: Add new Dart API call Dart_MakeIsolateRunnable(). This would allow an (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/isolate.h
===================================================================
--- runtime/vm/isolate.h (revision 20976)
+++ runtime/vm/isolate.h (working copy)
@@ -21,6 +21,7 @@
class ApiState;
class CodeIndexTable;
class Debugger;
+class Function;
class HandleScope;
class HandleVisitor;
class Heap;
@@ -35,6 +36,7 @@
class RawContext;
class RawDouble;
class RawMint;
+class RawObject;
class RawInteger;
class RawError;
class Simulator;
@@ -274,9 +276,15 @@
void ScheduleInterrupts(uword interrupt_bits);
uword GetAndClearInterrupts();
+ bool MakeRunnable();
+ void Run();
+
MessageHandler* message_handler() const { return message_handler_; }
void set_message_handler(MessageHandler* value) { message_handler_ = value; }
+ bool is_runnable() const { return is_runnable_; }
+ void set_is_runnable(bool value) { is_runnable_ = value; }
+
uword spawn_data() const { return spawn_data_; }
void set_spawn_data(uword value) { spawn_data_ = value; }
@@ -295,6 +303,8 @@
void set_ic_data_array(RawArray* value) { ic_data_array_ = value; }
ICData* GetICDataForDeoptId(intptr_t deopt_id) const;
+ Mutex* mutex() const { return mutex_; }
+
Debugger* debugger() const { return debugger_; }
Simulator* simulator() const { return simulator_; }
@@ -463,6 +473,7 @@
uword saved_stack_limit_;
MessageHandler* message_handler_;
uword spawn_data_;
+ bool is_runnable_;
GcPrologueCallbacks gc_prologue_callbacks_;
GcEpilogueCallbacks gc_epilogue_callbacks_;
@@ -553,6 +564,31 @@
DISALLOW_COPY_AND_ASSIGN(SwitchIsolateScope);
};
+
+class IsolateSpawnState {
+ public:
+ IsolateSpawnState(const Function& func, const Function& callback_func);
+ explicit IsolateSpawnState(const char* script_url);
+ ~IsolateSpawnState();
+
+ Isolate* isolate() const { return isolate_; }
+ void set_isolate(Isolate* value) { isolate_ = value; }
+ char* script_url() const { return script_url_; }
+ char* library_url() const { return library_url_; }
+ char* function_name() const { return function_name_; }
+ char* exception_callback_name() const { return exception_callback_name_; }
+
+ RawObject* ResolveFunction();
+ void Cleanup();
+
+ private:
+ Isolate* isolate_;
+ char* script_url_;
+ char* library_url_;
+ char* function_name_;
+ char* exception_callback_name_;
+};
+
} // namespace dart
#endif // VM_ISOLATE_H_

Powered by Google App Engine
This is Rietveld 408576698