module RValue:sig..end
val type_of : Gccjit.rvalue -> Gccjit.type_Gccjit.rvalue.val int : Gccjit.context -> Gccjit.type_ -> int -> Gccjit.rvalueGccjit.rvalue for the
given constant int value.val zero : Gccjit.context -> Gccjit.type_ -> Gccjit.rvalueGccjit.rvalue for
zero. Essentially this is just a shortcut for:
new_rvalue_from_int ctx numeric_type 0
val one : Gccjit.context -> Gccjit.type_ -> Gccjit.rvalueGccjit.rvalue for
one. Essentially this is just a shortcut for:
new_rvalue_from_int ctx numeric_type 1
val double : Gccjit.context -> Gccjit.type_ -> float -> Gccjit.rvalueGccjit.rvalue for the
given constant double value.val ptr : Gccjit.context -> Gccjit.type_ -> 'a Ctypes.ptr -> Gccjit.rvalueGccjit.rvalue for the given address.val null : Gccjit.context -> Gccjit.type_ -> Gccjit.rvalueGccjit.rvalue for NULL. Essentially this is
just a shortcut for:
new_rvalue_from_ptr ctx pointer_type Ctypes.null
val string_literal : Gccjit.context -> string -> Gccjit.rvalue
val unary_op : Gccjit.context ->
?loc:Gccjit.location ->
Gccjit.unary_op -> Gccjit.type_ -> Gccjit.rvalue -> Gccjit.rvalue
val binary_op : Gccjit.context ->
?loc:Gccjit.location ->
Gccjit.binary_op ->
Gccjit.type_ -> Gccjit.rvalue -> Gccjit.rvalue -> Gccjit.rvalue
val comparison : Gccjit.context ->
?loc:Gccjit.location ->
Gccjit.comparison -> Gccjit.rvalue -> Gccjit.rvalue -> Gccjit.rvalue
val call : Gccjit.context ->
?loc:Gccjit.location ->
Gccjit.function_ -> Gccjit.rvalue list -> Gccjit.rvalueGccjit.rvalue.
new_call merely builds a rvalue i.e. an expression that can be
evaluated, perhaps as part of a more complicated expression. The call won't
happen unless you add a statement to a function that evaluates the expression.
For example, if you want to call a function and discard the result (or to call a
function with void return type), use add_eval:
(* Add "(void)printf (args);". *)
add_eval block (new_call ctx printf_func args)
val indirect_call : Gccjit.context ->
?loc:Gccjit.location -> Gccjit.rvalue -> Gccjit.rvalue list -> Gccjit.rvalueval cast : Gccjit.context ->
?loc:Gccjit.location -> Gccjit.rvalue -> Gccjit.type_ -> Gccjit.rvalueGccjit.rvalue of T, construct another Gccjit.rvalue of another type.
Currently only a limited set of conversions are possible:int <-> floatint <-> boolP* <-> Q*, for pointer types P and Qval access_field : ?loc:Gccjit.location -> Gccjit.rvalue -> Gccjit.field -> Gccjit.rvalue
val lvalue : Gccjit.lvalue -> Gccjit.rvalue
val param : Gccjit.param -> Gccjit.rvalue
val to_string : Gccjit.rvalue -> string