Do not use repo to map a PC to an offset range

Unit::getOffsetRange(Offset pc, OffsetRange& range) did two SQL queries to the byte code repository in order to map a PC (offset) to a range of offsets that provide all of the bytecode operations that correspond to a single source statement. The information needed for this map is already recorded in the m_lineTable field of the Unit, so there is no need for a SQL query.

Reviewed By: @mikemag

Differential Revision: D966164
Add support for SideExitGuardStk in getStackValue

getStackValue is now being used to obtain the post-conditions at the
end of profiling translations, which requires supporting
SideExitGuardStk.  This was not necessary before because getStackValue
was never used after the jump optimizations that produce
SideExitGuardStk.

Reviewed By: @swtaarrs

Differential Revision: D966360
Update debugger to track async changes

This diff updates the debugger to be able to debug async functions again, after the most excellent optimizations introduced in D946914. Minor updates to be able to identify an async func outside of the emitter, and minor adjustments to get breakpoints on async function names working again. Async stacks were fine, the test just needed to be updated. Stepping over await/yield used to decode the instruction stream around OpContSuspend to determine where execution would continue, but that was annoying and brittle. I recently gave c_Continuation the ability to predict its next execution offset, so I enhanced that a bit and switched to using that, so the debugger no longer cares about the codegen around OpContSuspend and doesn't care about anything around OpCreateAsync. This fixes stepping over suspends within a continuation. To get across the first await, we now notice a OpCreateAsync, step over that operation, then grab the c_Continuation off the top of the operand stack and ask it where the heck it's going.

Reviewed By: @hermanventer

Differential Revision: D965577
Create specialized helpers for member operations on string bases

Make string indexing operations like $str[$i] faster.

Reviewed By: @swtaarrs

Differential Revision: D965035
Add the 'set' command to hphpd help, adjust tutorial on '='

Added the set command to the overall list of commands shown in the help. Removed extra equals sign from the tutorial printed when the output from '=' is too long, which was confusing people about how 'set cc' works.

Reviewed By: @hermanventer

Differential Revision: D967395
Cleanup some low_malloc issues

I noticed that the first page of low memory never gets hugified,
because the arena gets setup before main, and we don't know what to
mark huge until we've initialized the runtime options.

By setting the high water mark to 1 below the start of the low memory
arena, and only updating it when we *are* marking pages huge, we can
ensure that the right pages get marked.

I also replaced some jemalloc magic that I had never previously understood
with a simpler (to me) equivalent.

Reviewed By: @jdelong

Differential Revision: D967121
Have sysdoc.php print an error when it can't access php.net

Reviewed By: @ptarjan

Differential Revision: D967730
Declare instrIsControlFlow constexpr for better interpreter performance

Avoids a call on every interpreted instruction that just computes a statically-known property.

Reviewed By: @jdelong

Differential Revision: D968506
refactor test harness so it can be re-used

This is so I can run test_server type tests for the proxygen server, which is not in the open source directories.

Reviewed By: @paroski

Differential Revision: D922589
remove invalid assert in http_protocol

http_protocol was trying to assert that every body chunk was NULL terminated.  libevent_server *thought* it was doing this by enlarging the buffer and adding a 0.  POST body data can be binary though (images, video, etc) so if any code was actually relying on the 0 for termination, it was likely wrong.

The proxygen server will not add 0 termination to body chunks, so this assert has to go.

Reviewed By: @markw65

Differential Revision: D923553
refactor LibEvent(Worker|Job) to share code with Proxygen

The proxygen server will use the same basic Worker/Job structure so I created server_worker with the shared logic.  Had to make the templates somewhat complex to avoid the perf hit of virtual functions here.

Reviewed By: @markw65

Differential Revision: D922622
HphpArray cleanup

Various cleanups that I factored out of other work.
Eliminate ElmInd; it's usefulness is pretty low since we rely on
int32_t for the hashtable storage and ssize_t for locals and
and parameters that pass around array positions.

Renamed a few things for brevity & clarity.
Moved some inline functions to hphp-array-defs.h.
More use of auto, replace Elm* with auto& in several places.
Eliminate a bunch of unnecessary ssize_t() casts.
s/ElmIndEmpty/invalid_index in several places.

Reviewed By: bertrand

Differential Revision: D968744