init(visitor: AbsSyntaxVisitor, r: IRoutine, m: nullable MMMethod)
do
super(visitor.mmmodule, r)
init(visitor: AbsSyntaxVisitor, r: IRoutine, m: nullable MMMethod)
do
super(visitor.mmmodule, r)
writable var _icode_ctx: nullable A2IContext
fun icode_ctx: A2IContext do return _icode_ctx.as(not null)
redef fun visit(n) do n.accept_icode_generation(self)
writable var _icode_ctx: nullable A2IContext
fun icode_ctx: A2IContext do return _icode_ctx.as(not null)
redef fun visit(n) do n.accept_icode_generation(self)
var params = v.iroutine.params.to_a
var selfreg = v.variable(self_var)
v.stmt(new IMove(selfreg, params[0]))
var params = v.iroutine.params.to_a
var selfreg = v.variable(self_var)
v.stmt(new IMove(selfreg, params[0]))
- return v.expr(new ITypeCheck(e, n_type.stype), stype)
+ return v.expr(new ITypeCheck(v.selfreg.as(not null), e, n_type.stype), stype)