ocaml/ocaml — pull request #120 by gasche (2014-11-28 20:18:22+00:00)
Title: [RFC] add caml_modify_field and caml_initialize_field

Stephen Dolan reported that he had to do a related change as part of his Multicore-OCaml work, and it seems applicable independently of it.

This patch does not remove all uses of `Field(...)` as a lvalue, or all `&Field(..)` constructs, but only those that fit into the following patterns:

caml_modify(&Field(v, idx), w) => caml_modify_field(v, idx, w)
caml_initialize(&Field(v, idx, w) => caml_initialize_field(v, idx, w)

This is an exploratory patch from someone that doesn't know the runtime very well. I had some questions when working on the code, which are marked with
`/* GS: ... */` comments.

All feedback and comments are welcome.