fix DOMDocument_saveHTMLFile

Summary: Sharing files is bad

Reviewed By: @fredemmott

Differential Revision: D1500141
VASM fixes and instruction counts.

Summary: Add counters for HHIR and asm instructions for testing to make
sure vasm doesn't regress instruction counts. Also squashes various
changes to the vasm code itself, from higher up the vasm diff-stack.

Includes two passes: jump optimizations and dead code elimination,
however separate diffs will actually enable these.

fixes:
* Adds checking to make sure we don't assign to a vreg constant.
* moves pretty-printing code to vasm-print.cpp
* print area and predecesesors of each vasm block
* adds a SrcKey field in each Vinstr, for generating bcmaps
  (will probably change this to an IRInstruction*, thx @swtaarrs)
* actually populate bcmaps
* ripped out the area-coalescing logic; even if areas map
  to the same CodeBlock, we still want to order blocks by
  main/cold/frozen.
* only the last block in main can be closed with end{}.
* remove nops (useless copies, etc) after vasm-xls
* handle loop-carried live ranges in vasm-xls (yay, loops!)
* only use xor r,r for explicit ldimm{0}s, not xls-inserted ones.
  (so we don't accidentally clobber flags)

Reviewed By: @alexmalyshev

Differential Revision: D1494657
JSON_NUMERIC_CHECK shouldn't cast keys to numbers

Summary: See php bug 55543
Closes https://github.com/facebook/hhvm/pull/3470

Reviewed By: @fredemmott

Differential Revision: D1500288

Pulled By: svcscm
VASM part 1: convert a few HHIR ops to exersize ldimm,copy,branching

Summary: First in a series of diffs to migrate to VASM. Vauto makes this easy-ish
by collecting vasm instructions, then generating X64 asm when it's
destructor runs. By inserting Vauto uses into wider and wider contexts,
RAII style, more swaths of CodeGenerator can be converted.

Reviewed By: @alexmalyshev

Differential Revision: D1460360
Fix error message and returnvalue in fread

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

Reviewed By: svcscm

Differential Revision: D1483009

Pulled By: @fredemmott
Decrease timeout for framework installation commands

Summary: There's a higher level timeout of 300 somewhere. Set to 1 minute less at 240. We successfuly skip if this timeout is hit, but don't if the whole process gets killed

Reviewed By: @ptarjan

Differential Revision: D1498591
Makes HHVM recognize <<Memoize>> and generates a new param and changes the function name

Summary: This is the first part of making a <<Memoize>> attribute.
Specifically, this recognizes the attribute on a method, generates a param to hold the result, and changes the name of the underlying funciton.
It currently throws an error so people don't accidentally stumble upon it. The next step will be to make this work for methods with zero args

The admarket test failure was not possibly related to this

Reviewed By: @ptarjan

Differential Revision: D1490770
Makes <<__Memoize>> work for zero-arg methods

Summary: As the test shows, this works for normal methods, async methods, and overridden methods. It should just take a few tweaks to make it work for static methods. I'll do that in the next diff

As @jano said, these failures are clearly unrelated.

Reviewed By: @jano

Differential Revision: D1496765
Temp fix for cygwin linking

Summary: This is the quick and dirty version of dealing with no __register_frame with windows SEH frame unwind handling
this will be replaced with rtladdfunctiontable when that is ready to go

This allows cygwin to build and link

Reviewed By: @edwinsmith

Differential Revision: D1500365
added new raise_error family functions that skip the top frame of the backtrace.

Summary: There were not functions for raising errors skipping the top frame of the backtrace. Ideally, I would have made this an optional argument to the existing functions, however, the current functions are overloaded with formatting strings and thus that is not simple. This is useful for functions raising errors from systemlib code as otherwise the top frame of the stack will not contain file and line information. See D1486927

Reviewed By: @ptarjan

Differential Revision: D1488146
Updating Xenon to use :: always

Summary: Sometimes it generates -> and sometimes ::, based on how the data was
logged when created.  This will make it consistent.

Reviewed By: @jano

Differential Revision: D1499577
Added support for calling non user errors from systemlib code. This also fixes the lack of file and line info in systemlib trigger_errors

Summary: Added checks for trigger_error that allow the use of E_<USER/WARNING/...> from systemlib functions. This also happens to fix file and line information for some of the warnings raised by systemlib functions. Depends on D1488146

Reviewed By: @ptarjan

Differential Revision: D1486927
ArrayObject::append() should delegate to ArrayObject::offsetSet()

Summary: Match php5 implementation by delegating rather than direct manipulation of internal state.
Fixes issue #3403.
Closes https://github.com/facebook/hhvm/pull/3404

Reviewed By: @fredemmott

Differential Revision: D1486300

Pulled By: svcscm
Change Facebook proxy information for HHVM OSS test runner

Summary: Facebook: https://fb.facebook.com/groups/pe/permalink/815638725137542/

Reviewed By: @JoelMarcey

Differential Revision: D1500568
DirectoryIterator::seek from beginning not current position

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

Reviewed By: @fredemmott

Differential Revision: D1484789

Pulled By: svcscm
Change hhvm_wrapper to only make hhvm read /usr/local/hphpi/cli.hdf if i...

Summary: ...t exists, eg within FB.
Closes https://github.com/facebook/hhvm/pull/3405

Reviewed By: @fredemmott

Differential Revision: D1487055

Pulled By: svcscm
Fix thread stack limits on base thread in cygwin

Summary: Because of the nature of the pthreads layer, the attr passed to pthread_attr_getstack MUST be the one passed through pthread_create OR it needs to be fetched with the gnu extension pthread_getattr_np

Reviewed By: @JoelMarcey

Differential Revision: D1501623
typechecker: class_meth can use self::class and static::class

Summary: Referring to self::class and static::class is unambiguous in the
 context of `class_meth`. `self::class` is equivalent to the behavior
 with `__CLASS__`, whereas `static::class` is new functionality that
 allows `class_meth` to support dispatch to late-bound static methods.

Reviewed By: @jwatzman

Differential Revision: D1500010
typechecker: detect abstract parent:: calls

Summary: `parent::foo()` invokes a specific method and not a
 late-bound one; it's thus non-sensical for that method to be
 `abstract`.

Reviewed By: @jwatzman

Differential Revision: D1500136
Also move .skipif files and test against repo mode

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

Reviewed By: @fredemmott

Differential Revision: D1496026

Pulled By: svcscm