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

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

Issue 266913010: Refactor 'dart:profiler' UserTag API (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 VM_OBJECT_H_ 5 #ifndef VM_OBJECT_H_
6 #define VM_OBJECT_H_ 6 #define VM_OBJECT_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/utils.h" 10 #include "platform/utils.h"
(...skipping 6858 matching lines...) Expand 10 before | Expand all | Expand 10 after
6869 ASSERT(t < UserTags::kUserTagIdOffset + UserTags::kMaxUserTags); 6869 ASSERT(t < UserTags::kUserTagIdOffset + UserTags::kMaxUserTags);
6870 raw_ptr()->tag_ = t; 6870 raw_ptr()->tag_ = t;
6871 }; 6871 };
6872 static intptr_t tag_offset() { return OFFSET_OF(RawUserTag, tag_); } 6872 static intptr_t tag_offset() { return OFFSET_OF(RawUserTag, tag_); }
6873 6873
6874 RawString* label() const { 6874 RawString* label() const {
6875 return raw_ptr()->label_; 6875 return raw_ptr()->label_;
6876 } 6876 }
6877 6877
6878 void MakeActive() const; 6878 void MakeActive() const;
6879 static void ClearActive();
6880 6879
6881 static intptr_t InstanceSize() { 6880 static intptr_t InstanceSize() {
6882 return RoundedAllocationSize(sizeof(RawUserTag)); 6881 return RoundedAllocationSize(sizeof(RawUserTag));
6883 } 6882 }
6884 6883
6885 static RawUserTag* New(const String& label, 6884 static RawUserTag* New(const String& label,
6886 Heap::Space space = Heap::kOld); 6885 Heap::Space space = Heap::kOld);
6886 static RawUserTag* DefaultTag();
6887 6887
6888 static bool TagTableIsFull(Isolate* isolate); 6888 static bool TagTableIsFull(Isolate* isolate);
6889 static RawUserTag* FindTagById(uword tag_id); 6889 static RawUserTag* FindTagById(uword tag_id);
6890 6890
6891 private: 6891 private:
6892 static RawUserTag* FindTagInIsolate(Isolate* isolate, const String& label); 6892 static RawUserTag* FindTagInIsolate(Isolate* isolate, const String& label);
6893 static void AddTagToIsolate(Isolate* isolate, const UserTag& tag); 6893 static void AddTagToIsolate(Isolate* isolate, const UserTag& tag);
6894 6894
6895 void set_label(const String& tag_label) const { 6895 void set_label(const String& tag_label) const {
6896 StorePointer(&raw_ptr()->label_, tag_label.raw()); 6896 StorePointer(&raw_ptr()->label_, tag_label.raw());
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
7034 7034
7035 7035
7036 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 7036 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
7037 intptr_t index) { 7037 intptr_t index) {
7038 return array.At((index * kEntryLength) + kTargetFunctionIndex); 7038 return array.At((index * kEntryLength) + kTargetFunctionIndex);
7039 } 7039 }
7040 7040
7041 } // namespace dart 7041 } // namespace dart
7042 7042
7043 #endif // VM_OBJECT_H_ 7043 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698