OLD | NEW |
---|---|
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 RUNTIME_VM_BASE_ISOLATE_H_ | 5 #ifndef RUNTIME_VM_BASE_ISOLATE_H_ |
6 #define RUNTIME_VM_BASE_ISOLATE_H_ | 6 #define RUNTIME_VM_BASE_ISOLATE_H_ |
7 | 7 |
8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
9 #include "vm/globals.h" | 9 #include "vm/globals.h" |
10 | 10 |
11 namespace dart { | 11 namespace dart { |
12 | 12 |
13 class HandleScope; | 13 class HandleScope; |
14 class StackResource; | 14 class StackResource; |
15 class Thread; | 15 class Thread; |
16 class Zone; | 16 class Zone; |
17 | 17 |
18 // A BaseIsolate contains just enough functionality to allocate | 18 // A BaseIsolate contains just enough functionality to allocate |
19 // StackResources. This allows us to inline the StackResource | 19 // StackResources. This allows us to inline the StackResource |
20 // constructor/destructor for performance. | 20 // constructor/destructor for performance. |
rmacnak
2017/08/07 22:44:06
Wow, this comment is out of date :)
| |
21 class BaseIsolate { | 21 class BaseIsolate { |
22 public: | 22 public: |
23 #if defined(DEBUG) | 23 #if defined(DEBUG) |
24 void AssertCurrentThreadIsMutator() const; | 24 void AssertCurrentThreadIsMutator() const; |
25 #else | 25 #else |
26 void AssertCurrentThreadIsMutator() const {} | 26 void AssertCurrentThreadIsMutator() const {} |
27 #endif // DEBUG | 27 #endif // DEBUG |
28 | 28 |
29 #if defined(DEBUG) | 29 #if defined(DEBUG) |
30 static void AssertCurrent(BaseIsolate* isolate); | 30 static void AssertCurrent(BaseIsolate* isolate); |
31 #endif | 31 #endif |
32 | 32 |
33 protected: | 33 protected: |
34 BaseIsolate() : mutator_thread_(NULL) {} | 34 BaseIsolate() : scheduled_mutator_thread_(NULL) {} |
35 | 35 |
36 ~BaseIsolate() { | 36 ~BaseIsolate() { |
37 // Do not delete stack resources: top_resource_ and current_zone_. | 37 // Do not delete stack resources: top_resource_ and current_zone_. |
38 } | 38 } |
39 | 39 |
40 Thread* mutator_thread_; | 40 Thread* scheduled_mutator_thread_; |
41 | 41 |
42 private: | 42 private: |
43 DISALLOW_COPY_AND_ASSIGN(BaseIsolate); | 43 DISALLOW_COPY_AND_ASSIGN(BaseIsolate); |
44 }; | 44 }; |
45 | 45 |
46 } // namespace dart | 46 } // namespace dart |
47 | 47 |
48 #endif // RUNTIME_VM_BASE_ISOLATE_H_ | 48 #endif // RUNTIME_VM_BASE_ISOLATE_H_ |
OLD | NEW |