Signed-off-by: Jean Privat <jean@pryen.org>
while not todo.is_empty do
var mmethoddef = todo.shift
var mmeth = mmethoddef.mproperty
while not todo.is_empty do
var mmethoddef = todo.shift
var mmeth = mmethoddef.mproperty
+ var msignature = mmethoddef.msignature
+ if msignature == null then continue # Skip broken method
+
#print "# visit {mmethoddef}"
var v = new RapidTypeVisitor(self, mmethoddef.mclassdef.bound_mtype, mmethoddef)
#print "# visit {mmethoddef}"
var v = new RapidTypeVisitor(self, mmethoddef.mclassdef.bound_mtype, mmethoddef)
- var vararg_rank = mmethoddef.msignature.vararg_rank
+ var vararg_rank = msignature.vararg_rank
if vararg_rank > -1 then
var node = self.modelbuilder.mpropdef2node(mmethoddef)
if vararg_rank > -1 then
var node = self.modelbuilder.mpropdef2node(mmethoddef)
- var elttype = mmethoddef.msignature.mparameters[vararg_rank].mtype
+ var elttype = msignature.mparameters[vararg_rank].mtype
#elttype = elttype.anchor_to(self.mainmodule, v.receiver)
var vararg = self.mainmodule.array_type(elttype)
v.add_type(vararg)
#elttype = elttype.anchor_to(self.mainmodule, v.receiver)
var vararg = self.mainmodule.array_type(elttype)
v.add_type(vararg)
end
# TODO? new_msignature
end
# TODO? new_msignature
- var sig = mmethoddef.msignature.as(not null)
var osig = mmeth.intro.msignature.as(not null)
for i in [0..sig.arity[ do
var origtype = osig.mparameters[i].mtype
var osig = mmeth.intro.msignature.as(not null)
for i in [0..sig.arity[ do
var origtype = osig.mparameters[i].mtype
continue
else if mmethoddef.constant_value != null then
# Make the return type live
continue
else if mmethoddef.constant_value != null then
# Make the return type live
- v.add_type(mmethoddef.msignature.return_mtype.as(MClassType))
+ v.add_type(msignature.return_mtype.as(MClassType))
continue
else if npropdef == null then
abort
continue
else if npropdef == null then
abort
if mmethoddef.is_intern or mmethoddef.is_extern then
# UGLY: We force the "instantation" of the concrete return type if any
if mmethoddef.is_intern or mmethoddef.is_extern then
# UGLY: We force the "instantation" of the concrete return type if any
- var ret = mmethoddef.msignature.return_mtype
+ var ret = msignature.return_mtype
if ret != null and ret isa MClassType and ret.mclass.kind != abstract_kind and ret.mclass.kind != interface_kind then
v.add_type(ret)
end
if ret != null and ret isa MClassType and ret.mclass.kind != abstract_kind and ret.mclass.kind != interface_kind then
v.add_type(ret)
end