Do not attempt to cache conversions of zero-sized values
commit1846c04d7349d92254db5df7b950d0a90bc36fc2
authorJake Bailey (Hacklang) <jakebailey@fb.com>
Thu, 3 Sep 2020 22:33:06 +0000 (3 15:33 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 3 Sep 2020 22:35:50 +0000 (3 15:35 -0700)
tree7eb0d6c255465466834c0380365b303f4239bcbc
parent17aa4dc842f3a4b24d13d657c28720dbee61833f
Do not attempt to cache conversions of zero-sized values

Summary: In {D21556226 (https://github.com/facebook/hhvm/commit/99e26f9994af222fce5ebf1a33d2f3bbde04ce3c)}, I added this cache to preserve sharing of byte slices and &strs when converting Rust values to OCaml values. It doesn't always behave correctly for zero-sized slices, however.

Reviewed By: dabek

Differential Revision: D23508136

fbshipit-source-id: 134d2b5563eb9932a47663d5aa88bf2d659230ed
hphp/hack/src/ocamlrep/cache.rs