Refactor emitConst to constrain the type of the const more. 64/64 tests on mac