| 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_CHA_H_ | 5 #ifndef VM_CHA_H_ | 
| 6 #define VM_CHA_H_ | 6 #define VM_CHA_H_ | 
| 7 | 7 | 
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" | 
| 9 | 9 | 
| 10 namespace dart { | 10 namespace dart { | 
| 11 | 11 | 
| 12 class Function; | 12 class Function; | 
| 13 template <typename T> class ZoneGrowableArray; | 13 template <typename T> class ZoneGrowableArray; | 
| 14 class String; | 14 class String; | 
| 15 | 15 | 
| 16 class CHA : public AllStatic { | 16 class CHA : public AllStatic { | 
| 17  public: | 17  public: | 
| 18   // Returns true if the class given by its cid has subclasses. | 18   // Returns true if the class given by its cid has subclasses. | 
| 19   static bool HasSubclasses(intptr_t cid); | 19   static bool HasSubclasses(intptr_t cid); | 
| 20 | 20 | 
| 21   // Returns an array containing the cids of the direct and indirect subclasses | 21   // Returns an array containing the cids of the direct and indirect subclasses | 
| 22   // of the class given by its cid. | 22   // of the class given by its cid. | 
| 23   // Must not be called for kDartObjectCid. | 23   // Must not be called for kInstanceCid. | 
| 24   static ZoneGrowableArray<intptr_t>* GetSubclassIdsOf(intptr_t cid); | 24   static ZoneGrowableArray<intptr_t>* GetSubclassIdsOf(intptr_t cid); | 
| 25 | 25 | 
| 26   // Returns an array containing instance functions of the given name and | 26   // Returns an array containing instance functions of the given name and | 
| 27   // belonging to the classes given by their cids. | 27   // belonging to the classes given by their cids. | 
| 28   // Cids must not contain kDartObjectCid. | 28   // Cids must not contain kInstanceCid. | 
| 29   static ZoneGrowableArray<Function*>* GetNamedInstanceFunctionsOf( | 29   static ZoneGrowableArray<Function*>* GetNamedInstanceFunctionsOf( | 
| 30       const ZoneGrowableArray<intptr_t>& cids, | 30       const ZoneGrowableArray<intptr_t>& cids, | 
| 31       const String& function_name); | 31       const String& function_name); | 
| 32 | 32 | 
| 33   // Returns an array of functions overriding the given function. | 33   // Returns an array of functions overriding the given function. | 
| 34   // Must not be called for a function of class Object. | 34   // Must not be called for a function of class Object. | 
| 35   static ZoneGrowableArray<Function*>* GetOverridesOf(const Function& function); | 35   static ZoneGrowableArray<Function*>* GetOverridesOf(const Function& function); | 
| 36 }; | 36 }; | 
| 37 | 37 | 
| 38 }  // namespace dart | 38 }  // namespace dart | 
| 39 | 39 | 
| 40 #endif  // VM_CHA_H_ | 40 #endif  // VM_CHA_H_ | 
| OLD | NEW | 
|---|