Implement code generation for variable type.