Search
Friday, 26th of July 2019, 3:02:47 UTC
4:39:32
beach
Good morning everyone!
14:40:57
beach
At what point in the compilation process did you introduce argument parsing?
14:41:20
beach
I am asking, because I am attacking that stuff for the first time now, and it is very complicated.
14:41:45
beach
... which is why I decided I wanted to do it in HIR before the HIR gets further transformed and optimized.
14:43:19
drmeister
Hang on - I'm in a thesis defense by Skype.
14:52:42
drmeister
beach: We switch over entirely to cleavir - so the argument processing is done by cleavir.
14:53:08
beach
Except that cleavir doesn't do any argument processing.
14:53:37
beach
Somewhere there must be code to loop over all the arguments to find keywords, for instance.
14:54:08
drmeister
Hang on. Let me poke around.
14:57:20
Bike
i was the last one to rewrite it, so i can explain whatever
14:57:23
drmeister
Yes. But where we call stuff.
14:57:35
drmeister
beach: I copied your HIR translator
14:57:55
drmeister
translate calls layout-procedure and layout-procedure calls the code that does argument processing.
14:58:19
Bike
strictly speaking, it's the translate-simple-instruction method on enter-instruction
14:58:58
beach
So you do it by generating LLVM code for it?
14:59:07
Bike
it's honestly pretty terrible.
14:59:38
beach
I can very well imagine, especially now that I have HIR snippets that do it.
14:59:44
Bike
there's also some weird issues with like, optional parameters, since the enter-instruction can essentially assign them to be undefined (if nothing was provided), and the body initializes it
15:02:06
drmeister
I see. We do some argument processing setup in layout-procedure and then actually generate code from the lambda list in translate-simple-instruction
15:02:07
drmeister
https://github.com/clasp-developers/clasp/blob/dev/src/lisp/kernel/cleavir/translate-instruction.lisp#L18
15:02:35
drmeister
beach: You want to do more in HIR?
Friday, 26th of July 2019, 15:02:47 UTC