Skip to content

FFI: finish implementing .isa ffi features - #147

Merged
alastairreid merged 7 commits into
masterfrom
areid/fix-ffi
Aug 21, 2026
Merged

FFI: finish implementing .isa ffi features#147
alastairreid merged 7 commits into
masterfrom
areid/fix-ffi

Conversation

@alastairreid

Copy link
Copy Markdown

When I tried replacing the config.json files in tests, I found that the new .isa ffi language features were not fully implemented.
So this finishes the implementation (but leaves config.json support in place until others are updated).

See changes in tests for the new .isa way.

Comment thread libISA/backend_c.ml Outdated
Comment thread libISA/backend_c.ml Outdated
Comment thread libISA/isa_parser.mly Outdated

@nikolaykosarev nikolaykosarev left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left few comments.

@alastairreid
alastairreid force-pushed the areid/fix-ffi branch 3 times, most recently from b43c17f to e73e603 Compare June 23, 2026 14:23
In several places, support for foreign types such as enums
and for foreign variables was incomplete and did not work
if you replaced the configuration json file with
the new .isa foreign import/export declarations.
The FFI was mapping SInt(N) to 'int' even when it was mapping Integer to int64_t.
This caused problems because enabling -Obounded was changing the type of FFI functions.

This fix makes them match.
I noticed that github tests were first installing 3.22.2 and then
installing 3.24.2 so I am hoping that selecting 3.24.2 initially
will make CI tests run faster
@alastairreid
alastairreid merged commit 1626097 into master Aug 21, 2026
1 check passed
@alastairreid
alastairreid deleted the areid/fix-ffi branch August 21, 2026 10:51
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