Author: coke
Date: Fri Mar  2 18:00:43 2007
New Revision: 17300

Modified:
   trunk/   (props changed)
   trunk/languages/tcl/runtime/builtin/dict.pir
   trunk/languages/tcl/runtime/builtin/foreach.pir
   trunk/languages/tcl/runtime/builtin/inline.pir
   trunk/languages/tcl/runtime/builtin/linsert.pir
   trunk/languages/tcl/runtime/builtin/namespace.pir
   trunk/languages/tcl/runtime/builtin/package.pir
   trunk/languages/tcl/runtime/builtin/proc.pir
   trunk/languages/tcl/runtime/builtin/regsub.pir
   trunk/languages/tcl/runtime/builtin/return.pir
   trunk/languages/tcl/runtime/builtin/scan.pir
   trunk/languages/tcl/runtime/builtin/source.pir
   trunk/languages/tcl/runtime/builtin/split.pir
   trunk/languages/tcl/runtime/builtin/subst.pir
   trunk/languages/tcl/runtime/builtin/switch.pir
   trunk/languages/tcl/runtime/builtin/unset.pir
   trunk/languages/tcl/runtime/builtin/variable.pir
   trunk/languages/tcl/runtime/conversions.pir
   trunk/languages/tcl/runtime/tcllib.pir
   trunk/languages/tcl/runtime/variables.pir
   trunk/languages/tcl/src/builtin/cd.pir
   trunk/languages/tcl/src/builtin/expr.pir
   trunk/languages/tcl/src/builtin/list.pir
   trunk/languages/tcl/src/builtin/return.pir
   trunk/languages/tcl/src/class/tclconst.pir
   trunk/languages/tcl/src/class/tclproc.pir
   trunk/languages/tcl/src/grammar/expr/functions.pir
   trunk/languages/tcl/src/grammar/expr/past.pir
   trunk/languages/tcl/src/tclsh.pir

Log:
[tcl] use fewer "


Modified: trunk/languages/tcl/runtime/builtin/dict.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/dict.pir        (original)
+++ trunk/languages/tcl/runtime/builtin/dict.pir        Fri Mar  2 18:00:43 2007
@@ -119,7 +119,7 @@
 cant_dict_array:
   $S1 = dict_name
   $S1 = "can't set \"" . $S1
-  $S1 .= "\": variable is array"
+  $S1 .= '": variable is array'
   tcl_error $S1
 
 bad_args:
@@ -477,7 +477,7 @@
 cant_dict_array:
   $S1 = dict_name
   $S1 = "can't set \"" . $S1
-  $S1 .= "\": variable is array"
+  $S1 .= '": variable is array'
   tcl_error $S1
 
 bad_args:
@@ -561,7 +561,7 @@
 cant_dict_array:
   $S1 = dict_name
   $S1 = "can't set \"" . $S1
-  $S1 .= "\": variable is array"
+  $S1 .= '": variable is array'
   tcl_error $S1
 
 bad_args:
@@ -707,7 +707,7 @@
   .return (dictionary)
 
 odd_args:
-  tcl_error "missing value to go with key"
+  tcl_error 'missing value to go with key'
 
 bad_args:
   tcl_error 'wrong # args: should be "dict replace dictionary ?key value ...?"'
@@ -768,7 +768,7 @@
 cant_dict_array:
   $S1 = dict_name
   $S1 = "can't set \"" . $S1
-  $S1 .= "\": variable is array"
+  $S1 .= '": variable is array'
   tcl_error $S1
 
 bad_args:
@@ -847,7 +847,7 @@
 cant_dict_array:
   $S1 = dict_name
   $S1 = "can't set \"" . $S1
-  $S1 .= "\": variable is array"
+  $S1 .= '": variable is array'
   tcl_error $S1
 
 bad_args:
@@ -924,7 +924,7 @@
 cant_dict_array:
   $S1 = dict_name
   $S1 = "can't set \"" . $S1
-  $S1 .= "\": variable is array"
+  $S1 .= '": variable is array'
   tcl_error $S1
 
 bad_args:
@@ -1044,7 +1044,7 @@
 cant_dict_array:
   $S1 = dict_name
   $S1 = "can't set \"" . $S1
-  $S1 .= "\": variable is array"
+  $S1 .= '": variable is array'
   tcl_error $S1
 
 bad_args:

Modified: trunk/languages/tcl/runtime/builtin/foreach.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/foreach.pir     (original)
+++ trunk/languages/tcl/runtime/builtin/foreach.pir     Fri Mar  2 18:00:43 2007
@@ -122,7 +122,7 @@
 couldnt_set:
   $S0 =  "couldn't set loop variable: \""
   $S0 .= varname
-  $S0 .= "\""
+  $S0 .= '"'
   tcl_error $S0
 
 bad_args:

Modified: trunk/languages/tcl/runtime/builtin/inline.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/inline.pir      (original)
+++ trunk/languages/tcl/runtime/builtin/inline.pir      Fri Mar  2 18:00:43 2007
@@ -35,12 +35,12 @@
 # First pass at RT#40748
 compiler_error:
   get_results'(0,0)', $P1, $S1
-  $S1 = "compile error: " . $S1
+  $S1 = 'compile error: ' . $S1
   tcl_error $S1
 
 runtime_error:
   get_results'(0,0)', $P1, $S1
-  $S1 = "runtime error: " . $S1
+  $S1 = 'runtime error: ' . $S1
   tcl_error $S1
 
 bad_args:

Modified: trunk/languages/tcl/runtime/builtin/linsert.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/linsert.pir     (original)
+++ trunk/languages/tcl/runtime/builtin/linsert.pir     Fri Mar  2 18:00:43 2007
@@ -29,7 +29,7 @@
   the_index = __index(position, the_list)
 
   $S0 = substr position, 0, 3
-  if $S0 != "end" goto next
+  if $S0 != 'end' goto next
   inc the_index
   
 next:

Modified: trunk/languages/tcl/runtime/builtin/namespace.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/namespace.pir   (original)
+++ trunk/languages/tcl/runtime/builtin/namespace.pir   Fri Mar  2 18:00:43 2007
@@ -79,8 +79,8 @@
   .local pmc ns, __namespace
   __namespace = get_root_global ['_tcl'], '__namespace'
   ns  = __namespace('')
-  $S0 = join "::", ns
-  $S0 = "::" . $S0
+  $S0 = join '::', ns
+  $S0 = '::' . $S0
   .return($S0)
 
 bad_args:
@@ -123,7 +123,7 @@
   .return('')
 .end
 
-.sub "exists"
+.sub 'exists'
   .param pmc argv
 
   .local int argc
@@ -141,7 +141,7 @@
   if $I0 == 0 goto relative
 
   $S0 = $P0[0]
-  if $S0 != "" goto relative
+  if $S0 != '' goto relative
   $P1 = pop $P0
   goto get
 
@@ -252,7 +252,7 @@
   ns = __namespace(ns, 1)
 
   .local string namespace
-  namespace = ""
+  namespace = ''
   $I0 = elements ns
   if $I0 == 0 goto global_ns
   
@@ -264,7 +264,7 @@
   .local pmc __script, code
   __script = get_root_global ['_tcl'], '__script'
   code     = new 'PGE::CodeString'
-  $S0 = join " ", argv
+  $S0 = join ' ', argv
   ($S0, $S1) = __script($S0, 'pir_only'=>1)
   $I0 = code.unique()
   code.emit(<<'END_PIR', namespace, $S0, $I0, $S1)
@@ -273,7 +273,7 @@
 # src/compiler.pir :: pir_compiler (2)
 .pragma n_operators 1
 .sub compiled_tcl_sub_%2 
-  .include "languages/tcl/src/returncodes.pir"
+  .include 'languages/tcl/src/returncodes.pir'
   .local pmc epoch, colons, split, unk, interactive :unique_reg
   epoch  = get_root_global ['_tcl'], 'epoch'
   colons = get_root_global ['_tcl'], 'colons'
@@ -285,7 +285,7 @@
 END_PIR
   
   .local pmc pir_compiler
-  pir_compiler = compreg "PIR"
+  pir_compiler = compreg 'PIR'
   push_eh restore_call_chain
     $P0 = pir_compiler(code)
     $P0 = $P0()
@@ -330,7 +330,7 @@
   .local pmc __namespace, ns, ns_name
   .local string name
   __namespace = get_root_global ['_tcl'], '__namespace'
-  name = ""
+  name = ''
   if argc == 0 goto getname
 
   name = argv[0]
@@ -347,12 +347,12 @@
   unless iter goto end
   $S0 = shift iter
   $P0 = ns[$S0]
-  $I0 = isa $P0, "NameSpace"
+  $I0 = isa $P0, 'NameSpace'
   unless $I0 goto loop
   $P0 = $P0.'get_name'()
   $S0 = shift $P0 # get rid of 'tcl'
-  $S0 = join "::", $P0
-  $S0 = "::" . $S0
+  $S0 = join '::', $P0
+  $S0 = '::' . $S0
   $P0 = new .TclString
   $P0 = $S0
   unless has_pattern goto is_namespace
@@ -447,7 +447,7 @@
   argc = elements argv
 
   .local string name
-  name = ""
+  name = ''
   
   if argc > 1  goto bad_args
   if argc == 0 goto get_parent
@@ -458,14 +458,14 @@
   .local pmc ns, __namespace
   __namespace = get_root_global ['_tcl'], '__namespace'
   ns  = __namespace(name)
-  if $S0 != "" goto no_pop
+  if $S0 != '' goto no_pop
   # for when someone calls [namespace current] from ::
   push_eh current_in_root
     $S0 = pop ns
   clear_eh
 no_pop:
-  $S0 = join "::", ns
-  $S0 = "::" . $S0
+  $S0 = join '::', ns
+  $S0 = '::' . $S0
   .return($S0)
 
 current_in_root:

Modified: trunk/languages/tcl/runtime/builtin/package.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/package.pir     (original)
+++ trunk/languages/tcl/runtime/builtin/package.pir     Fri Mar  2 18:00:43 2007
@@ -8,7 +8,7 @@
 # RT#40707: Stub 
 # help tcltest compile
 
-.sub "&package"
+.sub '&package'
     .param pmc args :slurpy
 
     .return('')

Modified: trunk/languages/tcl/runtime/builtin/proc.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/proc.pir        (original)
+++ trunk/languages/tcl/runtime/builtin/proc.pir        Fri Mar  2 18:00:43 2007
@@ -7,7 +7,7 @@
 .HLL 'Tcl', 'tcl_group'
 .namespace
 
-.sub "&proc"
+.sub '&proc'
   .param pmc argv :slurpy
 
   .local int argc
@@ -22,7 +22,7 @@
   body      = argv[2]
 
   .local pmc pir_compiler, __script, __list, __namespace
-  pir_compiler = compreg "PIR"
+  pir_compiler = compreg 'PIR'
   __script     = get_root_global ['_tcl'], '__script'
   __list       = get_root_global ['_tcl'], '__list'
   __namespace  = get_root_global ['_tcl'], '__namespace'
@@ -112,7 +112,7 @@
   if elems == 0 goto args_loop_done
   $I0 = elems - 1
   $S0 = args[$I0]
-  if $S0 != "args" goto args_loop
+  if $S0 != 'args' goto args_loop
   is_slurpy = 1
   dec elems
 args_loop:
@@ -122,17 +122,17 @@
   
   $S0 = arg[0]
   args_info .= $S0
-  args_info .= " "
+  args_info .= ' '
   
   $I0 = elements arg
   if $I0 > 2 goto too_many_fields
   if $I0 == 2 goto default_arg
   
   min = i + 1
-  args_code.emit("  $P1 = shift args")
+  args_code.emit('  $P1 = shift args')
   args_code.emit("  lexpad['$%0'] = $P1", $S0)
   
-  args_usage .= " "
+  args_usage .= ' '
   args_usage .= $S0
   goto args_next
 
@@ -156,9 +156,9 @@
   lexpad['$%1'] = $P1
 END_PIR
 
-  args_usage .= " ?"
+  args_usage .= ' ?'
   args_usage .= $S0
-  args_usage .= "?"
+  args_usage .= '?'
 
 args_next:
   inc i
@@ -168,8 +168,8 @@
   chopn args_info,  1
 
   unless is_slurpy goto store_info
-  args_usage .= " ..."
-  args_info  .= " args"
+  args_usage .= ' ...'
+  args_info  .= ' args'
 
 store_info:
 
@@ -178,15 +178,15 @@
   argc = elements args
 END_PIR
 
-  code.emit("  if argc < %0 goto BAD_ARGS", min)
+  code.emit('  if argc < %0 goto BAD_ARGS', min)
   if is_slurpy goto emit_args
-  code.emit("  if argc > %0 goto BAD_ARGS", max)
+  code.emit('  if argc > %0 goto BAD_ARGS', max)
 
 emit_args:
   code .= args_code
   
   # Convert the remaining elements returned by foldup into a TclList
-  code.emit(<<"END_PIR")
+  code.emit(<<'END_PIR')
   .local pmc arg_list
   arg_list = new .TclList
   unless args goto NO_SLURPY_ARGS
@@ -196,13 +196,13 @@
 END_PIR
 
 done_args:
-  code.emit("  goto ARGS_OK")
+  code.emit('  goto ARGS_OK')
   code .= defaults
-  code.emit(<<"END_PIR", name, args_usage)
+  code.emit(<<'END_PIR', name, args_usage)
   goto ARGS_OK
 BAD_ARGS:
   $P0 = pop call_chain
-  tcl_error 'wrong # args: should be \"%0%1\"'
+  tcl_error 'wrong # args: should be "%0%1"'
 ARGS_OK:
   push_eh is_return
 END_PIR
@@ -213,14 +213,14 @@
 
   code .= parsed_body
   
-  code.emit(<<"END_PIR", body_reg)
+  code.emit(<<'END_PIR', body_reg)
   clear_eh
 was_ok:
   $P0 = pop call_chain
   .return(%0)
 END_PIR
 
-  code .= <<"END_PIR"
+  code .= <<'END_PIR'
 is_return:
   .catch()
   .get_return_code($I0)

Modified: trunk/languages/tcl/runtime/builtin/regsub.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/regsub.pir      (original)
+++ trunk/languages/tcl/runtime/builtin/regsub.pir      Fri Mar  2 18:00:43 2007
@@ -69,7 +69,7 @@
   goto loop
 
 emit_escaped_char:
-  replStr .= "\\"
+  replStr .= '\'
   goto emit_char
 
 emit_0:

Modified: trunk/languages/tcl/runtime/builtin/return.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/return.pir      (original)
+++ trunk/languages/tcl/runtime/builtin/return.pir      Fri Mar  2 18:00:43 2007
@@ -24,7 +24,7 @@
     tcl_error $S2
 
 bad_call:
-    tcl_error "XXX: bad call to return"
+    tcl_error 'XXX: bad call to return'
 
 onearg:
     $P0 = argv[0]

Modified: trunk/languages/tcl/runtime/builtin/scan.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/scan.pir        (original)
+++ trunk/languages/tcl/runtime/builtin/scan.pir        Fri Mar  2 18:00:43 2007
@@ -44,7 +44,7 @@
 
   # Get the next thing in the format.
   $S0 = substr format, format_pos, 1
-  if $S0 == "%" goto handle_percent
+  if $S0 == '%' goto handle_percent
   $I0 = is_cclass .CCLASS_WHITESPACE, format, format_pos
   unless $I0 goto handle_other
 
@@ -129,7 +129,7 @@
 
   $S0 = substr format, format_pos, 1  
 
-  if $S0 == "$" goto got_xpg3
+  if $S0 == '$' goto got_xpg3
   # We got a number, but it was the width.
   $S0 = match
   width = __integer($S0)
@@ -377,7 +377,7 @@
   $P0 = __number($S0)
   $S1 = typeof $P0
   if $S1 == 'TclFloat' goto done_float
-  $S0 = $S0 . ".0"
+  $S0 = $S0 . '.0'
   $P0 = $P1($S0)
 
 done_float:

Modified: trunk/languages/tcl/runtime/builtin/source.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/source.pir      (original)
+++ trunk/languages/tcl/runtime/builtin/source.pir      Fri Mar  2 18:00:43 2007
@@ -62,7 +62,7 @@
 not_space:
   dec $I0
   $I1 = $I2 - $I0
-  substr contents, $I0, $I1, " "
+  substr contents, $I0, $I1, ' '
   dec $I1
   len -= $I1
   goto backslash_loop

Modified: trunk/languages/tcl/runtime/builtin/split.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/split.pir       (original)
+++ trunk/languages/tcl/runtime/builtin/split.pir       Fri Mar  2 18:00:43 2007
@@ -12,7 +12,7 @@
 
   .local string splitchars,splitstring
   splitstring = argv[0]
-  if splitstring != "" goto check_splitchars
+  if splitstring != '' goto check_splitchars
   .return ('')
 
 check_splitchars:

Modified: trunk/languages/tcl/runtime/builtin/subst.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/subst.pir       (original)
+++ trunk/languages/tcl/runtime/builtin/subst.pir       Fri Mar  2 18:00:43 2007
@@ -93,12 +93,12 @@
 
     pir.emit(".HLL 'Tcl', ''")
     pir.emit(".loadlib 'tcl_ops'")
-    pir.emit(".namespace %0", namespace)
+    pir.emit('.namespace %0', namespace)
     pir.emit(".include 'languages/tcl/src/returncodes.pir'")
     pir.emit(".sub '_anon' :anon")
     pir .= code
-    pir.emit("  .return(%0)", ret)
-    pir.emit(".end")
+    pir.emit('  .return(%0)', ret)
+    pir.emit('.end')
     $S0 = pir
 
     $P1    = compreg 'PIR'

Modified: trunk/languages/tcl/runtime/builtin/switch.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/switch.pir      (original)
+++ trunk/languages/tcl/runtime/builtin/switch.pir      Fri Mar  2 18:00:43 2007
@@ -74,7 +74,7 @@
 
   # check to make sure the last option isn't a fall-through
   $S0 = body[-1]
-  unless $S0 == "-" goto check_mode
+  unless $S0 == '-' goto check_mode
   $S0 = body[-2]
   $S0 = 'no body specified for pattern "' . $S0
   $S0 = $S0 . '"'
@@ -141,7 +141,7 @@
   $S0  = shift body
   code = shift body
 body_match:
-  if code == "-" goto fallthrough
+  if code == '-' goto fallthrough
   .local pmc __script
   __script = get_root_global ['_tcl'], '__script'
   $P1 = __script(code)

Modified: trunk/languages/tcl/runtime/builtin/unset.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/unset.pir       (original)
+++ trunk/languages/tcl/runtime/builtin/unset.pir       Fri Mar  2 18:00:43 2007
@@ -18,13 +18,13 @@
   nocomplain = 0
   
   $S0 = argv[0]
-  if $S0 != "-nocomplain" goto flags_done
+  if $S0 != '-nocomplain' goto flags_done
   nocomplain = 1
   i = 1
   
   if argc < 2 goto flags_done
   $S0 = argv[1]
-  if $S0 != "--" goto flags_done
+  if $S0 != '--' goto flags_done
   i = 2
 
 flags_done:

Modified: trunk/languages/tcl/runtime/builtin/variable.pir
==============================================================================
--- trunk/languages/tcl/runtime/builtin/variable.pir    (original)
+++ trunk/languages/tcl/runtime/builtin/variable.pir    Fri Mar  2 18:00:43 2007
@@ -30,7 +30,7 @@
     if $I0 == -1 goto store
     $S0 = name
     $S0 = "can't define \"" . $S0
-    $S0 = $S0 . "\": name refers to an element in an array"
+    $S0 = $S0 . '": name refers to an element in an array'
     tcl_error $S0
 
 store:

Modified: trunk/languages/tcl/runtime/conversions.pir
==============================================================================
--- trunk/languages/tcl/runtime/conversions.pir (original)
+++ trunk/languages/tcl/runtime/conversions.pir Fri Mar  2 18:00:43 2007
@@ -144,7 +144,7 @@
 
   unless has_rawhex goto normal
   $S0 = value
-  $S0 =  "0x" . $S0
+  $S0 =  '0x' . $S0
   value = $S0
 
 normal: 
@@ -335,7 +335,7 @@
     pir = new 'PGE::CodeString'
 
     pir.emit(".HLL 'Tcl', ''")
-    pir.emit(".namespace %0", namespace)
+    pir.emit('.namespace %0', namespace)
     pir.emit(".sub '_anon' :anon")
     pir .= result
     pir.emit("  .return(%0)", ret)
@@ -426,12 +426,12 @@
 
     pir.emit(".HLL 'Tcl', ''")
     pir.emit(".loadlib 'tcl_ops'")
-    pir.emit(".namespace %0", namespace)
+    pir.emit('.namespace %0', namespace)
     pir.emit(".include 'languages/tcl/src/returncodes.pir'")
     pir.emit(".sub '_anon' :anon")
     pir .= result
-    pir.emit("  .return(%0)", ret)
-    pir.emit(".end")
+    pir.emit('  .return(%0)', ret)
+    pir.emit('.end')
 
     $P1 = compreg 'PIR'
     $P2 = $P1(pir)
@@ -474,7 +474,7 @@
   $I0 = elements ns_name
   if $I0 == 0 goto relative
   $S0 = ns_name[0]
-  if $S0 != "" goto relative
+  if $S0 != '' goto relative
   
 absolute:
   $P1 = shift ns_name
@@ -485,7 +485,7 @@
   interp = getinterp
 relative_loop:
   inc depth
-  $P0 = interp["sub"; depth]
+  $P0 = interp['sub'; depth]
   $P0 = $P0.'get_namespace'()
   $P0 = $P0.'get_name'()
   $S0 = $P0[0]
@@ -588,8 +588,8 @@
 get_absolute:
   # Is this an absolute?
   $S0 = tcl_level
-  $S1 = substr $S0, 0, 1, ""
-  if $S1 != "#" goto get_integer
+  $S1 = substr $S0, 0, 1, ''
+  if $S1 != '#' goto get_integer
   push_eh default
     parrot_level = __number($S0)
   clear_eh
@@ -620,7 +620,7 @@
 
 bad_level:
   $S0 = tcl_level
-  $S0 = "bad level \"" . $S0
-  $S0 = $S0 . "\""
+  $S0 = 'bad level "' . $S0
+  $S0 = $S0 . '"'
   tcl_error $S0
 .end

Modified: trunk/languages/tcl/runtime/tcllib.pir
==============================================================================
--- trunk/languages/tcl/runtime/tcllib.pir      (original)
+++ trunk/languages/tcl/runtime/tcllib.pir      Fri Mar  2 18:00:43 2007
@@ -98,7 +98,7 @@
   .local pmc    interp, config
   .local string slash
   interp = getinterp
-  .include "iglobals.pasm"
+  .include 'iglobals.pasm'
 
   config = interp[.IGLOBALS_CONFIG_HASH]
   $S0 = config['build_dir']
@@ -236,7 +236,7 @@
 
   # the regex used for namespaces
   .local pmc p6rule, colons
-  p6rule = compreg "PGE::P6Regex"
+  p6rule = compreg 'PGE::P6Regex'
   colons = p6rule('\:\:+')
   set_hll_global 'colons', colons
 
@@ -262,7 +262,7 @@
 .namespace
 
 .sub __load_stdlib :load :anon
-  .include "iglobals.pasm"
+  .include 'iglobals.pasm'
   .local pmc interp
   interp = getinterp
   $P1 = interp[.IGLOBALS_CONFIG_HASH]

Modified: trunk/languages/tcl/runtime/variables.pir
==============================================================================
--- trunk/languages/tcl/runtime/variables.pir   (original)
+++ trunk/languages/tcl/runtime/variables.pir   Fri Mar  2 18:00:43 2007
@@ -68,7 +68,7 @@
   if null variable goto no_such_variable
  
   $S0 = typeof variable 
-  if $S0 == "TclArray" goto cant_read_array
+  if $S0 == 'TclArray' goto cant_read_array
   .return(variable)
 
 cant_read_array:
@@ -239,7 +239,7 @@
   $P0 = __find_var(name)
   if null $P0 goto create_scalar
   $S0 = typeof $P0
-  if $S0 == "TclArray" goto cant_set_array
+  if $S0 == 'TclArray' goto cant_set_array
 
 create_scalar:
   __store_var(name, value)

Modified: trunk/languages/tcl/src/builtin/cd.pir
==============================================================================
--- trunk/languages/tcl/src/builtin/cd.pir      (original)
+++ trunk/languages/tcl/src/builtin/cd.pir      Fri Mar  2 18:00:43 2007
@@ -28,7 +28,7 @@
 cd_it:
   pir.emit(<<'END_PIR', retval, dir)
   $P0 = new .OS
-  %0  = $P0."chdir"(%1)
+  %0  = $P0.'chdir'(%1)
 END_PIR
 
   .return(pir)

Modified: trunk/languages/tcl/src/builtin/expr.pir
==============================================================================
--- trunk/languages/tcl/src/builtin/expr.pir    (original)
+++ trunk/languages/tcl/src/builtin/expr.pir    Fri Mar  2 18:00:43 2007
@@ -37,7 +37,7 @@
   pir = new 'PGE::CodeString'
   pir .= $P0
 
-  pir.emit("  %0 = %1", retval, $S0)
+  pir.emit('  %0 = %1', retval, $S0)
 
   .return(pir)
 
@@ -57,7 +57,7 @@
   $P0.replace('"', '\"')
   $S0 = $P0
   .local string error
-  error = "tcl_error \""
+  error = 'tcl_error "'
   error .= $S0
   error .= "\"\n"
   .return(error)

Modified: trunk/languages/tcl/src/builtin/list.pir
==============================================================================
--- trunk/languages/tcl/src/builtin/list.pir    (original)
+++ trunk/languages/tcl/src/builtin/list.pir    Fri Mar  2 18:00:43 2007
@@ -21,10 +21,10 @@
     if arg_num >= argc goto end_loop 
     $P1 = argv[arg_num]
     pir_code .= retval  
-    pir_code .= "["
+    pir_code .= '['
     $S0 = arg_num
     pir_code .= $S0
-    pir_code .= "] = "
+    pir_code .= '] = '
     $S0 = $P1
     pir_code .= $S0
     pir_code .= "\n"

Modified: trunk/languages/tcl/src/builtin/return.pir
==============================================================================
--- trunk/languages/tcl/src/builtin/return.pir  (original)
+++ trunk/languages/tcl/src/builtin/return.pir  Fri Mar  2 18:00:43 2007
@@ -21,7 +21,7 @@
   .return($P0)
 
 onearg:
-  pir_code = "tcl_return "
+  pir_code = 'tcl_return '
   $S1 = argv[0]
   pir_code.= $S1
   pir_code.= "\n"

Modified: trunk/languages/tcl/src/class/tclconst.pir
==============================================================================
--- trunk/languages/tcl/src/class/tclconst.pir  (original)
+++ trunk/languages/tcl/src/class/tclconst.pir  Fri Mar  2 18:00:43 2007
@@ -1,5 +1,5 @@
-.include "languages/tcl/src/returncodes.pir"
-.include "languages/tcl/src/macros.pir"
+.include 'languages/tcl/src/returncodes.pir'
+.include 'languages/tcl/src/macros.pir'
 
 .HLL 'parrot', ''
 .namespace [ 'TclConst' ]
@@ -13,8 +13,8 @@
 =cut
 
 .sub __class_init :load
-  $P0 = getclass "String"
-  $P1 = subclass $P0, "TclConst"
+  $P0 = getclass 'String'
+  $P1 = subclass $P0, 'TclConst'
   
   $P0 = new .Hash
   $P0[ 97] = "\a"
@@ -29,7 +29,7 @@
   set_root_global ['_tcl'], 'backslashes', $P0
 
   $P0 = new .Hash
-  $P0[ 48] =  0 # "0"
+  $P0[ 48] =  0 # '0'
   $P0[ 49] =  1
   $P0[ 50] =  2
   $P0[ 51] =  3
@@ -39,13 +39,13 @@
   $P0[ 55] =  7
   $P0[ 56] =  8
   $P0[ 57] =  9
-  $P0[ 65] = 10 # "A"
+  $P0[ 65] = 10 # 'A'
   $P0[ 66] = 11
   $P0[ 67] = 12
   $P0[ 68] = 13
   $P0[ 69] = 14
   $P0[ 70] = 15
-  $P0[ 97] = 10 # "a"
+  $P0[ 97] = 10 # 'a'
   $P0[ 98] = 11
   $P0[ 99] = 12
   $P0[100] = 13
@@ -69,7 +69,7 @@
   pos = 0
 loop:
   value_length = length value
-  pos = index value, "\\", pos
+  pos = index value, '\', pos
   if pos == -1 goto done
  
   $I0 = pos + 1
@@ -83,7 +83,7 @@
   $I1 = exists backslashes[$I0]
   if $I1 goto special
   
-  substr value, pos, 1, ""
+  substr value, pos, 1, ''
   inc pos
   goto loop
 
@@ -193,7 +193,7 @@
 
 hex_not_really:
   # This was a \x escape that had no hex value..
-  substr value, pos, 2, "x"
+  substr value, pos, 2, 'x'
   inc pos
   goto loop
 
@@ -236,7 +236,7 @@
 
 uni_not_really:
   # This was a \u escape that had no uni value..
-  substr value, pos, 2, "u"
+  substr value, pos, 2, 'u'
   inc pos
   goto loop
 
@@ -247,7 +247,7 @@
   goto loop
   
 done:
-  $I0 = classoffset self, "TclConst"
+  $I0 = classoffset self, 'TclConst'
   $P0 = getattribute self, $I0
   $P0 = value
 .end
@@ -262,7 +262,7 @@
    .param int argnum
   
    .local pmc value
-   $I0 = classoffset self, "TclConst"
+   $I0 = classoffset self, 'TclConst'
    value = getattribute self, $I0
 
    .local pmc compiler

Modified: trunk/languages/tcl/src/class/tclproc.pir
==============================================================================
--- trunk/languages/tcl/src/class/tclproc.pir   (original)
+++ trunk/languages/tcl/src/class/tclproc.pir   Fri Mar  2 18:00:43 2007
@@ -4,8 +4,8 @@
 
 =cut
 
-.include "languages/tcl/src/returncodes.pir"
-.include "languages/tcl/src/macros.pir"
+.include 'languages/tcl/src/returncodes.pir'
+.include 'languages/tcl/src/macros.pir'
 
 .HLL 'parrot', ''
 .namespace [ 'TclProc' ]
@@ -28,5 +28,6 @@
   addattribute $P1, 'HLL'         # In our case, Tcl...
   addattribute $P1, 'HLL_source'
   addattribute $P1, 'args'
-  addattribute $P1, 'defaults'    # Should combine this with 'args' for a more 
Perl-sixy way of specifying args.
+  # Should combine this with 'args' for P6-style args..
+  addattribute $P1, 'defaults'
 .end

Modified: trunk/languages/tcl/src/grammar/expr/functions.pir
==============================================================================
--- trunk/languages/tcl/src/grammar/expr/functions.pir  (original)
+++ trunk/languages/tcl/src/grammar/expr/functions.pir  Fri Mar  2 18:00:43 2007
@@ -54,7 +54,7 @@
     if a >  1 goto domain_error
  
     .local pmc ret
-    ret = new "TclFloat"
+    ret = new 'TclFloat'
     $N0 = a
     $N0 = acos $N0
     ret = $N0
@@ -89,7 +89,7 @@
     if a >  1 goto domain_error
     
     .local pmc ret
-    ret = new "TclFloat"
+    ret = new 'TclFloat'
     $N0 = a
     $N0 = asin $N0
     ret = $N0
@@ -121,7 +121,7 @@
     clear_eh
     
     .local pmc ret
-    ret = new "TclFloat"
+    ret = new 'TclFloat'
     $N0 = a
     $N0 = atan $N0
     ret = $N0
@@ -154,7 +154,7 @@
     clear_eh
     
     .local pmc ret
-    ret = new "TclFloat"
+    ret = new 'TclFloat'
     $N0 = a
     $N0 = ceil $N0
     ret = $N0
@@ -175,7 +175,7 @@
     clear_eh
     
     .local pmc ret
-    ret = new "TclFloat"
+    ret = new 'TclFloat'
     $N0 = a
     $N0 = cos $N0
     ret = $N0
@@ -199,7 +199,7 @@
     clear_eh
     
     .local pmc ret
-    ret = new "TclFloat"
+    ret = new 'TclFloat'
     $N0 = a
     $N0 = cosh $N0
     ret = $N0
@@ -223,7 +223,7 @@
     clear_eh
     
     .local pmc ret
-    ret = new "TclFloat"
+    ret = new 'TclFloat'
     $N0 = a
     ret = $N0
     .return (ret)
@@ -265,7 +265,7 @@
     clear_eh
     
     .local pmc ret
-    ret = new "TclFloat"
+    ret = new 'TclFloat'
     $N0 = a
     $N0 = exp $N0
     ret = $N0
@@ -351,7 +351,7 @@
     if a < 0 goto domain_error
 
     .local pmc ret
-    ret = new "TclFloat"
+    ret = new 'TclFloat'
     $N0 = a
     $N0 = ln $N0
     ret = $N0
@@ -385,7 +385,7 @@
     if a < 0 goto domain_error
 
     .local pmc ret
-    ret = new "TclFloat"
+    ret = new 'TclFloat'
     $N0 = a
     $N0 = log10 $N0
     ret = $N0
@@ -475,7 +475,7 @@
     clear_eh
     
     .local pmc ret
-    ret = new "TclFloat"
+    ret = new 'TclFloat'
     $N0 = a
     $N0 = sin $N0
     ret = $N0
@@ -499,7 +499,7 @@
     clear_eh
     
     .local pmc ret
-    ret = new "TclFloat"
+    ret = new 'TclFloat'
     $N0 = a
     $N0 = sinh $N0
     ret = $N0
@@ -524,7 +524,7 @@
     
     .local pmc ret
     if a < 0 goto domain_error
-    ret = new "TclFloat"
+    ret = new 'TclFloat'
     $N0 = a
     $N0 = sqrt $N0
     ret = $N0
@@ -559,7 +559,7 @@
     clear_eh
     
     .local pmc ret
-    ret = new "TclFloat"
+    ret = new 'TclFloat'
     $N0 = a
     $N0 = tan $N0
     ret = $N0
@@ -583,7 +583,7 @@
     clear_eh
     
     .local pmc ret
-    ret = new "TclFloat"
+    ret = new 'TclFloat'
     $N0 = a
     $N0 = tanh $N0
     ret = $N0
@@ -662,7 +662,7 @@
     $N1 = b
     $N0 = $N0 % $N1
     .local pmc ret
-    ret = new "TclFloat"
+    ret = new 'TclFloat'
     ret = $N0
     .return (ret)
 

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       Fri Mar  2 18:00:43 2007
@@ -55,7 +55,7 @@
     $P0 = subclass base, 'PAST::Var'
 
     $P0 = new .Integer
-    store_global "TclExpr::PAST", "$!serno", $P0
+    store_global 'TclExpr::PAST', '$!serno', $P0
 .end
 
 .namespace [ 'PAST::Node' ]

Modified: trunk/languages/tcl/src/tclsh.pir
==============================================================================
--- trunk/languages/tcl/src/tclsh.pir   (original)
+++ trunk/languages/tcl/src/tclsh.pir   Fri Mar  2 18:00:43 2007
@@ -167,7 +167,7 @@
 not_space:
   dec $I0
   $I1 = $I2 - $I0
-  substr contents, $I0, $I1, " "
+  substr contents, $I0, $I1, ' '
   dec $I1
   len -= $I1
   goto backslash_loop
@@ -226,11 +226,11 @@
   end
 
 continue_outside_loop:
-  print "invoked \"continue\" outside of a loop\n"
+  say 'invoked "continue" outside of a loop'
   end
 
 break_outside_loop:
-  print "invoked \"break\" outside of a loop\n"
+  say 'invoked "break" outside of a loop'
   end
 
 exit_exception:

Reply via email to