Pass return value explicitly to EventHook::FunctionExit
commit04fe22e7e7330c3c8842704500c178b0abaf267b
authorJan Oravec <jan@fb.com>
Fri, 4 Apr 2014 20:01:28 +0000 (4 13:01 -0700)
committerSara Golemon <sgolemon@fb.com>
Tue, 8 Apr 2014 20:45:34 +0000 (8 13:45 -0700)
tree053f9b1113f77cc519ace54b2311093c96581ae2
parent3f6a4c6f4f86c1812ef1b67b592fe2cf9ccd7c3b
Pass return value explicitly to EventHook::FunctionExit

EventHook::FunctionExit assumes the return value is always on top of the
stack before ActRec is destroyed. This will no longer be true with some
async functions and continuations opcodes.

As a side-effect, this improves built-in profiling.

Reviewed By: @swtaarrs

Differential Revision: D1262463
21 files changed:
hphp/doc/ir.specification
hphp/runtime/ext_zend_compat/hhvm/zend-wrap-func.cpp
hphp/runtime/vm/bytecode.cpp
hphp/runtime/vm/bytecode.h
hphp/runtime/vm/event-hook.cpp
hphp/runtime/vm/event-hook.h
hphp/runtime/vm/jit/code-gen-x64.cpp
hphp/runtime/vm/jit/hhbc-translator.cpp
hphp/runtime/vm/jit/hhbc-translator.h
hphp/runtime/vm/jit/ir.h
hphp/runtime/vm/jit/native-calls.cpp
hphp/runtime/vm/jit/reg-alloc.cpp
hphp/runtime/vm/name-value-table.cpp
hphp/runtime/vm/name-value-table.h
hphp/runtime/vm/native.cpp
hphp/runtime/vm/runtime.h
hphp/runtime/vm/unwind.cpp
hphp/test/quick/Setprofile.php.expectf
hphp/test/quick/Setprofile_generic.php.expect
hphp/test/quick/setprofile-this.php.expectf
hphp/tools/bootstrap/gen-ext-hhvm.cpp