- fun dump_intermediate_code(mods: Collection[MMModule])
- do
- for mod in mods do
- for c in mod.local_classes do
- if not c isa MMConcreteClass then continue
- for p in c.local_local_properties do
- var routine: nullable IRoutine = null
- if p isa MMAttribute then
- routine = p.iroutine
- else if p isa MMMethod then
- routine = p.iroutine
- end
- if routine == null then continue
- print "**** Property {p.full_name} ****"
- var icd = new ICodeDumper
- routine.dump(icd)
- print "**** OPTIMIZE {p.full_name} ****"
- routine.optimize(mod)
- icd = new ICodeDumper
- routine.dump(icd)
- end
- end
- end
- end
-