PREP_VAL needs to check its register is available

PREP_VAL tries to allocate a specific register (since it
will be used as a call argument). But there's no guarantee
the register is free. Clean/smash is not the right thing to
do, because it could be that one of the /other/ call arguments
is using that register.

So if the desired target register is not free, just use
any register, and let the usual argument shuffling take
care of getting it into the right place
intercepted functions could unbalance the stack

The cleanup code assumed that the number of parameters
reported in the actrec was the number of parameters
pushed on the stack. But some of them could be in
extraArgs.
Optimize builtin calls

Optimize builtin calls so that they can be invoked directly
without going through fg_wrappers. Adds a new opcode FCallBuiltin
that does not require an ActRec for builtin calls.

Add a new flag "NeedsActRec" to mark idl functions that require
an ActRec.
IR, (val1 == val1) ==> true is not correct when val1 is a NaN

Turn off simplification rule for (val1 OP val1) when val1
is a double, since NaNs have their own 'special' behavior.
Make Continuation::rewind equivalent to next

There was code that assumed it could call foreach
more than once on a continuation (as long as the
continuation wasnt "done"). This was broken by
recent changes to Continuation.
Workaround a bug in HphpArray::u*sort

The array was being modified in place, while calling the
user sort functions, with the result that the user sort
function saw garbage. As a temporary fix, always duplicate
the input array, sort that, and then update the original
array reference.

A better fix would be to only do this for
the user sort cases. Even better would be to sort an array
of indices, and then update the array itself after the
user functions have been called. (task #1910931)

In addition, the new test case I wrote revealed a bug in
the translator's type inference. It failed to take account
of OpBindM's effect on its base. Also fixed here.
Avoid a partial register stall when converting from ints.

Edwin and the Internet both agree: cvtsi2sd is considered
harmful without doing something to break the dependency on the target
register's high-order bits.
Handle trivial array and object casts.

Don't do work when casting arrays to arrays, or objects to
objects.
Unnecessary template metaprogram for iopFCallBuiltin

Replace perfectly reasonable macros with some templated
stuff.  (Makes it so we can easily add support for more return types
and supports double arguments (but that doesn't matter since the JIT
doesn't know how still).)
String concatenation helpers can reenter
Substitute defined constants in INI files.
Fix default args in call_user_func_array

If the function entry had not been translated,
and we couldnt translate it (because the write lease
was held by another thread) we would incorrectly
setup the pc to point to the function body, which
would skip the default initializers.
InterruptVMHook needs a VMRegAnchor

InterruptVMHook accesses the current frame from
the execution context, so needs a VMRegAnchor.
Warn when fetching an apc primed key fails

If fetching an apc primed key fails, raise a notice, return
false, and dont store the returned value (so that we'll
continue to raise the notice on every fetch).
Banish std::string and std::map from ext_obc, take 2

The first version of this diff dropped counters on the
floor due to an assumption about the ordering of std::map that I
didn't catch and fix.
Replace TV_WRITE_NULL and TV_WRITE_UNINIT with inline functions

Simple cleanup to use the inline function versions of these macros.
Fix some bugs with FPushClsMethodF on non-strings.

foo::$bar() where $bar was not a string would assert fail in
some places. Hit this while playing around with CGetM's type
inference.
IR, always check surprise flags in Ret

IR skipped surprise flag check when it did not handle freeing
locals inline.
Update surprise check mechanism to use testb 0xff,surpriseFlags
Fix the prediction stress a little more.

The prediction stress code was producing some impossible traces:
C* instructions that left a Ref on the stack, and KindOfUninit right
hand sides. This could cause rare downstream failures.
Fix the translator's type inference for (null)->prop

Per the existing comment, it was broken. Fix the code, and
remove the comment