Code generation up to sequence