Author: allison
Date: Sat Oct 6 09:57:08 2007
New Revision: 21920
Modified:
branches/pdd15oo/runtime/parrot/library/PGE/Hs.pir
Log:
[pdd15oo] PGE::Hs, don't add method that's already been compiled into the
namespace, but do add method instead of manually injecting it into the
namespace.
Modified: branches/pdd15oo/runtime/parrot/library/PGE/Hs.pir
==============================================================================
--- branches/pdd15oo/runtime/parrot/library/PGE/Hs.pir (original)
+++ branches/pdd15oo/runtime/parrot/library/PGE/Hs.pir Sat Oct 6 09:57:08 2007
@@ -58,8 +58,6 @@
.local pmc load
load_bytecode "Data/Escape.pir"
$P0 = get_class 'PGE::Match'
- $P1 = get_hll_global ['PGE::Match'], 'dump_hs'
- $P0.'add_method'('dump_hs', $P1)
.end
.sub "add_rule"
@@ -77,7 +75,9 @@
$I0 = exists adverbs["grammar"]
if $I0 goto done
- store_global "PGE::Grammar", name, rulesub
+ $P0 = get_class "PGE::Grammar"
+ if null $P0 goto done
+ addmethod $P0, name, rulesub
done:
.return (name)