From 7e439990d9e174bc128d0b75680b81b14317c561 Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Fri, 2 Aug 2013 21:43:23 -0400 Subject: [PATCH] rta: add RapidTypeAnalysis::live_classes Signed-off-by: Jean Privat --- src/rapid_type_analysis.nit | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 1.7.9.5