added tcg_temp_free() and improved the handling of constants