chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] check for exported types, constants, inlin


From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH] check for exported types, constants, inline procedures (#1346)
Date: Thu, 10 Oct 2019 07:54:44 +0200
User-agent: Mutt/1.10.1 (2018-07-13)

On Thu, Oct 03, 2019 at 01:11:31PM +0200, address@hidden wrote:
> This patch extends 21ff0d6affb35f7184a5e78f9d4beccc869b47b2 to
> type-names, inline procedures and constants, giving a warning when
> an identifier naming such an entity is exported.

Hi all,

Apparently this commit broke our own build!  It turns out that tweaks.scm,
which is included by support.scm (and others) defines inline versions of
procedures which are also exported as regular procedure bindings by the
module (chicken compiler support).

Attached is a patch which:

a) Checks the list of unexportable stuff _after_ checking if there's a
   regular or syntax identifier defined for that export inside the module.
b) Restores types to the list of things checked that cannot be exported.

This is not ideal, as it allows one to have conflicting definitions in
multiple "namespaces" (for example, define-external, define-inline and
regular define for the same identifier) but at least CHICKEN itself will
build again.

One alternative could be to keep the current code and drop tweaks.scm.
I don't know how much of an impact that will have on the performace, but
it might be worth considering.  OTOH, this trick we're using in core
might be used in other real world codebases as well...

Cheers,
Peter

Attachment: 0001-Check-if-there-_is_-a-value-or-syntax-binding-before.patch
Description: Text Data

Attachment: signature.asc
Description: PGP signature


reply via email to

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