Typecheck closure bodies in strict mode as well.

Reviewed By: @elgenie

Differential Revision: D1513986
Plumb Vloc, Vreg, and Vptr through X64::CodeGenerator and ArgGroup

Summary: Gets ready for using virtual registers. For now, all the Vlocs contain
physical registers, so final code should be unchanged.

Reviewed By: @swtaarrs

Differential Revision: D1525146
Fix race updating closure vars in ClosureExpression::inferTypes

Summary: When this code was written, there each ClosureExpression had
a unique m_func. Traits changed that, and now the m_func and m_vars
can be shared. Move the lock so the entire operation is guarded.

Reviewed By: @ottoni

Differential Revision: D1526701
Sanity check region descriptors

Summary: Before trying to translate a region, checks if it is well-formed, which entails the following properties:

 1) The region has at least one block.

 2) Each block in the region has a different id.

 3) All arcs involve blocks within the region.

 4) For each arc, the bytecode offset of the dst block must possibly follow the execution of the src block.

 5) Each block contains at most one successor corresponding to a given SrcKey.

 6) The region doesn't contains any loops, unless JitLoops is enabled.

 7) All blocks are reachable from the entry block.

Reviewed By: @alexmalyshev

Differential Revision: D1521900
Move coefficient test to FBOnly location

Summary: - hphp/test/ is open-source (https://github.com/facebook/hhvm/commit/cee09b7437b120c8c1cc4949613840cc89f3ba44)
 - the implementation of this class isn't (FB: D1521758)
 - this will have broken OSS builds. We pushed it anyway as we only run quick/
 - also, there shouldn't really be new top-level files in hphp/test/slow/

Reviewed By: @JoelMarcey

Differential Revision: D1527799
More cleanup on the relocator

Summary: More refactoring to support live relocation. This fixes
a few edge cases, which only show up if you relocate two adjacent
tracelets to two disjoint regions (essentially you have to be very
careful about where you remap the "in-between" address).

Also finding that some of the reformatting keeps conflicting with
other peoples diffs (especially vasm) - so wanted to get it in
sooner rather than later.

Reviewed By: @edwinsmith

Differential Revision: D1523462
Fix bugs in the zend compat layer for initialization entries.

Summary: 1. Fix a logic inversion bug with the return value from on_modify handler;
2. on_modify handler may be null, so protect against that;
3. the `modifiable` item is a bit set which may contain more than one element.

With these fixes, dso_test.php now sees that the direction flag
is correctly bound and implemented.
Closes https://github.com/facebook/hhvm/pull/3613

Reviewed By: @sgolemon

Differential Revision: D1525229
Ensure function hints are parenthesized.

Summary: This matches HHVM's behavior.

Reviewed By: @elgenie

Differential Revision: D1527616
Added xdebug computerized tracing output

Summary: This diff adds xdebug computerized tracing format output.

Computerized tracing output is intended to be a format that is easier to parse
programatically. More information is given and columns are simply separated by
tabs.

The specification can be found here:
http://xdebug.org/docs/execution_trace

The example given in the xdebug docs is:
    Version: 2.0.0RC4-dev
    TRACE START [2007-05-06 18:29:01]
    1   0   0   0.010870    114112  {main}  1   ../trace.php    0
    2   1   0   0.032009    114272  str_split   0   ../trace.php    8
    2   1   1   0.032073    116632
    2   2   0   0.033505    117424  ret_ord 1   ../trace.php    10
    3   3   0   0.033531    117584  ord 0   ../trace.php    5
    3   3   1   0.033551    117584
    2   2   1   0.033567    117584
    2   4   0   0.033718    117584  ret_ord 1   ../trace.php    10
    3   5   0   0.033740    117584  ord 0   ../trace.php    5
    3   5   1   0.033758    117584
    2   4   1   0.033770    117584
    2   6   0   0.033914    117584  ret_ord 1   ../trace.php    10
    3   7   0   0.033936    117584  ord 0   ../trace.php    5
    3   7   1   0.033953    117584
    2   6   1   0.033965    117584
    2   8   0   0.034108    117584  ret_ord 1   ../trace.php    10
    3   9   0   0.034130    117584  ord 0   ../trace.php    5
    3   9   1   0.034147    117584
    2   8   1   0.034160    117584
    2   10  0   0.034302    117584  ret_ord 1   ../trace.php    10
    3   11  0   0.034325    117584  ord 0   ../trace.php    5
    3   11  1   0.034342    117584
    2   10  1   0.034354    117584
    2   12  0   0.034497    117584  ret_ord 1   ../trace.php    10
    3   13  0   0.034519    117584  ord 0   ../trace.php    5
    3   13  1   0.034536    117584
    2   12  1   0.034549    117584
    1   0   1   0.034636    117584
    TRACE END   [2007-05-06 18:29:01]

Reviewed By: @ptarjan

Differential Revision: D1460615
Implement the shell of xdebug_is_enabled

Summary: This allows for `if(!function_exists('xdebug_is_enabled') || !xdebug_is_enabled())` style-checks to see if custom behaviour should be used instead of xdebug stuff.
Closes https://github.com/facebook/hhvm/pull/3621

Reviewed By: @sgolemon

Differential Revision: D1527920
Fix JSON_BIGINT_AS_STRING in json_decode

Summary: Closes https://github.com/facebook/hhvm/pull/3625

Reviewed By: @sgolemon

Differential Revision: D1527921
Add sublime text editor plugin

Summary: Closes https://github.com/facebook/hhvm/pull/3626

Reviewed By: @sgolemon

Differential Revision: D1528370
Fix parenthesized function hint check

Summary: We have to use error_at instead of calling the Errors module
directly, because error_at allows the parser to revert these errors and
backtrack if necessary.

Ideally, we'd support multiple error codes through error_at, but that
should probably be in a refactoring commit of its own.

Reviewed By: @jwatzman

Differential Revision: D1528293
JSON encode now detects recursion on array in serializable objects

Summary: fixes #3483
The cause of the problem is that there is no recursion detection for serializable objects, which can lead to a stack overflow.

Also, moved bad zend test bug61978 to good.

Reviewed By: @ptarjan

Differential Revision: D1522715
Remove FramePtr dests from {Assert,Check,Guard,SideExitGuard}Loc.

Summary: They are no longer needed, as IRBuilder tracks type sources by its
GuardConstraints object.

Reviewed By: @ottoni, @swtaarrs

Differential Revision: D1518873
Add a screaming header describing provenance to automatically generated C++ source files.

Summary: Closes https://github.com/facebook/hhvm/pull/3614

Reviewed By: @sgolemon

Differential Revision: D1527969
Implement error handler function's context parameter

Summary: Closes https://github.com/facebook/hhvm/pull/3409

Reviewed By: @ptarjan

Differential Revision: D1492036

Pulled By: @sgolemon
Add Extension::moduleEnabled() hook

Summary: This takes the special cases for
apc, apache, and xhp out of extension.cpp
and allows EZC extensions to be compiled in,
but not actually enabled.

Reviewed By: @ptarjan

Differential Revision: D1528920