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

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

Issue 195733009: Basic tag infrastructure (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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
OLDNEW
(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) \
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(intptr_t id);
35 private:
36 struct TagEntry {
37 const char* name;
38 intptr_t id;
39 };
40 static TagEntry entries_[];
41 };
42
43 class VMTagScope : StackResource {
44 public:
45 VMTagScope(intptr_t tag, Isolate* isolate);
46 ~VMTagScope();
47 private:
48 Isolate* isolate_;
49 intptr_t previous_tag_;
50 };
51
52 } // namespace dart
53
54 #endif // VM_TAGS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698