aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rwxr-xr-xconfigure90
-rw-r--r--configure.ac26
-rw-r--r--configure.ac.pamphlet38
-rw-r--r--src/ChangeLog36
-rw-r--r--src/algebra/Makefile.in2
-rw-r--r--src/algebra/Makefile.pamphlet2
-rw-r--r--src/algebra/exposed.lsp.pamphlet9
-rw-r--r--src/boot/ast.boot14
-rw-r--r--src/boot/parser.boot5
-rw-r--r--src/boot/translator.boot8
-rw-r--r--src/interp/Makefile.in14
-rw-r--r--src/interp/Makefile.pamphlet18
-rw-r--r--src/interp/axext_l.lisp42
-rw-r--r--src/interp/boot-pkg.lisp5
-rw-r--r--src/interp/c-util.boot1
-rw-r--r--src/interp/daase.lisp3
-rw-r--r--src/interp/g-util.boot12
-rw-r--r--src/interp/patches.lisp2
-rw-r--r--src/interp/sys-globals.boot4
-rw-r--r--src/interp/sys-utility.boot10
-rw-r--r--src/interp/template.boot2
-rw-r--r--src/interp/vmlisp.lisp2
-rw-r--r--src/interp/wi1.boot7
-rw-r--r--src/interp/wi2.boot3
-rw-r--r--src/lisp/Makefile.in17
-rw-r--r--src/lisp/core.lisp.in11
27 files changed, 297 insertions, 90 deletions
diff --git a/ChangeLog b/ChangeLog
index 74a7f77d..9f9d592b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2008-03-16 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * configure.ac.pamphlet: Compute native type translation table.
+
+2008-03-16 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* configure.ac.pamphlet: Tell Libtool to assume `dlopen'.
* config/var-def.mk (DLLEXT): New.
diff --git a/configure b/configure
index ece8ff69..579f18bf 100755
--- a/configure
+++ b/configure
@@ -867,6 +867,13 @@ CCF
LDF
LISP
GCLOPTS
+void_type
+char_type
+int_type
+float_type
+double_type
+string_type
+pointer_type
LIBOBJS
LTLIBOBJS'
ac_subst_files=''
@@ -3776,7 +3783,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 3779 "configure"' > conftest.$ac_ext
+ echo '#line 3786 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -6631,11 +6638,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6634: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6641: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6638: \$? = $ac_status" >&5
+ echo "$as_me:6645: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -6899,11 +6906,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6902: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6909: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6906: \$? = $ac_status" >&5
+ echo "$as_me:6913: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7003,11 +7010,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7006: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7013: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:7010: \$? = $ac_status" >&5
+ echo "$as_me:7017: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -9455,7 +9462,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9458 "configure"
+#line 9465 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -9555,7 +9562,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9558 "configure"
+#line 9565 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11923,11 +11930,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11926: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11933: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:11930: \$? = $ac_status" >&5
+ echo "$as_me:11937: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -12027,11 +12034,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12030: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12037: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:12034: \$? = $ac_status" >&5
+ echo "$as_me:12041: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -13597,11 +13604,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13600: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13607: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13604: \$? = $ac_status" >&5
+ echo "$as_me:13611: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -13701,11 +13708,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13704: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13711: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13708: \$? = $ac_status" >&5
+ echo "$as_me:13715: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -15931,11 +15938,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15934: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15941: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15938: \$? = $ac_status" >&5
+ echo "$as_me:15945: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16199,11 +16206,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16202: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16209: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16206: \$? = $ac_status" >&5
+ echo "$as_me:16213: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16303,11 +16310,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16306: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16313: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16310: \$? = $ac_status" >&5
+ echo "$as_me:16317: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -24818,6 +24825,34 @@ GCLOPTS="$axiom_gcl_emacs $axiom_gcl_bfd_option $axiom_gcl_mm_option $axiom_gcl_
+void_type='void'
+char_type='char'
+int_type='int'
+float_type='float'
+double_type='double'
+string_type='string'
+pointer_type='object'
+case $axiom_lisp_flavor in
+ gcl)
+ ;;
+ sbcl)
+ string_type='c-string'
+ pointer_type='system-area-pointer'
+ ;;
+ *)
+ { { echo "$as_me:$LINENO: error: We do not know how to translate native types for this Lisp" >&5
+echo "$as_me: error: We do not know how to translate native types for this Lisp" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+esac
+
+
+
+
+
+
+
+
ac_config_files="$ac_config_files Makefile:config/var-def.mk:Makefile.in:config/setup-dep.mk"
ac_config_files="$ac_config_files src/Makefile:config/var-def.mk:src/Makefile.in:config/setup-dep.mk"
@@ -25628,11 +25663,18 @@ CCF!$CCF$ac_delim
LDF!$LDF$ac_delim
LISP!$LISP$ac_delim
GCLOPTS!$GCLOPTS$ac_delim
+void_type!$void_type$ac_delim
+char_type!$char_type$ac_delim
+int_type!$int_type$ac_delim
+float_type!$float_type$ac_delim
+double_type!$double_type$ac_delim
+string_type!$string_type$ac_delim
+pointer_type!$pointer_type$ac_delim
LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 18; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 25; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
diff --git a/configure.ac b/configure.ac
index 6016198d..98dd46d9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -510,6 +510,32 @@ AC_SUBST(CCF)
AC_SUBST(LDF)
AC_SUBST(LISP)
AC_SUBST(GCLOPTS)
+void_type='void'
+char_type='char'
+int_type='int'
+float_type='float'
+double_type='double'
+string_type='string'
+pointer_type='object'
+case $axiom_lisp_flavor in
+ gcl)
+ ;;
+ sbcl)
+ string_type='c-string'
+ pointer_type='system-area-pointer'
+ ;;
+ *)
+ AC_MSG_ERROR([We do not know how to translate native types for this Lisp])
+ ;;
+esac
+AC_SUBST(void_type)
+AC_SUBST(char_type)
+AC_SUBST(int_type)
+AC_SUBST(float_type)
+AC_SUBST(double_type)
+AC_SUBST(string_type)
+AC_SUBST(pointer_type)
+
AXIOM_MAKEFILE([Makefile])
AXIOM_MAKEFILE([src/Makefile])
AXIOM_MAKEFILE([src/lib/Makefile])
diff --git a/configure.ac.pamphlet b/configure.ac.pamphlet
index 282c9383..d0498d1c 100644
--- a/configure.ac.pamphlet
+++ b/configure.ac.pamphlet
@@ -950,6 +950,43 @@ fi
AC_SUBST(axiom_fasl_type)
@
+\paragraph{Native data types}
+OpenAxiom needs to communicate to the hosting operation systems
+through a set of C interface. Consequently we need an automated
+translation mechanism that shields Boot code from the variability
+of Lisp systems for so-called `foreign function interface'. Here,
+we compute a translation table for supported Lisp systems. This table
+is used by the Boot translator for generating codes for import of
+native routines.
+<<nativeTypeTable>>=
+void_type='void'
+char_type='char'
+int_type='int'
+float_type='float'
+double_type='double'
+string_type='string'
+pointer_type='object'
+case $axiom_lisp_flavor in
+ gcl)
+ ;;
+ sbcl)
+ string_type='c-string'
+ pointer_type='system-area-pointer'
+ ;;
+ *)
+ AC_MSG_ERROR([We do not know how to translate native types for this Lisp])
+ ;;
+esac
+AC_SUBST(void_type)
+AC_SUBST(char_type)
+AC_SUBST(int_type)
+AC_SUBST(float_type)
+AC_SUBST(double_type)
+AC_SUBST(string_type)
+AC_SUBST(pointer_type)
+
+@
+
\section{Configuration options}
\label{sec:config-options}
@@ -1201,6 +1238,7 @@ AC_SUBST(axiom_c_runtime)
<<C headers and libraries>>
<<platform specific bits>>
+<<nativeTypeTable>>
<<instantiate config files>>
echo "Type '${MAKE}' (without quotes) to build OpenAxiom"
@
diff --git a/src/ChangeLog b/src/ChangeLog
index 4fd3989d..32510f10 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,41 @@
2008-03-16 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * lisp/Makefile.in (void_type): New.
+ (char_type): Likewise.
+ (int_type): Likewise.
+ (float_type): Likewise.
+ (double_type): Likewise.
+ (string_type): Likewise.
+ (pointer_type): Likewise.
+ (edit): Use them.
+ * interp/wi1.boot (ppFull): Tidy. Don't set *PRINT-DEPTH*.
+ * interp/vmlisp.lisp (gcmsg): Define when SBCL.
+ * interp/template.boot (measureCommon): Fix thinko.
+ * interp/sys-utility.boot: Move basic type definition from
+ g-util.boot to here.
+ * interp/g-util.boot (augProplistOf): Fix signature declaration.
+ * interp/daase.lisp: Tidy.
+ * interp/c-util.boot (displayComp): Remove assignment to
+ $X,$M,$F.
+ * interp/boot-pkg.lisp: Tidy.
+ * interp/axext_l.lisp: Likewise.
+ * interp/Makefile.pamphlet (makeint.lisp): Call GBC only when GCL.
+ ($(axiom_targetdir)/algebra/exposed.$(FASLEXT)): Tidy.
+ (patches.$(FASLEXT)): Require debug.$(FASLEXT), g-timer.$(FASLEXT).
+ (wi2.$(FASLEXT)): Require define.$(FASLEXT).
+ (spad.$(FASLEXT)): Require postpar.$(FASLEXT), debug.$(FASLEXT).
+ * boot/translator.boot (genImportDeclaration): Include translation
+ for SBCL.
+ * boot/parser.boot (bpMapping): Tidy.
+ * boot/ast.boot (coreSymbol): New.
+ (bootSymbol): Likewise.
+ (bootSymbol): Likewise.
+ * lisp/core.lisp.in (|$NativeTypeTable|): New. Export.
+ * algebra/Makefile.pamphlet (COMPILE_LISP): Use $(INTERPSYS).
+ * algebra/exposed.lsp.pamphlet: Tidy.
+
+2008-03-16 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* lib/Makefile.in ($(axiom_target_libdir)/libopen-axiom-core.$(DLLEXT)): Tidy.
($(axiom_target_libdir)/libspad.la): Likewise.
diff --git a/src/algebra/Makefile.in b/src/algebra/Makefile.in
index e0c99be5..dc5e3d24 100644
--- a/src/algebra/Makefile.in
+++ b/src/algebra/Makefile.in
@@ -10,7 +10,7 @@ EXTRACT_BOOTSTRAP_FILE = \
## We use interpsys, built from previous stage, to bootstrap the algebra
## files. In fact, we use interpsys to build everything.
-COMPILE_LISP = ../interp/interpsys$(EXEEXT) -- --compile --output=$@ $<
+COMPILE_LISP = $(INTERPSYS) --compile --output=$@ $<
INTERPSYS = ../interp/interpsys$(EXEEXT) -- --system="$(AXIOM)" \
diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet
index ff59f5a5..835df3b3 100644
--- a/src/algebra/Makefile.pamphlet
+++ b/src/algebra/Makefile.pamphlet
@@ -1328,7 +1328,7 @@ EXTRACT_BOOTSTRAP_FILE = \
<<environment>>=
## We use interpsys, built from previous stage, to bootstrap the algebra
## files. In fact, we use interpsys to build everything.
-COMPILE_LISP = ../interp/interpsys$(EXEEXT) -- --compile --output=$@ $<
+COMPILE_LISP = $(INTERPSYS) --compile --output=$@ $<
@
diff --git a/src/algebra/exposed.lsp.pamphlet b/src/algebra/exposed.lsp.pamphlet
index cc4000bc..3c12b66c 100644
--- a/src/algebra/exposed.lsp.pamphlet
+++ b/src/algebra/exposed.lsp.pamphlet
@@ -45,8 +45,9 @@
<<*>>=
<<license>>
-(in-package 'BOOT)
-(setq |$globalExposureGroupAlist|
+(import-module "boot-pkg")
+(in-package "BOOT")
+(defparameter |$globalExposureGroupAlist|
'(
;;define the groups |basic| |naglink| |anna| |categories| |Hidden| |defaults|
(|basic|
@@ -1246,7 +1247,7 @@
(|VectorCategory&| . VECTCAT-)
(|VectorSpace&| . VSPACE-)))
)
-(setq |$localExposureDataDefault| (VECTOR
+(defparameter |$localExposureDataDefault| (VECTOR
(LIST
;;These groups will be exposed
'|basic|
@@ -1261,7 +1262,7 @@
;;These constructors will be explicitly hidden
)
))
-(setq |$localExposureData| (copy-seq |$localExposureDataDefault|))
+(defparameter |$localExposureData| (copy-seq |$localExposureDataDefault|))
@
\eject
\begin{thebibliography}{99}
diff --git a/src/boot/ast.boot b/src/boot/ast.boot
index 210d5b2e..112236b6 100644
--- a/src/boot/ast.boot
+++ b/src/boot/ast.boot
@@ -1157,3 +1157,17 @@ bfThrow e ==
atom e => ["THROW",["QUOTE",e],nil]
not atom first e => bpTrap()
["THROW",["QUOTE",first e],:rest e]
+
+--% Native datatype translation
+coreSymbol: %Symbol -> %Symbol
+coreSymbol s ==
+ INTERN(SYMBOL_-NAME s, "AxiomCore")
+
+bootSymbol: %Symbol -> %Symbol
+bootSymbol s ==
+ INTERN SYMBOL_-NAME s
+
+nativeType t ==
+ null t => t
+ t' := ASSOC(coreSymbol t,$NativeTypeTable) => bootSymbol rest t'
+ fatalError CONCAT('"unsupported native type: ", SYMBOL_-NAME t)
diff --git a/src/boot/parser.boot b/src/boot/parser.boot
index 5cc2d856..10970e82 100644
--- a/src/boot/parser.boot
+++ b/src/boot/parser.boot
@@ -458,8 +458,9 @@ bpSignature() ==
++ Mapping:
++ (Name | IdList) -> Name
bpMapping() ==
- (bpName() or bpIdList()) and bpEqKey "ARROW" and bpName()
- and bpPush Mapping(bpPop1(), bpPop1())
+ (bpName() or bpParenthesized function bpIdList) and
+ bpEqKey "ARROW" and bpName() and
+ bpPush Mapping(bpPop1(), bfUntuple bpPop1())
bpCancel()==
a:=bpState()
diff --git a/src/boot/translator.boot b/src/boot/translator.boot
index 801848b8..5388c6c5 100644
--- a/src/boot/translator.boot
+++ b/src/boot/translator.boot
@@ -321,9 +321,15 @@ shoeAddComment l== CONCAT('"; ",CAR l)
genImportDeclaration(op, sig) ==
sig isnt ["Signature", op', m] => coreError '"invalid signature"
m isnt ["Mapping", t, s] => coreError '"invalid function type"
+ if not null s and SYMBOLP s then s := [s]
%hasFeature KEYWORD::GCL =>
- if SYMBOLP s then s := [s]
["DEFENTRY", op, s, [t, SYMBOL_-NAME op']]
+ %hasFeature KEYWORD::SBCL =>
+ args := [GENSYM() for x in s]
+ ["DEFUN",op,args,
+ [INTERN('"ALIEN-FUNCALL",'"SB-ALIEN"),
+ [INTERN('"EXTERN-ALIEN",'"SB-ALIEN"),SYMBOL_-NAME op',
+ ["FUNCTION",nativeType t,:[nativeType x for x in s]]], :args]]
fatalError '"import declaration not implemented for this Lisp"
shoeOutParse stream ==
diff --git a/src/interp/Makefile.in b/src/interp/Makefile.in
index 7eea5527..26fd1f92 100644
--- a/src/interp/Makefile.in
+++ b/src/interp/Makefile.in
@@ -209,7 +209,7 @@ makeint.lisp: ${OBJS} util.$(FASLEXT) \
@ echo '(|importModule| "sys-driver")' >> makeint.lisp
@ echo '(|importModule| "vmlisp")' >> makeint.lisp
@ echo '(|importModule| "hash")' >> makeint.lisp
- @ echo '(gbc t)' >> makeint.lisp
+ @ echo '#+:GCL (gbc t)' >> makeint.lisp
@ echo '(|importModule| "util")' >> makeint.lisp
@ echo '(in-package "BOOT")' >> makeint.lisp
@ touch ${TIMESTAMP}
@@ -222,7 +222,7 @@ makeint.lisp: ${OBJS} util.$(FASLEXT) \
@ echo '(load "obey")' >> makeint.lisp
@ echo '#+:akcl (setq compiler::*suppress-compiler-notes* t)' >> makeint.lisp
@ echo '#+:akcl (si::gbc-time 0)' >> makeint.lisp
- @ echo '(gbc t)' >> makeint.lisp
+ @ echo '#+:GCL (gbc t)' >> makeint.lisp
${SAVESYS}: makeint.lisp
$(LOADSYS) -- --system="$(AXIOM)/" \
@@ -249,7 +249,7 @@ exposed.lsp: $(axiom_src_algdir)/exposed.lsp.pamphlet
$(axiom_targetdir)/algebra/exposed.$(FASLEXT) : exposed.lsp ${LISPSYS}
@ echo 616 making $@ from exposed.lsp
$(mkinstalldirs) $(axiom_targetdir)/algebra
- @ echo '(progn (compile-file "exposed.lsp" :output-file "$(axiom_targetdir)/algebra/exposed.$(FASLEXT)"))' | ${LISPSYS}
+ $(BOOTSYS) -- --compile --output=$@ --load-directory=. $<
database.date:
@ echo 617 the database was updated...remaking interpsys
@@ -326,7 +326,8 @@ hypertex.$(FASLEXT): hypertex.boot boot-pkg.$(FASLEXT)
## OpenAxiom's interpreter.
-patches.$(FASLEXT): patches.lisp macros.$(FASLEXT)
+patches.$(FASLEXT): patches.lisp macros.$(FASLEXT) sockio.$(FASLEXT) \
+ g-timer.$(FASLEXT)
$(BOOTSYS) -- --compile --output=$@ --load-directory=. $<
setvars.$(FASLEXT): setvars.boot macros.$(FASLEXT) debug.$(FASLEXT)
@@ -406,7 +407,7 @@ setvart.$(FASLEXT): setvart.boot macros.$(FASLEXT)
$(BOOTSYS) -- --compile --boot="old" --output=$@ --load-directory=. $<
## OpenAxiom's compiler
-wi2.$(FASLEXT): wi2.boot macros.$(FASLEXT)
+wi2.$(FASLEXT): wi2.boot macros.$(FASLEXT) define.$(FASLEXT)
$(BOOTSYS) -- --compile --output=$@ --load-directory=. $<
wi1.$(FASLEXT): wi1.boot macros.$(FASLEXT)
@@ -624,7 +625,8 @@ spaderror.$(FASLEXT): spaderror.lisp macros.$(FASLEXT)
debug.$(FASLEXT): debug.lisp macros.$(FASLEXT) parsing.$(FASLEXT)
$(BOOTSYS) -- --compile --output=$@ --load-directory=. $<
-spad.$(FASLEXT): spad.lisp bootlex.$(FASLEXT)
+spad.$(FASLEXT): spad.lisp bootlex.$(FASLEXT) postpar.$(FASLEXT) \
+ debug.$(FASLEXT)
$(BOOTSYS) -- --compile --output=$@ --load-directory=. $<
monitor.$(FASLEXT): monitor.lisp macros.$(FASLEXT)
diff --git a/src/interp/Makefile.pamphlet b/src/interp/Makefile.pamphlet
index ef951a9e..93b32464 100644
--- a/src/interp/Makefile.pamphlet
+++ b/src/interp/Makefile.pamphlet
@@ -361,8 +361,8 @@ be in the lisp image thus minimizing their startup time.
@
<<warm.data>>=
-(in-package 'boot)
-(setq |$topicHash| (make-hash-table))
+(in-package "BOOT")
+(defparameter |$topicHash| (make-hash-table))
(setf (gethash '|basic| |$topicHash|) 2)
(setf (gethash '|algebraic| |$topicHash|) 4)
(setf (gethash '|miscellaneous| |$topicHash|) 13)
@@ -426,7 +426,7 @@ makeint.lisp: ${OBJS} util.$(FASLEXT) \
@ echo '(|importModule| "sys-driver")' >> makeint.lisp
@ echo '(|importModule| "vmlisp")' >> makeint.lisp
@ echo '(|importModule| "hash")' >> makeint.lisp
- @ echo '(gbc t)' >> makeint.lisp
+ @ echo '#+:GCL (gbc t)' >> makeint.lisp
@ echo '(|importModule| "util")' >> makeint.lisp
@ echo '(in-package "BOOT")' >> makeint.lisp
@ touch ${TIMESTAMP}
@@ -439,7 +439,7 @@ makeint.lisp: ${OBJS} util.$(FASLEXT) \
@ echo '(load "obey")' >> makeint.lisp
@ echo '#+:akcl (setq compiler::*suppress-compiler-notes* t)' >> makeint.lisp
@ echo '#+:akcl (si::gbc-time 0)' >> makeint.lisp
- @ echo '(gbc t)' >> makeint.lisp
+ @ echo '#+:GCL (gbc t)' >> makeint.lisp
${SAVESYS}: makeint.lisp
$(LOADSYS) -- --system="$(AXIOM)/" \
@@ -514,7 +514,7 @@ exposed.lsp: $(axiom_src_algdir)/exposed.lsp.pamphlet
$(axiom_targetdir)/algebra/exposed.$(FASLEXT) : exposed.lsp ${LISPSYS}
@ echo 616 making $@ from exposed.lsp
$(mkinstalldirs) $(axiom_targetdir)/algebra
- @ echo '(progn (compile-file "exposed.lsp" :output-file "$(axiom_targetdir)/algebra/exposed.$(FASLEXT)"))' | ${LISPSYS}
+ $(BOOTSYS) -- --compile --output=$@ --load-directory=. $<
database.date:
@ echo 617 the database was updated...remaking interpsys
@@ -640,7 +640,8 @@ hypertex.$(FASLEXT): hypertex.boot boot-pkg.$(FASLEXT)
## OpenAxiom's interpreter.
-patches.$(FASLEXT): patches.lisp macros.$(FASLEXT)
+patches.$(FASLEXT): patches.lisp macros.$(FASLEXT) sockio.$(FASLEXT) \
+ g-timer.$(FASLEXT)
$(BOOTSYS) -- --compile --output=$@ --load-directory=. $<
setvars.$(FASLEXT): setvars.boot macros.$(FASLEXT) debug.$(FASLEXT)
@@ -720,7 +721,7 @@ setvart.$(FASLEXT): setvart.boot macros.$(FASLEXT)
$(BOOTSYS) -- --compile --boot="old" --output=$@ --load-directory=. $<
## OpenAxiom's compiler
-wi2.$(FASLEXT): wi2.boot macros.$(FASLEXT)
+wi2.$(FASLEXT): wi2.boot macros.$(FASLEXT) define.$(FASLEXT)
$(BOOTSYS) -- --compile --output=$@ --load-directory=. $<
wi1.$(FASLEXT): wi1.boot macros.$(FASLEXT)
@@ -938,7 +939,8 @@ spaderror.$(FASLEXT): spaderror.lisp macros.$(FASLEXT)
debug.$(FASLEXT): debug.lisp macros.$(FASLEXT) parsing.$(FASLEXT)
$(BOOTSYS) -- --compile --output=$@ --load-directory=. $<
-spad.$(FASLEXT): spad.lisp bootlex.$(FASLEXT)
+spad.$(FASLEXT): spad.lisp bootlex.$(FASLEXT) postpar.$(FASLEXT) \
+ debug.$(FASLEXT)
$(BOOTSYS) -- --compile --output=$@ --load-directory=. $<
monitor.$(FASLEXT): monitor.lisp macros.$(FASLEXT)
diff --git a/src/interp/axext_l.lisp b/src/interp/axext_l.lisp
index a37d2c6e..ad3d5088 100644
--- a/src/interp/axext_l.lisp
+++ b/src/interp/axext_l.lisp
@@ -1,6 +1,6 @@
-;; Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
+;; 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
@@ -15,7 +15,7 @@
;; the documentation and/or other materials provided with the
;; distribution.
;;
-;; - Neither the name of The Numerical ALgorithms Group Ltd. nor the
+;; - Neither the name of The Numerical Algorithms Group Ltd. nor the
;; names of its contributors may be used to endorse or promote products
;; derived from this software without specific prior written permission.
;;
@@ -38,26 +38,13 @@
(import-module "foam_l")
(in-package "FOAM-USER")
-;; tacky but means we can run programs
-
-(defun H-integer (l e)
- (|AXL-LiteralToInteger| l))
-
-(defun H-string (l e)
- (|AXL-LiteralToString| l))
-
-(defun H-error (l e)
- (|AXL-error| l))
-
-(eval-when (load eval)
- (defconstant |G-axclique_string_305639517| (cons #'H-String nil))
- (defconstant |G-axclique_integer_685864888| (cons #'H-integer nil))
- (defconstant |G-axclique_error_011667951| (cons #'H-error nil)))
-
;; Literals should be null-terminated strings
;; SingleInteger
+(eval-when (:compile-toplevel :load-toplevel :execute)
+ (progn
+
(defmacro |AXL-LiteralToSingleInteger| (l)
`(parse-integer ,l :junk-allowed t))
@@ -196,6 +183,23 @@
;; Vectors
+;; tacky but means we can run programs
+
+(defun H-integer (l e)
+ (|AXL-LiteralToInteger| l))
+
+(defun H-string (l e)
+ (|AXL-LiteralToString| l))
+
+(defun H-error (l e)
+ (|AXL-error| l))
+
+))
+
+(eval-when (load eval)
+ (defconstant |G-axclique_string_305639517| (cons #'H-String nil))
+ (defconstant |G-axclique_integer_685864888| (cons #'H-integer nil))
+ (defconstant |G-axclique_error_011667951| (cons #'H-error nil)))
;; Testing
diff --git a/src/interp/boot-pkg.lisp b/src/interp/boot-pkg.lisp
index 3d4dc57c..12d8915c 100644
--- a/src/interp/boot-pkg.lisp
+++ b/src/interp/boot-pkg.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
@@ -30,13 +30,12 @@
;; LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-;;
-;; Copyright (C) 2007 Gabriel Dos Reis
(defpackage "BOOT"
#+:common-lisp (:use "COMMON-LISP")
#-:common-lisp (:use "LISP")
+ #+:SBCL (:use "SB-ALIEN")
(:use "AxiomCore"))
(in-package "BOOT")
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot
index d0e4f037..850fe090 100644
--- a/src/interp/c-util.boot
+++ b/src/interp/c-util.boot
@@ -108,7 +108,6 @@ displayComp level ==
pp removeZeroOne mkErrorExpr level
sayBrightly ['"****** level",'%b,level,'%d,'" ******"]
[$x,$m,$f,$exitModeStack]:= ELEM($s,level)
- ($X:=$x;$M:=$m;$F:=$f)
SAY("$x:= ",$x)
SAY("$m:= ",$m)
SAY "$f:="
diff --git a/src/interp/daase.lisp b/src/interp/daase.lisp
index 00525246..57732417 100644
--- a/src/interp/daase.lisp
+++ b/src/interp/daase.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
@@ -201,6 +201,7 @@
; -- tim daly
(import-module "macros")
+(in-package "AxiomCore")
(import-module "foam_l")
(in-package "BOOT")
diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot
index 272ad517..539bf56b 100644
--- a/src/interp/g-util.boot
+++ b/src/interp/g-util.boot
@@ -39,16 +39,6 @@ import '"sys-utility"
++
$interpOnly := false
-++ Basic types used throughout Boot codes.
-%Boolean <=> BOOLEAN
-%Short <=> FIXNUM
-%Integer <=> BIGNUM
-%Symbol <=> SYMBOL
-%String <=> STRING
-%List <=> LIST
-%Vector <=> VECTOR
-%Thing <=> true
-
--% Utility Functions of General Use
ELEMN(x, n, d) ==
@@ -97,7 +87,7 @@ get2(x,prop,e) ==
++ Update properties of an entity in an environment.
put: (%Thing,%Symbol,%Thing,%List) -> %List
addBinding: (%Thing,%List,%List) -> %List
-augProplistOf: (%Thing,%List,%Thing,%List) -> %List
+augProplistOf: (%Thing,%Symbol,%Thing,%List) -> %List
augProplist: (%List,%Thing,%Thing) -> %List
put(x,prop,val,e) ==
diff --git a/src/interp/patches.lisp b/src/interp/patches.lisp
index 5bce910d..915efc21 100644
--- a/src/interp/patches.lisp
+++ b/src/interp/patches.lisp
@@ -32,6 +32,8 @@
;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
(import-module "macros")
+(import-module "debug")
+(import-module "g-timer")
(in-package "BOOT")
;;patches for now
diff --git a/src/interp/sys-globals.boot b/src/interp/sys-globals.boot
index 4d326287..4c72a011 100644
--- a/src/interp/sys-globals.boot
+++ b/src/interp/sys-globals.boot
@@ -449,3 +449,7 @@ $sourceFiles := []
++ ??? bogus initialization for now
INPUTSTREAM := "T"
+++ ???
+$x := nil
+$f := nil
+$m := nil
diff --git a/src/interp/sys-utility.boot b/src/interp/sys-utility.boot
index 2e8502dd..ff8e32cb 100644
--- a/src/interp/sys-utility.boot
+++ b/src/interp/sys-utility.boot
@@ -36,6 +36,16 @@
import '"vmlisp"
)package "BOOT"
+++ Basic types used throughout Boot codes.
+%Boolean <=> BOOLEAN
+%Short <=> FIXNUM
+%Integer <=> BIGNUM
+%Symbol <=> SYMBOL
+%String <=> STRING
+%List <=> LIST
+%Vector <=> VECTOR
+%Thing <=> true
+
++ returns true if `f' is bound to a macro.
macrop: %Thing -> %Boolean
macrop f ==
diff --git a/src/interp/template.boot b/src/interp/template.boot
index cf3adf6b..ada43d26 100644
--- a/src/interp/template.boot
+++ b/src/interp/template.boot
@@ -318,7 +318,7 @@ measureCommon u ==
$table: local := MAKE_-HASHTABLE 'UEQUAL
fn(u,0) where fn(u,n) == n +
VECP u => +/[fn(u.i,0) for i in 0..MAXINDEX u]
- HASH-TABLE-P u =>
+ HASH_-TABLE_-P u =>
+/[fn(key,0) + fn(HGET(u,key),0) for key in HKEYS u]
PAIRP u =>
HGET($table,u) => 0
diff --git a/src/interp/vmlisp.lisp b/src/interp/vmlisp.lisp
index 889b3c58..ddfc83ba 100644
--- a/src/interp/vmlisp.lisp
+++ b/src/interp/vmlisp.lisp
@@ -1829,7 +1829,7 @@
#+:cmulisp
(defun gcmsg (x)
(prog1 ext:*gc-verbose* (setq ext:*gc-verbose* x)))
-#+:allegro
+#+ (or :allegro :sbcl)
(defun gcmsg (x))
#+Lucid
diff --git a/src/interp/wi1.boot b/src/interp/wi1.boot
index c97a61d5..cee264b1 100644
--- a/src/interp/wi1.boot
+++ b/src/interp/wi1.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
@@ -62,9 +62,8 @@ stackMessage msg ==
nil
ppFull x ==
- _*PRINT_-LEVEL_* : local := nil
- _*PRINT_-DEPTH_* : local := nil
- _*PRINT_-LENGTH_* : local := nil
+ SETQ(_*PRINT_-LEVEL_*,nil)
+ SETQ(_*PRINT_-LENGTH_*,nil)
pp x
put(x,prop,val,e) ==
diff --git a/src/interp/wi2.boot b/src/interp/wi2.boot
index 45fa17f3..2fe55053 100644
--- a/src/interp/wi2.boot
+++ b/src/interp/wi2.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
@@ -33,6 +33,7 @@
import '"macros"
+import '"define"
)package "BOOT"
compDefineFunctor1(df, m,$e,$prefix,$formalArgList) ==
diff --git a/src/lisp/Makefile.in b/src/lisp/Makefile.in
index 5bf625d4..c9a76d8d 100644
--- a/src/lisp/Makefile.in
+++ b/src/lisp/Makefile.in
@@ -117,12 +117,27 @@ base-lisp$(EXEEXT): core.$(FASLEXT)
axiom_optimize_options = @axiom_optimize_options@
+void_type = @void_type@
+char_type = @char_type@
+int_type = @int_type@
+float_type = @float_type@
+double_type = @double_type@
+string_type = @string_type@
+pointer_type = @pointer_type@
+
edit = sed \
-e 's|@open_axiom_installdir[@]|$(open_axiom_installdir)|g' \
-e 's|@axiom_optimize_options[@]|$(axiom_optimize_options)|g' \
-e 's|@host[@]|$(host)|g' \
-e 's|@build[@]|$(build)|g' \
- -e 's|@target[@]|$(target)|g'
+ -e 's|@target[@]|$(target)|g' \
+ -e 's|@void_type[@]|$(void_type)|g' \
+ -e 's|@char_type[@]|$(char_type)|g' \
+ -e 's|@int_type[@]|$(int_type)|g' \
+ -e 's|@float_type[@]|$(float_type)|g' \
+ -e 's|@double_type[@]|$(double_type)|g' \
+ -e 's|@string_type[@]|$(string_type)|g' \
+ -e 's|@pointer_type[@]|$(pointer_type)|g'
core.lisp: $(srcdir)/core.lisp.in
$(edit) $< > $@.tmp
diff --git a/src/lisp/core.lisp.in b/src/lisp/core.lisp.in
index 23b119ac..433dc720 100644
--- a/src/lisp/core.lisp.in
+++ b/src/lisp/core.lisp.in
@@ -72,6 +72,7 @@
"$faslType"
"$systemInstallationDirectory"
+ "$NativeTypeTable"
"getCommandLineArguments"
"processCommandLine"
@@ -774,3 +775,13 @@
#+ :sbcl
(eval-when (:load-toplevel :execute)
(pushnew #'shoe-provide-module sb-ext:*module-provider-functions*))
+
+;; native data type translation table
+(defconstant |$NativeTypeTable|
+ '((|void| . @void_type@)
+ (|char| . @char_type@)
+ (|int| . @int_type@)
+ (|float| . @float_type@)
+ (|double| . @double_type@)
+ (|string| . @string_type@)
+ (|pointer| . @pointer_type@)))