private void unwindTrail ( int a1 , int a2 ) { // for i <- a1 to a2 - 1 do for ( int addr = a1 ; addr < a2 ; addr ++ ) { // STORE[TRAIL[i]] <- <REF, TRAIL[i]> int tmp = data . get ( addr ) ; data . put ( tmp , refTo ( tmp ) ) ; } }
Undoes variable bindings that have been recorded on the trail . Addresses recorded on the trail are reset to REF to self .