Code generation for return statements and for loops.