Displaying 3 results from an estimated 3 matches for "int_predicate".
2007 Nov 27
1
[LLVMdev] Fibonacci example in OCaml
...lobalVariable, say.
> I would use polymorphic variants more, particularly for enums and
> types that are only used once (e.g. "linkage" and "visibility"). So
> types would be `i32 rather than i32_type
Types are not enums, they're first-class objects.
> and int_predicate and real_predicate would become overlapping sum
> types, e.g. `ugt is valid for both.
These variant types were set up to have a 1:1 correspondence with the C
++ enums, and I'd prefer to keep that. There's also no overlap for
integer and FP predicates (unsigned greater than is not u...
2007 Nov 27
0
[LLVMdev] Fibonacci example in OCaml
..._call function would require a value of that type, so you could
not accidentally pass it an int.
I would use polymorphic variants more, particularly for enums and types that
are only used once (e.g. "linkage" and "visibility"). So types would be `i32
rather than i32_type and int_predicate and real_predicate would become
overlapping sum types, e.g. `ugt is valid for both. I'd also rather see
structuring than identifier bloat, e.g.:
module Linkage = struct
type linkage =
[ `External
| `Link_once
| `Weak
| `Appending
| `Internal
| `Dllimport...
2007 Nov 26
4
[LLVMdev] Fibonacci example in OCaml
On Nov 26, 2007, at 14:18, Jon Harrop wrote:
> On Monday 26 November 2007 16:21, Gordon Henriksen wrote:
>>
>
>> Unfortunately, even if the bindings were more strongly typed, it
>> would still be structurally possible to build invalid LLVM code, so
>> you've just got to take care not to violate the invariants, then
>> use the verifier as a