Pass list of changed files in a temp file.

Summary: There is a limit on how long command line invocations can be,
and a long list of files can easily exceed that limit.

Also remove the string truncation logic as we will no longer be
overflowing the screen with a single command.

Reviewed By: @​svcscm

Differential Revision: D1697045
fix broken scuba logging

Summary: Return back to ClientBuild when we're successful so we log CLIENT_BUILD_FINISH.
This isn't a disaster since we still have basically the same data spread out
in scuba table hh_build_steps, but might as well fix this.

Reviewed By: @paulcavallaro

Differential Revision: D1694667

Signature: t1:1694667:1416516191:54be6b1c677a9316acfcbad123e8672a6ea8b35b
point doc blocks for builtins to docs.hhvm.com

Summary: ... instead of php.net. This is quite useful for features
 that exist only in HHVM and not PHP5 (such as hack collections).

 Facebook: HipHopSpecific is really quite a misnomer at this point, as
 it seems to be applied only to stuff that isn't documented because
 it's not yet open sourced (and rather rarely internal to the VM).

Reviewed By: @JoelMarcey

Differential Revision: D1693767

Signature: t1:1693767:1416532376:acf87a1bf5dd361a1d1f9cfaa915c32823b973f4
Make BigNode parsable, extend HeapIter to visit BigNodes.

Summary: Now, clients of HeapIter will visit everything in the heap,
not just objects in slabs. Using the standard format isn't
strictly necessary for iterating, but it enables the HeapIter
client to inspect a standard header, to see it's kind.

Reviewed By: @jdelong

Differential Revision: D1687825
Dump typedef info in `hh_client --show`

Summary: Occasionally useful.

Reviewed By: @int3, @elgenie

Differential Revision: D1695998

Signature: t1:1695998:1416530544:befee9d06783c4130d824db3191905f7a20587f7
Cleanup of hfsort

Summary: I want to embed the core of hfsort into hhvm to use for perf based
jit relocation, so move it into its own namespace, and move error() and TRACE
out of the core so they can be replaced with something more appropriate when
running from hhvm.

Reviewed By: @ottoni

Differential Revision: D1697874

Signature: t1:1697874:1416607428:0c68d05310bd047b6bf7d9db4be8dceeb5dbaaab
Fix headerTest

Summary: It was written to the old api

Reviewed By: @alexmalyshev

Differential Revision: D1698880

Signature: t1:1698880:1416617532:3111a9d67b0624be5cbfccbea7bf019a192028e2
typechecker: add constants to hh_client --show

Summary: ... it's valuable for checking whether a builtin constant is declared.

Reviewed By: @jwatzman

Differential Revision: D1696607

Signature: t1:1696607:1416616316:bb07a63e2dd07da4ac39014ea8fbc0252ecba5b0
Use sha1sum for the repo-schema

Summary: it turns out that shasum isn't installed in the sandcastle
tupperware containers.

Reviewed By: @edwinsmith
Map operator new/delete directly to malloc/free

Summary: They used to go through the plt, which caused extra cache
misses and extra instructions.

Reviewed By: @edwinsmith

Differential Revision: D1698182

Signature: t1:1698182:1416607907:6e44c34a3e31a56afaa93b367d83f2bdc9e68745
Re-order some runtime options

Summary: Some Eval options needed to know the value of RepoAuthoritative,
so move the Repo section higher up, rather than splitting the Eval
options.

I was adding some more options that needed to know about RepoAuthoritative,
so this seemed to make sense.

Reviewed By: @JoelMarcey

Differential Revision: D1697691

Signature: t1:1697691:1416598948:1fd0ce678e90cbff1051afc9e49d665ceec1497d
Flip DParam and DParamNRel, so NRel is the default

Summary: Only LdLoc and LdStack need this.  The LdLocPseudoMain support didn't
seem to be entirely working: when we gen'd new LdLocPseudoMains, we'd map their
type sources to whatever the current type source was, and LdLocPseudoMain would
set its own dst as a type source.  Right now it's also setting types in
localTypes which are incorrect without a new guard (this could cause problems
for any callers of localType, but I don't know if it can just be removed, so I
made a task).  So any constrainValue on a LdLocPseudoMain would constrain the
/previous/ LdLocPseudoMain in the tracelet.  However, isGuardOp returns false
for these, so it can't have worked.  Also I don't understand why
StLocPseudoMain was modifying type srcs, so just remove that too.

Reviewed By: @markw65

Differential Revision: D1687087

Signature: t1:1687087:1416589588:d25561f895d2c6b994366485dc372493e0d6ff9e
Fix insertPhis calls to IRUnit::replace()

Summary: It was trying to replace a jump but passing no destination block.  Due
to a bug in IRInstruction::become this actually worked, because it left the old
Edges in place.  It also seems really sketchy to iterate the predecessor
EdgeList while you're modifying instructions that change it; I'm not sure if
that's ok (it probably could be if we guarantee not to move the Edge*'s if it
already had Edges, but that seems like a weird thing to rely on), so stop doing
it.  The function does something pretty similar a few lines earlier while
splitting critical edges also, but this part is explicitly doing setTaken and
setNext calls without anything that could be changing the Edge*, which seems
like it /might/ work, so I'm going to leave that part alone for now.

Reviewed By: @bertmaher

Differential Revision: D1693126

Signature: t1:1693126:1416451300:c4c3dafb5de2c6b92828fb4dd4ecc359e0fdb6cd
Fix bugs relating to edges in IRInstruction::become

Summary: It was keeping the edges from the old branch if you replace one branch
with another, if you replaced a non-branch with a branch, it would call
setNext/setTaken before changing m_op so they wouldn't do anything, and if it
allocated edges it didn't set their instruction pointers.

Reviewed By: @edwinsmith

Differential Revision: D1689306

Signature: t1:1689306:1416503105:5f54a7526d1fe128044c5831683a189ce24a3d1c
Remove IRInstruction::convertToJmp, and IRInstruction::convertToNop

Summary: The comments about the simplifier (which doesn't even call these
anymore) were pretty scary.  Now become() works for jumps, so we can just use
it.  convertToMov was dead.  convertToNop seems common enough to have a special
function (and it lets you do it without an IRUnit).

Reviewed By: @ottoni

Differential Revision: D1689348

Signature: t1:1689348:1416595146:3806ebc30697603cb6a9fa7a7afea9518a84542b
Merging function for sparse_id_maps

Summary: To use these to contain dataflow state you'll generally want to have
something like this.  It turns out I have a better way for now, but this was
tested and seems worth putting in.

Reviewed By: @edwinsmith

Differential Revision: D1690835

Signature: t1:1690835:1416415333:1060c99a6e41c5ea9380d981e5bcc60d03ba62ce
Add a dataflow_worklist class to use instead of some std::sets

Reviewed By: @edwinsmith

Differential Revision: D1690949

Signature: t1:1690949:1416418755:8d90adcc22f60684de46797112b9cf36c519463e
Load elimination pass

Summary: This is still kinda a work in progress and doesn't do very much yet,
but it can eliminate some loads in trivial situations.  I think it's landable
and we can iterate more in trunk.  (Teaching memory-effects more and doing
things like getting DecRefs that can re-enter out of the main lines of code may
make it more effective even without more improvements here, too.)

Reviewed By: @ottoni

Differential Revision: D1691662
Rename memelim to store-elim for now

Reviewed By: @alexmalyshev

Differential Revision: D1691700

Signature: t1:1691700:1416430962:326925bd916f0c3dfff35034a3099c685b936215
Revert "Revert "Add fixed-point analysis to FrameState""

Summary: This reverts commit 532e6ca9ce3aa88e8e006024ce4b76b25b8ab6a8, and
turns the fixed point stuff on only if EvalHHIRBytecodeControlFlow is true
(which will have refcountOptsDefault saying false).

Reviewed By: @alexmalyshev

Differential Revision: D1691934

Signature: t1:1691934:1416434945:8acd6b40f5d08e8b8d7575048135e5a960f28e33