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

Unified Diff: runtime/vm/cha.h

Issue 10827450: Move class hierarchy analysis to its own source. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/cha.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/cha.h
===================================================================
--- runtime/vm/cha.h (revision 0)
+++ runtime/vm/cha.h (revision 0)
@@ -0,0 +1,47 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#ifndef VM_CHA_H_
+#define VM_CHA_H_
+
+#include "vm/allocation.h"
+
+namespace dart {
+
+class ClassTable;
+class Function;
+template <typename T> class ZoneGrowableArray;
+class String;
+
+class CHA : public ValueObject {
+ public:
+ CHA();
+
+ // Returns true if the class given by its cid has subclasses.
+ // Must not be called for kDartObjectCid.
+ bool HasSubclasses(intptr_t cid) const;
+
+ // Returns an array containing the cids of the direct and indirect subclasses
+ // of the class given by its cid.
+ // Must not be called for kDartObjectCid.
+ ZoneGrowableArray<intptr_t>* GetSubclassIdsOf(intptr_t cid) const;
+
+ // Returns an array containing instance functions of the given name and
+ // belonging to the classes given by their cids.
+ // Cids must not contain kDartObjectCid.
+ ZoneGrowableArray<Function*>* GetNamedInstanceFunctionsOf(
+ const ZoneGrowableArray<intptr_t>& cids,
+ const String& function_name) const;
+
+ // Returns an array of functions overriding the given function.
+ // Must not be called for a function of class Object.
+ ZoneGrowableArray<Function*>* GetOverridesOf(const Function& function) const;
+
+ private:
+ const ClassTable& class_table_;
srdjan 2012/08/21 18:46:24 DISALLOW_COPY ...
regis 2012/08/21 20:09:34 N/A
+};
+
+} // namespace dart
+
+#endif // VM_CHA_H_
« no previous file with comments | « no previous file | runtime/vm/cha.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698