Upgrade a pre-implementation for code generation