Prepare upvalue info for function.