Index: compilers/pct/src/PCT/HLLCompiler.pir =================================================================== --- compilers/pct/src/PCT/HLLCompiler.pir (revision 36573) +++ compilers/pct/src/PCT/HLLCompiler.pir (working copy) @@ -15,7 +15,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 @@ -143,6 +143,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, which is often the filename of +the compiler's program entry point, like C. + =cut .sub 'stages' :method @@ -181,6 +186,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. @@ -710,6 +721,7 @@ .local string arg0 arg0 = shift args + self.'compiler_progname'(arg0) .local pmc getopts getopts = new 'Getopt::Obj' getopts.'notOptStop'(1)