Move changesPC and populateImmediates into NormalizedInstruction constructor

Summary: I've messed something up at least twice now by trying to do something
with an NI's immediates before populating them, so avoid that mistake by doing
it in the constructor.

Reviewed By: @swtaarrs

Differential Revision: D1439359
Introduce StringMap array of kStrMapKind

Summary: StringMap uses the same machinery as IntMap, by changing how ArrayFunctions
dispatches to ##kStrMapKind##ed arrays. StringMap will warn when:

 * Is appended to
 * Is used to lookup/set/remove integer keys
 * Is sorted/usorted
 * Has elements taken by reference or given values that are references

This diff also changes some of the machinery for raising warnings.

Reviewed By: eletuchy, andrewparoski

Differential Revision: D1436599
Add sandcastle run for Eval.JitLoops=1 in dbgo mode.

Summary: In the title.

Reviewed By: @ottoni

Differential Revision: D1437390
add option to statically link libstdc++

Summary: Ubuntu 12.04 doesn't have 4.8 out of the box, but our packages
currently depend on libstdc++6 >= 4.8. Although GCC's ABI policy
guarantees forward compatibility, it's scary to have to upgrade
libstdc++ system-wide.

Add a build option (off by default) to statically link it. Next step
will be to update the packaging scripts for 12.04.

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

Reviewed By: @ptarjan

Differential Revision: D1444701
Fix POST handling without data + Fix HEAD which should return no body

Summary: This PR does two things:

 - It fixes the POST handling when there is no data (#3234).
 - It fixes the HEAD handling which should return no body.

After looking to the tests, I don't know how to do it :s

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

Reviewed By: @ptarjan

Differential Revision: D1446409
Improved the Zend compatibility for ReflectionClass

Summary: `inNamespace()`, `getNamespaceName()`, and `getShortName()` should not be `final`. This was causing issues in phpspec which mocks these methods.

This was done for ReflectionFunctionAbstract in #3070 but ReflectionClass was missed

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

Reviewed By: @ptarjan

Differential Revision: D1445618
Mark stringmap_array/idx.php norepo

Summary: The warning is issued on a different line in norepo mode, which shouldn't
make a difference.

Reviewed By: @ptarjan

Differential Revision: D1446446
Pass a condition code to cgCmpHelper instead of a method pointer.

Summary: Using setcc in this case is way simpler.

Reviewed By: @alexmalyshev

Differential Revision: D1432874
Rename --zend option to --with-php in test runner

Summary: Inaccurate name, fix.

Reviewed By: @JoelMarcey

Differential Revision: D1446936
Unbreak HHVM OSS `make install`

Summary: https://reviews.facebook.net/D19959 was in fact wrong in the
way that I commented on there that it was wrong. `make install` totally
doesn't work due to wrong path. Fix.

Fixes https://github.com/facebook/hhvm/issues/3244

Reviewed By: @kmiller68

Differential Revision: D1447093
CPack support

Summary: There are proposals to replace script [`hhvm/packaging/blob/hhvm/deb/package`](https://github.com/hhvm/packaging/blob/master/hhvm/deb/package)
Most likely it will need to adapt the code, more dependencies (supplied separately).
Unfinished prototype CPack skeleton.

```
$ cmake -DCPACK_GENERATOR=ON .
$ make package
```

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

Reviewed By: ptarjan, fredemmott

Differential Revision: D1446406
Run quick tests in repo mode too for hhvm.com/frameworks/

Summary: Now Pear has a competitor for 'Slowest Test Suite' :p

Reviewed By: @JoelMarcey

Differential Revision: D1447175
update hash to get thrift OSX fixes
Revert "Share errors for abstract trait methods and interfaces"

Summary: This reverts commit 3b432fcbf02ac8daf066a60df16268fcb1b9fcfa.

Reviewed By: @bertmaher

Differential Revision: D1448119
Fix file:// URL decoding in libxml functions and elsewhere

Summary: Anything that accepts a file URL should be able to accept an actual
file URL, as per RFC 1738, without requiring escape codes to be pre-decoded.
So, implement decoding in all the relevant places by means of a new function
StringUtil::DecodeFileUrl(). Use url_parse() as a backend, which should cover
the relevant corner cases (or can be fixed if it doesn't).

Refactor the many places in the code where a string is checked for a file://
prefix to see if it is a file URL. Some methods are inefficient, requiring
copying. Some are wrong -- RFC 1738 section 2.1 states that the protocol is
case-insensitive, so strncasecmp should be used instead of strncmp.

Refactor the identical *_get_valid_file_path() in the XML extensions into a new
libxml_get_valid_file_path(). Implement it with url_parse() instead of the
idiosyncratic xmlCreateURI(). If there's any test case which works with
xmlCreateURI() but fails in DecodeFileUrl(), then that should be fixed in
DecodeFileUrl() for the benefit of non-libxml callers.

Reviewed By: @fredemmott

Differential Revision: D1445181
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