Author: mdiep
Date: Fri Aug  5 19:04:37 2005
New Revision: 8828

Removed:
   trunk/languages/tcl/lib/macros/
Modified:
   trunk/MANIFEST
   trunk/config/gen/makefiles/tcl.in
   trunk/languages/tcl/TODO
   trunk/languages/tcl/lib/commands/concat.pir
   trunk/languages/tcl/lib/expression.pir
Log:
Remove the is_space macro.


Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST      (original)
+++ trunk/MANIFEST      Fri Aug  5 19:04:37 2005
@@ -1420,7 +1420,6 @@ languages/tcl/lib/get_var.pir           
 languages/tcl/lib/interpret.pir                   [tcl]
 languages/tcl/lib/list.pir                        [tcl]
 languages/tcl/lib/list_to_string.pir              [tcl]
-languages/tcl/lib/macros/is_space.pir             [tcl]
 languages/tcl/lib/parser.pir                      [tcl]
 languages/tcl/lib/string_to_list.pir              [tcl]
 languages/tcl/lib/string.pir                      [tcl]

Modified: trunk/config/gen/makefiles/tcl.in
==============================================================================
--- trunk/config/gen/makefiles/tcl.in   (original)
+++ trunk/config/gen/makefiles/tcl.in   Fri Aug  5 19:04:37 2005
@@ -64,7 +64,6 @@ lib${slash}get_var.pir \
 lib${slash}interpret.pir \
 lib${slash}list.pir \
 lib${slash}list_to_string.pir \
-lib${slash}macros${slash}is_space.pir \
 lib${slash}parser.pir \
 lib${slash}string_to_list.pir \
 lib${slash}string.pir \

Modified: trunk/languages/tcl/TODO
==============================================================================
--- trunk/languages/tcl/TODO    (original)
+++ trunk/languages/tcl/TODO    Fri Aug  5 19:04:37 2005
@@ -7,10 +7,6 @@
 new parser breaks ability to send interactive commands to the shell, add it
 back
 
-=item remove .is_space macro
-
-looks like <is_whitespace> opcode will handle this.
-
 =item PIR Tree
 
 From autrijus's talk.

Modified: trunk/languages/tcl/lib/commands/concat.pir
==============================================================================
--- trunk/languages/tcl/lib/commands/concat.pir (original)
+++ trunk/languages/tcl/lib/commands/concat.pir Fri Aug  5 19:04:37 2005
@@ -34,16 +34,12 @@ loop_init:
 
   # Trim off leading and trailing space on the arg. 
   start_pos = 0
-  length end_pos, current_arg
+  end_pos = length current_arg
 
 left_loop:
   if start_pos == end_pos goto right_done
-  current_char = ord current_arg, start_pos
-  #is_space doesn't check for newlines...
-  if current_char == 10 goto left_next
-  .is_space(current_char,$I0)
+  $I0 = is_whitespace current_arg, start_pos
   if $I0 == 0 goto left_done
-left_cont:
   inc start_pos
   goto left_loop
 
@@ -51,12 +47,8 @@ left_done:
   dec end_pos
 
 right_loop:
-  current_char = ord current_arg, end_pos
-  #is_space doesn't check for newlines...
-  if current_char == 10 goto right_next
-  .is_space(current_char,$I0)
+  $I0 = is_whitespace current_arg, end_pos
   if $I0 == 0 goto right_done
-right_next:
   dec end_pos
   goto right_loop
 

Modified: trunk/languages/tcl/lib/expression.pir
==============================================================================
--- trunk/languages/tcl/lib/expression.pir      (original)
+++ trunk/languages/tcl/lib/expression.pir      Fri Aug  5 19:04:37 2005
@@ -68,9 +68,8 @@ chunk_loop:
   #print "CHUNK_LOOP\n"
   if chunk_start >= expr_length goto chunks_done
   
-  ord char, expr, chunk_start
   # Is this a space? skip it and try again, otherwise, fall through.
-  .is_space(char,$I0)
+  $I0 = is_whitespace expr, chunk_start
   if $I0 == 0 goto get_parenthetical
 
   inc chunk_start
@@ -82,6 +81,7 @@ get_parenthetical:
   # string and call ourselves recursively.
   # (XXX should unroll this recursion.)
 
+  char = ord expr, chunk_start
   if char != 40 goto get_variable # (
   .local int depth
   depth = 1

Reply via email to