compiler: make heap expression's write barrier conditional