Author: leo
Date: Thu Oct 6 09:20:05 2005
New Revision: 9370
Modified:
trunk/examples/sdl/tetris/app.imc
trunk/examples/sdl/tetris/blockdata.imc
trunk/languages/lisp/cl.imc
trunk/languages/lisp/eval.imc
trunk/languages/lisp/internals.imc
trunk/languages/lisp/read.imc
trunk/languages/lisp/system.imc
trunk/languages/lisp/validate.imc
trunk/runtime/parrot/library/Data/Replace.imc
Log:
isnull => if_null
$ find . -name '*.imc' | xargs grep -wl isnull | xargs \
perl -pi -e's/\bisnull\b/if_null/g'
Modified: trunk/examples/sdl/tetris/app.imc
==============================================================================
--- trunk/examples/sdl/tetris/app.imc (original)
+++ trunk/examples/sdl/tetris/app.imc Thu Oct 6 09:20:05 2005
@@ -176,7 +176,7 @@ This method returns nothing.
# shutdown the SDL system
$P0 = self."SDL"()
- isnull $P0, END
+ if_null $P0, END
$P0."quit"()
END:
.end
@@ -318,7 +318,7 @@ Returns the color palette.
classoffset $I0, self, "Tetris::App"
add $I0, tPalette
getattribute palette, self, $I0
- isnull palette, CREATE
+ if_null palette, CREATE
branch RET
NULL:
@@ -454,7 +454,7 @@ Returns the block object, or NULL if the
.local pmc temp
temp = self."board"( boardID )
- isnull temp, BLOCKISNULL
+ if_null temp, BLOCKISNULL
temp = temp."currentBlock"()
BLOCKISNULL:
@@ -497,7 +497,7 @@ Returns 1 if the rotation was possible,
# lookup the block
block = self."currentBlock"( boardID )
- isnull block, END
+ if_null block, END
# rotate the block
ret = block."rotate"( dir )
@@ -557,7 +557,7 @@ Returns 1 if the movement was possible,
self."disableTimer"()
block = self."currentBlock"( boardID )
- isnull block, END
+ if_null block, END
success = block."move"( xval, yval )
unless success goto END
@@ -615,7 +615,7 @@ This method returns the new falling bloc
SKIP_ID:
temp = self."board"( boardID )
- isnull temp, APP_NEXTBLOCK_END
+ if_null temp, APP_NEXTBLOCK_END
temp = temp."nextBlock"(id )
APP_NEXTBLOCK_END:
@@ -648,7 +648,7 @@ This method returns 1 if the board was f
ret = 0
board = self."board"( boardID )
- isnull board, APP_FALL_END
+ if_null board, APP_FALL_END
board."fall"()
ret = 1
@@ -682,7 +682,7 @@ This method returns 1 if the block is fa
ret = 0
board = self."board"( boardID )
- isnull board, APP_FALLING_END
+ if_null board, APP_FALLING_END
ret = board."falling"()
APP_FALLING_END:
@@ -715,7 +715,7 @@ to fall down one unit.
ret = 0
board = self."board"( boardID )
- isnull board, APP_INTERVAL_END
+ if_null board, APP_INTERVAL_END
ret = board."fallInterval"()
APP_INTERVAL_END:
@@ -747,7 +747,7 @@ Returns the time when the block falls do
.local num ret
board = self."board"( boardID )
- isnull board, APP_NEXTFALL_END
+ if_null board, APP_NEXTFALL_END
ret = board."nextFallTime"()
APP_NEXTFALL_END:
@@ -783,7 +783,7 @@ This method returns nothing.
.local pmc board
board = self."board"( boardID )
- isnull board, APP_SETFALL_END
+ if_null board, APP_SETFALL_END
board."setNextFallTime"( val )
APP_SETFALL_END:
@@ -979,7 +979,7 @@ the boards array.
add $I0, tBoards
getattribute boards, self, $I0
count = 0
- isnull boards, END
+ if_null boards, END
count = boards
END:
@@ -1086,7 +1086,7 @@ This method returns nothing.
add $I0, tPlayers
getattribute temp, self, $I0
players = 1
- isnull temp, SET
+ if_null temp, SET
players = temp
branch END_SET
Modified: trunk/examples/sdl/tetris/blockdata.imc
==============================================================================
--- trunk/examples/sdl/tetris/blockdata.imc (original)
+++ trunk/examples/sdl/tetris/blockdata.imc Thu Oct 6 09:20:05 2005
@@ -218,7 +218,7 @@ items in the blockdata array.
classoffset $I0, self, "Tetris::BlockData"
getattribute $P0, self, $I0
$I0 = 0
- isnull $P0, END
+ if_null $P0, END
$I0 = $P0
$N0 = $I0
sqrt $N0, $I0
@@ -244,7 +244,7 @@ END:
classoffset $I0, self, "Tetris::BlockData"
getattribute $P0, self, $I0
- isnull $P0, ERR
+ if_null $P0, ERR
$I0 = $P0
if index >= $I0 goto ERR
$I0 = $P0[index]
@@ -272,7 +272,7 @@ ERR:
classoffset $I0, self, "Tetris::BlockData"
getattribute $P0, self, $I0
- isnull $P0, ERR
+ if_null $P0, ERR
$I0 = $P0
if index >= $I0 goto ERR
$P0[index] = val
Modified: trunk/languages/lisp/cl.imc
==============================================================================
--- trunk/languages/lisp/cl.imc (original)
+++ trunk/languages/lisp/cl.imc Thu Oct 6 09:20:05 2005
@@ -143,7 +143,7 @@ FUNCTION:
SYMBOL:
func = car._get_function() # Get the function from symbol
- isnull func, INVALID_FUNCTION_NAME # Throw an error if undefined
+ if_null func, INVALID_FUNCTION_NAME # Throw an error if undefined
_FUNCTION_CALL(func,cdr)
goto DONE
@@ -210,7 +210,7 @@ DONE:
.ASSERT_TYPE(symbol, "symbol")
val = symbol._get_value()
- isnull val, UNBOUND
+ if_null val, UNBOUND
.TRUE(retv)
goto DONE
@@ -738,7 +738,7 @@ CLEANUP_LOOP:
goto CLEANUP_LOOP
CLEANUP_DONE:
- isnull error, DONE # Rethrow an exception if we
+ if_null error, DONE # Rethrow an exception if we
rethrow error # need to
goto DONE
@@ -912,7 +912,7 @@ LOOP:
name = symbol._get_name_as_string() # Get the symbols name
lexical = _LOOKUP_LEXICAL(name) # Look for it in lexical env
- isnull lexical, SET_SYMBOL_VALUE
+ if_null lexical, SET_SYMBOL_VALUE
symbol = lexical # Lexical variable was found
Modified: trunk/languages/lisp/eval.imc
==============================================================================
--- trunk/languages/lisp/eval.imc (original)
+++ trunk/languages/lisp/eval.imc Thu Oct 6 09:20:05 2005
@@ -95,7 +95,7 @@ MACRO_FORM:
.local pmc macroarg
macrosym = _LOOKUP_SYMBOL("*MACROEXPAND-HOOK*")
- isnull macrosym, MACRO_NOT_INITIALIZED
+ if_null macrosym, MACRO_NOT_INITIALIZED
macroexp = macrosym._get_value() # Get the expander function
.ASSERT_TYPE_AND_BRANCH(macroexp, "function", MACRO_NOT_INITIALIZED)
@@ -127,7 +127,7 @@ DYNAMIC_SYMBOL:
LEXICAL_SYMBOL:
retv = _LOOKUP_LEXICAL(symname) # Check for a lexical shadow
- isnull retv, CHECK_VALUE # If not found, assume global
+ if_null retv, CHECK_VALUE # If not found, assume global
symbol = retv # Use the lexical value
goto CHECK_VALUE
Modified: trunk/languages/lisp/internals.imc
==============================================================================
--- trunk/languages/lisp/internals.imc (original)
+++ trunk/languages/lisp/internals.imc Thu Oct 6 09:20:05 2005
@@ -65,15 +65,15 @@ DONE:
LEXICAL_SYMBOL:
symbol = _LOOKUP_LEXICAL(symname)
- isnull retv, GLOBAL_SYMBOL
+ if_null retv, GLOBAL_SYMBOL
goto DONE
GLOBAL_SYMBOL:
symbol = _LOOKUP_GLOBAL("COMMON-LISP", "*PACKAGE*")
- isnull symbol, PACKAGE_NOT_FOUND
+ if_null symbol, PACKAGE_NOT_FOUND
package = symbol._get_value()
- isnull package, PACKAGE_NOT_FOUND
+ if_null package, PACKAGE_NOT_FOUND
pkgname = package._get_name_as_string()
@@ -264,7 +264,7 @@ CALL_FUNCTION:
retv = 1
getattribute special, symbol, "LispSymbol\0special"
- isnull special, NOT_SPECIAL
+ if_null special, NOT_SPECIAL
.NULL(special, NOT_SPECIAL)
Modified: trunk/languages/lisp/read.imc
==============================================================================
--- trunk/languages/lisp/read.imc (original)
+++ trunk/languages/lisp/read.imc Thu Oct 6 09:20:05 2005
@@ -135,7 +135,7 @@ STEP_9b:
STEP_10:
retv = _VALIDATE_TOKEN(token)
- isnull retv, READER_ERROR
+ if_null retv, READER_ERROR
goto DONE
Modified: trunk/languages/lisp/system.imc
==============================================================================
--- trunk/languages/lisp/system.imc (original)
+++ trunk/languages/lisp/system.imc Thu Oct 6 09:20:05 2005
@@ -440,7 +440,7 @@ DONE:
concat attr, objt, attr
getattribute retv, symbol, attr
- isnull retv, NO_VALUE
+ if_null retv, NO_VALUE
goto DONE
NO_VALUE:
Modified: trunk/languages/lisp/validate.imc
==============================================================================
--- trunk/languages/lisp/validate.imc (original)
+++ trunk/languages/lisp/validate.imc Thu Oct 6 09:20:05 2005
@@ -30,21 +30,21 @@ QUALIFIED_SYMBOL:
if flag != 1 goto SYMBOL
retv = _LOOKUP_GLOBAL(pkgname, symname)
- isnull retv, SYMBOL_NOT_FOUND
+ if_null retv, SYMBOL_NOT_FOUND
goto DONE
SYMBOL:
symbol = _LOOKUP_GLOBAL("COMMON-LISP", "*PACKAGE*")
- isnull symbol, PACKAGE_NOT_FOUND
+ if_null symbol, PACKAGE_NOT_FOUND
package = symbol._get_value() # Get the current package
- isnull package, PACKAGE_NOT_FOUND
+ if_null package, PACKAGE_NOT_FOUND
pkgname = package._get_name_as_string()
symname = token
retv = _LOOKUP_GLOBAL(pkgname, symname)
- isnull retv, SYMBOL_NOT_FOUND # If not found, intern a new
symbol
+ if_null retv, SYMBOL_NOT_FOUND # If not found, intern a new
symbol
goto DONE
Modified: trunk/runtime/parrot/library/Data/Replace.imc
==============================================================================
--- trunk/runtime/parrot/library/Data/Replace.imc (original)
+++ trunk/runtime/parrot/library/Data/Replace.imc Thu Oct 6 09:20:05 2005
@@ -80,7 +80,7 @@ IS:
.local pmc temp
.local string name
- isnull where, END
+ if_null where, END
# call __replace if the PMC supports it
can $I0, where, "__replace"