Update third party SHA to support 12:0 folly update
Don't re-create singletons

Summary: This forbids singleton creation/re-creation after destroyInstances() was called.
Only after reset() is called singletons can be created again.

registrationComplete() behavior is also slightly change. We disallow singleton registration after registrationComplete() is called even in Relaxed mode. Strict mode now only controlls whether singletons can be constructed before registation is complete.

Reviewed By: @chipturner

Differential Revision: D1605136
Fix a crash in nested file functions

Summary: UrlFile functions correctly chased through multiple actrecs
to find the callsite. ExecutionContext::setVar only went one deep.

The result was that the example crashed because it tried to set a
variable in a frame that didn't have a VarEnv.

Reviewed By: @swtaarrs

Differential Revision: D1614350
Remove the implicit label hack in vasm-xls

Summary: The numbering scheme for positions requires that the first
instruction in a block not have uses, so that we don't end
up with empty lifetime ranges. In XLS, this was acheived by
inserting a DefLabel if the block didn't have one and it
started with an instruction with 1+ uses. In vasm-xls, I
hacked this by leaving an empty position there and
compenstating for it everywhere. But wrongly, because
phidef should be exactly at the block start.

This diff inserts nop instructions similar to the way XLS
originally inserted DefLabel, if a block started with an
instruction with uses. Inserting in vasm requires memcpy,
but blocks tend to be very small on average. I'll measure
JIT speed just in case.

Reviewed By: @swtaarrs

Differential Revision: D1582946
parse require, include, require_once and include_once

Summary: This diff adds require/include/require_once and include_once.
since these constructs are expressions, we allow this but while naming
we treat this as ANY.
In strict mode we only allow these constructs at the top level as statements.

Depends on D1610236

Reviewed By: @int3

Differential Revision: D1613311
typechecker: consolidate reflection hhi's

Summary: Having all the classes for ext_reflection in a single
 file is more representative of the conceptual granularity. It also
 avoids having three-line ##// decl## files

 There are no semantic changes in this code other than file moves.

Reviewed By: @int3

Differential Revision: D1616978
Only call exsltRegisterAll() once

Summary: The extension list in libxslt looks global, and mutex-guarded. There's no reason to call this once per thread.

~ 64% performance boost for hello world

Reviewed By: @oyamauchi

Differential Revision: D1608475
==WIP== Create ArrayTracer to trace array usage in the runtime

Summary: ArrayTracer aims to track the creation and use of arrays throughout the HHVM
runtime. For ease of use it's enabled as a runtime flag -vEval.TraceArrays=true
which defaults to off.

It works by wrapping the functions in the ArrayFunctions g_array_funcs table
with a function that records the ArrayData pointers it sees, classifying them
as either static or request local, and then storing them in their respective
maps from ArrayData* to ArrayUsage. ArrayUsage just records what has happened
to a specific ArrayData, which gets fed information by the intercepted calls
to g_array_funcs. For example, a call to g_array_funcs.setStr will set the
string key flag on the ArrayUsage.

Reviewed By: @edwinsmith

Differential Revision: D1539544
Drop the -m suffix from the store immediate instructions.

Summary: It's implied by it being a store.
Also fixed some indentation in code-gen-x64.cpp,
and unbroke vasm-xls pretty-print.

Reviewed By: @swtaarrs

Differential Revision: D1616232
Remove unused parameters.

Summary: Makes dependencies clearer.

Reviewed By: @elgenie

Differential Revision: D1613869
Fix SplFileObject::__construct to match with PHP

Summary: Aims to fix #3401
Closes https://github.com/facebook/hhvm/pull/3983

Reviewed By: @paulbiss

Differential Revision: D1617360
Delete loadq/storeq since they are redundant

Summary: load/store do the same thing with less restrictions on the register.

Reviewed By: @jasone

Differential Revision: D1617595
Do not allow recursive calls to vasm.

Summary: Not all callsites of Vauto are created equal, in terms of what
registers they grant Vauto to use when emitting code. This removes
the callsites that can be entered recursively from vasm itself.

Reviewed By: @swtaarrs

Differential Revision: D1614832
Split bindcall and nativecall

Summary: emitBindCall() is essentially two different things rolled into one;
Split out the case for a direct call to a NativeCall function.

Reviewed By: @maksfb

Differential Revision: D1616115
Hide temporary state used in Typing_compare

Summary: Also add an mli file for Typing_compare.

This makes it easier to figure out where state gets used.

Reviewed By: @jwatzman

Differential Revision: D1613898
Make is_hh_file a local non-reference

Summary: global references increase likelihood of save / restore flakiness

Reviewed By: @jwatzman

Differential Revision: D1613872
Refactor daemonization code.

Summary: Looks nicer to me this way; separates daemonization code from what to
do after daemonization

Reviewed By: @jwatzman

Differential Revision: D1613866
Allow HH_FIXME in XHP attribute declarations

Summary: Just an oversight. Note that there are several XHP places we
should //not// allow this, since comments there are rendered to the
page!

Reviewed By: @int3

Differential Revision: D1614516
FIXME applies to the line of the next lexer token

Summary: This means you have multiple FIXMEs on their own line, and they
will apply to the first non-comment thing after them. Requires a bit of
ugly in the lexer -- it's unclear to me that at this point we shouldn't
just move this over to the parser, getting scary close to actually
parsing, but this is easiest for now.

Reviewed By: @elgenie

Differential Revision: D1614498
Import PHP 5.6.1 Zend Tests

Summary: Re-import our Zend tests. Use PHP 5.6.1 as the baseline. This is also after we
updated the import script too. https://github.com/facebook/hhvm/commit/b60c133884f4af5b0073909ffb157c8a134ca878

Reviewed By: @paulbiss

Differential Revision: D1604585