# Live methods.
var live_methods = new HashSet[MMethod]
+ # Live mmodules.
+ # Those with a live method definitions (see `live_methoddefs`)
+ var live_mmodules = new HashSet[MModule]
+
# Live callsites.
var live_callsites = new HashSet[CallSite]
do
if live_methoddefs.has(mpropdef) then return
live_methoddefs.add(mpropdef)
+ live_mmodules.add(mpropdef.mclassdef.mmodule)
todo.add(mpropdef)
var mproperty = mpropdef.mproperty
redef class ACrangeExpr
redef fun accept_rapid_type_visitor(v)
do
- var mtype = self.mtype.as(MClassType)
+ var mtype = self.mtype
+ if not mtype isa MClassType then return
v.add_type(mtype)
v.add_callsite(init_callsite)
end
redef class AOrangeExpr
redef fun accept_rapid_type_visitor(v)
do
- var mtype = self.mtype.as(MClassType)
+ var mtype = self.mtype
+ if not mtype isa MClassType then return
v.add_type(mtype)
v.add_callsite(init_callsite)
end
redef class AIsaExpr
redef fun accept_rapid_type_visitor(v)
do
- v.add_cast_type(self.cast_type.as(not null))
+ var cast_type = self.cast_type
+ if cast_type == null then return
+ v.add_cast_type(cast_type)
end
end
redef class AAsCastExpr
redef fun accept_rapid_type_visitor(v)
do
- v.add_cast_type(self.mtype.as(not null))
+ var mtype = self.mtype
+ if mtype == null then return
+ v.add_cast_type(mtype)
end
end