[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH 0/4] Some symbol and module-related patches
From: |
Evan Hanson |
Subject: |
Re: [Chicken-hackers] [PATCH 0/4] Some symbol and module-related patches |
Date: |
Sun, 14 May 2017 18:25:48 +1200 |
Hi Peter,
On 2017-05-13 11:58, Peter Bex wrote:
> Two quick questions: Given that C_namespaced_symbolp is inlineable and
> unsafe, shouldn't it be named C_u_i_namespaced_symbolp?
>
> And, given that it's inlineable, I think it would be better to put it in
> tweaks.scm (for example) as a define-inline. I think this would be much
> more efficient. Perhaps this even dwarfs the scan time of memchr.
Good point, I agree. Here's an updated patch that fixes the name and
inlines the C call.
Unfortunately, it can't just go in tweaks.scm, since that file includes
declarations that are only suitable for use in the compiler (e.g.
"no-argc-checks"), whereas this is one of those odd procedures that
straddles the boundary between compiler and runtime, being used in
expand.scm and modules.scm which both include user-facing procedure
definitions and can't include tweaks.scm as it is.
I think we probably ought to split that file up into two, one for
declarations for compiler-only code and one for inlined procedures that
are OK to use anywhere in core. There are also a handful of duplicated
definitions that appear in both expand.scm and modules.scm (the inline
versions of "getp"/"putp", for example) which might be good candidates
to move there. For now, though, I've simply changed patch to include a
"define-inline" wherever the procedure is needed. This isn't ideal, but
I hope it'll do for now. Let me know what you think.
Cheers,
Evan
- [Chicken-hackers] [PATCH 0/4] Some symbol and module-related patches, Evan Hanson, 2017/05/13
- [Chicken-hackers] [PATCH 2/4] Use "internally-namespaced" aliases for read-string[!]/port procedures, Evan Hanson, 2017/05/13
- [Chicken-hackers] [PATCH 4/4] Kill unused "##sys#call-with-direct-continuation" procedure, Evan Hanson, 2017/05/13
- [Chicken-hackers] [PATCH 1/4] Exempt explicitly-namespaced symbols from module aliasing, Evan Hanson, 2017/05/13
- [Chicken-hackers] [PATCH 3/4] Drop "##net#" qualifiers in tcp module, Evan Hanson, 2017/05/13
- Re: [Chicken-hackers] [PATCH 0/4] Some symbol and module-related patches, Peter Bex, 2017/05/13
- Re: [Chicken-hackers] [PATCH 0/4] Some symbol and module-related patches,
Evan Hanson <=
- Re: [Chicken-hackers] [PATCH 0/4] Some symbol and module-related patches, felix . winkelmann, 2017/05/15
Re: [Chicken-hackers] [PATCH 0/4] Some symbol and module-related patches, Peter Bex, 2017/05/19