unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* What's the plan about language-joiner?
@ 2012-12-08 15:47 Nala Ginrut
  2013-01-22  8:22 ` Andy Wingo
  0 siblings, 1 reply; 4+ messages in thread
From: Nala Ginrut @ 2012-12-08 15:47 UTC (permalink / raw)
  To: guile-devel

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!




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: What's the plan about language-joiner?
  2012-12-08 15:47 What's the plan about language-joiner? Nala Ginrut
@ 2013-01-22  8:22 ` Andy Wingo
  2013-01-22  8:31   ` Nala Ginrut
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Wingo @ 2013-01-22  8:22 UTC (permalink / raw)
  To: Nala Ginrut; +Cc: guile-devel

On Sat 08 Dec 2012 16:47, Nala Ginrut <nalaginrut@gmail.com> writes:

> 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"

Fixed.  Thanks for the report :)

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: What's the plan about language-joiner?
  2013-01-22  8:22 ` Andy Wingo
@ 2013-01-22  8:31   ` Nala Ginrut
  2013-01-22  8:35     ` Nala Ginrut
  0 siblings, 1 reply; 4+ messages in thread
From: Nala Ginrut @ 2013-01-22  8:31 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guile-devel

On Tue, 2013-01-22 at 09:22 +0100, Andy Wingo wrote:
> On Sat 08 Dec 2012 16:47, Nala Ginrut <nalaginrut@gmail.com> writes:
> 
> > 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"
> 
> Fixed.  Thanks for the report :)
> 
> Andy


Thanks for fixing that. Now it's possible to write an external compiler
to compile glil into jvm-bytecode or newer-register-VM-bytecode(if any
necessary).





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: What's the plan about language-joiner?
  2013-01-22  8:31   ` Nala Ginrut
@ 2013-01-22  8:35     ` Nala Ginrut
  0 siblings, 0 replies; 4+ messages in thread
From: Nala Ginrut @ 2013-01-22  8:35 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guile-devel

On Tue, 2013-01-22 at 16:31 +0800, Nala Ginrut wrote:
> On Tue, 2013-01-22 at 09:22 +0100, Andy Wingo wrote:
> > On Sat 08 Dec 2012 16:47, Nala Ginrut <nalaginrut@gmail.com> writes:
> > 
> > > 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"
> > 
> > Fixed.  Thanks for the report :)
> > 
> > Andy
> 
> 
> Thanks for fixing that. Now it's possible to write an external compiler
> to compile glil into jvm-bytecode or newer-register-VM-bytecode(if any
> necessary).
> 

A little explanation: this fix is not relate to an external compiler,
but I thought it's not available to convert glil into lower. From the
patch I learned something about it.

Thanks!




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-01-22  8:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-08 15:47 What's the plan about language-joiner? Nala Ginrut
2013-01-22  8:22 ` Andy Wingo
2013-01-22  8:31   ` Nala Ginrut
2013-01-22  8:35     ` Nala Ginrut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).