aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/compiler.boot13
-rw-r--r--src/interp/sys-constants.boot5
2 files changed, 17 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"
diff --git a/src/interp/sys-constants.boot b/src/interp/sys-constants.boot
index 02d6d4b2..2c88a75e 100644
--- a/src/interp/sys-constants.boot
+++ b/src/interp/sys-constants.boot
@@ -489,6 +489,10 @@ $NoValueMode ==
$ExitMode ==
"$ExitMode"
+++ A domain form for the OpenAxiom system-level pointer datatype.
+$SystemPointer ==
+ '(SystemPointer)
+
--%
++ Category constructor form
@@ -577,6 +581,7 @@ $SystemInlinableConstructorNames ==
PositiveInteger _
NonNegativeInteger _
SingleInteger _
+ SystemPointer _
String _
Boolean _
Identifier _