Signed-off-by: Jean Privat <jean@pryen.org>
redef class IRoutine
# Perfom all optimizations
redef class IRoutine
# Perfom all optimizations
+ fun optimize(m: MMModule)
allocate_iregister_slots
end
end
allocate_iregister_slots
end
end
+ fun inline_methods(m: MMModule)
do
var v = new InlineMethodVisitor
v.visit_iroutine(self)
do
var v = new InlineMethodVisitor
v.visit_iroutine(self)
# cv must be in the correct function
fun compile_to_c(cv: CompilerVisitor, cname: String, args: Array[String]): nullable String
do
# cv must be in the correct function
fun compile_to_c(cv: CompilerVisitor, cname: String, args: Array[String]): nullable String
do
var v = new I2CCompilerVisitor(cv, self, cname)
return compile_inside_to_c(v, args)
end
var v = new I2CCompilerVisitor(cv, self, cname)
return compile_inside_to_c(v, args)
end
var icd = new ICodeDumper
routine.dump(icd)
print "**** OPTIMIZE {p.full_name} ****"
var icd = new ICodeDumper
routine.dump(icd)
print "**** OPTIMIZE {p.full_name} ****"
icd = new ICodeDumper
routine.dump(icd)
end
icd = new ICodeDumper
routine.dump(icd)
end