Define wrappers for accessing size/contents on older versions of libxml2 which match the function protos in 2.9.0 and later. Thanks to github/nareshv for finding the issue and providing a fix.
The PHP master that calls into pagelet server currently needs to wait indefinitely on the worker. This adds an optional timeout parameter so that the PHP master can timeout after e.g. 10 seconds and log a descriptive message rather than dieing with the generic message of "the request timed out after 30 seconds". There was also a bug with the return code for partial flushed responses. Sometimes the PHP master would receive a bogus return status like 65353. I traced this down to the fact that the return code was never set for partial responses, so it would be the initial value of `int rcode` on the stack.
Separates hhvm from hphpc. (This will mean we don't have to compile hphpc when iterating on VM changes, and will help for eventual hphpc-deprecation.) Details: - Stubs for hphpc-externals symbols that can't yet be removed. - src/system now includes g_system_class_map, which is essentially what the hhvm class map contained (only system stuff, plus things from constants.php). - VM::ProcessInit was the only part of the runtime that depended on libext_hhvm---breaks that dependency using a function pointer for now so you can link hphp_runtime without linking ext_hhvm. - Remove dlsym usage to access compiler symbols, using function pointers for now too.
Crutch is long dead. idl/base.php hasn't supported DeclaredDynamic in some time.
LdLoc and LdStack, when provided a label, also do the type check, and that's how guards were being implemented. Although that has the nice effect of hoisting the loads early in the trace, it's bad because the loads effectively end up as part of the guards and they execute redundantly when guards fail. This diff splits the checks into their own instructions, but also loads all the dependencies right after the guards to preserve the hoisting effect.
Values produced by the tracelet which had their values inferred by static analysis were not being passed to the IR. This was not only bad for performance, but it was only causing correctness issues (see new test, which used to fail in repo-authoritative mode).
fb_autoload_map($map, $root) specifies a mapping from classes, functions and constants to the files that define them. The map has the form: array('class' => array('cls' => 'cls_file.php', ...), 'function' => array('fun' => 'fun_file.php', ...), 'constant' => array('con' => 'con_file.php', ...), 'failure' => callable); If $root is non empty, it is prepended to every filename (so will typically need to end with '/'). If the 'failure' element exists, it will be called if the lookup in the map fails, or the file cant be included. It takes a kind ('class', 'function' or 'constant') and the name of the entity we're trying to autoload. You can supply the autoload map to hphpc at compile time. Currently, this is just used to augment hphpc's parseOnDemand feature. It will use the map it to find more files to add to the build based on class/function and constant names used. This becomes necessary when all the requires are removed.
$a = 'foo'; $a = array($a => $x[$a = 'bar']); should be equivalent to $a = array('bar' => $x['bar']); but hhvm was treating it as $a = array('foo' => $x['bar']); In production mode, some code transformations resulted in code similar to the above example, which hhvm then mis-interpreted.
Equivalent functionality is achieved with tables of member function pointers. This should make debugging much nicer.
Call a generic decref helper for PopR/V/C. Added an additional helper entry point for the case where we are decref'ing TOS, which happens for PopR.
ir.h contained an outdated and unused declaration for eleminateDeadCode. It has been removed. opt.cpp has a bug whereby an instruction is inserted into a trace, but the backedge (IRInstruction's m_parent) is not being correctly set to the trace. This has been fixed.
FPushObjMethodD implementation in HHIR was lacking a fast-path implemented in TranslatorX64, namely when the base class is known.
Added HHIR support for 3 bytecodes, IncStat, SetOpL, and BareThis. These showed up among the top reasons the IR punts in a sandbox run.
This diff enables the dormant CGetM type prediction code. This affects tracelet geometry, sometimes making the trace guards explode. To compensate, I appear to need two new heuristics: 1. give up on type prediction if we're in a polymorphic trace 2. don't inline returns in polymorphic traces. These two heuristics use different tracelet depths to kick in; an exhaustive search of an 8x8 matrix of parameters suggests (2,6) is the right setting for now.