aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog10
-rw-r--r--src/boot/ast.boot18
-rw-r--r--src/boot/translator.boot5
-rw-r--r--src/lisp/Makefile.in4
-rw-r--r--src/lisp/core.lisp.in5
5 files changed, 32 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 2aadfbd8..e3adaa73 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,15 @@
2008-09-13 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * lisp/core.lisp.in (|$NativeTypeTable|): Don' include `pointer'
+ and `buffer'.
+ * lisp/Makefile.in (pointer_type): Remove.
+ (edit): Tidy.
+ * boot/ast.boot (nativeType): Tidy. Handle `pointer' and `buffer'
+ here.
+ * boot/translator.boot (genImportDeclaration): Tidy.
+
+2008-09-13 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* boot/translator.boot (AxiomCore::%sysInit) [ECL]: Remove
settings for ECL-base builds.
(getIntermediateLispFile): Tidy.
diff --git a/src/boot/ast.boot b/src/boot/ast.boot
index b0d5d769..15cd2ab8 100644
--- a/src/boot/ast.boot
+++ b/src/boot/ast.boot
@@ -1218,12 +1218,28 @@ bootSymbol: %Symbol -> %Symbol
bootSymbol s ==
INTERN SYMBOL_-NAME s
+
+unknownNativeTypeError t ==
+ fatalError CONCAT('"unsupported native type: ", SYMBOL_-NAME t)
+
+
nativeType t ==
null t => t
+ -- for the time being, approximate `data buffer' by `pointer to data'
+ t = "buffer" or t = "pointer" =>
+ %hasFeature KEYWORD::GCL => "fixnum"
+ %hasFeature KEYWORD::ECL => KEYWORD::POINTER_-VOID
+ %hasFeature KEYWORD::SBCL => ["*",true]
+ %hasFeature KEYWORD::CLISP => bfColonColon("FFI","C-POINTER")
+ unknownNativeTypeError t
t' := rest ASSOC(coreSymbol t,$NativeTypeTable) =>
+ t' :=
+ %hasFeature KEYWORD::SBCL => bfColonColon("SB-ALIEN", t')
+ %hasFeature KEYWORD::CLISP => bfColonColon("FFI",t')
+ t'
-- ??? decree we have not discovered Unicode yet.
t = "string" and %hasFeature KEYWORD::SBCL =>
[t',KEYWORD::EXTERNAL_-FORMAT,KEYWORD::ASCII,
KEYWORD::ELEMENT_-TYPE, "BASE-CHAR"]
t'
- fatalError CONCAT('"unsupported native type: ", SYMBOL_-NAME t)
+ unknownNativeTypeError t
diff --git a/src/boot/translator.boot b/src/boot/translator.boot
index c972af6c..5358d91b 100644
--- a/src/boot/translator.boot
+++ b/src/boot/translator.boot
@@ -426,9 +426,8 @@ genImportDeclaration(op, sig) ==
n := INTERN strconc(SYMBOL_-NAME op, '"%clisp-hack")
[bfColonColon("FFI","DEF-CALL-OUT"),n,
[KEYWORD::NAME,SYMBOL_-NAME op'],
- [KEYWORD::ARGUMENTS,:[[a,
- bfColonColon("FFI", nativeType x)] for x in s for a in args]],
- [KEYWORD::RETURN_-TYPE,bfColonColon("FFI",nativeType t)],
+ [KEYWORD::ARGUMENTS,:[[a, nativeType x] for x in s for a in args]],
+ [KEYWORD::RETURN_-TYPE, nativeType t],
[KEYWORD::LANGUAGE,KEYWORD::STDC]]
forwardingFun :=
["DEFUN",op,args,
diff --git a/src/lisp/Makefile.in b/src/lisp/Makefile.in
index 2f0270b1..726a017f 100644
--- a/src/lisp/Makefile.in
+++ b/src/lisp/Makefile.in
@@ -134,7 +134,6 @@ 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' \
@@ -151,8 +150,7 @@ edit = sed \
-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'
+ -e 's|@string_type[@]|$(string_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 83a1b610..7b9d5710 100644
--- a/src/lisp/core.lisp.in
+++ b/src/lisp/core.lisp.in
@@ -985,6 +985,5 @@
(|int| . @int_type@)
(|float| . @float_type@)
(|double| . @double_type@)
- (|string| . @string_type@)
- (|buffer| . @pointer_type@)
- (|pointer| . @pointer_type@)))
+ (|string| . @string_type@)))
+