Updated codegen.ml

It supports infinite integal now.