regrouping all the errors in the same file.

Summary: All the logic to build an error is now in errors.ml.
The type of an error is abstract (cf errors.mli), to make sure that it stays that way.

Reviewed By: jwatzman, eletuchy

Differential Revision: D1390136
Added xdebug code coverage

Summary: So this is a large diff, I apoligize for that in advance. However, most of the
code is taken from D1220726 and most lines come from the added tests.

This diff adds the xdebug functions related to code coverage. You can
view these functions here http://xdebug.org/docs/code_coverage.
Code coverage is started with xdebug_start_code_coverage and stopped
with xdebug_stop_code_coverage. xdebug_get_code_coverage returns an
array first indexed by filename, then by line number, where the value
is the number of times that line was executed.

Depends on D1390958.

Reviewed By: @ptarjan

Differential Revision: D1392774
Reimplement WholeCFG region selector to choose regions with consistent types

Summary: This is what I have in mind for selection of arbitrary control flow regions.
The idea is to grab as much of the CFG as possible by following all arcs from
an initial translation, with the restriction that a SrcKey should appear only
once per region.

Reviewed By: @ottoni

Differential Revision: D1388356
Prevent mid-region reffiness checks in WholeCFG selector

Summary: translateRegion can't handle this so don't do it.  This solves a bunch
of the quick test failures using the whole CFG selector.

Depends on D1388356

Reviewed By: @ottoni

Differential Revision: D1391952
Fix HHVM OSS Build after D1390136 commit

Summary: Makefiles needed to be changed in parallel with Targets file and other changes in D1390136.

Reviewed By: @ptarjan

Differential Revision: D1399556
Clean up, split out, and document PreClass

Summary: Working on refactoring Unit/Class/Func loading.  This just moves
PreClass into its own files, refines the includes, documents as much as
possible, organizes the API, and eliminates the unnecessary
setUserAttributes() by inlining its functionality into PreClassEmitter.

We should be able to get rid of the mutableFoos() methods once the
loader refactor is done.

Reviewed By: @elgenie

Differential Revision: D1398297
Initial coding conventions doc

Summary: This is mostly the uncontroversial stuff that we already agree on. I'd
like to go after the remaining stuff like switch statement formatting too but
that can come in later diffs after much discussion.

Reviewed By: @edwinsmith

Differential Revision: D1394638
Expand jit documentation a bit

Summary: I added more about the hhbc -> ir transformation, hhir itself, and
some optimizations.

Reviewed By: @edwinsmith

Differential Revision: D1397404
Enable HHIRBytecodeControlFlow by default

Summary: Bytecode controlflow is looking stable and perf-neutral, so let's turn it on and see how things go.

Reviewed By: @ottoni

Differential Revision: D1371626
re-enable mustache, mark the one failing test as flakey

Summary: No change to expect file as when I removed it from clownlylist and re-recorded, the file was still disabled on disk (needed blowing away, etst runner has now been modified)

Reviewed By: @bertmaher

Differential Revision: D1400141
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