Improve the property accessing API of Class.
commitc1c1f81ad03f34c0ce7e39295393be5092ed30d4
authorAlex Malyshev <alexanderm@fb.com>
Sat, 29 Nov 2014 22:45:51 +0000 (29 14:45 -0800)
committerhhvm-bot <hhvm-bot@fb.com>
Sat, 29 Nov 2014 23:00:33 +0000 (29 15:00 -0800)
tree2384c01bda5bd76a1e23827c100b9dd9bf4c0208
parentbc135b8b5a42c001faf793f54bce28b50b6d348e
Improve the property accessing API of Class.

Summary: Affects Class methods getDeclPropIndex(), findSProp(), getSProp(), and
zGetSProp(). They were taking two boolean arguments by reference and setting
them: visible and accessible.

visible is unneeded. It was set iff the property existed, but that could be
checked against the return values of those functions (either "value == nullptr"
or "slotIdx == kInvalidInd").

That left returning a some representation of the property (either a Slot,
TypedValue*, or RefData*) and the accessible flag, which I turned into a struct
templated on the property.

Reviewed By: @jdelong

Differential Revision: D1708784

Signature: t1:1708784:1417282914:1782c28704245b9b2a50520936dcabc155e13a77
hphp/runtime/base/object-data.cpp
hphp/runtime/ext/reflection/ext_reflection.cpp
hphp/runtime/ext/std/ext_std_classobj.cpp
hphp/runtime/ext/xdebug/php5_xdebug/xdebug_var.cpp
hphp/runtime/ext_zend_compat/php-src/Zend/zend_API.cpp
hphp/runtime/vm/bytecode.cpp
hphp/runtime/vm/class.cpp
hphp/runtime/vm/class.h
hphp/runtime/vm/jit/hhbc-translator.cpp
hphp/runtime/vm/jit/translator-runtime.cpp
hphp/runtime/vm/jit/translator.cpp