search for: const_add

Displaying 2 results from an estimated 2 matches for "const_add".

2008 Mar 15
0
[LLVMdev] improving the ocaml binding's type safety
...yan's Haskell bindings in terms of type safety, you'll need to go beyond preventing the cast macros in the C bindings from asserting and actually take over some of the work performed by the verifier. This is very difficult to do correctly outside of toy programs. For instance, given const_add x y, there are several conditions that would be interesting for the type checker to verify: (* Easy; is encoded in the C++ type system. *) isa<Constant>(x) && isa<Constant>(y) (* Harder; assertions in C++. *) x->getType() == y->getType() x->getType()->isIntOrInt...
2008 Mar 15
4
[LLVMdev] improving the ocaml binding's type safety
I was talking to Gordon on #llvm earlier, and he challenged me with coming up with a way to improve the ocaml binding's type safety. We can't go letting haskell beat us now, can we? I think I got an easy solution with phantom types. For those who don't know what the problem is, the ocaml bindings share one type between whole class branches (like values). This means we need to downcast