OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 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 | 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 VM_TAGS_H_ | 5 #ifndef VM_TAGS_H_ |
6 #define VM_TAGS_H_ | 6 #define VM_TAGS_H_ |
7 | 7 |
8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
9 | 9 |
10 namespace dart { | 10 namespace dart { |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 struct TagEntry { | 72 struct TagEntry { |
73 const char* name; | 73 const char* name; |
74 uword id; | 74 uword id; |
75 }; | 75 }; |
76 static TagEntry entries_[]; | 76 static TagEntry entries_[]; |
77 }; | 77 }; |
78 | 78 |
79 | 79 |
80 class VMTagScope : StackResource { | 80 class VMTagScope : StackResource { |
81 public: | 81 public: |
82 VMTagScope(Isolate* isolate, uword tag, bool conditional_set = true); | 82 VMTagScope(Thread* thread, uword tag, bool conditional_set = true); |
83 ~VMTagScope(); | 83 ~VMTagScope(); |
84 private: | 84 private: |
85 uword previous_tag_; | 85 uword previous_tag_; |
86 | 86 |
87 DISALLOW_ALLOCATION(); | 87 DISALLOW_ALLOCATION(); |
88 DISALLOW_IMPLICIT_CONSTRUCTORS(VMTagScope); | 88 DISALLOW_IMPLICIT_CONSTRUCTORS(VMTagScope); |
89 }; | 89 }; |
90 | 90 |
91 | 91 |
92 class VMTagCounters { | 92 class VMTagCounters { |
(...skipping 21 matching lines...) Expand all Loading... |
114 static bool IsUserTag(uword tag_id) { | 114 static bool IsUserTag(uword tag_id) { |
115 return (tag_id >= kUserTagIdOffset) && | 115 return (tag_id >= kUserTagIdOffset) && |
116 (tag_id < kUserTagIdOffset + kMaxUserTags); | 116 (tag_id < kUserTagIdOffset + kMaxUserTags); |
117 } | 117 } |
118 }; | 118 }; |
119 | 119 |
120 | 120 |
121 } // namespace dart | 121 } // namespace dart |
122 | 122 |
123 #endif // VM_TAGS_H_ | 123 #endif // VM_TAGS_H_ |
OLD | NEW |