Open jon-lipstate opened 1 year ago
Have you tried packing the varargs together into one argument?
push_op(main, .mov, {.RAX, .RCX})
I think I just have an edge case for the compiler (union
/enum
varag followed by a bit_set[enum]
).
Compiler does not like it with or without the prefixes arg:
ojitsu.odin(26:22) Error: Invalid compound literal type 'RMI'
push_op(main, .mov, {.RAX, .RCX})
^~~~~~~~~~~^
I'm having an issue with varags & bit_sets colliding. At the root of the issue, the varag is prior in the signature than the set. An example of this (though not ambiguous to the compiler) is core's
fmt.aprint
.Usage Code:
push_op(main, .mov, .RAX, .RCX)
Working Signature:push_op :: proc(p: ^Procedure, m: Mneumnoic, args: ..RMI) {
Non-Working Signature:push_op :: proc(p: ^Procedure, m: Mneumnoic, args: ..RMI, prefixes: Prefixes = {}) {
Resulting Error:Temp Fix, though annoying:
push_op(main, .mov, .RAX, GeneralPurpose.RCX)
(Fully specified enum is no longer confused for thebit_set
)For completeness, the enums/bit_set are: