utility functions regarding instruction generation and Java primitives