From 6cb0dc4a2050e8191f61e42a365ec77dd9a3e051 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Thu, 26 Mar 2009 14:06:40 +0000 Subject: * 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. --- src/boot/ast.boot | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/boot/ast.boot') 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. -- cgit v1.2.3