Expressions¶
-
class
gccjit.RValue¶ -
dereference_field(Field field, Location loc=None)¶
-
dereference(loc=None)¶
-
get_type()¶
-
-
class
gccjit.LValue¶ -
get_address(loc=None)¶ Get the address of this lvalue, as a
gccjit.RValueof type T*.
-
Unary Operations¶
Unary operations are gccjit.RValue instances
built using gccjit.Context.new_unary_op()
with an operation from one of the following:
Unary Operation |
C equivalent |
|---|---|
-(EXPR) |
|
~(EXPR) |
|
!(EXPR) |
Binary Operations¶
Unary operations are gccjit.RValue instances
built using gccjit.Context.new_binary_op()
with an operation from one of the following:
Binary Operation |
C equivalent |
|---|---|
x + y |
|
x - y |
|
x * y |
|
x / y |
|
x % y |
|
x & y |
|
x ^ y |
|
x | y |
|
x && y |
|
x || y |
-
class
gccjit.BinaryOp¶ -
PLUS¶ Addition of arithmetic values; analogous to:
(EXPR_A) + (EXPR_B)
in C.
For pointer addition, use
gccjit.Context.new_array_access().
-
MINUS¶ Subtraction of arithmetic values; analogous to:
(EXPR_A) - (EXPR_B)
in C.
-
MULT¶ Multiplication of a pair of arithmetic values; analogous to:
(EXPR_A) * (EXPR_B)
in C.
-
DIVIDE¶ Quotient of division of arithmetic values; analogous to:
(EXPR_A) / (EXPR_B)
in C.
The result type affects the kind of division: if the result type is integer-based, then the result is truncated towards zero, whereas a floating-point result type indicates floating-point division.
-
MODULO¶ Remainder of division of arithmetic values; analogous to:
(EXPR_A) % (EXPR_B)
in C.
-
BITWISE_AND¶ Bitwise AND; analogous to:
(EXPR_A) & (EXPR_B)
in C.
-
BITWISE_XOR¶ Bitwise exclusive OR; analogous to:
(EXPR_A) ^ (EXPR_B)
in C.
-
BITWISE_OR¶ Bitwise inclusive OR; analogous to:
(EXPR_A) | (EXPR_B)
in C.
-
LOGICAL_AND¶ Logical AND; analogous to:
(EXPR_A) && (EXPR_B)
in C.
-
LOGICAL_OR¶ Logical OR; analogous to:
(EXPR_A) || (EXPR_B)
in C.
-
Comparisons¶
Comparisons are gccjit.RValue instances of
boolean type built using gccjit.Context.new_comparison()
with an operation from one of the following:
Comparison |
C equivalent |
|---|---|
x == y |
|
x != y |
|
x < y |
|
x <= y |
|
x > y |
|
x >= y |