Mark Call and CallUnpack as producing reference
Summary:
IncRef/DecRef pairs on results of function calls were not getting optimized
away, such as in this example, where the pair was emitted around the
ConvObjToBool instruction, but not optimized away.
$obj = get_object();
if ($obj) {
var_dump(get_class($obj));
}
This was because the Call and CallUnpack opcodes were not marked as producing
reference, so refcount opts thought the DecRef may go to zero.
Reviewed By: ricklavoie
Differential Revision:
D20861624
fbshipit-source-id:
c5ead2e5700d6a8985ccf2145c847e5d664b1320