refactor global constant allocation, and assume worst-case 8-byte alignment for now
fix variable-size alloca cast