From 1aea5ee00784ced3ce1ddde7d72f135aa900c33b Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Tue, 16 Aug 2022 12:20:38 -0500 Subject: [PATCH] Remove stack inversion code for sysv64 FFI. --- CHANGELOG.md | 7 +++++-- src/core/ffi.c | 9 --------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63077048..8f79db5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,15 +1,18 @@ # Changelog All notable changes to this project will be documented in this file. +## 1.24.1 - ??? +- Fix FFI bug on Linux/Posix + ## 1.24.0 - 2022-08-14 - Add FFI support to 64-bit windows compiled with MSVC - Don't process shared object names passed to dlopen. -- Add better support for windows console in the default shell.c for autocompletion and +- Add better support for windows console in the default shell.c for auto-completion and other shell-like input features. - Improve default error message from `assert`. - Add the `tabseq` macro for simpler table comprehensions. - Allow setting `(dyn :task-id)` in fibers to improve context in supervisor messages. Prior to - this change, supverisor messages over threaded channels would be from ambiguous threads/fibers. + this change, supervisor messages over threaded channels would be from ambiguous threads/fibers. ## 1.23.0 - 2022-06-20 - Add experimental `ffi/` module for interfacing with dynamic libraries and raw function pointers. Only available diff --git a/src/core/ffi.c b/src/core/ffi.c index 35f0fe5a..f37b02e6 100644 --- a/src/core/ffi.c +++ b/src/core/ffi.c @@ -799,15 +799,6 @@ JANET_CORE_FN(cfun_ffi_signature, } } } - - /* Invert stack */ - for (uint32_t i = 0; i < arg_count; i++) { - if (mappings[i].spec == JANET_SYSV64_MEMORY) { - uint32_t old_offset = mappings[i].offset; - size_t el_size = type_size(mappings[i].type); - mappings[i].offset = stack_count - ((el_size + 7) / 8) - old_offset; - } - } } break; #endif