I would like to remove the sb-c:stack-allocate-dynamic-extent policy,
and replace it with
variable sb-ext:*stack-allocate-dynamic-extent*, defaulting to true.
This would control behavior of normal dynamic-extent declarations.
Value cells would never be stack allocated (as long as we don't do
stack analysis for them, that is.)
policy sb-c:truly-dynamic-extent. This would be like dynamic-extent,
but (1) allow value-cell stack allocation, (2) not obey the above
special variable, but the one below.
variable sb-c:*stack-allocate-truly-dynamic-extent*, defaulting to
true. Like the first one, but controlling effect of
truly-dynamic-extent declarations only.
My reasoning is that controlling the lexical scope of
STACK-ALLOCATE-DYNAMIC-EXTENT declarations is hard and tedious -- and
hence error prone, and we should normally obey dynamic-extent when it
is requested. At the same time, it would be good to be able to compile
bodies of code with either user-space or implementation-level dynamic
extent disabled, to make it easier to identify and isolate bogus
We would then internally use truly-dynamic-extent, and DX-FLET and
DX-LET would be simplified -- or could just even go away.
Any thoughts on this? I'm still thinking about what the role of
sb-c:stack-allocate-vectors should be, though.