I was annoyed that parrot perl6.pbc --target=PAST -e 'say "Hello"'
didn't seem to work, so I modified PCT/HLLCompiler so that it does. I'm not sure it's entirely correct though as I only tested it for the limited functionality I was after. I've attached the patch though. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]
diff --git a/compilers/pct/src/PCT/HLLCompiler.pir b/compilers/pct/src/PCT/HLLCompiler.pir index 13164ed..1a529a0 100644 --- a/compilers/pct/src/PCT/HLLCompiler.pir +++ b/compilers/pct/src/PCT/HLLCompiler.pir @@ -458,6 +458,14 @@ options provided. $P0 = $P0(args :flat) trace 0 end: + if null $P0 goto real_end + unless target goto real_end + if target == 'pir' goto target_pir + '_dumper'($P0,target) + goto real_end + target_pir: + say $P0 + real_end: .return ($P0) .end @@ -512,13 +520,6 @@ specifies the encoding to use for the input (e.g., "utf8"). push_eh interactive_trap $P0 = self.'eval'(code, adverbs :flat :named) pop_eh - if null $P0 goto interactive_loop - unless target goto interactive_loop - if target == 'pir' goto target_pir - '_dumper'($P0, target) - goto interactive_loop - target_pir: - say $P0 goto interactive_loop interactive_trap: get_results '0,0', $P0, $S0 @@ -585,9 +586,6 @@ options are passed to the evaluator. goto iter_loop iter_end: $P0 = self.'eval'(code, adverbs :flat :named) - if target == '' goto end - if target == 'pir' goto end - '_dumper'($P0, target) end: .return ($P0)