Ticket #366: HLLCompiler-dump-on-eval.patch

File HLLCompiler-dump-on-eval.patch, 0.9 KB (added by chrisdolan, 6 years ago)

emit if -e and --target anything but pir,none

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

     
    765765    if $I0 goto version 
    766766 
    767767 
     768    .local string target 
     769    target = adverbs['target'] 
     770    target = downcase target 
     771 
    768772    $S0 = adverbs['e'] 
    769773    $I0 = exists adverbs['e'] 
    770774    if $I0 goto eval_line 
     
    785789    goto save_output 
    786790  eval_line: 
    787791    result = self.'eval'($S0, '-e', args :flat, adverbs :flat :named) 
     792    if target == '' goto no_dump 
     793    if target == 'pir' goto no_dump 
     794    '_dumper'(result, target) 
     795  no_dump: 
    788796 
    789797  save_output: 
    790798    if null result goto end 
    791799    unless result goto end 
    792     .local string target 
    793     target = adverbs['target'] 
    794     target = downcase target 
    795800    if target != 'pir' goto end 
    796801    .local string output 
    797802    .local pmc ofh