Support hash-consing of byte strings
commitcf227a4044bb169d213228304e93439ece8dccd9
authorJake Bailey (Hacklang) <jakebailey@fb.com>
Wed, 26 Jan 2022 00:14:05 +0000 (25 16:14 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 26 Jan 2022 00:24:36 +0000 (25 16:24 -0800)
tree7658552fb772f2b80245717595931f5f7cf39df2
parentefbbc59bed2bb18c4ddeb4577452aa05fa277779
Support hash-consing of byte strings

Summary: Extend `mk_str` (added in the previous diff) so that it can support arbitrary types of slices. Add an `mk_str` helper so that a `Conser<[u8]>` can conveniently produce `Hc<str>` values (which will be shared with hash-consed byte strings containing the same contents).

Reviewed By: shayne-fletcher

Differential Revision: D33698452

fbshipit-source-id: 2d00631e67a3254610cb8b1351af672e4faa8d43
hphp/hack/src/rupro/lib/hcons/mod.rs
hphp/hack/src/rupro/lib/pos_provider.rs