Wrap pointer to OCaml source text in UnsafeOcamlPtr
Summary:
I think it would be helpful to represent pointers to live OCaml values using a dedicated type rather than usize. For instance, this allows us to communicate to ocamlrep_derive that fields of type UnsafeOcamlPtr should not be converted (rather than uselessly converting the usize to an OCaml int). It also helps call out that the pointer is only valid for some unchecked lifetime, and hopefully will encourage the reader to carefully think about what that lifetime is.
This diff introduces the type and begins using it in SourceText.
Reviewed By: 2BitSalute
Differential Revision:
D18051130
fbshipit-source-id:
43fc63876b1d77343edb0925fa8d9b652396f416