Ticket #329: hll-compiler-name.patch

File hll-compiler-name.patch, 1.6 KB (added by chrisdolan, 5 years ago)

add compiler_progname property to PCT::HLLCompiler

  • compilers/pct/src/PCT/HLLCompiler.pir

     
    1515    load_bytecode 'P6object.pbc' 
    1616    load_bytecode 'Parrot/Exception.pbc' 
    1717    $P0 = new 'P6metaclass' 
    18     $S0 = '@stages $parsegrammar $parseactions $astgrammar $commandline_banner $commandline_prompt @cmdoptions $usage $version' 
     18    $S0 = '@stages $parsegrammar $parseactions $astgrammar $commandline_banner $commandline_prompt @cmdoptions $usage $version $compiler_progname' 
    1919    $P0.'new_class'('PCT::HLLCompiler', 'attr'=>$S0) 
    2020.end 
    2121 
     
    143143The prompt is displayed in interactive mode at each point where 
    144144the compiler is ready for code to be compiled and executed. 
    145145 
     146=item compiler_progname([string name]) 
     147 
     148Accessor for the C<compiler_progname>, which is often the filename of 
     149the compiler's program entry point, like C<perl6.pbc>. 
     150 
    146151=cut 
    147152 
    148153.sub 'stages' :method 
     
    181186    .tailcall self.'attr'('$commandline_prompt', value, has_value) 
    182187.end 
    183188 
     189.sub 'compiler_progname' :method 
     190    .param pmc value        :optional 
     191    .param int has_value       :opt_flag 
     192    .tailcall self.'attr'('$compiler_progname', value, has_value) 
     193.end 
     194 
    184195=item removestage(string stagename) 
    185196 
    186197Delete a stage from the compilation process queue. 
     
    710721 
    711722    .local string arg0 
    712723    arg0 = shift args 
     724    self.'compiler_progname'(arg0) 
    713725    .local pmc getopts 
    714726    getopts = new 'Getopt::Obj' 
    715727    getopts.'notOptStop'(1)