[PATCH] D136400: [ocaml-llvm] Migrate from naked pointers in preparation for OCaml 5
Alan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 22 10:42:17 PDT 2022
alan added a comment.
For what it's worth, I redefined `to_val` to the following:
value to_val(void *ptr) {
if ((((value)ptr) & 1) == 0) {
return ((value)ptr) + 1;
} else {
return NULL;
}
}
and all the tests passed.
- Should I omit registering locals with `CAMLparam` if the value is known to not be an OCaml heap allocation?
- Should I switch the implementations of `to_val` and `from_val` to assume 2-bit alignment, and not register LLVM objects with `CAMLparam`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136400/new/
https://reviews.llvm.org/D136400
More information about the llvm-commits
mailing list