Free generator locals at return / frame unwind.
commit872f85c6a42ba814637d5569b3ff1dd119f033bf
authorJan Oravec <jan@fb.com>
Mon, 14 Apr 2014 21:53:33 +0000 (14 14:53 -0700)
committerSara Golemon <sgolemon@fb.com>
Tue, 15 Apr 2014 22:45:34 +0000 (15 15:45 -0700)
tree10cdd88fb943673ad001250cbe21c3ddf6cb603c
parentafb9a7a4a4d9262b89ae41d794d95733ced7bc39
Free generator locals at return / frame unwind.

Make async functions and generators behave like normal functions wrt
local variable cleanup at function exit.

Non-generator and generator implementations of return opcodes are now
unified (except for storing results). Unwinder now knows how to unwind
generator frames and ContHandle opcode is no longer needed.

Reviewed By: @jdelong

Differential Revision: D1276267
18 files changed:
hphp/compiler/analysis/emitter.cpp
hphp/doc/bytecode.specification
hphp/hhbbc/interp.cpp
hphp/runtime/base/execution-context.h
hphp/runtime/ext/ext_continuation.cpp
hphp/runtime/vm/bytecode.cpp
hphp/runtime/vm/hhbc.h
hphp/runtime/vm/jit/extra-data.h
hphp/runtime/vm/jit/hhbc-translator.cpp
hphp/runtime/vm/jit/hhbc-translator.h
hphp/runtime/vm/jit/refcount-opts.cpp
hphp/runtime/vm/jit/region-hot-trace.cpp
hphp/runtime/vm/jit/translator.cpp
hphp/runtime/vm/jit/translator.h
hphp/runtime/vm/runtime.h
hphp/runtime/vm/unwind.cpp
hphp/test/slow/yield/2183.php
hphp/test/slow/yield/2183.php.expect