axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] [build-improvements] Char and DFlo types


From: Gabriel Dos Reis
Subject: [Axiom-developer] [build-improvements] Char and DFlo types
Date: 12 May 2007 11:15:00 -0500

Hi,

  The attached patch make depsys buildable with CLISP.

string-char is a cltl1 ttype, it is not part of ANSI Lisp.
In ANSI Lisp, we have the "character" type, which is further
divided into the subtypes "base-char" and "extended-char".
Here, I've replaced "string-char" with the general "character"
types.

I have already raised the issue about the use of long-float as the
underlying type of DFlo.  I believe that is wrong, from portability
point of view, and that the underlying type should be double-float.
However, this patch just changes 0.0d0 (which is of type double-float)
to 0.0l0 (of type long-float) to match the existing underlying type
of DFlo.  We should revisit the definition of DFlo and Float
in separate thread.

compiler-let is a cltl thingy.  It is not ANSI Lisp.  We should
try to avoid it where we can.  This patch just import the symbol 
from EXT when using CLISP and base Lisp runtime.


build and tested on an i686-pc-linux-gnu.
Applied to build-improvements.

-- Gaby



2007-05-12  Gabriel Dos Reis  <address@hidden>

        * bootfuns.lisp.pamphlet: Work around non-portable codes.
        * foam_l.lisp.pamphlet: Replace type "string-char" with type
        "character".
        Replace "0.0d0" with "0.0l0" because DFlo is actually long-float,
        not double-float.


*** README.build-improvements   (revision 20987)
--- README.build-improvements   (local)
*************** Gabriel Dos Reis
*** 71,76 ****
--- 71,79 ----
  === TODO ===
  ============
  
+ * Revisit the underlying definition of the types DFlo in foam
+   interface, and Float in Axiom.
+ 
  * Audit all codes that manipulate sockets.
  
  * Automate the process of "optimized" Axiom: this requires a two-pass
*************** Gabriel Dos Reis
*** 159,164 ****
--- 162,174 ----
  * Build on Windows platforms, more specifically MSYS/MinGW, is
    supported.
  
+ * Components known to build with various Lisp implementations:
+    + bootsys: GCL, SBCL, CLISP
+    + depsys: GCL, CLISP
+    + interpsys: GCL
+    + AXIOMsys: GCL
+ 
+ 
  ================================================
  === New Boot vs. Old Boot compatibility notes ==
  ================================================

*** src/interp/bootfuns.lisp.pamphlet   (revision 20987)
--- src/interp/bootfuns.lisp.pamphlet   (local)
***************
*** 1,16 ****
  \documentclass{article}
  \usepackage{axiom}
! \begin{document}
! \title{\$SPAD/src/interp bootfuns.lisp}
  \author{Timothy Daly}
  \maketitle
  \begin{abstract}
  \end{abstract}
  \eject
  \tableofcontents
  \eject
  \section{Constants}
  \subsection{\$EmptyMode}
  [[$EmptyMode]] is a contant whose value is [[$EmptyMode]].
  It is used by [[isPartialMode]] (in [[i-funsel.boot]]) to
  decide if a modemap is partially constructed. If the [[$EmptyMode]]
--- 1,23 ----
+ %% Oh Emacs, this is a -*- Lisp -*- file despite apperance.
  \documentclass{article}
  \usepackage{axiom}
! 
! \title{\File{src/interp/bootfuns.lisp} Pamphlet}
  \author{Timothy Daly}
+ 
+ \begin{document}
  \maketitle
  \begin{abstract}
  \end{abstract}
  \eject
  \tableofcontents
  \eject
+ 
+ 
  \section{Constants}
+ 
  \subsection{\$EmptyMode}
+ 
  [[$EmptyMode]] is a contant whose value is [[$EmptyMode]].
  It is used by [[isPartialMode]] (in [[i-funsel.boot]]) to
  decide if a modemap is partially constructed. If the [[$EmptyMode]]
*************** which will walk the structure $Y$ lookin
*** 22,27 ****
--- 29,51 ----
  (def-boot-val |$EmptyMode| '|$EmptyMode|    "compiler constant")
  @
  
+ 
+ \section{Portability issues}
+ 
+ This section discusses some portability issues known to affect
+ this module.
+ 
+ \subsection{[[compiler-let]]}
+ 
+ The construct [[compiler-let]] is not part of ANSI Lisp, although
+ it had been described in CLTL.  Therefore some Lisp implementations
+ offer it as extensions.
+ 
+ <<non-portable-codes>>=
+ #+:clisp (import 'ext:compiler-let)
+ @
+ 
+ 
  \section{License}
  <<license>>=
  ;; Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
*************** which will walk the structure $Y$ lookin
*** 66,71 ****
--- 90,97 ----
  
  (in-package "BOOT")
  
+ <<non-portable-codes>>
+ 
  (defmacro def-boot-fun (f args where)
    `(compiler-let nil
       (defun ,f ,args ,where (print (list ',f . ,args)))
*** src/interp/foam_l.lisp.pamphlet     (revision 20987)
--- src/interp/foam_l.lisp.pamphlet     (local)
***************
*** 168,174 ****
  
  
  ;; type defs for Foam types
! (deftype |Char| () 'string-char)
  (deftype |Clos| () 'list)
  (deftype |Bool| () '(member t nil))
  (deftype |Byte| () 'unsigned-byte)
--- 168,174 ----
  
  
  ;; type defs for Foam types
! (deftype |Char| () 'character)
  (deftype |Clos| () 'list)
  (deftype |Bool| () '(member t nil))
  (deftype |Byte| () 'unsigned-byte)
***************
*** 206,212 ****
  (defconstant |SIntInit| (the |SInt| 0))
  (defconstant |BIntInit| (the |BInt|  0))
  (defconstant |SFloInit| (the |SFlo| 0.0s0))
! (defconstant |DFloInit| (the |DFlo| 0.0d0))
  (defconstant |PtrInit|  (the |Ptr|  nil))
  (defconstant |ArrInit|  (the |Arr|  nil))
  (defconstant |RecordInit|  (the |Record|  nil))
--- 206,213 ----
  (defconstant |SIntInit| (the |SInt| 0))
  (defconstant |BIntInit| (the |BInt|  0))
  (defconstant |SFloInit| (the |SFlo| 0.0s0))
! ;; FIXME: Revisit the definition of DFlo as long-double.
! (defconstant |DFloInit| (the |DFlo| 0.0l0))
  (defconstant |PtrInit|  (the |Ptr|  nil))
  (defconstant |ArrInit|  (the |Arr|  nil))
  (defconstant |RecordInit|  (the |Record|  nil))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]