diff options
author | dos-reis <gdr@axiomatics.org> | 2009-09-08 13:16:28 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2009-09-08 13:16:28 +0000 |
commit | 5ab1bb2721c9fdf77e6fa530523f5044b8445880 (patch) | |
tree | fb7fc8c5c0a9a73f4d7ccd486b53630f4c69ece2 /src/interp/compiler.boot | |
parent | 7fb7062638f05c3748a7aaace55d50cb1ac87fb0 (diff) | |
download | open-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.boot | 13 |
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" |