Added file_with_modes object, store it in saved state
commitb4a7cfb38cca2d2f475942b254973ae1d346234f
authorJingze Wu <jjwu@fb.com>
Wed, 16 Nov 2016 23:31:51 +0000 (16 15:31 -0800)
committerHhvm Bot <hhvm-bot-bot@fb.com>
Wed, 16 Nov 2016 23:37:59 +0000 (16 15:37 -0800)
treeb45a35a8c0ad3c55d6b7e04a790e40458d084021
parent381154e90347b35bf1cf5092ac6425f504776a3e
Added file_with_modes object, store it in saved state

Summary:
In order for lazy parsing to work, we need the file mode of every file, which isn't saved in our fast object. This adds a fast_with_modes object which essentially just stores a file mode with every set of toplevel names.

This doesn't increase the saved state size significantly(< 1MB before compression), and makes it a lot cheaper than reading and parsing modes on the fly.

(Flaky tests, so overriding unit failures)

Reviewed By: andrewjkennedy

Differential Revision: D4085054

fbshipit-source-id: 4a86541c5f504632df2bd031c7342b4cd2bed9f5
hphp/hack/src/deps/fileInfo.ml
hphp/hack/src/deps/fileInfo.mli
hphp/hack/src/naming/namingGlobal.ml
hphp/hack/src/server/serverInit.ml