Split EndCatch into TryEndCatch and EndCatch

EndCatch was supposed to be terminal in some catch traces but not in
other. We know which is which at compile time, so now we use TryEndCatch for
the non-terminal case and EndCatch for the terminal case.

Reviewed By: @edwinsmith

Differential Revision: D1005802
Reenable FCall type prediction in opt builds, fix KindOfRef predictions

This was (we think) accidentally disabled in non-debug builds a long
time ago, and some type shuffling I did a while ago broke KindOfRef
predictions. RuntimeType expects an inner type of KindOfAny instead of
KindOfNone.

Reviewed By: @kmafb

Differential Revision: D1004691
Assert instruction input flavors before translating

We don't have a translation for Box, so we always interpOne it and all
of its inputs are marked dontGuard. If the input to the Box was produced in a
previous tracelet, this means we won't know its type in the jit, and it was
upsetting the code figuring out the output type of the interpOne. We know from
the bytecode that the input is always a Cell, so assert that before translating
the instruction.

Reviewed By: @ptarjan

Differential Revision: D1006328
Get ARM disassembly printing in printir:2

I'm getting to the point where it's helpful to see the ARM code being
emitted, and this is the most natural way to hook it up.

There's a little wrinkle here in that sometimes (e.g. smashable jumps),
there's stuff in the TC that isn't executable code. In this case the
disassembly is either "Unallocated" or some nonsense instruction. We
could avoid this with sufficient metadata, but I'm not convinced it's
necessary yet. (FYI, this pattern -- data embedded in code -- is common
in ARM code, to judge by the vixl assembler's inclusion of an
abstraction to do this very thing.)

In the process I had to convert vixl's printing facilities to use
std::ostream instead of FILE*. I converted it to use folly::format
instead of fprintf as part of this.

Also added an --arm flag to hhvm_wrapper.php to make my life easier.

Reviewed By: @edwinsmith

Differential Revision: D1006435
Add PHPUnit to list of framework tests and make a few other changes.

Wanted to add PHPUnit to our list of frameworks to test. While doing so, I made a few extra changes such as making the hhvm build be in JIT mode. And re-ran the tests again to get a new baseline and summary file.

(Ignorning conflict markers because symfony uses 7+ = signs in some of their tests, which causes conflict marker errors here: diffusion/E/browse/admin/scripts/git/hosting/hooks/update.d/430.conflict_markers.sh)

@EntNotFoundException

Reviewed By: @ptarjan

Differential Revision: D1006290
Fix the tracelet region selector to correctly end a trace

There were a few situations where the bcOff used in the ReqBindJmp at
the end of the trace was either for the wrong function or the wrong instruction
in the correct function. We can now explicitly pass it into HhbcTranslator::end
to make sure it's correct all the time.

Reviewed By: @bertmaher

Differential Revision: D1005831
Moving a few more helpers to translator-runtime

Found these while poking around tx64...

Reviewed By: @swtaarrs

Differential Revision: D1006852
make debugger work with old editline

These functions are stubs in editline anyways, so in order to support Ubuntu 10.04 using editline 2.11-20080614-1build1 just ifdef them out

Reviewed By: @sgolemon

Differential Revision: D1006813
Don't interpOne nopped out BoxRs

BoxR is always interpOned. If its nopped out, we should skip it.

Reviewed By: @ottoni

Differential Revision: D1006405
Test case for reflowTypes with hottrace PGO

Thought it would be good to check this in since it was useful
in diagnosing a sandbox bug.

Reviewed By: @ottoni

Differential Revision: D1007313
Suppress gcc4.8 warning from double-conversion

double-conversion uses this typedef as a sort
of a static assert for the template.

Mark it as explicitly unused so we don't get
a warning.
Increase maximum template depth
Revert "Get ARM disassembly printing in printir:2"

This reverts commit 23745b0488b81e0bc92ed45661b67cd4ec1f784d.

It's templates all the way down
added "Attempted to interpret unknown debugger command as PHP" into the error message

The error message for a bad command is misleading. Added "Attempted to interpret unknown debugger command as PHP" into the error message

Reviewed By: @mikemag

Differential Revision: D989538
Support already-sorted EHTabs in FuncEmitter.

Because we re-sort the EHEnt table every time we load from
the repo, it's impossible to represent certain configurations of
fault/catch regions that are not made illegal in the spec.  For
example, you can't have a Fault and Catch region with the same extents
where the Fault region should be considered "outer" to the Catch
region.  This changes things to serialize parentIndexes to the repo,
and adds support to the FuncEmitter to tell it not to re-sort the
EHTab if a given user knows they've sorted it properly (and set up
parentIndexes) already.  Also adds some assertions about the required
sorted properties.

Reviewed By: @dariorussi

Differential Revision: D1002108
Add a unit test for type inference

Courtesy of erling.

Reviewed By: @swtaarrs

Differential Revision: D1005514
Add file_uploads and upload_tmp_dir to ini_get

Add file_uploads and upload_tmp_dir to ini_get options

Closes #1158

Reviewed By: @JoelMarcey

Differential Revision: D1007352

Pulled By: @scannell
Fix catch trace bug and inline cost bug

The catch trace map was being updated as we went along, instead of at
the end of translation along with all the other metadata. shouldIRInline was
treating the immediate vector for Switch and SSwitch as an m-vector.

Reviewed By: @ottoni

Differential Revision: D1005823
Clean up FrameState's block handling

This is some reorganization I did to use FrameState in guard
relaxation. It cleans up the interface used to enter and exit blocks by using
startBlock and finishBlock instead of the old methods.

Reviewed By: bertrand

Differential Revision: D1005829
SharedString should use AtomicSharedPtr

Right now, SharedPtr works, because SharedStringData provides
atomic ref counting. But I need to make some changes to SharedPtr which
break it. Use AtomicSharedPtr instead (this is what AtomicSharedPtr is
for).

Reviewed By: @dariorussi

Differential Revision: D1006407