debugging things suggests that the issue is a susp...
# compiler
t
debugging things suggests that the issue is a suspend lambda generated by my plugin. are there any examples of how to correctly generate a suspend lambda for a launch block?
d
The easiest way is to write a real code equal to the one you're generating, inspect its IR and compare it to the IR you're creating in the plugin. You can do it by • dumping IR with
-Xphases-to-dump
CLI arg • dumping IR with
// DUMP_IR
directive, if you're using the compiler test framework • just inspecting the tree in the debugger in the environment you'd like
t
you guys gave me that in the past - and i'm using it and love it. i have the desired end state written in the same class as the function i'm trying to re-write so i can compare the dumped IR. the problem is that it doesn't tell me how to use the compiler plugin api to achieve that. there's really no docs on how to use the backend plugin apis to generate the kind of code i'm trying to do.
d
It's all because the API was never released in a stable state
t
i get that, but it still makes it hard to use for people like me who want to experiment with things that could be really valuable
also, can you point me to a list of compiler phases? the one i was previously given was
IrLowering
but that doesn't seem to work anymore. i'm currently just using
all
but that makes it hard to figure out which of the dozens of files is the right one to look at
d
t
thanks