aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-02-20 17:24:05 +0000
committerdos-reis <gdr@axiomatics.org>2008-02-20 17:24:05 +0000
commit7ba4cd656138bedb567137ea662f26213bc2e898 (patch)
treedffa37ee129563ce966d52514ec6deb569794d9b /src/interp
parent9fbb89443e0c88ee5e76d95a3eea2ac5ea9916b6 (diff)
downloadopen-axiom-7ba4cd656138bedb567137ea662f26213bc2e898.tar.gz
* lisp/core.lisp.in [SBCL]: Require "sb-posix".
(|resetErrorCount|): New export function. * interp/vmlisp.lisp (opOf): Remove macro definition. * interp/msg.boot (setMsgCatlessAttr): Fix thinko. * interp/monitor.lisp (monitor-add): Remove extra right parenthesis. * interp/lisplib.boot: Import "debug". (initializeLisplib): Don't use ERRORS variable. * interp/i-spec1.boot (isDomainValuedVariable): Tidy. * interp/i-output.boot (outputTran): Use SIZE instead of #. (output): Remove misguided conversion from Tuple to List. * interp/i-coerce.boot (coerceInteractive): Allow domain object convesions. * interp/g-util.boot (opOf): Declare. * interp/Makefile.pamphlet (lisplib.$(FASLEXT)): Depend on debug.$(FASLEXT). * algebra/Makefile.pamphlet: Use .$(FASLEXT) instead of hardcoded .o extension.
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/Makefile.in3
-rw-r--r--src/interp/Makefile.pamphlet3
-rw-r--r--src/interp/debug.lisp2
-rw-r--r--src/interp/g-util.boot1
-rw-r--r--src/interp/i-coerce.boot5
-rw-r--r--src/interp/i-output.boot7
-rw-r--r--src/interp/i-spec1.boot4
-rw-r--r--src/interp/lisplib.boot5
-rw-r--r--src/interp/monitor.lisp4
-rw-r--r--src/interp/msg.boot4
-rw-r--r--src/interp/vmlisp.lisp7
11 files changed, 21 insertions, 24 deletions
diff --git a/src/interp/Makefile.in b/src/interp/Makefile.in
index cabc92d7..008453ac 100644
--- a/src/interp/Makefile.in
+++ b/src/interp/Makefile.in
@@ -471,7 +471,8 @@ simpbool.$(FASLEXT): simpbool.boot macros.$(FASLEXT)
newfort.$(FASLEXT): newfort.boot macros.$(FASLEXT)
$(BOOTSYS) -- --compile --boot="old" --output=$@ --load-directory=. $<
-lisplib.$(FASLEXT): lisplib.boot nlib.$(FASLEXT) c-util.$(FASLEXT)
+lisplib.$(FASLEXT): lisplib.boot nlib.$(FASLEXT) c-util.$(FASLEXT) \
+ debug.$(FASLEXT)
$(BOOTSYS) -- --compile --output=$@ --load-directory=. $<
interop.$(FASLEXT): interop.boot c-util.$(FASLEXT)
diff --git a/src/interp/Makefile.pamphlet b/src/interp/Makefile.pamphlet
index 6e4ff654..bea38292 100644
--- a/src/interp/Makefile.pamphlet
+++ b/src/interp/Makefile.pamphlet
@@ -785,7 +785,8 @@ simpbool.$(FASLEXT): simpbool.boot macros.$(FASLEXT)
newfort.$(FASLEXT): newfort.boot macros.$(FASLEXT)
$(BOOTSYS) -- --compile --boot="old" --output=$@ --load-directory=. $<
-lisplib.$(FASLEXT): lisplib.boot nlib.$(FASLEXT) c-util.$(FASLEXT)
+lisplib.$(FASLEXT): lisplib.boot nlib.$(FASLEXT) c-util.$(FASLEXT) \
+ debug.$(FASLEXT)
$(BOOTSYS) -- --compile --output=$@ --load-directory=. $<
interop.$(FASLEXT): interop.boot c-util.$(FASLEXT)
diff --git a/src/interp/debug.lisp b/src/interp/debug.lisp
index 8eeef9b1..125f352e 100644
--- a/src/interp/debug.lisp
+++ b/src/interp/debug.lisp
@@ -1,6 +1,6 @@
;; Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
;; All rights reserved.
-;; Copyright (C) 2007, Gabriel Dos Reis.
+;; Copyright (C) 2007-2008, Gabriel Dos Reis.
;; All rights reserved.
;;
;; Redistribution and use in source and binary forms, with or without
diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot
index ca50a4e5..272ad517 100644
--- a/src/interp/g-util.boot
+++ b/src/interp/g-util.boot
@@ -514,6 +514,7 @@ str2Tex s ==
val := objValUnwrap val
CAR val.1
+opOf: %Thing -> %Thing
opOf x ==
atom x => x
first x
diff --git a/src/interp/i-coerce.boot b/src/interp/i-coerce.boot
index 273dcb15..c5794562 100644
--- a/src/interp/i-coerce.boot
+++ b/src/interp/i-coerce.boot
@@ -753,7 +753,10 @@ coerceInteractive(triple,t2) ==
-- JHD added category Aug 1996 for BasicMath
t1 in $LangSupportTypes =>
t2 = $OutputForm => objNew(val,t2)
- NIL
+ t1 = $Domain and conceptualType t2 = $Category
+ and ofCategory(val,t2)=> objNew(val,t2)
+ conceptualType t1 = t2 => objNew(val,t2)
+ nil
t1 = '$NoValueMode =>
if $compilingMap then clearDependentMaps($mapName,nil)
throwKeyedMsg("S2IC0009",[t2,$mapName])
diff --git a/src/interp/i-output.boot b/src/interp/i-output.boot
index ce11e725..c3d46723 100644
--- a/src/interp/i-output.boot
+++ b/src/interp/i-output.boot
@@ -383,11 +383,11 @@ outputTran x ==
op is ["$elt",targ,fun] or not $InteractiveMode and op is ["elt",targ,fun] =>
-- l has the args
targ' := obj2String prefix2String targ
- if 2 = #targ then targ' := ['PAREN,targ']
+ if 2 = SIZE targ then targ' := ['PAREN,targ']
['CONCAT,outputTran [fun,:l],'"$",targ']
x is ["$elt",targ,c] or not $InteractiveMode and x is ["elt",targ,c] =>
targ' := obj2String prefix2String targ
- if 2 = #targ then targ' := ['PAREN,targ']
+ if 2 = SIZE targ then targ' := ['PAREN,targ']
['CONCAT,outputTran c,'"$",targ']
x is ["-",a,b] =>
a := outputTran a
@@ -1405,9 +1405,6 @@ output(expr,domain) ==
SPADCALL(SPADCALL textwrit, expr, printfun)
sayMSGNT '%l
- -- big hack for tuples for new compiler
- domain is ['Tuple, S] => output(asTupleAsList expr, ['List, S])
-
sayALGEBRA [:bright '"LISP",'"output:",'%l,expr or '"NIL"]
outputNumber(start,linelength,num) ==
diff --git a/src/interp/i-spec1.boot b/src/interp/i-spec1.boot
index 2cbd7722..f8408fa9 100644
--- a/src/interp/i-spec1.boot
+++ b/src/interp/i-spec1.boot
@@ -1212,8 +1212,8 @@ isDomainValuedVariable form ==
get(form,'value,$InteractiveFrame) or _
(PAIRP($env) and get(form,'value,$env)) or _
(PAIRP($e) and get(form,'value,$e)))) and
- objMode(val) in '((Domain) (Category) (Type)) =>
- -- ??? shall we accept all of $LangSupportTypes?
+ ((m := objMode(val)) in '((Domain) (Category))
+ or conceptualType m = $Category) =>
objValUnwrap(val)
nil
diff --git a/src/interp/lisplib.boot b/src/interp/lisplib.boot
index 5c75ede6..f111df8f 100644
--- a/src/interp/lisplib.boot
+++ b/src/interp/lisplib.boot
@@ -34,6 +34,7 @@
import '"nlib"
import '"c-util"
+import '"debug"
)package "BOOT"
++
@@ -384,7 +385,7 @@ getLisplibVersion libName ==
initializeLisplib libName ==
_$ERASE(libName,'ERRORLIB,$libraryDirectory)
- SETQ(ERRORS,0) -- ERRORS is a fluid variable for the compiler
+ resetErrorCount()
$libFile:= writeLib1(libName,'ERRORLIB,$libraryDirectory)
ADDOPTIONS('FILE,$libFile)
$lisplibForm := nil --defining form for lisplib
@@ -436,7 +437,7 @@ finalizeLisplib libName ==
if $profileCompiler then profileWrite()
if $lisplibForm and null CDR $lisplibForm then
MAKEPROP(CAR $lisplibForm,'NILADIC,'T)
- ERRORS ^=0 => -- ERRORS is a fluid variable for the compiler
+ errorCount() ^=0 =>
sayMSG ['" Errors in processing ",kind,'" ",:bright libName,'":"]
sayMSG ['" not replacing ",$spadLibFT,'" for",:bright libName]
diff --git a/src/interp/monitor.lisp b/src/interp/monitor.lisp
index 6fa26c98..c6f5c35b 100644
--- a/src/interp/monitor.lisp
+++ b/src/interp/monitor.lisp
@@ -1,6 +1,6 @@
;; Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
;; All rights reserved.
-;; Copyright (C) 2007, Gabriel Dos Reis.
+;; Copyright (C) 2007-2008, Gabriel Dos Reis.
;; All rights reserved.
;;
;; Redistribution and use in source and binary forms, with or without
@@ -186,7 +186,7 @@
(eval `(trace (,name :cond (progn (monitor-incr ',name) nil))))
(setf (gethash name *monitor-table*)
(make-monitor-data
- :name name :count 0 :monitorp t :sourcefile sourcefile)))))
+ :name name :count 0 :monitorp t :sourcefile sourcefile)))
(defun monitor-delete (fn)
"delete a function from the monitor table"
diff --git a/src/interp/msg.boot b/src/interp/msg.boot
index dbfb81b0..0befa79c 100644
--- a/src/interp/msg.boot
+++ b/src/interp/msg.boot
@@ -1,6 +1,6 @@
-- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-- All rights reserved.
--- Copyright (C) 2007, Gabriel Dos Reis.
+-- Copyright (C) 2007-2008, Gabriel Dos Reis.
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
@@ -494,7 +494,7 @@ setMsgUnforcedAttr(msg,cat,attr) ==
not QASSQ(cat, ncAlist msg) => ncPutQ(msg,cat,attr)
setMsgCatlessAttr(msg,attr) ==
- ncPutQ(msg,'catless,CONS (attr, IFCDR QASSQ(catless, ncAlist msg)))
+ ncPutQ(msg,'catless,CONS (attr, IFCDR QASSQ("catless", ncAlist msg)))
whichCat attr ==
found := 'catless
diff --git a/src/interp/vmlisp.lisp b/src/interp/vmlisp.lisp
index 4be165ea..889b3c58 100644
--- a/src/interp/vmlisp.lisp
+++ b/src/interp/vmlisp.lisp
@@ -265,13 +265,6 @@
(defmacro nump (n)
`(numberp ,n))
-(defmacro |opOf| (x) ;(if (atom x) x (qcar x))
- (if (atom x)
- `(if (consp ,x) (qcar ,x) ,x)
- (let ((xx (gensym)))
- `(let ((,xx ,x))
- (if (consp ,xx) (qcar ,xx) ,xx)))))
-
(defmacro oraddtempdefs (filearg)
`(eval-when
#+:common-lisp (:compile-toplevel)