Skip to content

Commit

Permalink
Get past the TT #389 "fix"
Browse files Browse the repository at this point in the history
(and workaround the resulting TT #1672)
  • Loading branch information
coke committed Jun 3, 2010
1 parent b2d258b commit 7d30d88
Show file tree
Hide file tree
Showing 15 changed files with 28 additions and 16 deletions.
3 changes: 2 additions & 1 deletion config/PARROT_VERSION
@@ -1,6 +1,7 @@
# Minimum svn revision, e.g.:
# revision: 12345
revision: 45800
revision: 45827

# TODO: allow specification of a maximum version, as parrot trunk does
# sometimes break.

Expand Down
1 change: 1 addition & 0 deletions runtime/builtin/namespace.pir
Expand Up @@ -119,6 +119,7 @@ bad_args:

.local pmc colons, split, name
colons = get_root_global ['_tcl'], 'colons'
colons = colons[0]
split = get_root_global ['parrot'; 'PGE'; 'Util'], 'split'

name = argv[0]
Expand Down
2 changes: 2 additions & 0 deletions runtime/conversions.pir
Expand Up @@ -207,8 +207,10 @@ Given a string namespace, return an array of names.
depth_set:
.local pmc colons, split
colons = get_root_global ['_tcl'], 'colons'
colons = colons[0]
split = get_root_global ['parrot'; 'PGE'; 'Util'], 'split'


.local pmc ns_name
ns_name = split(colons, name)
$I0 = elements ns_name
Expand Down
7 changes: 6 additions & 1 deletion runtime/tcllib.pir
Expand Up @@ -220,7 +220,11 @@ got_platform:
.local pmc p6rule, colons
p6rule = compreg 'PGE::Perl6Regex'
colons = p6rule('\:\:+')
set_hll_global 'colons', colons
# XXX Workaround TT #1672 - put this sub into a TclList
# and pop it out each time we want to invoke it.
$P1 = new 'TclList'
$P1[0] = colons
set_root_global ['_tcl'], 'colons', $P1

# register the TCL compiler.
$P1 = get_root_global ['_tcl'], 'compileTcl'
Expand All @@ -231,6 +235,7 @@ got_platform:
set_global 'compiled_num', $P1
.end


.HLL 'parrot'
.include 'src/grammar/expr/expression.pir'
.include 'src/grammar/expr/parse.pir'
Expand Down
1 change: 1 addition & 0 deletions runtime/variables.pir
Expand Up @@ -405,6 +405,7 @@ root_global_var:
absolute = 1
.local pmc colons, split
colons = get_root_global ['_tcl'], 'colons'
colons = colons[0]
split = get_root_global ['parrot'; 'PGE'; 'Util'], 'split'

ns = split(colons, name)
Expand Down
2 changes: 1 addition & 1 deletion src/class/string.pir
Expand Up @@ -8,7 +8,7 @@ call Tcl methods on them.
.HLL 'parrot'
.namespace ['String']

.sub getListValue :method
.sub getListValue :method :nsentry
# a TclString would know what to do!
.local pmc tclstring
tclstring = new 'TclString'
Expand Down
6 changes: 3 additions & 3 deletions src/class/tclarray.pir
Expand Up @@ -48,7 +48,7 @@ Create a new iterator and track it.

=cut

.sub new_iter :method
.sub new_iter :method :nsentry
.param string array_name

.local pmc ids, searches
Expand Down Expand Up @@ -80,7 +80,7 @@ Remove iterator from our list.

=cut

.sub rm_iter :method
.sub rm_iter :method :nsentry
.param string named

.local pmc ids, searches
Expand Down Expand Up @@ -119,7 +119,7 @@ Return the named iterator

=cut

.sub get_iter :method
.sub get_iter :method :nsentry
.param string named

.local pmc searches
Expand Down
2 changes: 1 addition & 1 deletion src/class/tclconst.pir
Expand Up @@ -275,7 +275,7 @@ we're subclassing String...

=cut

.sub '__dump' :method
.sub '__dump' :method :nsentry
.param pmc dumper
.param string label
print self
Expand Down
2 changes: 1 addition & 1 deletion src/class/tcldict.pir
Expand Up @@ -55,7 +55,7 @@ present in TclList.

=cut

.sub getDictValue :method
.sub getDictValue :method :nsentry
.return(self)
.end

Expand Down
2 changes: 1 addition & 1 deletion src/class/tclint.pir
Expand Up @@ -13,7 +13,7 @@ Convert to a List.

=cut

.sub getListValue :method
.sub getListValue :method :nsentry
.list(retval)
$I0 = self
retval[0] = $I0
Expand Down
6 changes: 3 additions & 3 deletions src/class/tcllist.pir
Expand Up @@ -48,7 +48,7 @@ Return a list-ified version of this Tcl PMC.

=cut

.sub getListValue :method
.sub getListValue :method :nsentry
.return(self)
.end

Expand All @@ -61,7 +61,7 @@ moved back into parrot core where we'd be happy to inherit it.
=cut
.sub reverse :method
.sub reverse :method :nsentry
.local int low,high
low = 0
high = elements self
Expand Down Expand Up @@ -277,7 +277,7 @@ Copy the contents of other to self.

=cut

.sub getDictValue :method
.sub getDictValue :method :nsentry

.local int sizeof_list
sizeof_list = elements self
Expand Down
2 changes: 1 addition & 1 deletion src/class/tclproc.pir
Expand Up @@ -24,7 +24,7 @@ Define the attributes required for the class.
addattribute $P1, 'defaults'
.end

.sub 'create' :method
.sub 'create' :method :nsentry
.param pmc args
.param pmc body
.param string name # short proc name, or apply {...}
Expand Down
4 changes: 2 additions & 2 deletions src/class/tclstring.pir
Expand Up @@ -14,7 +14,7 @@ Convert to a List.

=cut

.sub getListValue :method
.sub getListValue :method :nsentry
.local pmc retval
retval = new 'TclList'

Expand Down Expand Up @@ -190,7 +190,7 @@ done:

=cut

.sub getDictValue :method
.sub getDictValue :method :nsentry
# convert to list, then to dict.
$P1 = self.'getListValue'()
.tailcall $P1.'getDictValue'()
Expand Down
2 changes: 1 addition & 1 deletion src/class/tracearray.pir
Expand Up @@ -22,7 +22,7 @@ Define the attributes required for the class.
addattribute $P1, 'working'
.end

.sub set_reader :method
.sub set_reader :method :nsentry
.param pmc reader

$S0 = reader
Expand Down
2 changes: 2 additions & 0 deletions src/grammar/expr/past2pir.tg
Expand Up @@ -244,6 +244,7 @@ transform pir (PAST::StaticCommand) {
.local pmc split, colons
split = get_root_global ['parrot'; 'PGE'; 'Util'], 'split'
colons = get_root_global ['_tcl'], 'colons'
colons = colons[0]
$P0 = split(colons, name)
$S1 = pop $P0

Expand Down Expand Up @@ -368,6 +369,7 @@ transform pir (PAST::DynamicCommand) {
$S0 = %1
.local pmc colons, split
colons = get_root_global ['_tcl'], 'colons'
colons = colons[0]
split = get_root_global ['parrot'; 'PGE'; 'Util'], 'split'
$P0 = split(colons, $S0)
$S0 = ""
Expand Down

0 comments on commit 7d30d88

Please sign in to comment.