Change return type of LdRef to InitCell

Summary: Boxes can't contain Uninit.

Reviewed By: @swtaarrs

Differential Revision: D1436506
Corrected the debug output and classname of Closure objects to match php

Summary: our output of `var_dump` and `get_class` of closure objects was different tan php's. Correcting it made several bad zend tests pass!

Reviewed By: @ptarjan

Differential Revision: D1402833
Share errors for abstract trait methods and interfaces

Summary: Abstract trait methods were not checked for same compliance as interfaces. Found via a bad zend test

Reviewed By: fredemmott, eletuchy

Differential Revision: D1395699
Fixed Issue Tracker Link

Summary: The current link will redirect here, but it would make more sense to just put the correct link in the first place.
Closes #3212
Created from: https://github.com/facebook/hhvm/pull/3212

Reviewed By: @fredemmott

Differential Revision: D1441564
Unbreak DynamicYield in javascript

Summary: js_of_ocaml doesn't provide the Str library, so ages ago, somebody made a fake one so our existing code still worked.

Unfortunately, the javascript regexp library uses javascript's syntax for regexes, instead of ocaml syntax.

Because of this, DynamicYield has never worked in FBIDE. This used to be ok for typechecking, because we'd never bring in every dependency from Hack, so it would just assume these methods were defined in PHP. (So nobody ever caught it.) It's never worked for autocomplete (but I never realized that it *should* work for autocomplete)

There's no library method to convert regexes from ocaml to js format, so I did a terrible hack that makes this work for us. (I admit this is awful :( )

We're only using Str regex stuff for dynamic yield in javascript, so I was able to verify that this fixes it.

The problem for our regexes is that in ocaml, you escape ( and ) to indicate that they're a matching group, while in javascript, you do not.

Reviewed By: @jwatzman

Differential Revision: D1440297
Kill FrameState::compatible()

Summary: It doesn't do anything anymore (just an assert) and always returns true.

Reviewed By: aravind

Differential Revision: D1439881
Convert ext/xmlwriter to HNI.

Summary: Signed-off-by: Arthur Loiret <arthur.loiretens-lyon.fr>
Closes #3044

Reviewed By: @ptarjan

Differential Revision: D1410044
scandir() stops at falsy filenames.

Summary: `(bool)` !== `===`.

Reviewed By: @markw65

Differential Revision: D1442174
The embedded server doesn't exist anymore. Remove it from travis

Summary: Some cURL test should be failing/skipped because of this

The background process does nothing currently
See b1090c3e04
Closes #3214
Created from: https://github.com/facebook/hhvm/pull/3214

Reviewed By: @ptarjan

Differential Revision: D1441570
Fix pow() to deal with abnormal data types

Summary: PHP5 special handling for types which Variant::toNumeric()
doesn't handle.  Create a specialized helper for those cases in the
form of convert_for_pow()

Reviewed By: @fredemmott

Differential Revision: D1430284
Implement wordwrap() natively

Reviewed By: @ptarjan

Differential Revision: D1440874
Fix Redis::sRandMember()

Summary: Don't require a second parameter which is originally optional.
Also, it shouldn't always return an array.

Closes: #3213
Closes #3217
Created from: https://github.com/facebook/hhvm/pull/3217

Reviewed By: @swtaarrs

Differential Revision: D1442294
For future safety: "-1" is dangerous when comparing with unsigned type.

Summary: For future safety: "-1" is dangerous when comparing with unsigned
type.

Reviewed By: dmitrip

Differential Revision: D1442895
cotire 1.6.4

Summary: Closes #3194
Created from: https://github.com/facebook/hhvm/pull/3194

Reviewed By: @ptarjan

Differential Revision: D1435738
unset another cached variable for dwarf detection

Summary: We're not actually broken right now because of the way we fall-back to
dwarf_producer_init_c, but a function exists check is still being
skipped due to CMake caching. That could potentially confuse things
if/when another init function were to be added in the future.
Closes #3200
Created from: https://github.com/facebook/hhvm/pull/3200

Reviewed By: @ptarjan

Differential Revision: D1438631
Fix CMake to install hh_client and hh_server

Summary: Make sure we install under bin/ the hack binaries.
Closes #3192
Closes #3158
Created from: https://github.com/facebook/hhvm/pull/3192

Reviewed By: @jwatzman

Differential Revision: D1435736
Reorganize and refactor Unit

Summary: This is partway towards having less monolithic and more documented Unit
code.  The rest of the cleanup is imminent, but it was starting to get
out of control in scope and I wanted to get this much in first to avoid
conflicts.

Notable changes include:

- Clean up and document all of Unit's methods.  Also do some easy
  refactoring, delete some undefined functions, and privatize some
  things that aren't used publicly.

- Kill Unit::m_cache{Offset,Mask}, which were always zero and never
  mutated.

- Refactor the code copypasta'd between LitstrTable and Unit into
  NamedEntityPairTable, and move the global NamedEntityMap into
  named-entity.h.  This untangles the dependency between LitstrTable and
  Unit and also slays villainous duplication.

- Remove the m_litstrs vector of StringData*'s from LitstrTable; it is
  redundant with the first component of m_namedInfo, the vector of NEPs.
  This is the only real functionality change included in this diff.

- Move UnitEmitter and UnitRepoProxy to unit-emitter.h---though we're
  currently relying on unit.h for all our includes.  This will be fixed.

Reviewed By: @alexmalyshev

Differential Revision: D1440780
In mysql_escape_string() use ReserveString instead of AttachString

Summary: * Use ReserveString instead of AttachString in mysql_escape_string()
  and mysql_real_escape_string(). AttachString should really be
  deprecated, since it doesn't actually attach, it just copies.
* Don't truncate the return value of the underlying C API call -- use
  unsigned long.
* Upgrade string size to size_t before doing arithmetic. Overflow is
  probably not possible in this case, but it's a good habit to get into.
* Added missing skipif.inc from PHP, so that the relevant tests would
  run.

Submitted on behalf of a third-party: The PHP Group
Source: PHP 5.7.0-dev
License: version 3.01 of the PHP license
Closes #3198
Created from: https://github.com/facebook/hhvm/pull/3198

Reviewed By: @ptarjan

Differential Revision: D1438627
freetype 2.16+

Summary: #3190
Closes #3196
Created from: https://github.com/facebook/hhvm/pull/3196

Reviewed By: @ptarjan

Differential Revision: D1438014
RBTrace should be NNT

Summary: I missed this when making CallsNative imply MayRaiseError.

Closes https://github.com/facebook/hhvm/pull/3216

Reviewed By: @bertmaher

Differential Revision: D1442287