Author: mdiep
Date: Sat Aug 13 08:53:46 2005
New Revision: 8942

Modified:
   trunk/languages/tcl/lib/commands/array.pir
   trunk/languages/tcl/lib/commands/info.pir
   trunk/languages/tcl/lib/commands/namespace.pir
   trunk/languages/tcl/lib/commands/puts.pir
   trunk/languages/tcl/lib/commands/string.pir
   trunk/languages/tcl/lib/commands/unset.pir
   trunk/languages/tcl/lib/expression.pir
   trunk/languages/tcl/lib/get_var.pir
   trunk/languages/tcl/lib/parser.pir
   trunk/languages/tcl/lib/tclcommand.pir
   trunk/languages/tcl/lib/variables.pir
   trunk/languages/tcl/tcl.pir
Log:
tcl: Use if_null instead of isnull

Modified: trunk/languages/tcl/lib/commands/array.pir
==============================================================================
--- trunk/languages/tcl/lib/commands/array.pir  (original)
+++ trunk/languages/tcl/lib/commands/array.pir  Sat Aug 13 08:53:46 2005
@@ -26,7 +26,7 @@
     subcommand_proc = find_global "_Tcl\0builtins\0array", subcommand_name
 resume:
   clear_eh
-  isnull subcommand_proc, bad_args
+  if_null subcommand_proc, bad_args
 
   .local int is_array
   .local string array_name, sigil_array_name
@@ -51,7 +51,7 @@ resume_var:
 
   catch_var:
 
-  isnull the_array, array_no
+  if_null the_array, array_no
   $I99 = does the_array, "hash"
   if $I99==0 goto array_no
 
@@ -169,7 +169,7 @@ pre_loop:
   .local pmc set
   set = find_global  "_Tcl", "__set"
 
-  isnull the_array, new_array
+  if_null the_array, new_array
   goto set_loop
 
 new_array:

Modified: trunk/languages/tcl/lib/commands/info.pir
==============================================================================
--- trunk/languages/tcl/lib/commands/info.pir   (original)
+++ trunk/languages/tcl/lib/commands/info.pir   Sat Aug 13 08:53:46 2005
@@ -21,7 +21,7 @@
     subcommand_proc = find_global "_Tcl\0builtins\0info", subcommand_name
 resume:
   clear_eh 
-  isnull subcommand_proc, bad_args
+  if_null subcommand_proc, bad_args
   .return subcommand_proc(argv)
 
 catch:
@@ -52,7 +52,7 @@ bad_args:
   procname = shift argv
   $P1 = find_global "_Tcl", "proc_args"
   $P2 = $P1[procname]
-  isnull $P2, no_args
+  if_null $P2, no_args
   .return(TCL_OK,$P2)
 
 no_args:
@@ -82,7 +82,7 @@ bad_args:
   procname = shift argv
   $P1 = find_global "_Tcl", "proc_body"
   $P2 = $P1[procname]
-  isnull $P2, no_body
+  if_null $P2, no_body
   .return(TCL_OK,$P2)
 
 no_body:
@@ -141,7 +141,7 @@ bad_args:
     $P1 = find_global "Tcl", varname
 global_resume:
   clear_eh 
-  isnull $P1, lex
+  if_null $P1, lex
   retval = 1
   .return(TCL_OK,retval)
 
@@ -155,7 +155,7 @@ lex:
     $P1 = find_lex $I1, varname
 lex_resume:
   clear_eh 
-  isnull $P1, nope
+  if_null $P1, nope
   retval = 1
   .return(TCL_OK,retval)
 

Modified: trunk/languages/tcl/lib/commands/namespace.pir
==============================================================================
--- trunk/languages/tcl/lib/commands/namespace.pir      (original)
+++ trunk/languages/tcl/lib/commands/namespace.pir      Sat Aug 13 08:53:46 2005
@@ -26,7 +26,7 @@ real top level namespace.
     subcommand_proc = find_global "_Tcl\0builtins\0namespace", subcommand_name
 resume:
   clear_eh
-  isnull subcommand_proc, bad_args
+  if_null subcommand_proc, bad_args
   .return subcommand_proc(argv)
 
 catch:

Modified: trunk/languages/tcl/lib/commands/puts.pir
==============================================================================
--- trunk/languages/tcl/lib/commands/puts.pir   (original)
+++ trunk/languages/tcl/lib/commands/puts.pir   Sat Aug 13 08:53:46 2005
@@ -30,7 +30,7 @@ three_arg: 
   channels = find_global "_Tcl", "channels"
   $S2 = argv[1]
   $P1 = channels[$S2]
-  isnull $P1, bad_channel
+  if_null $P1, bad_channel
   $S3 = argv[2]
   print $P1, $S3
   goto done
@@ -50,7 +50,7 @@ two_arg_channel:  
   .local pmc channels 
   channels = find_global "_Tcl", "channels"
   $P1 = channels[$S2]
-  isnull $P1, bad_channel
+  if_null $P1, bad_channel
   print $P1, $S3
   print $P1, "\n"
   goto done

Modified: trunk/languages/tcl/lib/commands/string.pir
==============================================================================
--- trunk/languages/tcl/lib/commands/string.pir (original)
+++ trunk/languages/tcl/lib/commands/string.pir Sat Aug 13 08:53:46 2005
@@ -18,7 +18,7 @@
     subcommand_proc = find_global "_Tcl\0builtins\0string", subcommand_name
 resume:
   clear_eh
-  isnull subcommand_proc, bad_args
+  if_null subcommand_proc, bad_args
   .return subcommand_proc(argv)
 
 catch:

Modified: trunk/languages/tcl/lib/commands/unset.pir
==============================================================================
--- trunk/languages/tcl/lib/commands/unset.pir  (original)
+++ trunk/languages/tcl/lib/commands/unset.pir  Sat Aug 13 08:53:46 2005
@@ -37,7 +37,7 @@ get_lexical:
 resume:
   clear_eh
 
-  isnull search_variable, error
+  if_null search_variable, error
 
   null search_variable
 

Modified: trunk/languages/tcl/lib/expression.pir
==============================================================================
--- trunk/languages/tcl/lib/expression.pir      (original)
+++ trunk/languages/tcl/lib/expression.pir      Sat Aug 13 08:53:46 2005
@@ -206,7 +206,7 @@ two_char:
   op_len = 2
   test_op = substr expr, chunk_start, op_len
   $P11 = ops[test_op]
-  isnull $P11, one_char
+  if_null $P11, one_char
   $I1 = typeof $P11
   if $I1 == .Undef goto one_char
   goto op_done
@@ -216,7 +216,7 @@ one_char:
   op_len = 1
   test_op = substr expr, chunk_start, op_len
   $P11 = ops[test_op]
-  isnull $P11, op_fail
+  if_null $P11, op_fail
   $I1 = typeof $P11
   if $I1 == .Undef goto op_fail
   goto op_done
@@ -286,7 +286,7 @@ converter_loop:
   if precedence_level > MAX_PRECEDENCE goto converter_done
   if stack_index >= input_len goto precedence_done
   our_op = chunks[stack_index]
-  isnull our_op, converter_next
+  if_null our_op, converter_next
   $I0 = typeof our_op
   if $I0 == .Undef goto converter_next
   $I2 = our_op[0]
@@ -308,7 +308,7 @@ right_arg:
   $I2 = stack_index + 1
   if $I2 >= input_len goto left_arg
   retval = chunks[$I2]
-  isnull retval, left_arg
+  if_null retval, left_arg
   chunks[$I2] = undef
   inc $I4
   program_stack = unshift retval
@@ -323,7 +323,7 @@ left_arg:
   $I2 = stack_index - 1
   if $I2 < 0 goto shift_op
   retval = chunks[$I2]
-  isnull retval, shift_op
+  if_null retval, shift_op
   chunks[$I2] = undef
   inc $I4
   program_stack = unshift retval
@@ -905,7 +905,7 @@ loop_done:
   $P1 = find_global "_Tcl", "functions"
   
   func = $P1[$S0]
-  isnull func, fail 
+  if_null func, fail 
   $I0 = typeof func
   if $I0 == .Undef goto fail
 

Modified: trunk/languages/tcl/lib/get_var.pir
==============================================================================
--- trunk/languages/tcl/lib/get_var.pir (original)
+++ trunk/languages/tcl/lib/get_var.pir Sat Aug 13 08:53:46 2005
@@ -41,7 +41,7 @@ get_scalar_global:
 resume:
   clear_eh
 
-  isnull variable, no_such_variable 
+  if_null variable, no_such_variable 
   $I0 = does variable, "hash"
   unless $I0 goto get_scalar_ok
 
@@ -101,7 +101,7 @@ get_indexed_global:
 resume:
   clear_eh
 
-  isnull variable, no_such_variable
+  if_null variable, no_such_variable
   $I0 = does variable, "hash"
   unless $I0 goto get_indexed_bad
 

Modified: trunk/languages/tcl/lib/parser.pir
==============================================================================
--- trunk/languages/tcl/lib/parser.pir  (original)
+++ trunk/languages/tcl/lib/parser.pir  Sat Aug 13 08:53:46 2005
@@ -81,7 +81,7 @@ found_comment:
 done_comment:
   .local pmc command
   (command, pos) = get_command(tcl_code, chars, pos)
-  isnull command, done
+  if_null command, done
   
   push commands, command
   goto next_command
@@ -120,7 +120,7 @@ get:
   if pos >= len goto check
   (word, pos) = get_word(tcl_code, chars, pos)
   inc pos
-  isnull word, get
+  if_null word, get
   $S0 = word
   $I0 = ord $S0, 0
   if $I0 == 35 goto got_comment
@@ -157,7 +157,7 @@ get:
   # try to get a command name
   .local pmc word
   (word, pos) = get_word(tcl_code, chars, pos)
-  isnull word, check
+  if_null word, check
   
   $I0 = find_type "TclCommand"
   command = new $I0
@@ -165,7 +165,7 @@ get:
   
 next_word:
   (word, pos) = get_word(tcl_code, chars, pos)
-  isnull word, done
+  if_null word, done
   push command, word
   goto next_word
 
@@ -294,7 +294,7 @@ have_word:
   goto done
 
 done:
-  isnull word, really_done
+  if_null word, really_done
   $I0 = word
   if $I0 != 1 goto really_done
   word = word[0]

Modified: trunk/languages/tcl/lib/tclcommand.pir
==============================================================================
--- trunk/languages/tcl/lib/tclcommand.pir      (original)
+++ trunk/languages/tcl/lib/tclcommand.pir      Sat Aug 13 08:53:46 2005
@@ -61,7 +61,7 @@ Execute the command.
   
   # we can't delete commands, so we store deleted commands
   # as null PMCs
-  isnull cmd, no_command
+  if_null cmd, no_command
 
 execute:
   .local pmc args

Modified: trunk/languages/tcl/lib/variables.pir
==============================================================================
--- trunk/languages/tcl/lib/variables.pir       (original)
+++ trunk/languages/tcl/lib/variables.pir       Sat Aug 13 08:53:46 2005
@@ -41,7 +41,7 @@ array:
   key = substr name, char, len
   
   variable = __find_var(var)
-  isnull variable, no_such_variable
+  if_null variable, no_such_variable
   
   $I0 = does variable, "hash"
   unless $I0 goto cant_read_not_array
@@ -52,7 +52,7 @@ array:
   #unless $I0 goto bad_index
 
   variable = variable[key]
-  isnull variable,bad_index 
+  if_null variable, bad_index 
   .return(TCL_OK, variable)
 
 bad_index:
@@ -73,7 +73,7 @@ cant_read_not_array:
 
 scalar:
   variable = __find_var(name)
-  isnull variable, no_such_variable
+  if_null variable, no_such_variable
   
   $I0 = does variable, "hash"
   if $I0 goto cant_read_array
@@ -139,7 +139,7 @@ find_array:
   .local pmc array
   null array
   array = __find_var(var)
-  isnull array, create_array
+  if_null array, create_array
 
   $I0 = does array, "hash"
   unless $I0 goto cant_set_not_array

Modified: trunk/languages/tcl/tcl.pir
==============================================================================
--- trunk/languages/tcl/tcl.pir (original)
+++ trunk/languages/tcl/tcl.pir Sat Aug 13 08:53:46 2005
@@ -49,7 +49,7 @@ input_loop:
   register $P1
   (retcode,retval) = interpret($P1)
   # print out the result of the evaluation.
-  isnull retval, input_loop
+  if_null retval, input_loop
   if retval == "" goto input_loop
   print retval
   print "\n"

Reply via email to