add a inputlen field to code-gen