fix prefix-use flags on a closure that ignores its captured prefix
Optimization can cause a `lambda` that was going to refer to a top-level variable or syntax object to not refer to it after all. Ideally, the prefix should be dropped from the closure, but the change here is more conservative: it fixes the `lambda`s annotation that's used by the GC to indicate that nothing will be used from the prefix.
This commit is contained in:
parent
e42bf573e1
commit
857950a2b2
|
@ -2151,6 +2151,11 @@ resolve_closure_compilation(Scheme_Object *_data, Resolve_Info *info,
|
||||||
+ SCHEME_TAIL_COPY_THRESHOLD);
|
+ SCHEME_TAIL_COPY_THRESHOLD);
|
||||||
|
|
||||||
data->tl_map = new_info->tl_map;
|
data->tl_map = new_info->tl_map;
|
||||||
|
if (!data->tl_map && has_tl) {
|
||||||
|
/* Our reason to refer to the top level has apparently gone away;
|
||||||
|
record that we're not using anything */
|
||||||
|
data->tl_map = (void *)0x1;
|
||||||
|
}
|
||||||
|
|
||||||
/* Add code to box set!ed argument variables: */
|
/* Add code to box set!ed argument variables: */
|
||||||
for (i = 0; i < num_params; i++) {
|
for (i = 0; i < num_params; i++) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user