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

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

Issue 2483373002: Add Kernel Isolate (Closed)
Patch Set: wip Created 4 years 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
OLDNEW
(Empty)
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
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.
4
5 #ifndef RUNTIME_VM_KERNEL_ISOLATE_H_
6 #define RUNTIME_VM_KERNEL_ISOLATE_H_
7
8 #include "include/dart_api.h"
9
10 #include "vm/allocation.h"
11 #include "vm/dart.h"
12 #include "vm/os_thread.h"
13
14 namespace dart {
15
16 class ObjectPointerVisitor;
17 class SendPort;
18
19 class KernelIsolate : public AllStatic {
Cutch 2016/12/01 19:47:23 Lots of this code could be shared between the serv
20 public:
21 static const char* kName;
22
23 static void Run();
24
25 static bool Exists();
26 static bool IsRunning();
27 static bool IsKernelIsolate(const Isolate* isolate);
28 static Dart_Port WaitForKernelPort();
29 static Dart_Port KernelPort() { return kernel_port_; }
30
31 static bool LoadScript(const String& url, const String& source);
32
33 protected:
34 static Monitor* monitor_;
35 static Dart_IsolateCreateCallback create_callback_;
36
37 static void InitCallback(Isolate* I);
38 static void SetKernelIsolate(Isolate* isolate);
39 static void SetLoadPort(Dart_Port port);
40 static void FinishedInitializing();
41 static void FinishedExiting();
42
43 static Dart_Port kernel_port_;
44 static Isolate* isolate_;
45 static bool initializing_;
46 static bool shutting_down_;
47
48
49 static Dart_IsolateCreateCallback create_callback() {
50 return create_callback_;
51 }
52
53 friend class Dart;
54 friend class RunKernelTask;
55 };
56
57 } // namespace dart
58
59 #endif // RUNTIME_VM_KERNEL_ISOLATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698