Skip to content

Commit

Permalink
PCT::HLLCompiler - use PBCCompiler.pbc
Browse files Browse the repository at this point in the history
mainpmc doesn't work very well yet...
  • Loading branch information
Benabik committed Aug 4, 2011
1 parent b56e6cd commit 805280c
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions compilers/pct/src/PCT/HLLCompiler.pir
Expand Up @@ -590,20 +590,23 @@ Emit PBC file.
$P0 = get_hll_global ['POST'], 'PBCCompiler'
packfile = $P0.'packfile'(post, adverbs :flat :named)
.local string filename
filename = adverbs['output']
unless filename goto packfile_written
# Writing file handled by pbc function
# XXX: This will be needed again if we use mainpmc below
.local pmc handle
handle = new 'FileHandle'
handle.'open'(filename, 'w')
$S0 = packfile
handle.'print'($S0)
handle.'close'()
#.local string filename
#filename = adverbs['output']
#unless filename goto packfile_written
packfile_written:
#.local pmc handle
#handle = new 'FileHandle'
#handle.'open'(filename, 'w')
#$S0 = packfile
#handle.'print'($S0)
#handle.'close'()
.tailcall $P0.'mainpmc'(packfile, adverbs :flat :named)
#packfile_written:
.tailcall $P0.'pbc'(packfile, adverbs :flat :named)
.end
Expand Down

0 comments on commit 805280c

Please sign in to comment.