Fix blank line bug with JSON_PRETTY_PRINT

Summary: Ported https://bugs.php.net/bug.php?id=66021.
Closes #2877
Fixes #2869

Reviewed By: @ptarjan

Differential Revision: D1370969

Pulled By: @JoelMarcey
Band-aid apparently incorrect assertion in SimpleVariable::analyzeProgram

Summary: This is asserting something isn't a parameter when it doesn't
have various contexts flags, but it's not true if you didn't run with
PostOptimization and GenerateInferredTypes set, which are both
user-controlled flags.  I suspect the bug is the assert, not somewhere
else, but I don't know the code well enough to be sure.

Reviewed By: @markw65

Differential Revision: D1371177
Add --inheritance-children and --inheritance-ancestors to hh_client

Summary: Add `--inheritance-children X` and ``--inheritance-ancestors X` to `hh_client` which returns a list of either children or ancestor classes and methods to `X`.  This will be used in FBIDE to allow for jumping between interfaces and implementations of classes and methods.

Reviewed By: @pikatchu

Differential Revision: D1363095
reverse crazy boolean in repo code

Summary: Returning false for success and true for failure was totally making me crazy

Reviewed By: @jdelong

Differential Revision: D1374027
remove anything after a ? too

Summary: Heroku is running into this problem with their current apache rewrite rules

Reviewed By: @JoelMarcey

Differential Revision: D1374358
Fix WithRef iterator creation

Summary: It looks like we were always calling the non-with-ref variant
of new_iter_array_cold.

Reviewed By: @jdelong

Differential Revision: D1372076
remove lang option and associated parsing

Summary: Remove unnecessary option and associated parsing.

Reviewed By: @avikchaudhuri

Differential Revision: D1374959
Enable warnings in C files in ocaml, and fix some warnings in Hack

Summary: This should have been on, whoops. Mostly minor stuff, some of
which is spewing in the OSS build.

Reviewed By: @ptarjan

Differential Revision: D1375062
Clear all existing keys before testing getAllKeys

Summary: This allows the test to work, even if the memcache instance is dirty. Also moves the test into the `ext_memcached` folder.
Closes #2875

Reviewed By: @ptarjan

Differential Revision: D1370972

Pulled By: @JoelMarcey
Allow Repo::loadGlobalData to fail and print SrcKey's resumed flag

Summary: Print the SrcKey's resumed flag so we can more easily figure out why
we have multiple translations for the same md5 + bytecode offset.

Also, running hhvm -vEval.DumpTC=1 and then tc-print was failing
because there was no global data in the repo.  So allow
Repo::loadGlobalData to fail in this case.

Reviewed By: @swtaarrs

Differential Revision: D1372475
Stop storing two models in hh_ide.js

Summary: Motivation: As more and more code gets converted to hack, we're pulling more and more dependencies into hh_ide.js. The model is getting too big, and it's going to start crashing chrome for people. (This is started to happen occasionally to people now)

I tried adding deps like they were decl (as discussed with Josh when we were talking about this), but it only reduced the number of files added by 10%. :(

This should be a much bigger win. I think this code is basically legacy stuff from when we first integrated this. We were holding two models, one for typechecking and one for autocomplete. There doesn't seem to be much reason to do this now (especially now that @pikatchu is making us not stop on errors).

I'm hoping I'm not missing something here and that this is ok to do.

Seems like a reasonable assumption that holding one model instead of two will cut our declare_file time in half and the model size in half. This should buy us a bunch of time.

Reviewed By: @jwatzman

Differential Revision: D1374505
Use `detach()` instead of an empty array for removing stream filter persistence across rrequests

Summary: D1373808 did this, but as @markw65 pointed out, an empty array may not be the most efficient way.

Reviewed By: @markw65

Differential Revision: D1374219
Stub out `ReflectionFunction::isDisabled`.

Summary: Closes #2881
Fixes #2879

Reviewed By: @elgenie

Differential Revision: D1370973

Pulled By: @JoelMarcey
better repo failure messages

Summary: We can identify a few different error conditions which we can report better

Reviewed By: @jdelong

Differential Revision: D1374028
don't include bt_handler or killpg in backtraces

Summary: These are pretty much in every backtrace and @markw65 and I spent ~15 mins staring at why it could segfault in the `bt_handler`. It is just a symptom of where we grab the backtrace.

I'm not sure if there is a better way to do arrays without using the heap. Anyone better at C++ want to help out?

Reviewed By: @markw65

Differential Revision: D1375137
clean up test dir

Summary: I quite dislike 1-off scripts residing in the root dir since it hurts discoverability. Lets move the one-offs into `tools`. Also, I killed the `verify.sh` that I accidentally resurected.

Reviewed By: @bertmaher

Differential Revision: D1376084
make sure all funcs have names

Summary: I ran accross a stack trace where there was a Func without a name. Lets check for that and catch it earlier.

Reviewed By: @jdelong

Differential Revision: D1375249
mysqli: Return false on non-selects

Summary: Produces the expect result for INSERT/UPDATE and other queries that do not produce a result set.

Closes #2799
Fixes #2781

Reviewed By: @ptarjan

Differential Revision: D1375310

Pulled By: @JoelMarcey
Fix HHVM OSS Build: Add methodJumps to to Makefile

Summary: D1363095 add some new `hh_client` functionality and added some new targets to the TARGETS files. We need to add these to the Makefiles as well.

Reviewed By: @ptarjan

Differential Revision: D1376588
make ./configure --help have all the options

Summary: This has always bugged me.

Now we have (with columns):

    usage: ./configure -Dvariable=argument ...\n
    Variables:
      -DCMAKE_BUILD_TYPE=Debug|Release|RelWithDebInfo|MinSizeRel    Sets build type                                                Default   Release
      -DALWAYS_ASSERT=ON|OFF                                        Enabled asserts in a release build                             Default   OFF
      -DDEBUG_APC_LEAK=ON|OFF                                       Allow easier debugging of apc leaks                            Default   OFF
      -DDEBUG_MEMORY_LEAK=ON|OFF                                    Allow easier debugging of memory leaks                         Default   OFF
      -DDISABLE_HARDWARE_COUNTERS=ON|OFF                            Disable hardware counters (for XenU systems)                   Default   OFF
      -DENABLE_COTIRE=ON|OFF                                        Speed up the build by precompiling headers                     Default   OFF
      -DENABLE_FULL_SETLINE=ON|OFF                                  Enable full setline function for debugger and code-coverage    Default   OFF
      -DENABLE_TRACE=ON|OFF                                         Enable tracing in release build                                Default   OFF
      -DENABLE_ZEND_COMPAT=ON|OFF                                   Enable Zend source compatibility                               Default   ON
      -DEXECUTION_PROFILER=ON|OFF                                   Enable the execution profiler                                  Default   OFF
      -DHOTPROFILER=ON|OFF                                          Enable support for the hot-profiler                            Default   OFF
      -DPACKED_TV=ON|OFF                                            Enable packed tv (typed value) compilation                     Default   OFF
      -DUSE_GOOGLE_CPU_PROFILER=ON|OFF                              Use Google cpu profiler                                        Default   OFF
      -DUSE_GOOGLE_HEAP_PROFILER=ON|OFF                             Use Google heap profiler                                       Default   OFF
      -DUSE_JEMALLOC=ON|OFF                                         Use jemalloc                                                   Default   ON
      -DUSE_TCMALLOC=ON|OFF                                         Use tcmalloc (if jemalloc is not used)                         Default   ON

and without columns

    usage: ./configure -Dvariable=argument ...\n
    Variables:
      -DCMAKE_BUILD_TYPE=Debug|Release|RelWithDebInfo|MinSizeRel : Sets build type : Default: Release
      -DALWAYS_ASSERT=ON|OFF : Enabled asserts in a release build : Default: OFF
      -DDEBUG_APC_LEAK=ON|OFF : Allow easier debugging of apc leaks : Default: OFF
      -DDEBUG_MEMORY_LEAK=ON|OFF : Allow easier debugging of memory leaks : Default: OFF
      -DDISABLE_HARDWARE_COUNTERS=ON|OFF : Disable hardware counters (for XenU systems) : Default: OFF
      -DENABLE_COTIRE=ON|OFF : Speed up the build by precompiling headers : Default: OFF
      -DENABLE_FULL_SETLINE=ON|OFF : Enable full setline function for debugger and code-coverage : Default: OFF
      -DENABLE_TRACE=ON|OFF : Enable tracing in release build : Default: OFF
      -DENABLE_ZEND_COMPAT=ON|OFF : Enable Zend source compatibility : Default: ON
      -DEXECUTION_PROFILER=ON|OFF : Enable the execution profiler : Default: OFF
      -DHOTPROFILER=ON|OFF : Enable support for the hot-profiler : Default: OFF
      -DPACKED_TV=ON|OFF : Enable packed tv (typed value) compilation : Default: OFF
      -DUSE_GOOGLE_CPU_PROFILER=ON|OFF : Use Google cpu profiler : Default: OFF
      -DUSE_GOOGLE_HEAP_PROFILER=ON|OFF : Use Google heap profiler : Default: OFF
      -DUSE_JEMALLOC=ON|OFF : Use jemalloc : Default: ON
      -DUSE_TCMALLOC=ON|OFF : Use tcmalloc (if jemalloc is not used) : Default: ON

Reviewed By: @JoelMarcey

Differential Revision: D1376802