add const folding optimization prototype