Test code here: ------------------------cut-------------------------- # echo "(+ 1 1)" > aa.scm # guild compile aa.scm --from=scheme --to=glil -o aa.glil # guild compile aa.glil --from=glil --to=assembly -o aa.asm ------------------------end--------------------------
Error throws: "don't know how to join expressions" And I checked the code, the problem is in "read-and-compile" in module/system/base/compile.scm. It tries to get "language-joiner", but only 'tree-il' has "joiner". That means, if I try to compile any intermediate-language lower than 'tree-il', it'll throw the error message. IMO, we ought to let guild compile any intermediate-language to any lower level. And I can do such job follow these steps: 1. read out "aa.glil" 2. parser-glil the glil code 3. (compile glil-code #:from 'glil #:to 'assembly) But I can't do it with 'guild compile' since it calls "read-and-compile", which needs the weird "language-joiner". There's no any docs for 'language-joiner' in the manual. Here're the questions: 1. So what's the plan about 'language-joiner'? 2. What's the utility? 3. Why only 'tree-il' has it? 4. What about implementing 'joiner' for other lower ILs? Thanks!