There are several potential optimizations to speed up parsing:
- Short-circuit replacing SELF.x on the right hand side of assignments.
- Don't mark out of line functions as unbound if they don't refer to any parameters from outer scopes.
- Avoid a couple of local class instances if there are no parameters to a function
- Avoid remapping references to "virtual" attributes if the definition was found in the current module.