compiler add cloud closure detection