A gccjit;;rvalue is an expression that can be computed. It is a subclass of gccjit;;object, and is a thin wrapper around gcc_jit_rvalue * from the C API.
It can be simple, e.g.:
- an integer value e.g. 0 or 42
- a string literal e.g. “Hello world”
- a variable e.g. i. These are also lvalues (see below).
or compound e.g.:
- a unary expression e.g. !cond
- a binary expression e.g. (a + b)
- a function call e.g. get_distance (&player_ship, &target)
- etc.
Every rvalue has an associated type, and the API will check to ensure that types match up correctly (otherwise the context will emit an error).