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

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

Issue 10829446: Add HasSubclasses function to class hierarchy analysis. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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 | « no previous file | runtime/vm/class_table.cc » ('j') | runtime/vm/class_table.cc » ('J')
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_CLASS_TABLE_H_ 5 #ifndef VM_CLASS_TABLE_H_
6 #define VM_CLASS_TABLE_H_ 6 #define VM_CLASS_TABLE_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "platform/globals.h" 9 #include "platform/globals.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
(...skipping 20 matching lines...) Expand all
31 intptr_t IsValidIndex(intptr_t index) const { 31 intptr_t IsValidIndex(intptr_t index) const {
32 return (index > 0) && (index < top_); 32 return (index > 0) && (index < top_);
33 } 33 }
34 34
35 void Register(const Class& cls); 35 void Register(const Class& cls);
36 36
37 void VisitObjectPointers(ObjectPointerVisitor* visitor); 37 void VisitObjectPointers(ObjectPointerVisitor* visitor);
38 38
39 void Print(); 39 void Print();
40 40
41 // Returns true if the class given by its cid has subclasses.
42 // Must not be called for kDartObjectCid.
43 bool HasSubclasses(intptr_t cid) const;
44
41 // Returns an array containing the cids of the direct and indirect subclasses 45 // Returns an array containing the cids of the direct and indirect subclasses
42 // of the class given by its cid. 46 // of the class given by its cid.
43 // Must not be called for kDartObjectCid. 47 // Must not be called for kDartObjectCid.
44 ZoneGrowableArray<intptr_t>* GetSubclassIdsOf(intptr_t cid) const; 48 ZoneGrowableArray<intptr_t>* GetSubclassIdsOf(intptr_t cid) const;
45 49
46 // Returns an array containing instance functions of the given name and 50 // Returns an array containing instance functions of the given name and
47 // belonging to the classes given by their cids. 51 // belonging to the classes given by their cids.
48 // Cids must not contain kDartObjectCid. 52 // Cids must not contain kDartObjectCid.
49 ZoneGrowableArray<Function*>* GetNamedInstanceFunctionsOf( 53 ZoneGrowableArray<Function*>* GetNamedInstanceFunctionsOf(
50 const ZoneGrowableArray<intptr_t>& cids, 54 const ZoneGrowableArray<intptr_t>& cids,
(...skipping 15 matching lines...) Expand all
66 intptr_t capacity_; 70 intptr_t capacity_;
67 71
68 RawClass** table_; 72 RawClass** table_;
69 73
70 DISALLOW_COPY_AND_ASSIGN(ClassTable); 74 DISALLOW_COPY_AND_ASSIGN(ClassTable);
71 }; 75 };
72 76
73 } // namespace dart 77 } // namespace dart
74 78
75 #endif // VM_CLASS_TABLE_H_ 79 #endif // VM_CLASS_TABLE_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/class_table.cc » ('j') | runtime/vm/class_table.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698