Refactor local.set
register preservation
#786
Merged
local.set
register preservation
#786