Skip to content

support (nongenerative uid) in define-ftype#1015

Merged
mflatt merged 1 commit intocisco:mainfrom
mflatt:ftype-uid
Mar 19, 2026
Merged

support (nongenerative uid) in define-ftype#1015
mflatt merged 1 commit intocisco:mainfrom
mflatt:ftype-uid

Conversation

@mflatt
Copy link
Copy Markdown
Contributor

@mflatt mflatt commented Feb 6, 2026

A (nongenerative uid) clause in define-ftype is analogous to the same kind of clause in define-record-type.

To prevent mismatched definitions using the same uid the check for interned record types needs to compare "extras" —fields that are added to the record type itself. Previously, "extras" were just assumed to be the same, since they were only generated internally.

Also, correct some information in the documentation about the generativity of define-ftype. When the right-hand side is an existing ftype name, the definition is not syntactically generative. In those case, (nongenerative uid) is disllowed.

@mflatt mflatt force-pushed the ftype-uid branch 4 times, most recently from cb58051 to df915dd Compare February 13, 2026 21:24
@mflatt mflatt force-pushed the ftype-uid branch 9 times, most recently from 235ec50 to 8fd09a0 Compare March 18, 2026 16:04
A `(nongenerative uid)` clause in `define-ftype` is analogous to the
same kind of clause in `define-record-type`.

To prevent mismatched definitions using the same `uid`, the check for
interned record types needs to compare "extras" --- fields that are
added to the record type itself. Previously, "extras" were just
assumed to be the same, since they were only generated internally.

Also, correct some information in the documentation about the
generativity of `define-ftype`. When the right-hand side is an
existing ftype name, the definition is not syntactically generative.
In those case, `(nongenerative uid)` is disllowed.

The `(& <ftype-name> <ftype-name>)` form for a foreign procedure or
callable now allows any pointer ftype as the second <ftype-name>,
instead of allowing only `ftype-pointer` or
`ftype-scheme-object-pointer`.

The internal implementation of `ftype-pointer` and
`ftype-scheme-object-pointer has been cleaned up to allow these
extensions.

Relatedly, enable cp0 to reduce `ftype-pointer-address` of
`ftype-&ref` of a null pointer to a constant offset.
@mflatt mflatt merged commit 9c49422 into cisco:main Mar 19, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants