Author: coke
Date: Tue Jul 29 06:13:22 2008
New Revision: 29844
Modified:
trunk/languages/tcl/runtime/builtin/array.pir
trunk/languages/tcl/runtime/builtin/dict.pir
trunk/languages/tcl/runtime/builtin/for.pir
trunk/languages/tcl/runtime/builtin/lassign.pir
trunk/languages/tcl/runtime/builtin/proc.pir
trunk/languages/tcl/runtime/conversions.pir
trunk/languages/tcl/runtime/string_to_list.pir
trunk/languages/tcl/runtime/tcllib.pir
trunk/languages/tcl/src/grammar/expr/past.pir
trunk/languages/tcl/src/tclsh.pir
Log:
[tcl] Convert internal usage of String, Integer to tcl PMC variants.
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 06:13:22 2008
@@ -403,7 +403,7 @@
iter = new 'Iterator', the_array
- retval = new 'String'
+ retval = new 'TclString'
retval = ''
check_loop:
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 06:13:22 2008
@@ -107,7 +107,7 @@
$S2 = value
$S2 .= $S1
.local pmc stringy
- stringy = new 'String'
+ stringy = new 'TclString'
stringy = $S2
copy value, stringy
goto loop
Modified: trunk/languages/tcl/runtime/builtin/for.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/for.pir (original)
+++ trunk/languages/tcl/runtime/builtin/for.pir Tue Jul 29 06:13:22 2008
@@ -58,7 +58,7 @@
.rethrow()
done:
- R = new 'String'
+ R = new 'TclString'
R = ''
.return(R)
bad_args:
Modified: trunk/languages/tcl/runtime/builtin/lassign.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/lassign.pir (original)
+++ trunk/languages/tcl/runtime/builtin/lassign.pir Tue Jul 29 06:13:22 2008
@@ -29,7 +29,7 @@
if argv goto var_loop
list_empty:
- value = new 'String'
+ value = new 'TclString'
value = ''
null_loop:
unless argv goto var_end
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 06:13:22 2008
@@ -235,17 +235,17 @@
$P1 = new 'TclProc'
assign $P1, $P0
- $P9 = new 'String'
+ $P9 = new 'TclString'
$P9 = $S0
setattribute $P1, 'PIR_source', $P9
- $P9 = new 'String'
+ $P9 = new 'TclString'
$P9 = 'Tcl'
setattribute $P1, 'HLL', $P9
setattribute $P1, 'HLL_source', body
- $P9 = new 'String'
+ $P9 = new 'TclString'
$P9 = args_info
setattribute $P1, 'args', $P9
Modified: trunk/languages/tcl/runtime/conversions.pir
==============================================================================
--- trunk/languages/tcl/runtime/conversions.pir (original)
+++ trunk/languages/tcl/runtime/conversions.pir Tue Jul 29 06:13:22 2008
@@ -594,14 +594,14 @@
.sub getCallLevel
.param pmc tcl_level
.local pmc parrot_level, defaulted, orig_level
- defaulted = new 'Integer'
+ defaulted = new 'TclInt'
defaulted = 0
.local pmc call_chain
.local int call_level
call_chain = get_root_global ['_tcl'], 'call_chain'
call_level = elements call_chain
- orig_level = new 'Integer'
+ orig_level = new 'TclInt'
orig_level = call_level
.local int num_length
@@ -627,7 +627,7 @@
default:
defaulted = 1
- parrot_level = new 'Integer'
+ parrot_level = new 'TclInt'
parrot_level = orig_level - 1
# fallthrough.
Modified: trunk/languages/tcl/runtime/string_to_list.pir
==============================================================================
--- trunk/languages/tcl/runtime/string_to_list.pir (original)
+++ trunk/languages/tcl/runtime/string_to_list.pir Tue Jul 29 06:13:22 2008
@@ -25,7 +25,6 @@
$S0 = typeof $P2
if $S0 == 'TclConst' goto is_string
if $S0 == 'TclString' goto is_string
- if $S0 == 'String' goto is_string
is_list:
$P2 = listToDict($P2)
result[$S1] = $P2
Modified: trunk/languages/tcl/runtime/tcllib.pir
==============================================================================
--- trunk/languages/tcl/runtime/tcllib.pir (original)
+++ trunk/languages/tcl/runtime/tcllib.pir Tue Jul 29 06:13:22 2008
@@ -192,10 +192,10 @@
# Global variable initialization
#version info
- $P0 = new 'String'
+ $P0 = new 'TclString'
$P0 = '0.1'
set_root_global ['tcl'], '$tcl_patchLevel', $P0
- $P0 = new 'String'
+ $P0 = new 'TclString'
$P0 = '0.1'
set_root_global ['tcl'], '$tcl_version', $P0
@@ -218,7 +218,7 @@
store_global 'channels', $P1
# Setup the id # for channels..
- $P1 = new 'Integer'
+ $P1 = new 'TclInt'
$P1 = 1
store_global 'next_channel_id', $P1
@@ -230,7 +230,7 @@
# This counter: if the counter hasn't changed since it was compiled,
# it's safe to use the inline version (if available)
# Otherwise fallback to the interpreted version.
- $P1 = new 'Integer'
+ $P1 = new 'TclInt'
$P1 = 0
store_global 'epoch', $P1
@@ -245,7 +245,7 @@
compreg 'TCL', $P1
# Setup a global to keep a unique id for compiled subs.
- $P1 = new 'Integer'
+ $P1 = new 'TclInt'
$P1 = 0
store_global 'compiled_num', $P1
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 06:13:22 2008
@@ -54,7 +54,7 @@
$P0 = subclass base, 'PAST::Val'
$P0 = subclass base, 'PAST::Var'
- $P0 = new 'Integer'
+ $P0 = new 'TclInt'
store_global 'TclExpr::PAST', '$!serno', $P0
.end
@@ -73,8 +73,8 @@
=cut
.sub init :vtable
- $P0 = new 'String'
- $P1 = new 'Integer'
+ $P0 = new 'TclString'
+ $P1 = new 'TclInt'
$P2 = new 'TclList'
setattribute self, '$.source', $P0
Modified: trunk/languages/tcl/src/tclsh.pir
==============================================================================
--- trunk/languages/tcl/src/tclsh.pir (original)
+++ trunk/languages/tcl/src/tclsh.pir Tue Jul 29 06:13:22 2008
@@ -39,7 +39,7 @@
.local int argc,retcode
.local pmc tcl_interactive
- tcl_interactive = new 'Integer'
+ tcl_interactive = new 'TclInt'
store_global '$tcl_interactive', tcl_interactive
.local pmc compileTcl