py, compiler: Improve passes; add an extra pass for native emitter.