Rename some of the ArgGroup code and remove operator[]

Summary: This is factored out of the vasm diff stack.

Reviewed By: @bertmaher

Differential Revision: D1447149
Kill IRBuilder::blockIsIncompatible

Summary: The only purpose of IRBuilder::blockIsIncompatible left was to prevent
loops when Eval.JitLoops is off.  This diff gets rid of that, and
translateRegion now properly follows the region description passed to
it.  If any region former doesn't want to expose loops, it should not
include backedge arcs in the produced region.

Reviewed By: @bertmaher

Differential Revision: D1442450
Remove temporary hacks relating to the closure naming race

Summary: We believe this was fixed.  Leaving the assertions about unique
classes actually being unique, but we don't need to merge closure use var types
into a list of closures anymore.

Reviewed By: @ptarjan

Differential Revision: D1439704
Fix interp for VGetN

Summary: It was not popping one of its inputs.  Found in D1346023; putting up
this diff to decouple the fix from that.

Reviewed By: @alexmalyshev

Differential Revision: D1439827
Add stats in hhbbc about persistent static properties

Summary: We're going to have to redo this in hhbbc if we want to turn off
inferTypes, so I was looking at how many there are.  (Right now there's also an
issue: if you turn off inferTypes, it appears that every static property gets
marked as persistent, because isIndirectAltered defaults false everywhere, and
we'll behave horribly wrongly at runtime.)

I think it would probably be pretty trivial to do this for private statics
right now, but a huge majority of the cases of this are public statics from
thrift classes, so it's probably necessary to make something that can track
generally which statics could be assigned to.

Reviewed By: @alexmalyshev

Differential Revision: D1439901
Don't make use of HNI property type hints if AllFuncsInterceptable is true

Summary: It's too easy for systemlib code to violate the constraints in this
case.  (There's a case that can do so if you turn hphpc optimizations
off---it's only not doing so right now because hphpc makes some transformations
first that make it so renaming the func in question wouldn't break the type
hint.)

Reviewed By: @bertmaher

Differential Revision: D1443244
Make eval stack pushes in interp.cpp use TInitGen instead of TGen

Summary: The cases where it's pushing an F that it doesn't know if it's boxed.
You can't have an Uninit on the stack in these cases.

Reviewed By: @alexmalyshev

Differential Revision: D1445006
Fix a missing "return" in interp-minstr.cpp for a CGetM with final MW

Summary: This wasn't being tripped because it never happens, but it crashes
hhbbc at compile time.  An unrelated change to the emitter made it possible for
one of the unit tests to do this.

Reviewed By: mwang, alexanderm

Differential Revision: D1445466
Remove some dead code from hhbbc/class-util.h

Summary: This used to be used.

Reviewed By: @alexmalyshev

Differential Revision: D1444887
more complete hhi for LibXMLError

Summary: ... previous hhi was missing the properties
  http://php.net/manual/en/class.libxmlerror.php

Reviewed By: @paulcavallaro

Differential Revision: D1449908
Handle multiple end-of-region points in a translation

Summary: Any block in a region that doesn't have any successors is an end point.  Handle
this by checking for end-of-region at the end of each block, and resetting the
m_hasExit flag at each region end so that each exit can be generated correctly.

Reviewed By: @ottoni

Differential Revision: D1431292
Allow any conditional branching opcode to have both paths included in a region

Summary: We were artificially limiting the control flow within regions to come
from JmpZ/JmpNZ, but there's no good reason for that.  So, let's lift the
restriction.

Reviewed By: @alexmalyshev

Differential Revision: D1445273
Bump timeout more, retry on server out-of-date

Summary: 300s was chosen because it was the p90 of hack server startup times
as observed here: https://fburl.com/29184831

Reviewed By: pad, eladg

Differential Revision: D1449428
Sink stack adjustment into emitBindCall()

Summary: And remove dead toSave argument to emitRB().

Reviewed By: @ottoni

Differential Revision: D1449455
typechecker: case insensitive naming lookup

Summary: HHVM continues to be an environment that treats classnames as
 case insensitive (like PHP) and will remain so for some time. In
 order to smooth the transition to <?hh code, the typechecker should
 *not* allow ##class CamelCase## and ##class CaMeLcAsE## to both be
 defined names, nor should it treat typehints that refer to such
 mis-capitalizations in partial mode as referring to an unknown PHP
 class.

 This is accomplished by having an additional map of
 ##lowercase(classname) => classname## as part of naming, and spitting
 out an error when a lowercase(classname) is present in this map but
 standard naming lookup fails. The recovery from this error is
 **rewriting** the offending hint to the canonical name and proceeding
 with lookup as normal.

Reviewed By: @jwatzman

Differential Revision: D1447845
Replace regexes with string functions in DynamicYield

Summary: As @elgenie suggested in D1440297, instead of my hacky fix, I've rewritten the regexes to not be regexes.

I also deleted str.ml completely. I do not know if we want to do this or not. This would prevent people from using Str regexes in any part of the codebase that is being compiled to javascript, so that nobody starts adding them without realizing that they don't really work in javascript.

Reviewed By: jwatzman, eletuchy

Differential Revision: D1444831
Support "yield x => y" syntax

Summary: This syntax has existed for a while but the typechecker never
supported it. Let's do it. Mostly involves changing `Yield` to take an
`afield` instead of an expression, as well as a little bit of cleanup of
cruft from the days when we faked `async` with `yield` that makes no
sense nowadays and got in the way.

Reviewed By: @elgenie

Differential Revision: D1447853
Removed HOTPROFILER compile flag

Summary: This diff removes the HOTPROFILER flag.

I'm not sure if this is the best approach or if this should even be done at
all, but @swtaarrs said he thought this made sense so I figured I'd send this
out for review.

Currently the HOTPROFILER flags is always set, but the hooks into the
hotprofiler are still guarded by ifdefs. @swtaarrs said this was because it
used to have a non-zero overhead, but this is no longer the case. The
overhead would be in `event-hooks.cpp` but we don't run the hotprofiler code
unless event hooks have been enabled- and we have this check even
without the HOTPROFILER flag.

This matters for external profilers, namely xdebug. Since HOTPROFILER is
always set, this isn't actually required, but I'm not sure if it makes sense
for external profilers (implementations of `Profiler`) in general to
rely on the HOTPROFILER flag being set to work.

I just added anyone who commented on this in IRC as a reviewer. So feel free
to remove yourself if you'd like.

Reviewed By: @swtaarrs

Differential Revision: D1433761
Added xdebug_get_declared_vars

Summary: This diff adds the xdebug function xdebug_get_declared_vars.
xdebug_get_declared_vars returns an array containing the names of all the
variables in scope. It differs from the php function get_defined_vars at
the top level, because the environment variables are not included. Also
variable values are not included.

Depends on D1401578 in order to match php5 xdebug results in closures.

Reviewed By: @ptarjan

Differential Revision: D1401714
Revert "Fix casting a DateTime to an array"

Summary: This reverts commit 728b3674e2a89ee5404031e821e96b906d0b945e.

D1414803 causes
flib/intern/site/web/recruiting/stat/__tests__/SchedulrStatEngineTest.php to
fail

Reviewed By: @fredemmott

Differential Revision: D1451208