fix life time of local variable at jvm codegen