From: Jean Privat Date: Sat, 3 Aug 2013 01:43:23 +0000 (-0400) Subject: rta: add RapidTypeAnalysis::live_classes X-Git-Tag: v0.6.1~68 X-Git-Url: http://nitlanguage.org?hp=344638a392e98c2a55c4ba70bd1d8c81450149d7 rta: add RapidTypeAnalysis::live_classes Signed-off-by: Jean Privat --- diff --git a/src/rapid_type_analysis.nit b/src/rapid_type_analysis.nit index e383656..40b1be3 100644 --- a/src/rapid_type_analysis.nit +++ b/src/rapid_type_analysis.nit @@ -88,6 +88,9 @@ class RapidTypeAnalysis # live_send_sites to determine new customized_methoddefs to visit var live_types: HashSet[MClassType] = new HashSet[MClassType] + # Live (instantiated) classes. + var live_classes: HashSet[MClass] = new HashSet[MClass] + # The pool of types used to perform type checks (isa and as). var live_cast_types: HashSet[MClassType] = new HashSet[MClassType] @@ -134,6 +137,8 @@ class RapidTypeAnalysis self.live_types.add(mtype) self.check_depth(mtype) + self.live_classes.add(mtype.mclass) + # Collect default attributes for cd in mtype.collect_mclassdefs(self.mainmodule) do