Author: coke
Date: Tue Jul 29 05:46:35 2008
New Revision: 29843
Modified:
trunk/languages/tcl/runtime/builtin/array.pir
trunk/languages/tcl/runtime/builtin/binary.pir
trunk/languages/tcl/runtime/builtin/clock.pir
trunk/languages/tcl/runtime/builtin/dict.pir
trunk/languages/tcl/runtime/builtin/encoding.pir
trunk/languages/tcl/runtime/builtin/file.pir
trunk/languages/tcl/runtime/builtin/fileevent.pir
trunk/languages/tcl/runtime/builtin/info.pir
trunk/languages/tcl/runtime/builtin/lsearch.pir
trunk/languages/tcl/runtime/builtin/lsort.pir
trunk/languages/tcl/runtime/builtin/namespace.pir
trunk/languages/tcl/runtime/builtin/proc.pir
trunk/languages/tcl/runtime/builtin/regexp.pir
trunk/languages/tcl/runtime/builtin/regsub.pir
trunk/languages/tcl/runtime/builtin/string.pir
trunk/languages/tcl/runtime/builtin/subst.pir
trunk/languages/tcl/runtime/builtin/uplevel.pir
trunk/languages/tcl/runtime/builtin/upvar.pir
trunk/languages/tcl/runtime/options.pir
trunk/languages/tcl/runtime/tcllib.pir
trunk/languages/tcl/src/grammar/expr/past.pir
trunk/languages/tcl/src/grammar/expr/past2pir.tg
trunk/languages/tcl/t/internals/select_option.t
trunk/languages/tcl/t/internals/select_switches.t
Log:
[tcl] use our list PMC preferentially, even internally.
Modified: trunk/languages/tcl/runtime/builtin/array.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/array.pir (original)
+++ trunk/languages/tcl/runtime/builtin/array.pir Tue Jul 29 05:46:35 2008
@@ -21,7 +21,7 @@
subcommand_name = shift argv
.local pmc options
- options = new 'ResizablePMCArray'
+ options = new 'TclList'
options[0] = 'anymore'
options[1] = 'donesearch'
options[2] = 'exists'
Modified: trunk/languages/tcl/runtime/builtin/binary.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/binary.pir (original)
+++ trunk/languages/tcl/runtime/builtin/binary.pir Tue Jul 29 05:46:35 2008
@@ -13,7 +13,7 @@
subcommand_name = shift argv
.local pmc options
- options = new 'ResizablePMCArray'
+ options = new 'TclList'
push options, 'format'
push options, 'scan'
Modified: trunk/languages/tcl/runtime/builtin/clock.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/clock.pir (original)
+++ trunk/languages/tcl/runtime/builtin/clock.pir Tue Jul 29 05:46:35 2008
@@ -13,7 +13,7 @@
subcommand_name = shift argv
.local pmc options
- options = new 'ResizablePMCArray'
+ options = new 'TclList'
push options, 'add'
push options, 'clicks'
push options, 'format'
Modified: trunk/languages/tcl/runtime/builtin/dict.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/dict.pir (original)
+++ trunk/languages/tcl/runtime/builtin/dict.pir Tue Jul 29 05:46:35 2008
@@ -16,7 +16,7 @@
subcommand_name = shift argv
.local pmc options
- options = new 'ResizablePMCArray'
+ options = new 'TclList'
options[0] = 'append'
options[1] = 'create'
options[2] = 'exists'
@@ -887,8 +887,8 @@
body = pop argv
.local pmc keys,varnames
- keys = new 'ResizablePMCArray'
- varnames = new 'ResizablePMCArray'
+ keys = new 'TclList'
+ varnames = new 'TclList'
# get lists of both keys & varnames, setting the variables.
key_loop:
$I0 = elements argv
Modified: trunk/languages/tcl/runtime/builtin/encoding.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/encoding.pir (original)
+++ trunk/languages/tcl/runtime/builtin/encoding.pir Tue Jul 29 05:46:35 2008
@@ -16,7 +16,7 @@
subcommand_name = shift argv
.local pmc options
- options = new 'ResizablePMCArray'
+ options = new 'TclList'
push options, 'convertfrom'
push options, 'convertto'
push options, 'dirs'
Modified: trunk/languages/tcl/runtime/builtin/file.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/file.pir (original)
+++ trunk/languages/tcl/runtime/builtin/file.pir Tue Jul 29 05:46:35 2008
@@ -13,7 +13,7 @@
subcommand_name = shift argv
.local pmc options
- options = new 'ResizablePMCArray'
+ options = new 'TclList'
push options, 'atime'
push options, 'attributes'
push options, 'channels'
Modified: trunk/languages/tcl/runtime/builtin/fileevent.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/fileevent.pir (original)
+++ trunk/languages/tcl/runtime/builtin/fileevent.pir Tue Jul 29 05:46:35 2008
@@ -36,7 +36,7 @@
.local pmc events
events = get_root_global ['_tcl'], 'events'
- $P0 = new 'ResizablePMCArray'
+ $P0 = new 'TclList'
push events, $P0
push $P0, channel
push $P0, script
Modified: trunk/languages/tcl/runtime/builtin/info.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/info.pir (original)
+++ trunk/languages/tcl/runtime/builtin/info.pir Tue Jul 29 05:46:35 2008
@@ -18,7 +18,7 @@
subcommand_name = shift argv
.local pmc options
- options = new 'ResizablePMCArray'
+ options = new 'TclList'
push options, 'args'
push options, 'body'
push options, 'cmdcount'
Modified: trunk/languages/tcl/runtime/builtin/lsearch.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/lsearch.pir (original)
+++ trunk/languages/tcl/runtime/builtin/lsearch.pir Tue Jul 29 05:46:35 2008
@@ -7,7 +7,7 @@
.param pmc argv :slurpy
.local pmc options
- options = new 'ResizablePMCArray'
+ options = new 'TclList'
push options, 'all'
push options, 'ascii'
push options, 'decreasing'
Modified: trunk/languages/tcl/runtime/builtin/lsort.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/lsort.pir (original)
+++ trunk/languages/tcl/runtime/builtin/lsort.pir Tue Jul 29 05:46:35 2008
@@ -81,7 +81,7 @@
if c == size goto strip_end
$P2 = $P1
$P1 = $P0[c]
-
+
if $P1 != $P2 goto strip_loop
delete $P0[c]
dec c
Modified: trunk/languages/tcl/runtime/builtin/namespace.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/namespace.pir (original)
+++ trunk/languages/tcl/runtime/builtin/namespace.pir Tue Jul 29 05:46:35 2008
@@ -24,7 +24,7 @@
subcommand_name = shift argv
.local pmc options
- options = new 'ResizablePMCArray'
+ options = new 'TclList'
options[0] = 'children'
options[1] = 'code'
options[2] = 'current'
@@ -234,7 +234,7 @@
.local pmc call_chain, temp_call_chain
call_chain = get_root_global ['_tcl'], 'call_chain'
- temp_call_chain = new 'ResizablePMCArray'
+ temp_call_chain = new 'TclList'
set_root_global ['_tcl'], 'call_chain', temp_call_chain
.local pmc info_level
Modified: trunk/languages/tcl/runtime/builtin/proc.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/proc.pir (original)
+++ trunk/languages/tcl/runtime/builtin/proc.pir Tue Jul 29 05:46:35 2008
@@ -36,7 +36,7 @@
.local pmc ns
.local string name
- ns = new 'ResizablePMCArray'
+ ns = new 'TclList'
name = ''
if full_name == '' goto create
Modified: trunk/languages/tcl/runtime/builtin/regexp.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/regexp.pir (original)
+++ trunk/languages/tcl/runtime/builtin/regexp.pir Tue Jul 29 05:46:35 2008
@@ -9,7 +9,7 @@
if argc < 2 goto badargs
.local pmc options
- options = new 'ResizablePMCArray'
+ options = new 'TclList'
push options, 'all'
push options, 'about'
push options, 'indices'
Modified: trunk/languages/tcl/runtime/builtin/regsub.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/regsub.pir (original)
+++ trunk/languages/tcl/runtime/builtin/regsub.pir Tue Jul 29 05:46:35 2008
@@ -11,7 +11,7 @@
.local string expression, target, subSpec, original_target
.local pmc options
- options = new 'ResizablePMCArray'
+ options = new 'TclList'
push options, 'all'
push options, 'nocase'
push options, 'expanded' # RT#40774: use tcl-regexps
Modified: trunk/languages/tcl/runtime/builtin/string.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/string.pir (original)
+++ trunk/languages/tcl/runtime/builtin/string.pir Tue Jul 29 05:46:35 2008
@@ -16,7 +16,7 @@
subcommand_name = shift argv
.local pmc options
- options = new 'ResizablePMCArray'
+ options = new 'TclList'
push options, 'bytelength'
push options, 'compare'
push options, 'equal'
@@ -649,7 +649,7 @@
the_string = argv[1]
.local pmc options
- options = new 'ResizablePMCArray'
+ options = new 'TclList'
push options, 'alnum'
push options, 'alpha'
push options, 'ascii'
Modified: trunk/languages/tcl/runtime/builtin/subst.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/subst.pir (original)
+++ trunk/languages/tcl/runtime/builtin/subst.pir Tue Jul 29 05:46:35 2008
@@ -5,7 +5,7 @@
.param pmc argv :slurpy
.local pmc options
- options = new 'ResizablePMCArray'
+ options = new 'TclList'
options[0] = 'nobackslashes'
options[1] = 'nocommands'
options[2] = 'novariables'
Modified: trunk/languages/tcl/runtime/builtin/uplevel.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/uplevel.pir (original)
+++ trunk/languages/tcl/runtime/builtin/uplevel.pir Tue Jul 29 05:46:35 2008
@@ -42,7 +42,7 @@
difference = call_level - $I0
.local pmc saved_call_chain
- saved_call_chain = new 'ResizablePMCArray'
+ saved_call_chain = new 'TclList'
$I0 = 0
save_chain_loop:
if $I0 == difference goto save_chain_end
Modified: trunk/languages/tcl/runtime/builtin/upvar.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/upvar.pir (original)
+++ trunk/languages/tcl/runtime/builtin/upvar.pir Tue Jul 29 05:46:35 2008
@@ -58,7 +58,7 @@
store_var:
.local pmc saved_call_chain
- saved_call_chain = new 'ResizablePMCArray'
+ saved_call_chain = new 'TclList'
$I0 = 0
save_chain_loop:
if $I0 == difference goto save_chain_end
Modified: trunk/languages/tcl/runtime/options.pir
==============================================================================
--- trunk/languages/tcl/runtime/options.pir (original)
+++ trunk/languages/tcl/runtime/options.pir Tue Jul 29 05:46:35 2008
@@ -26,7 +26,7 @@
got_type_name:
.local pmc partials
- partials = new 'ResizablePMCArray'
+ partials = new 'TclList'
# is there an exact match?
@@ -211,7 +211,7 @@
# delete any processed switches from the argv
if pos <= 0 goto done
- $P1 = new 'ResizablePMCArray'
+ $P1 = new 'TclList'
splice argv, $P1, 0, pos
done:
Modified: trunk/languages/tcl/runtime/tcllib.pir
==============================================================================
--- trunk/languages/tcl/runtime/tcllib.pir (original)
+++ trunk/languages/tcl/runtime/tcllib.pir Tue Jul 29 05:46:35 2008
@@ -183,10 +183,10 @@
# Eventually, we'll need to register MMD for the various Tcl PMCs
# (Presuming we don't do this from the .pmc definitions.)
- $P1 = new 'ResizablePMCArray'
+ $P1 = new 'TclList'
store_global 'info_level', $P1
- $P1 = new 'ResizablePMCArray'
+ $P1 = new 'TclList'
store_global 'events', $P1
# Global variable initialization
@@ -223,7 +223,7 @@
store_global 'next_channel_id', $P1
# call chain of lex pads (for upvar and uplevel)
- $P1 = new 'ResizablePMCArray'
+ $P1 = new 'TclList'
store_global 'call_chain', $P1
# Change counter: when something is compiled, it is compared to
Modified: trunk/languages/tcl/src/grammar/expr/past.pir
==============================================================================
--- trunk/languages/tcl/src/grammar/expr/past.pir (original)
+++ trunk/languages/tcl/src/grammar/expr/past.pir Tue Jul 29 05:46:35 2008
@@ -75,7 +75,7 @@
.sub init :vtable
$P0 = new 'String'
$P1 = new 'Integer'
- $P2 = new 'ResizablePMCArray'
+ $P2 = new 'TclList'
setattribute self, '$.source', $P0
setattribute self, '$.pos', $P1
Modified: trunk/languages/tcl/src/grammar/expr/past2pir.tg
==============================================================================
--- trunk/languages/tcl/src/grammar/expr/past2pir.tg (original)
+++ trunk/languages/tcl/src/grammar/expr/past2pir.tg Tue Jul 29 05:46:35 2008
@@ -133,7 +133,7 @@
.local pmc return_register
pir = new 'CodeString'
- args = new 'ResizablePMCArray'
+ args = new 'TclList'
iter = node.'child_iter'()
iter_loop:
unless iter goto iter_done
@@ -168,7 +168,7 @@
.local pmc return_register
pir = new 'CodeString'
- args = new 'ResizablePMCArray'
+ args = new 'TclList'
iter = node.'child_iter'()
iter_loop:
unless iter goto iter_done
@@ -200,7 +200,7 @@
.local string reg
pir = new 'CodeString'
- args = new 'ResizablePMCArray'
+ args = new 'TclList'
children = node.'get_children'()
iter = new 'Iterator', children
@@ -306,7 +306,7 @@
.local pmc args, children, iter, pir, reg
pir = new 'CodeString'
- args = new 'ResizablePMCArray'
+ args = new 'TclList'
children = node.'get_children'()
iter = new 'Iterator', children
iter_loop:
Modified: trunk/languages/tcl/t/internals/select_option.t
==============================================================================
--- trunk/languages/tcl/t/internals/select_option.t (original)
+++ trunk/languages/tcl/t/internals/select_option.t Tue Jul 29 05:46:35 2008
@@ -49,7 +49,7 @@
# Setup options
.local pmc options
- options = new 'ResizablePMCArray'
+ options = new 'TclList'
options[0] = 'dank'
options[1] = 'dark'
options[2] = 'dunk'
@@ -113,7 +113,7 @@
# 7
message='no comma with only two options'
- options = new 'ResizablePMCArray'
+ options = new 'TclList'
options[0] = 'bill'
options[1] = 'bob'
push_eh eh_7
@@ -129,7 +129,7 @@
# 8
message='no comma with only two options, ambiguous'
- options = new 'ResizablePMCArray'
+ options = new 'TclList'
options[0] = 'bill'
options[1] = 'bob'
push_eh eh_8
Modified: trunk/languages/tcl/t/internals/select_switches.t
==============================================================================
--- trunk/languages/tcl/t/internals/select_switches.t (original)
+++ trunk/languages/tcl/t/internals/select_switches.t Tue Jul 29 05:46:35 2008
@@ -49,13 +49,13 @@
# Setup options
.local pmc options, argv
- options = new 'ResizablePMCArray'
+ options = new 'TclList'
options[0] = 'baz'
options[1] = 'bob'
options[2] = 'joe'
# 2-5
- argv = new 'ResizablePMCArray'
+ argv = new 'TclList'
argv[0] = '-joe'
argv[1] = 'what'
message='exact match, single, leftover args'
@@ -78,7 +78,7 @@
is ($S0, 'what', $S1)
# 6-8
- argv = new 'ResizablePMCArray'
+ argv = new 'TclList'
argv[0] = '-joe'
message='exact match, single, no leftover args'
$P1 = select_switches(options, argv)
@@ -96,7 +96,7 @@
is ($I1, 0, $S1)
# 9-13
- argv = new 'ResizablePMCArray'
+ argv = new 'TclList'
argv[0] = '-joe'
argv[1] = '-baz'
argv[2] = 'what'
@@ -124,7 +124,7 @@
is ($S0, 'what', $S1)
# 14-17
- argv = new 'ResizablePMCArray'
+ argv = new 'TclList'
argv[0] = '-joe'
argv[1] = '--'
argv[2] = '-bob'
@@ -148,7 +148,7 @@
is ($S0, '-bob', $S1)
# 18-22
- argv = new 'ResizablePMCArray'
+ argv = new 'TclList'
argv[0] = '-joke'
argv[1] = 'bag_o_donuts'
message='invalid option specified, no exception'
@@ -175,7 +175,7 @@
is ($S0, 'bag_o_donuts', $S1)
# 23
- argv = new 'ResizablePMCArray'
+ argv = new 'TclList'
argv[0] = '-joke'
argv[1] = 'bag_o_donuts'
message='invalid option specified, w/ exception'
@@ -193,7 +193,7 @@
is($S2, 'bad switch "-joke": must be -baz, -bob, or -joe', message)
# 24
- argv = new 'ResizablePMCArray'
+ argv = new 'TclList'
argv[0] = '-joke'
argv[1] = 'bag_o_donuts'
message='invalid option specified, w/ exception and --'
@@ -211,7 +211,7 @@
is($S2, 'bad switch "-joke": must be -baz, -bob, -joe, or --', message)
# 25
- argv = new 'ResizablePMCArray'
+ argv = new 'TclList'
argv[0] = '-joke'
argv[1] = 'bag_o_donuts'
message='invalid option specified, w/ exception, --, and override name'
@@ -231,7 +231,7 @@
# 26-29
options[2] = 'joe:s' # change this to take a value..
- argv = new 'ResizablePMCArray'
+ argv = new 'TclList'
argv[0] = '-joe'
argv[1] = 'bag_o_donuts'
argv[2] = 'what'