OLD | NEW |
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 7981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7992 void MakeActive() const; | 7992 void MakeActive() const; |
7993 | 7993 |
7994 static intptr_t InstanceSize() { | 7994 static intptr_t InstanceSize() { |
7995 return RoundedAllocationSize(sizeof(RawUserTag)); | 7995 return RoundedAllocationSize(sizeof(RawUserTag)); |
7996 } | 7996 } |
7997 | 7997 |
7998 static RawUserTag* New(const String& label, | 7998 static RawUserTag* New(const String& label, |
7999 Heap::Space space = Heap::kOld); | 7999 Heap::Space space = Heap::kOld); |
8000 static RawUserTag* DefaultTag(); | 8000 static RawUserTag* DefaultTag(); |
8001 | 8001 |
8002 static bool TagTableIsFull(Isolate* isolate); | 8002 static bool TagTableIsFull(Thread* thread); |
8003 static RawUserTag* FindTagById(uword tag_id); | 8003 static RawUserTag* FindTagById(uword tag_id); |
8004 | 8004 |
8005 private: | 8005 private: |
8006 static RawUserTag* FindTagInIsolate(Thread* thread, const String& label); | 8006 static RawUserTag* FindTagInIsolate(Thread* thread, const String& label); |
8007 static void AddTagToIsolate(Thread* thread, const UserTag& tag); | 8007 static void AddTagToIsolate(Thread* thread, const UserTag& tag); |
8008 | 8008 |
8009 void set_label(const String& tag_label) const { | 8009 void set_label(const String& tag_label) const { |
8010 StorePointer(&raw_ptr()->label_, tag_label.raw()); | 8010 StorePointer(&raw_ptr()->label_, tag_label.raw()); |
8011 } | 8011 } |
8012 | 8012 |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8173 | 8173 |
8174 | 8174 |
8175 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 8175 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
8176 intptr_t index) { | 8176 intptr_t index) { |
8177 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 8177 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
8178 } | 8178 } |
8179 | 8179 |
8180 } // namespace dart | 8180 } // namespace dart |
8181 | 8181 |
8182 #endif // VM_OBJECT_H_ | 8182 #endif // VM_OBJECT_H_ |
OLD | NEW |