The interpreter fix was different than the jit/ir fix because ##translateFPushObjMethodD()##'s ##i.inputs[0]->rtt.valueClass()## is null (with a TODO in the code to make it not null). It then goes into the slowpath.
Another one like this and I think I should have a different attribute for static closures :(
This diff fixes problems with FPushObjMethodD stack unwinding, to HHIR.
This diff simply moves the try-catch into the methodCacheSlowPath.
This should also improve the code generated by gcc for the fast path.
Inlined the fast-path of FPushObjMethodD in the IR from
MethodCache::lookup. This should reduce the number of times we call
the MethodCache::lookup helper by inlining the common case where the
object's class hits in the target cache.
This is the last step to being able to get rid of the c++ code
gen in hphp. "make -Chphp/system" is now a no-op.
I'll rip out the actual c++ generating code as a separate diff.
Broke LdClsPropAddr into 2 instructions by introducing a
ldClsPropAddrCached. LdClsPropAddrCached loads the static property via
the target cache so requires the class and property name to be
compile-time constants. LdClsPropAddr does not use the target cache
and works even if the property and class names are not constant.
Similarly broke LdCls into 2 by introducing LdClsCached. LdClsCached
uses the target cache to handle the case where the class name is a
compile time constant. Added code to detect cases where the class name
can be folded to a Class* constant.
Moved the code that decides between LdCls (LdClsPropAddr) and
LdClsCached (LdClsPropAddrCached) to the simplifier, allowing us to
optimize these instructions as optimization passes discover more
constants.
Changed HhbcTranslator code generation for AGet* and getClsPropAddr to
handle more cases using the above new instructions. Also improved
HhbcTranslator's translations for self and parent bytecodes.
Added a label to LdClsPropAddr to allow control flow when property is
not accessible. This enables implementation of IssetS (which was
incorrect before this diff) and EmptyS.
Implemented BindS, VGetS, EmptyS, and LateBoundCls.
Opportunitistically introduces calls to SSATmp::isA(...) to replace
explicit comparisons against Type::Tag values.
Moved AddElem punt from code generator to hhbctranslator so that we
can interpone.
Add support for in-trace control flow to HHIR. To support
merging SSATmps, add support for 1+ sources to Jmp_ and
1+ destinations to DefLabel. (One must use Jmp_ to pass
values to a label).
Every pass is affected by this. The linearscan passes were
modified to visit blocks in reverse postorder (linear scan
should work even early blocks are not dominators of later
blocks).
Other passes had to be pessimized a bit because the dominator
assumption no longer holds. Either they need to do full
dataflow analysis, be changed to do preorder traversals
down the dominator tree, changed to work only on a block
at a time, or fully disabled if control flow is detected.
This change is mostly for FB internal organizational reasons.
Building is not effected beyond the fact that the target now
lands in hphp/hhvm/hhvm rather than src/hhvm/hhvm.