- # live_send_sites to determine new customized_methoddefs to visit
- var live_types: HashSet[MClassType] = new HashSet[MClassType]
-
- # The pool of types used to perform type checks (isa and as).
- var live_cast_types: HashSet[MClassType] = new HashSet[MClassType]
-
- # Live method definitions.
- # These method definitions are:
- # * visited trough a add_send on an already known live_type
- # * visited trough a add_type for an already known live_send_sites
- # * visided by a add_monomorphic_send or a add_static_call
- var live_methoddefs: HashSet[MMethodDef] = new HashSet[MMethodDef]
-
- # The pool of live customized method definitions
- var live_customized_methoddefs: HashSet[CustomizedMethodDef] = new HashSet[CustomizedMethodDef]
-
- # The pool of live RTA send site
- # During the analysis, new live_send_sites are added and combined with
- # live_types to determine new live_customized_methoddefs to visit
- var live_send_sites: HashSet[RTASendSite] = new HashSet[RTASendSite]
-
- # The customized method definitions that remain to visit
- private var todo: List[CustomizedMethodDef] = new List[CustomizedMethodDef]
-
- # Adapt and remove nullable
- # return null if we got the null type
- fun cleanup_type(mtype: MType, recvtype: MClassType): nullable MClassType
- do
- mtype = mtype.anchor_to(self.mainmodule, recvtype)
- if mtype isa MNullType then return null
- if mtype isa MNullableType then mtype = mtype.mtype
- assert mtype isa MClassType
- assert not mtype.need_anchor
- return mtype
- end