diff --git a/generator.c b/generator.c
index 419a2b22c4c2dbb765a9656163f701c645637eb8..709e5a65cbfb513cd502e2bf7d70383b89468449 100644 (file)
--- a/generator.c
+++ b/generator.c
}
else if(type -> class == OBERON_TYPE_RECORD)
{
- gcc_struct = gcc_jit_context_new_opaque_struct(gcc_context, NULL, "");
+ char name[32];
+ snprintf(name, 32, "RECORD%u", gen_context -> record_count);
+ gen_context -> record_count += 1;
+
+ gcc_struct = gcc_jit_context_new_opaque_struct(gcc_context, NULL, name);
gcc_type = gcc_jit_struct_as_type(gcc_struct);
}
else if(type -> class == OBERON_TYPE_POINTER)
enum gcc_jit_comparison comp_op;
};
} op_table[] = {
- { 0, .unary_op = GCC_JIT_UNARY_OP_LOGICAL_NEGATE },
{ 0, .unary_op = GCC_JIT_UNARY_OP_MINUS },
+ { 0, .unary_op = GCC_JIT_UNARY_OP_BITWISE_NEGATE },
+ { 0, .unary_op = GCC_JIT_UNARY_OP_LOGICAL_NEGATE },
+ { 0, .unary_op = GCC_JIT_UNARY_OP_ABS },
{ 1, .binary_op = GCC_JIT_BINARY_OP_PLUS },
{ 1, .binary_op = GCC_JIT_BINARY_OP_MINUS },
{ 1, .binary_op = GCC_JIT_BINARY_OP_MULT },
{ 1, .binary_op = GCC_JIT_BINARY_OP_DIVIDE },
{ 1, .binary_op = GCC_JIT_BINARY_OP_MODULO },
+ { 1, .binary_op = GCC_JIT_BINARY_OP_BITWISE_AND },
+ { 1, .binary_op = GCC_JIT_BINARY_OP_BITWISE_XOR },
+ { 1, .binary_op = GCC_JIT_BINARY_OP_BITWISE_OR },
{ 1, .binary_op = GCC_JIT_BINARY_OP_LOGICAL_AND },
{ 1, .binary_op = GCC_JIT_BINARY_OP_LOGICAL_OR },