In the second case, to say that the callee is k scopes outward is to say that the name of the callee is resolved in a block whose representing frame is k frames down the static chain for the caller (and is thus accessible by dereferencing the caller's static link k times). This block is also the immediately enclosing block for the callee, and thus should appear immediately after the callee's frame on the callee's static chain. So the callee's static link should link to the frame corresponding to this block, and this is precisely what the algorithm does.
+.
expr1.register is "r1". The value of spill_code is nil (since the value of expr3.next_free_register is 1). The value of expr1.code is a string corresponding to the target code below.
r1 := a
r2 := b
r1 := r1 + r2
goto L1 at the bottom of the loop. Thus every loop iteration would require two branches instead of one.