The House of Representatives has passed legislation that would make it a felony to be an illegal immigrant , and heavily penalize companies hiring them .