Skip to content
This repository has been archived by the owner on Jun 9, 2018. It is now read-only.

Commit

Permalink
Now, works with Parrot r37968 (PCT/POST refactor)
Browse files Browse the repository at this point in the history
    COMPATIBILITY BREAK
  • Loading branch information
fperrad committed Apr 9, 2009
1 parent 5600806 commit 4b2e14e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/POSTGrammar.tg
Expand Up @@ -87,9 +87,9 @@ PIRCODE
.local pmc start
$P0 = get_hll_global ['Lua'; 'POST'], 'Sub'
start = $P0.'new'('name'=>'&start', 'pirflags'=>':anon :main')
start.'add_param'('args', 'optional'=>1)
$S0 = post.'subid'()
start.'push_pirop'('inline', $S0, 'inline'=><<'PIRCODE')
.param pmc args :optional
# print "start\n"
load_bytecode "languages/lua/lua.pbc"
lua_openlibs()
Expand Down
15 changes: 3 additions & 12 deletions src/lua51.pir
Expand Up @@ -198,22 +198,13 @@ used in F<languages/lua/src/POSTGrammar.tg>
.sub 'pir' :method :multi(_, ['Lua';'POST';'Chunk'])
.param pmc node
.local pmc subcode
subcode = get_global '@!subcode'
$P0 = new 'CodeString'
push subcode, $P0
.local pmc code
code = self.'pir_children'(node)
$S0 = node.'prologue'()
if $S0 == '' goto L1
new code, 'CodeString'
.local pmc code
code = find_caller_lex '$CODE'
code.'emit'($S0)
$P0 = pop subcode
code .= $P0
$P0 = subcode[-1]
$P0 .= code
L1:
.return (code)
.tailcall self.'pir_children'(node)
.end
Expand Down

0 comments on commit 4b2e14e

Please sign in to comment.