On Friday 22 February 2008 16:50:35 Mitchell N Charity wrote:

> languages/perl6/perl6 --target=past gives no output with -e CODE.
> r25997 on fedora 8, x86_64.
>
> # works
> $ languages/perl6/perl6 -e 'say(3);'
> 3
>
> # works
> $ echo -n 'say(3);' > deleteme.pm; languages/perl6/perl6 --target=past
> deleteme.pm
> # ...big past output...
>
> # doesn't work
> $ languages/perl6/perl6 --target=past -e 'say(3);'
> # no output at all

Confirmed on 32-bit Linux, confirmed also with perl6.pbc.  The problem's not 
in pbc_to_exe; it's in PCT, specifically HLLCompiler.

The attached patch fixes things.  It's slightly quick and dirty.  A better 
solution is to clean up compile() further to handle adverb combinations.  
However, this patch works.

-- c

--- compilers/pct/src/PCT/HLLCompiler.pir	(revision 26008)
+++ compilers/pct/src/PCT/HLLCompiler.pir	(local)
@@ -712,7 +714,8 @@
     self.'version'()
     goto end
   eval_line:
-    self.'eval'($S0, adverbs :flat :named)
+    result = self.'eval'($S0, adverbs :flat :named)
+    goto save_output
 .end
 
 

Reply via email to