# Return the local runtime_variable associated to a Nit local variable
fun variable(variable: Variable): RuntimeVariable
do
if self.variables.has_key(variable) then
return self.variables[variable]
else
var name = self.get_name("var_{variable.name}")
var mtype = variable.declared_type.as(not null)
mtype = self.anchor(mtype)
var res = new RuntimeVariable(name, mtype, mtype)
self.add_decl("{mtype.ctype} {name} /* var {variable}: {mtype} */;")
self.variables[variable] = res
return res
end
end
src/compiler/abstract_compiler.nit:1613,2--1627,4