[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] [PATCH][5] Some FFI improvements

From: lemonboy
Subject: [Chicken-hackers] [PATCH][5] Some FFI improvements
Date: Sun, 28 May 2017 23:29:06 +0200

Hello hackers,
I'll be brief:
- The first patch fixes a problem where we'd fail to consider the
internal defines as toplevel ones,
 leading to a compiler error.
- The second patch complements the first by rejecting more `define-`
forms in non-toplevel contexts.
- The third one is slightly beefier as it prevents us to apply the
wrong specialization in some cases
 like in the following snippet.

(import foreign)
(define-foreign-type ty int (lambda (x) 42) (lambda (x) 0.5))
(let ((t0 ((foreign-lambda* ty ((ty x)) "return 0;") 'sym)))
  (print (min t0 1))) ;; We expect this to be 0.5 and not 1


Attachment: 0001-Do-not-treat-internal-defines-as-non-toplevel-ones.patch
Description: Text Data

Attachment: 0002-Reject-more-definitions-outside-of-toplevel-context.patch
Description: Text Data

Attachment: 0003-Fix-the-type-inference-with-foreign-types.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]