[svn:parrot] r49555 - trunk/compilers/pct/src/PCT

cotto at svn.parrot.org cotto at svn.parrot.org
Sat Oct 16 18:30:54 UTC 2010


Author: cotto
Date: Sat Oct 16 18:30:53 2010
New Revision: 49555
URL: https://trac.parrot.org/parrot/changeset/49555

Log:
[pct] apply patch from chrisdolan++ to add compiler_progname to PCT::HLLCompiler

Modified:
   trunk/compilers/pct/src/PCT/HLLCompiler.pir

Modified: trunk/compilers/pct/src/PCT/HLLCompiler.pir
==============================================================================
--- trunk/compilers/pct/src/PCT/HLLCompiler.pir	Fri Oct 15 21:00:19 2010	(r49554)
+++ trunk/compilers/pct/src/PCT/HLLCompiler.pir	Sat Oct 16 18:30:53 2010	(r49555)
@@ -18,7 +18,7 @@
     load_bytecode 'P6object.pbc'
     load_bytecode 'Parrot/Exception.pbc'
     $P0 = new 'P6metaclass'
-    $S0 = '@stages $parsegrammar $parseactions $astgrammar $commandline_banner $commandline_prompt @cmdoptions $usage $version'
+    $S0 = '@stages $parsegrammar $parseactions $astgrammar $commandline_banner $commandline_prompt @cmdoptions $usage $version $compiler_progname'
     $P0.'new_class'('PCT::HLLCompiler', 'attr'=>$S0)
 .end
 
@@ -154,6 +154,11 @@
 The prompt is displayed in interactive mode at each point where
 the compiler is ready for code to be compiled and executed.
 
+=item compiler_progname([string name])
+
+Accessor for the C<compiler_progname>, which is often the filename of
+the compiler's program entry point, like C<perl6.pbc>.
+
 =cut
 
 .sub 'stages' :method
@@ -192,6 +197,12 @@
     .tailcall self.'attr'('$commandline_prompt', value, has_value)
 .end
 
+.sub 'compiler_progname' :method
+    .param pmc value        :optional
+    .param int has_value       :opt_flag
+    .tailcall self.'attr'('$compiler_progname', value, has_value)
+.end
+
 =item removestage(string stagename)
 
 Delete a stage from the compilation process queue.
@@ -786,6 +797,7 @@
 
     .local string arg0
     arg0 = shift args
+    self.'compiler_progname'(arg0)
     .local pmc getopts
     getopts = new ['Getopt';'Obj']
     getopts.'notOptStop'(1)


More information about the parrot-commits mailing list