value-based dirty checking