fix emitsBoolean handling of conditional, and add handling of num
add conditional to hasSideEffects
add testcases for last few commits