| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 #include "vm/tags.h" | 5 #include "vm/tags.h" |
| 6 | 6 |
| 7 #include "vm/isolate.h" | 7 #include "vm/isolate.h" |
| 8 #include "vm/json_stream.h" | 8 #include "vm/json_stream.h" |
| 9 #include "vm/native_entry.h" | 9 #include "vm/native_entry.h" |
| 10 #include "vm/runtime_entry.h" | 10 #include "vm/runtime_entry.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 ASSERT(entry.id == tag); | 30 ASSERT(entry.id == tag); |
| 31 return entry.name; | 31 return entry.name; |
| 32 } | 32 } |
| 33 | 33 |
| 34 | 34 |
| 35 bool VMTag::IsNativeEntryTag(uword tag) { | 35 bool VMTag::IsNativeEntryTag(uword tag) { |
| 36 return (tag > kLastTagId) && !IsRuntimeEntryTag(tag); | 36 return (tag > kLastTagId) && !IsRuntimeEntryTag(tag); |
| 37 } | 37 } |
| 38 | 38 |
| 39 | 39 |
| 40 bool VMTag::IsDartTag(uword id) { |
| 41 return id == kDartTagId; |
| 42 } |
| 43 |
| 44 |
| 45 bool VMTag::IsExitFrameTag(uword id) { |
| 46 return (id != 0) && !IsDartTag(id) && (id != kIdleTagId) && |
| 47 (id != kVMTagId) && (id != kEmbedderTagId); |
| 48 } |
| 49 |
| 50 |
| 40 static RuntimeEntry* runtime_entry_list = NULL; | 51 static RuntimeEntry* runtime_entry_list = NULL; |
| 41 | 52 |
| 42 | 53 |
| 43 bool VMTag::IsRuntimeEntryTag(uword id) { | 54 bool VMTag::IsRuntimeEntryTag(uword id) { |
| 44 const RuntimeEntry* current = runtime_entry_list; | 55 const RuntimeEntry* current = runtime_entry_list; |
| 45 while (current != NULL) { | 56 while (current != NULL) { |
| 46 if (reinterpret_cast<uword>(current->function()) == id) { | 57 if (reinterpret_cast<uword>(current->function()) == id) { |
| 47 return true; | 58 return true; |
| 48 } | 59 } |
| 49 current = current->next(); | 60 current = current->next(); |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 Zone* zone = Thread::Current()->zone(); | 162 Zone* zone = Thread::Current()->zone(); |
| 152 const UserTag& tag = | 163 const UserTag& tag = |
| 153 UserTag::Handle(zone, UserTag::FindTagById(tag_id)); | 164 UserTag::Handle(zone, UserTag::FindTagById(tag_id)); |
| 154 ASSERT(!tag.IsNull()); | 165 ASSERT(!tag.IsNull()); |
| 155 const String& label = String::Handle(zone, tag.label()); | 166 const String& label = String::Handle(zone, tag.label()); |
| 156 return label.ToCString(); | 167 return label.ToCString(); |
| 157 } | 168 } |
| 158 | 169 |
| 159 | 170 |
| 160 } // namespace dart | 171 } // namespace dart |
| OLD | NEW |