aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure18
-rw-r--r--configure.ac2
-rw-r--r--configure.ac.pamphlet2
-rw-r--r--src/ChangeLog9
-rw-r--r--src/interp/c-util.boot2
-rw-r--r--src/interp/compiler.boot22
-rw-r--r--src/interp/g-util.boot6
7 files changed, 42 insertions, 19 deletions
diff --git a/configure b/configure
index 35dd4ded..3ce6b143 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for OpenAxiom 1.4.0-2010-05-28.
+# Generated by GNU Autoconf 2.63 for OpenAxiom 1.4.0-2010-05-29.
#
# Report bugs to <open-axiom-bugs@lists.sf.net>.
#
@@ -745,8 +745,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='OpenAxiom'
PACKAGE_TARNAME='openaxiom'
-PACKAGE_VERSION='1.4.0-2010-05-28'
-PACKAGE_STRING='OpenAxiom 1.4.0-2010-05-28'
+PACKAGE_VERSION='1.4.0-2010-05-29'
+PACKAGE_STRING='OpenAxiom 1.4.0-2010-05-29'
PACKAGE_BUGREPORT='open-axiom-bugs@lists.sf.net'
ac_unique_file="src/Makefile.pamphlet"
@@ -1513,7 +1513,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures OpenAxiom 1.4.0-2010-05-28 to adapt to many kinds of systems.
+\`configure' configures OpenAxiom 1.4.0-2010-05-29 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1583,7 +1583,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of OpenAxiom 1.4.0-2010-05-28:";;
+ short | recursive ) echo "Configuration of OpenAxiom 1.4.0-2010-05-29:";;
esac
cat <<\_ACEOF
@@ -1691,7 +1691,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-OpenAxiom configure 1.4.0-2010-05-28
+OpenAxiom configure 1.4.0-2010-05-29
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1705,7 +1705,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by OpenAxiom $as_me 1.4.0-2010-05-28, which was
+It was created by OpenAxiom $as_me 1.4.0-2010-05-29, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@@ -21182,7 +21182,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by OpenAxiom $as_me 1.4.0-2010-05-28, which was
+This file was extended by OpenAxiom $as_me 1.4.0-2010-05-29, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -21245,7 +21245,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-OpenAxiom config.status 1.4.0-2010-05-28
+OpenAxiom config.status 1.4.0-2010-05-29
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff --git a/configure.ac b/configure.ac
index 29555ad8..9ee978e8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
sinclude(config/open-axiom.m4)
sinclude(config/aclocal.m4)
-AC_INIT([OpenAxiom], [1.4.0-2010-05-28],
+AC_INIT([OpenAxiom], [1.4.0-2010-05-29],
[open-axiom-bugs@lists.sf.net])
AC_CONFIG_AUX_DIR(config)
diff --git a/configure.ac.pamphlet b/configure.ac.pamphlet
index 2f446383..11b98525 100644
--- a/configure.ac.pamphlet
+++ b/configure.ac.pamphlet
@@ -1210,7 +1210,7 @@ information:
<<Autoconf init>>=
sinclude(config/open-axiom.m4)
sinclude(config/aclocal.m4)
-AC_INIT([OpenAxiom], [1.4.0-2010-05-28],
+AC_INIT([OpenAxiom], [1.4.0-2010-05-29],
[open-axiom-bugs@lists.sf.net])
@
diff --git a/src/ChangeLog b/src/ChangeLog
index ebd6ae0f..b9850970 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
+2010-05-29 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * interp/compiler.boot (getExternalSymbolMode): Allow Lisp as
+ foreign language.
+ (checkExternalEntity): Likewise.
+ (compSignatureImport): Likewise. Give foreign variables dummy values.
+ * interp/c-util.boot (middleEndExpand): Handle %true and %false.
+ * interp/g-util.boot (expandToVMForm): Likewise.
+
2010-05-28 Gabriel Dos Reis <gdr@cs.tamu.edu>
Add support for 'property' builtin function.
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot
index 459ef90e..79e040b6 100644
--- a/src/interp/c-util.boot
+++ b/src/interp/c-util.boot
@@ -1075,6 +1075,8 @@ $middleEndMacroList ==
middleEndExpand: %Form -> %Form
middleEndExpand x ==
+ x = '%false => 'NIL
+ x = '%true => 'T
isAtomicForm x => x
[op,:args] := x
IDENTP op and (fun := getOpcodeExpander op) => apply(fun,x,nil)
diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot
index 9ee54315..6bad4fcb 100644
--- a/src/interp/compiler.boot
+++ b/src/interp/compiler.boot
@@ -1125,7 +1125,8 @@ compReturn(["return",x],m,e) ==
++ `op' supposedly designate an external entity with language linkage
++ `lang'. Return the mode of its local declaration (import).
getExternalSymbolMode(op,lang,e) ==
- lang = "Builtin" => "%Thing" -- for the time being
+ lang = 'Builtin => "%Thing" -- for the time being
+ lang = 'Lisp => "%Thing" -- for the time being
lang ~= "C" =>
stackAndThrow('"Sorry: %b Foreign %1b %d is invalid at the moment",[lang])
get(op,"%Lang",e) ~= lang =>
@@ -1369,9 +1370,9 @@ checkExternalEntity(id,type,lang,e) ==
get(id,"modemap",e) =>
stackAndThrow('"%1b already names exported operations in scope",[id])
-- We don't type check builtin declarations at the moment.
- lang = "Builtin" => id
+ lang = 'Builtin or lang = 'Lisp => id
-- Only functions are accepted at the moment. And all mentioned
- -- types must be those that are supported by the FFI.
+ -- types must be those that are supported by the FFI.
type' := checkExternalEntityType(type,e)
type' isnt [=bootDenotation "Mapping",:.] =>
stackAndThrow('"Signature for external entity must be a Mapping type",nil)
@@ -1393,19 +1394,24 @@ compSignatureImport: (%Form,%Mode,%Env) -> %Maybe %Triple
compSignatureImport(["%SignatureImport",id,type,home],m,e) ==
-- 1. Make sure we have the right syntax.
home isnt ["Foreign",:args] =>
- stackAndThrow('"signature import from be from a %1bp domain",["Foreign"])
+ stackAndThrow('"signature import must be from a %1bp domain",["Foreign"])
args isnt [lang] =>
stackAndThrow('"%1bp takes exactly one argument",["Foreign"])
not IDENTP lang =>
stackAndThrow('"Argument to %1bp must be an identifier",["Foreign"])
- not (lang in '(Builtin C)) =>
+ not (lang in '(Builtin C Lisp)) =>
stackAndThrow('"Sorry: Only %1bp is valid at the moment",["Foreign C"])
-- 2. Make sure this import is not subverting anything we know
id' := checkExternalEntity(id,type,lang,e)
-- 3. Make a local declaration for it.
- T := compMakeDeclaration(id,removeModifiers type,e) or return nil
- T.env := put(id,"%Lang",lang,T.env)
- T.env:= put(id,"%Link",id',T.env)
+ T := [.,.,e] := compMakeDeclaration(id,removeModifiers type,e) or return nil
+ e := put(id,"%Lang",lang,e)
+ e := put(id,"%Link",id',e)
+ -- 4. Also make non-function externals self-evaluating so we don't
+ -- complain later for undefined variable references.
+ if T.mode isnt ['Mapping,:.] then
+ e := put(id,"value",[id',T.mode,nil],e)
+ T.env := e
convert(T,m)
diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot
index 2ab9d696..0a78b182 100644
--- a/src/interp/g-util.boot
+++ b/src/interp/g-util.boot
@@ -253,6 +253,9 @@ expandIadd ["%iadd",:args] ==
expandIsub ["%isub",:args] ==
["-",:expandToVMForm args]
+expandEq ["%eq",:args] ==
+ ["EQ",:expandToVMForm args]
+
expandIeq ["%ieq",:args] ==
["EQL",:expandToVMForm args]
@@ -315,6 +318,7 @@ for x in [
["%imax",:function expandImax],
["%igcd",:function expandIgcd],
+ ["%eq",:function expandEq],
["%ieq",:function expandIeq],
["%head",:function expandHead],
@@ -332,6 +336,8 @@ getOpcodeExpander op ==
++ Expand all opcodes contained in the form `x' into a form
++ suitable for evaluation by the VM.
expandToVMForm x ==
+ x = '%false => 'NIL
+ x = '%true => 'T
isAtomicForm x => x
[op,:args] := x
IDENTP op and (fun:= getOpcodeExpander op) => apply(fun,x,nil)