Code generation for variables