Integrated semantic phase in compiler