developing a simple compiler to cut out unnecessary allocations