rta: add_monomorphic_send mark the mproperty as live
authorJean Privat <jean@pryen.org>
Mon, 7 Apr 2014 14:49:05 +0000 (10:49 -0400)
committerJean Privat <jean@pryen.org>
Fri, 25 Apr 2014 13:16:57 +0000 (09:16 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/rapid_type_analysis.nit

index 1017b08..4916889 100644 (file)
@@ -473,7 +473,11 @@ class RapidTypeVisitor
 
        fun add_type(mtype: MClassType) do analysis.add_new(receiver, mtype)
 
-       fun add_monomorphic_send(mtype: MType, mproperty: MMethod) do analysis.try_send(mtype.as(MClassType), mproperty)
+       fun add_monomorphic_send(mtype: MType, mproperty: MMethod)
+       do
+               analysis.live_methods.add(mproperty)
+               analysis.try_send(mtype.as(MClassType), mproperty)
+       end
 
        fun add_send(mtype: MType, mproperty: MMethod) do analysis.add_send(mtype, mproperty)