Author: bernhard
Date: Thu Jun 14 13:10:10 2007
New Revision: 19003
Modified:
trunk/languages/lisp/cl.pir
trunk/languages/lisp/eval.pir
trunk/languages/lisp/internals.pir
Log:
[languages/lisp]
Use assignment form of 'typeof'
Modified: trunk/languages/lisp/cl.pir
==============================================================================
--- trunk/languages/lisp/cl.pir (original)
+++ trunk/languages/lisp/cl.pir Thu Jun 14 13:10:10 2007
@@ -163,7 +163,7 @@
.ASSERT_TYPE(cdr, "list")
- typeof type, car
+ type = typeof car
if type == "LispFunction" goto FUNCTION
if type == "LispSymbol" goto SYMBOL
@@ -212,7 +212,7 @@
.CAR(a, args)
- typeof type, a # An atom is anything that is
+ type = typeof a # An atom is anything that is
if type != "LispCons" goto ATOM # not a cons.
goto CONS
@@ -397,6 +397,7 @@
.sub _function
.param pmc args
+
.local string symname
.local string pkgname
.local string type
@@ -411,7 +412,7 @@
.CAR(form, args)
- typeof type, form
+ type = typeof form
if type == "LispSymbol" goto SYMBOL # Retrieve function from symbol
@@ -653,7 +654,7 @@
push_eh CLEANUP_HANDLER # Set a handler for cleanup
INIT_FORM: # Process the init form
- typeof type, init
+ type = typeof init
if type == "LispSymbol" goto INIT_SYMBOL
if type == "LispCons" goto INIT_LIST
goto EVAL_BODY
@@ -987,7 +988,7 @@
null nil
- typeof type, form
+ type = typeof form
if type == "LispCons" goto CONS
if type == "LispFloat" goto FLOAT
Modified: trunk/languages/lisp/eval.pir
==============================================================================
--- trunk/languages/lisp/eval.pir (original)
+++ trunk/languages/lisp/eval.pir Thu Jun 14 13:10:10 2007
@@ -15,7 +15,7 @@
# switch based on the type of the first arg
.local pmc form
.CAR(form, args)
- typeof type, form
+ type = typeof form
if type == "LispSymbol" goto SYMBOL
if type == "LispCons" goto FUNCTION_FORM
if type == "LispInteger" goto SELF_EVALUATING_OBJECT
@@ -46,7 +46,7 @@
# Check to see if the function is a special form (which aren't subject to
# normal function evaluation rules).
- typeof type, function
+ type = typeof function
if type == "LispSpecialForm" goto SPECIAL_FORMS
if type == "LispMacro" goto MACRO_FORM
Modified: trunk/languages/lisp/internals.pir
==============================================================================
--- trunk/languages/lisp/internals.pir (original)
+++ trunk/languages/lisp/internals.pir Thu Jun 14 13:10:10 2007
@@ -240,7 +240,7 @@
proto = function._get_args()
body = function._get_body()
- typeof type, body # Get the function type
+ type = typeof body # Get the function type
if type == "Sub" goto COMPILED_FUNCTION
goto INTERPRETED_FUNCTION
@@ -461,7 +461,7 @@
.local string atype
.local int retv
- typeof atype, args
+ atype = typeof args
retv = 1
if rtype == "cons" goto CONS_TYPE