aboutsummaryrefslogtreecommitdiff
path: root/src/interp/compiler.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2009-09-08 13:16:28 +0000
committerdos-reis <gdr@axiomatics.org>2009-09-08 13:16:28 +0000
commit5ab1bb2721c9fdf77e6fa530523f5044b8445880 (patch)
treefb7fc8c5c0a9a73f4d7ccd486b53630f4c69ece2 /src/interp/compiler.boot
parent7fb7062638f05c3748a7aaace55d50cb1ac87fb0 (diff)
downloadopen-axiom-5ab1bb2721c9fdf77e6fa530523f5044b8445880.tar.gz
* boot/ast.boot: Support "pointer" as simple datatype.
* interp/compiler.boot (getBasicFFIType): SystemPointer is an FFI type. * algebra/data.spad.pamphlet (SystemPointer): New. * algebra/Makefile.pamphlet (axiom_algebra_layer_0): Include SYSPTR.
Diffstat (limited to 'src/interp/compiler.boot')
-rw-r--r--src/interp/compiler.boot13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot
index f2ced87a..8666c1ff 100644
--- a/src/interp/compiler.boot
+++ b/src/interp/compiler.boot
@@ -1340,12 +1340,23 @@ getBasicFFIType t ==
t = $SingleFloat => bootDenotation "float"
t = $DoubleFloat => bootDenotation "double"
t = $String => bootDenotation "string"
+ t = $SystemPointer => bootDenotation "pointer"
nil
++ List of admissible type modifiers in an FFI import declaration.
$FFITypeModifier == '(ReadOnly WriteOnly ReadWrite)
+++ List of admissible element types of contiguously stored
+++ homogeneous FFI aggregate types.
+$FFIAggregableDataType ==
+ [$Byte,
+ $Int16,$UInt16,
+ $Int32,$UInt32,
+ $Int64, $UInt64,
+ $SingleFloat,
+ $DoubleFloat]
+
++ Return the Boot denotation of an FFI datatype. This is either
++ a basic VM type, or a simple array of sized integer or floating
++ point type.
@@ -1353,7 +1364,7 @@ getFFIDatatype: %Mode -> %Form
getFFIDatatype t ==
x := getBasicFFIType t => x
t is [m,["PrimitiveArray",t']] and m in $FFITypeModifier and
- member(t',[$Byte,$Int16,$Int32,$SingleFloat,$DoubleFloat]) =>
+ member(t',$FFIAggregableDataType) =>
m' :=
m = "ReadOnly" => bootDenotation "readonly"
m = "WriteOnly" => bootDenotation "writeonly"