I don't think how this factors into anyone's real world thinking, but when gaming out the short-term politics of comprehensive immigration reform it's worth underscoring the fact that the most important political consideration with almost any bill is its substantive impact on the world. If immigration reform passes, the economy gets a short-term boost and that makes incumbents look better. And that short-term boost is there relatively uncontroversially, even if you believe the darker tales about the long-term consequences.
Where does that boost come from?
First, by placing the country on a higher expected population growth trajectory suddenly our number of houses per capita looks too low which stimulates investment in the housing sector. Second, and relatedly, by placing the country on a higher expected population growth trajectory suddenly our stock of capital goods per capital looks too low which stimulates business investment.
The other factor is that the 10 million unauthorized migrants currently residing in the United States are operating under severe credit constraints. It is very difficult to get a loan on favorable terms when you can't establish that you're a legal resident of the country. That's terrible for the individuals affected, but at a time of financial distress and depressed economic conditions it also has broader implications. The fact that with a wave of a magic wand we can genuinely improve the creditworthiness of millions of people has significant economic implications.
The flipside is that if you imagine some kind of stringent bill being signed into law that credibly committed the country to a future course of no amnesty, much more effective border security, no guest workers to replace the unauthorized migrants, and large-scale self-deportation of people living here illegally then you'd have the opposite impact. The expected future path of population growth would fall, the number of houses per capita would look to large, and the marginal product of capital would fall. All of that would depress the economy in the short run. The rational investor has probably been putting a low weight on the probability of this happening ever since Obama's reelection, but it is out there as a possibility and a drag on the economy.
Long story short, I think people oftentimes overthink the political implications of legislation. If something resembling the Gang of 8 bill passes the House, broad economic conditions will improve in a modest way and people will be modestly happier with the overall state of things. They probably won't accurately understand the linkages, but a rising tide of public satisfaction will nonetheless lift many votes.