Devirtualize ArrayInit calls to MixedArray, some removal for keyConverted flag

Summary: We can call MixedArray methods directly here.  The semantics
of set() were bizarre and probably not intentional (e.g. when key
isn't converted, using a null variant wouldn't insert anything instead
of using the empty string as key).

Reviewed By: bertrand

Subscribers: hphp-diffslists, ps, mcduff, marccelani, mshneer, zhuohuang

Differential Revision: D1322489

Tasks: 4109771
Add some documentation meant to be in an earlier diff

Summary: I meant to document the new collection opcodes and modify
part of the simplifier comments that was old, but forgot to in that
change.

Reviewed By: smith

Subscribers: hphp-diffslists, ps

Differential Revision: D1330212
Revert "Devirtualize ArrayInit calls to MixedArray, some removal for keyConverted flag"

Summary: This was incompatible with one of my other diffs and broke build.  (Oops.)

Reviewed By: eletuchy

Subscribers: hphp-diffslists, ps, mcduff, marccelani, hitesh, mshneer, zhuohuang

Differential Revision: D1333691
Return false on empty string for ZipArchive::addEmptyDir

Summary: PHP returns false when empty string is returned from `ZipArchive::addEmptyDir`.

Reviewed By: fredemmott

Subscribers: hphp-diffslists, ps

Differential Revision: D1332282

Tasks: 4338998
perf: don't pessimize dynamic function calls as being extract/compact/func_get_args

Summary: The following functions have been rewritten to have two versions,
 an internal-to-vm version called for `SimpleFunctionCall` and the
 external version used by dynamic invocations:

  - `extract` -> `__SystemLib\\extract` (HNI alias)
  - `get_defined_vars` -> `__SystemLib\\get_defined_vars` (HNI alias)
  - `func_get_args` -> `__SystemLib\\func_get_args_sl` (IDL)
  - `func_get_arg` -> `__SystemLib\\func_get_arg_sl` (IDL)
  - `func_num_args` -> `__SystemLib\\func_num_args_sl` (IDL)
  - `compact` -> `__SystemLib\\compact_sl` (IDL)

 The non-SystemLib versions of these functions raise an error about
 them not being allowed to be called dynamically (when HipHop syntax
 is on). That means that hphpc and hhbbc now don't have to interpret
 `$f()` as potentially using the variable environment or ExtraArgs,
 reading/trampling unknown/unknowable locals, etc.

Reviewed By: jdelong

Subscribers: trunkagent, hphp-diffslists, ps

Differential Revision: D1325958

Tasks: 4338754
Cleanup PendingFixups

Summary: When emitting prologues, we just wrote the fixups directly.
This makes everything go through the pending fixup list. This should
make it easier to generate the code into a temporary location, and then
move it to its final destination.

While looking at the code, it seemed to be in the wrong place; it was
implemented on FixupMap, but every use of the pending fixups had to do
mcg->fixupMap()->whatever(), and there were accessors which were provided
solely to let MCGenerator manipulate it. So I moved it to MCGenerator,
which also matches the pending catch list.

Reviewed By: jdelong

Subscribers: hphp-diffslists, ps

Differential Revision: D1328671
Better RDS usage for static properties

Summary: For static properties of persistent classes that are never
modified, put them in persistent RDS. If all of a class's
static props are persistent, put the inited flag in persistent RDS too.

Since using the properties is guarded by the inited flag, put the props
themselves in Local RDS

Reviewed By: jdelong

Subscribers: trunkagent, hphp-diffslists, ps

Differential Revision: D1318943
Correctly resolve type hints when comparing types signatures in methods

Summary: `TypeConstraint` was using strings to compare if two types are the same, where in reality it should lookup the types and compare the result incase of aliases.

Fixes #2527

Reviewed By: ptarjan

Subscribers: eletuchy, jdelong, trunkagent, mwilliams, hphp-diffslists, ps

Differential Revision: D1330905

Tasks: 4210703
Allow indexing of string literals

Summary: fixes facebook/hhvm#2662

Reviewed By: eletuchy, liranuna

Subscribers: hphp-diffslists, ps, amenghra

Differential Revision: D1332969
Restore `generic_this_chain.php`

Summary: This test, deleted in D1329747 due to flakiness, actually might
be good to keep around. We can just remove the bits depending on how
exactly idents are assigned. (Test originally added in D1301331.)

Reviewed By: eletuchy

Subscribers: hphp-diffslists, ps, jwatzman, ptc

Differential Revision: D1333164
update for DSO header installation
Do not discard first frame of output buffer handler

Summary: PHP5.4 fixed this behavior, so should we.

Fixes #2690

Reviewed By: fredemmott

Subscribers: hphp-diffslists, ps

Differential Revision: D1333042
Include scope string in json output of search results

Summary: Same api as monocle. If this is a class member (var or method), include the name of the class that it's part of.

Reviewed By: jwatzman

Subscribers: hphp-diffslists, ps, jwatzman, ptc

Differential Revision: D1327701
Upgrade to curl-7.36.0

Summary: Lots of bug fixes and Happy Eyeballs is now implemented in
curl.

Reviewed By: bertrand

Subscribers: ps, trunkagent, hphp-diffslists

Differential Revision: D1328961
Convert zend-url functions to smart_malloc

Summary: Convert imported php5 url functions to using smart_malloc-based
Strings. This mandates a few downstream changes.

Reviewed By: aravind

Subscribers: trunkagent, mwilliams, hphp-diffslists, ps, jdelong

Differential Revision: D1331794
hackificator adds "public" modifier if possible

Summary: My first try at ocaml, let's see how it goes.

related to https://github.com/facebook/hhvm/issues/2388
Closes #2474
Fixes #2388

Reviewed By: pad

Subscribers: hphp-diffslists, ps, jwatzman, ptc, joelm

Differential Revision: D1334523

Pulled By: @jwatzman
Preserve the information gathered on PHP files

Summary: We currently remove the information we have (cf FileInfo) on PHP files.
It is no longer necessary, since the rest of the pipeline works fine even
with PHP files (it just ignores them).

Reviewed By: pad

Subscribers: hphp-diffslists, ps, jwatzman, ptc

Differential Revision: D1334832
Fix autocomplete

Summary: We need to clear out these errors if `fail` is false. Make this
code more readable too while we're at it.

Reviewed By: joelb

Subscribers: hphp-diffslists, ps, jwatzman, ptc

Differential Revision: D1334810

Tasks: 4352006
fix precoloring

Summary: If the builtin function returned a struct by value in memory, and had
no other arguments, precoloring would try to read off the end of
the (null) func->params() array.  Also, this fixes precoloring to
properly hint the 0th arg when it's pointing to the return value.

Reviewed By: bertrand

Subscribers: seanc, hphp-diffslists, ps

Differential Revision: D1334372
Reflection classes should not be cloneable

Summary: PHP does not allow cloning of Reflection classes. Please note that this implementation differs a bit: PHP fatals while we throw an exception.

Fixes #1572

Reviewed By: fredemmott

Subscribers: hphp-diffslists, ps

Differential Revision: D1334388