[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] C_resize_stack
From: |
felix winkelmann |
Subject: |
Re: [Chicken-users] C_resize_stack |
Date: |
Mon, 17 Jul 2006 07:27:07 +0200 |
On 7/17/06, Brandon J. Van Every <address@hidden> wrote:
chicken.h contains:
#ifdef C_DEFAULT_TARGET_STACK_SIZE
# define C_resize_stack(n)
C_do_resize_stack(C_DEFAULT_TARGET_STACK_SIZE)
#else
# define C_resize_stack(n) C_do_resize_stack(n)
#endif
The only consumer is c-backend.scm:
(when target-stack-size
(gen #t "C_resize_stack(" target-stack-size ");") ) )
Can C_resize_stack be moved out of chicken.h and into c-backend.scm?
Currently, in terms of the build, C_DEFAULT_TARGET_STACK_SIZE is
circular. To determine it with nsample, we need to build libchicken,
but libchicken includes chicken.h. My agenda is I'm trying to get all
these various command line -D flags into .h files where they're easier
to read and manage in the build. So I can't do #include "stack-size.h"
in chicken.h because it would be circular and has to be determined later.
c-backend generates code in the above snippet, so the call to
C_resize_stack is generated in all chicken-compiled code.
The macro definition is not important in libchicken, only in program
("standalone", in the sens of "not library") compilation units.
So it only applies to the compilation unit that is at the top (and
eventually uses units from the library or loads extensions).
I recommend not to worry about it.
cheers,
felix