Refactorisation of the protected methods in compiler pass