OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 | |
5 #ifndef VM_TAGS_H_ | |
6 #define VM_TAGS_H_ | |
7 | |
8 #include "vm/allocation.h" | |
9 | |
10 class Isolate; | |
11 | |
12 namespace dart { | |
13 | |
14 #define VM_TAG_LIST(V) \ | |
15 V(VM) /* Catch all */ \ | |
16 V(Compile) \ | |
17 V(Script) \ | |
18 V(GCNewSpace) \ | |
19 V(GCOldSpace) \ | |
20 V(RuntimeNative) \ | |
siva
2014/03/13 23:20:36
Another tag that Todd had pointed out a while back
Cutch
2014/03/14 15:41:51
Done.
| |
21 | |
22 | |
23 class VMTag : public AllStatic { | |
24 public: | |
25 enum VMTagId { | |
26 kInvalidTagId = 0, | |
27 #define DEFINE_VM_TAG_ID(tag) \ | |
28 k##tag##TagId, | |
29 VM_TAG_LIST(DEFINE_VM_TAG_ID) | |
30 #undef DEFINE_VM_TAG_KIND | |
31 kNumVMTags, | |
32 }; | |
33 | |
34 const char* TagName(uword id); | |
35 private: | |
36 struct TagEntry { | |
37 const char* name; | |
38 uword id; | |
39 }; | |
40 static TagEntry entries_[]; | |
41 }; | |
42 | |
43 class VMTagScope : StackResource { | |
44 public: | |
45 VMTagScope(Isolate* isolate, uword tag); | |
46 ~VMTagScope(); | |
47 private: | |
48 Isolate* isolate_; | |
siva
2014/03/13 23:18:47
StackResource already has an isolate pointer you d
Cutch
2014/03/14 15:41:51
Done.
| |
49 uword previous_tag_; | |
siva
2014/03/13 23:18:47
DISALLOW stuff.
Cutch
2014/03/14 15:41:51
Done.
| |
50 }; | |
51 | |
52 } // namespace dart | |
53 | |
54 #endif // VM_TAGS_H_ | |
OLD | NEW |