Skip to content

Instantly share code, notes, and snippets.

@jnthn
Created April 21, 2011 19:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jnthn/935285 to your computer and use it in GitHub Desktop.
Save jnthn/935285 to your computer and use it in GitHub Desktop.
diff --git a/compilers/pct/src/PAST/Compiler.pir b/compilers/pct/src/PAST/Compiler.pir
index c0ca392..104cda4 100644
--- a/compilers/pct/src/PAST/Compiler.pir
+++ b/compilers/pct/src/PAST/Compiler.pir
@@ -854,23 +854,11 @@ Return the POST representation of a C<PAST::Block>.
## pir-encode name and namespace
.local string blockreg, blockref
blockreg = self.'uniquereg'('P')
- if ns goto block_ns
blockref = concat ".const 'Sub' ", blockreg
blockref = concat blockref, ' = '
$P0 = bpost.'subid'()
$S0 = self.'escape'($P0)
blockref = concat blockref, $S0
- goto have_blockref
- block_ns:
- $P0 = get_hll_global ['POST'], 'Compiler'
- blockref = concat 'get_hll_global ', blockreg
- $S0 = $P0.'key_pir'(ns)
- blockref = concat blockref, ', '
- blockref = concat blockref, $S0
- $S0 = self.'escape'(name)
- blockref = concat blockref, ', '
- blockref = concat blockref, $S0
- have_blockref:
## determine the outer POST::Sub for the new one
.local pmc outerpost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment