Fixed 0e0 as a value on JSON_parser

Summary: We're using a heavily modified version of Dougles Crockford's JSON parsing library. That library has a bug that fails
to parse 0e0 as a value in an array or an object (as a value). This diff corrects the issue which also fixes a broken zend test

Reviewed By: @JoelMarcey

Differential Revision: D1393793
Fix preOptimize for CheckLoc and AssertLoc

Summary: In preOptimize, we convert CheckLoc/AssertLoc into CheckType/AssertType.
The return value of preOptimize should be the old FramePtr, not the
destination of the new instructions.

Reviewed By: @swtaarrs

Differential Revision: D1399908
Fix bug in insertLocalPhis()

Summary: We added a ldLoc but did not add the corresponding src-type constraint.

Reviewed By: @swtaarrs

Differential Revision: D1399896
Bug fix for JitLoop

Summary: We should add block id to region (instead of trans id).

Reviewed By: @ottoni

Differential Revision: D1399052
Introduce I/O wait enter/exit hooks

Summary: Introduce I/O wait enter/exit hooks, useful for profiling asynchronous
execution.

Reviewed By: @billf

Differential Revision: D1397075
Fix hhhbc for SetElem with non-array bases.

Summary: If the base is not an array or an object implementing ArrayAccess,
SetM pushes a null. This was not being handled correctly hhbbc, and
we were pushing the rhs on stack in these cases.

Reviewed By: @jdelong

Differential Revision: D1383973
Various fixes to access modifiers errors

Summary: HHVM would not error correctly for various error relating to multiple access modifiers on methods and functions. This diff matches the behavior of this to php.

Reviewed By: @ptarjan

Differential Revision: D1398889
Add missing removeKey for flakey option

Reviewed By: @JoelMarcey

Differential Revision: D1400965
Revert "[hack] don't recompute files with errors"

Summary: This reverts commit D1387289. There are cases when the
invariants listed don't actually hold, we need to think this through
more carefully.

Almost a clean revert -- one change to `serverTypeCheck` in D1390136
conflicted, pretty sure we can just nuke that change.

Reviewed By: @pikatchu

Differential Revision: D1401096
CallsNative flag on ir opcodes should imply MayRaiseError by default

Summary: We've been burned in the past by opcodes that can throw but weren't
marked as such. MayRaiseError is now opt-out on CallsNative opcodes, by using
NNE instead of N. I tried to audit each one that broke because of this and make
the right choise wrt NNE vs. adding a catch block.

Reviewed By: @bertmaher

Differential Revision: D1400014
Shut up jobserver warning

Summary: Yes, seriously, this is the fix. I'm going to go cry in a
corner now. I'm just so far past rage for the creators of `make` and
`cmake`.

somuchrage

Reviewed By: @JoelMarcey

Differential Revision: D1401502
Fix a JIT crash in unsupported NewElem dims

Summary: I got a sandbox crash in ExternalThreadEventWaitHandle---the strangest
part is that it seemed to be trying to abandon a wait handle from the minstr
translator at JIT time.  Apparently in an opt build if we get an MW that we
don't understand we load a function to call out of these tables with an invalid
index and somehow we called some random code (I'm not 100% sure I understand
how).  The inspecting the junk in the crash led me to trying an FPassM with an
MW.  Just PUNT instead of crashing.

Reviewed By: @swtaarrs

Differential Revision: D1400770
deal with BSD stty output

Summary: I'm going to be working on a plane, so I'm getting it compiled on my laptop. The test runner doesn't love BSD.

Reviewed By: @JoelMarcey

Differential Revision: D1399789
Re-record assetic

Reviewed By: @fredemmott

Differential Revision: D1402727
Serialize Makefile build

Summary: @JoelMarcey is running into some weird issues after D1401502 allowed
this to be parallelized when called from cmake. I really really don't
care to debug it, and parallelization doesn't lose us that much, so just
serialize it.

Reviewed By: @JoelMarcey

Differential Revision: D1402916
Reorganize class.h

Summary: Ain't she a beaut'?  Organize and document all of class.h, and spawn off
a class-inl.h.

I'll organize class.cpp also, shortly before I start working on
rejiggering the loader logic.  This may not happen immediately, but this
cleanup is still good now.

Reviewed By: @jdelong

Differential Revision: D1399915
Add a control-flow test with a loop and multiple translations for a srckey

Summary: This test exercises some corner cases that were causing assertion
failures in dbgo (now fixed).  It never quite repro'ed the exact bug I was
seeing, but it seems like a reasonable stress test to have in the tree.

Reviewed By: @alexmalyshev

Differential Revision: D1403027
Log unit when failing the fromLoad assertion in refcount opts

Summary: This assert popped up on a diff last night but it seems somewhat rare,
so let's print the unit to debug it when it does happen.

Reviewed By: @ottoni

Differential Revision: D1402862
Fixing out of tree build, cmake

Summary: Closes #3023
Fixes #2922

Reviewed By: @ptarjan

Differential Revision: D1400227

Pulled By: @JoelMarcey
`hh_server --check` use the right error code

Summary: This has annoyed a lot of folks, let's fix. We `exit 0` on no
errors, `exit 1` on errors.

Reviewed By: @fredemmott

Differential Revision: D1403902