Fewer varEnvs in generators
commit59f2c1749f77c1ef30aa0db3802a8b77df1037fd
authorMark Williams <mwilliams@fb.com>
Thu, 16 May 2013 19:46:47 +0000 (16 12:46 -0700)
committerSara Golemon <sgolemon@fb.com>
Mon, 20 May 2013 20:52:29 +0000 (20 13:52 -0700)
tree0c623b6098549baedae878f0ce101299b0d5fd42
parentca4d38d5ff82d9d83fd5fa5dd92d125c1e6c48d2
Fewer varEnvs in generators

If the original function has a variable that the generator does not,
we create a varenv. Its not clear that that should ever happen, but
it *was* happening because:

 - closures get a magic variable called 0Closure, but generators
from closures did not.

 - unused parameters didnt get put into the variable table, so
generators with unused parameters got a varenv
hphp/compiler/analysis/emitter.cpp
hphp/compiler/statement/method_statement.cpp