From: Jean Privat Date: Tue, 11 Mar 2014 18:15:12 +0000 (-0400) Subject: src: use `ASuperExpr::mpropdef` instead of asking the frame or visitors X-Git-Tag: v0.6.5~39^2 X-Git-Url: http://nitlanguage.org src: use `ASuperExpr::mpropdef` instead of asking the frame or visitors Signed-off-by: Jean Privat --- diff --git a/src/abstract_compiler.nit b/src/abstract_compiler.nit index b4d0779..2de8333 100644 --- a/src/abstract_compiler.nit +++ b/src/abstract_compiler.nit @@ -2499,7 +2499,7 @@ redef class ASuperExpr end # stantard call-next-method - return v.supercall(v.frame.mpropdef.as(MMethodDef), recv.mtype.as(MClassType), args) + return v.supercall(mpropdef.as(not null), recv.mtype.as(MClassType), args) end end diff --git a/src/naive_interpreter.nit b/src/naive_interpreter.nit index 688d675..afa3fd9 100644 --- a/src/naive_interpreter.nit +++ b/src/naive_interpreter.nit @@ -1598,9 +1598,8 @@ redef class ASuperExpr end # stantard call-next-method - var mpropdef = v.frame.mpropdef + var mpropdef = self.mpropdef mpropdef = mpropdef.lookup_next_definition(v.mainmodule, recv.mtype) - assert mpropdef isa MMethodDef var res = v.call_without_varargs(mpropdef, args) return res end diff --git a/src/rapid_type_analysis.nit b/src/rapid_type_analysis.nit index eecee11..50e4563 100644 --- a/src/rapid_type_analysis.nit +++ b/src/rapid_type_analysis.nit @@ -544,7 +544,7 @@ redef class ASuperExpr return end - v.analysis.add_super_send(v.receiver, v.mpropdef.as(MMethodDef)) + v.analysis.add_super_send(v.receiver, mpropdef.as(not null)) end end