Code generation for constructor.