var recvval = args[0].to_i
if pname == "unary -" then
return v.int_instance(-args[0].to_i)
+ else if pname == "unary +" then
+ return args[0]
else if pname == "+" then
return v.int_instance(args[0].to_i + args[1].to_i)
else if pname == "-" then
var recv = args[0].to_f
if pname == "unary -" then
return v.float_instance(-recv)
+ else if pname == "unary +" then
+ return args[0]
else if pname == "+" then
return v.float_instance(recv + args[1].to_f)
else if pname == "-" then
end
end
+redef class AImplicitSelfExpr
+ redef fun expr(v)
+ do
+ if not is_sys then return super
+ return v.mainobj
+ end
+end
+
redef class AEscapeExpr
redef fun stmt(v)
do
var mtype = v.unanchor_type(self.recvtype.as(not null))
var recv: Instance = new MutableInstance(mtype)
v.init_instance(recv)
+ var callsite = self.callsite
+ if callsite == null then return recv
+
var args = v.varargize(callsite.mpropdef, recv, self.n_args.n_exprs)
if args == null then return null
var res2 = v.callsite(callsite, args)