aboutsummaryrefslogtreecommitdiff
path: root/src/boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2009-03-26 14:06:40 +0000
committerdos-reis <gdr@axiomatics.org>2009-03-26 14:06:40 +0000
commit6cb0dc4a2050e8191f61e42a365ec77dd9a3e051 (patch)
treea0f34f766daad36295110038a91b5acdb0a2bdfd /src/boot
parentbec1b2699335ba5795cfe36de4f899c8d9567d6d (diff)
downloadopen-axiom-6cb0dc4a2050e8191f61e42a365ec77dd9a3e051.tar.gz
* boot/ast.boot (nativeType): Accept int16 and int32.
(getFFIDatatype): Accept ReadWrite modifier. * algebra/data.spad.pamphlet (Int32): New. (UInt64): Likewise. * algebra/Makefile.pamphlet (axiom_algebra_layer_7): Include INT64 and UINT64.
Diffstat (limited to 'src/boot')
-rw-r--r--src/boot/ast.boot12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/boot/ast.boot b/src/boot/ast.boot
index 819f79d4..9b9feac5 100644
--- a/src/boot/ast.boot
+++ b/src/boot/ast.boot
@@ -1256,7 +1256,7 @@ genTypeAlias(head,body) ==
-- part of the data being transmitted.
$NativeSimpleDataTypes ==
- '(char byte int float double)
+ '(char byte int int16 int32 float double)
$NativeSimpleReturnTypes ==
[:$NativeSimpleDataTypes,:'(void string)]
@@ -1297,6 +1297,14 @@ nativeType t ==
%hasFeature KEYWORD::ECL => KEYWORD::UNSIGNED_-BYTE
-- approximate by 'char' for GCL
nativeType "char"
+ t = "int16" =>
+ %hasFeature KEYWORD::SBCL => [bfColonColon("SB-ALIEN","UNSIGNED"),16]
+ %hasFeature KEYWORD::CLISP => bfColonColon("FFI","INT16")
+ unknownNativeTypeError t
+ t = "int32" =>
+ %hasFeature KEYWORD::SBCL => [bfColonColon("SB-ALIEN","UNSIGNED"),32]
+ %hasFeature KEYWORD::CLISP => bfColonColon("FFI","INT32")
+ unknownNativeTypeError t
unknownNativeTypeError t
-- composite, reference type.
first t = "buffer" =>
@@ -1339,7 +1347,7 @@ nativeArgumentType t ==
++ True if objects of type native type `t' are sensible to GC.
needsStableReference? t ==
- not atom t and first t in '(readonly writeonly readwrite)
+ t is [m,:.] and m in '(readonly writeonly readwrite)
++ coerce argument `a' to native type `t', in preparation for
++ a call to a native functions.