Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 #ifndef VM_CHA_H_ | |
| 6 #define VM_CHA_H_ | |
| 7 | |
| 8 #include "vm/allocation.h" | |
| 9 | |
| 10 namespace dart { | |
| 11 | |
| 12 class ClassTable; | |
| 13 class Function; | |
| 14 template <typename T> class ZoneGrowableArray; | |
| 15 class String; | |
| 16 | |
| 17 class CHA : public ValueObject { | |
| 18 public: | |
| 19 CHA(); | |
| 20 | |
| 21 // Returns true if the class given by its cid has subclasses. | |
| 22 // Must not be called for kDartObjectCid. | |
| 23 bool HasSubclasses(intptr_t cid) const; | |
| 24 | |
| 25 // Returns an array containing the cids of the direct and indirect subclasses | |
| 26 // of the class given by its cid. | |
| 27 // Must not be called for kDartObjectCid. | |
| 28 ZoneGrowableArray<intptr_t>* GetSubclassIdsOf(intptr_t cid) const; | |
| 29 | |
| 30 // Returns an array containing instance functions of the given name and | |
| 31 // belonging to the classes given by their cids. | |
| 32 // Cids must not contain kDartObjectCid. | |
| 33 ZoneGrowableArray<Function*>* GetNamedInstanceFunctionsOf( | |
| 34 const ZoneGrowableArray<intptr_t>& cids, | |
| 35 const String& function_name) const; | |
| 36 | |
| 37 // Returns an array of functions overriding the given function. | |
| 38 // Must not be called for a function of class Object. | |
| 39 ZoneGrowableArray<Function*>* GetOverridesOf(const Function& function) const; | |
| 40 | |
| 41 private: | |
| 42 const ClassTable& class_table_; | |
|
srdjan
2012/08/21 18:46:24
DISALLOW_COPY ...
regis
2012/08/21 20:09:34
N/A
| |
| 43 }; | |
| 44 | |
| 45 } // namespace dart | |
| 46 | |
| 47 #endif // VM_CHA_H_ | |
| OLD | NEW |