Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

languages/perl6/perl6 --target=past ignores -e #62

Closed
p6rt opened this issue Feb 23, 2008 · 6 comments
Closed

languages/perl6/perl6 --target=past ignores -e #62

p6rt opened this issue Feb 23, 2008 · 6 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Feb 23, 2008

Migrated from rt.perl.org#51116 (status was 'resolved')

Searchable as RT51116$

@p6rt
Copy link
Author

p6rt commented Feb 23, 2008

From mncharity@vendian.org

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

Fyi.
Thanks for all your work.
Mitchell

@p6rt
Copy link
Author

p6rt commented Feb 23, 2008

From @chromatic

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

@p6rt
Copy link
Author

p6rt commented Feb 23, 2008

From @chromatic

pct_target_and_dash_e.patch
--- 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
 
 

@p6rt
Copy link
Author

p6rt commented Feb 23, 2008

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Feb 23, 2008

From @pmichaud

Patch applied, with minor refactoring.
Resolving ticket, thanks!

Pm

@p6rt
Copy link
Author

p6rt commented Feb 23, 2008

@pmichaud - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Feb 23, 2008
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant