cli.compiler: type layout calculation

type supporting utilities