sb-cltl2::macroexpand-all doesn't track the lexenv properly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Triaged
|
Medium
|
Unassigned |
Bug Description
on 1.0.39.4
see the pasted form below (the macro is expanded twice, although that's not illegal in itself).
the lexenv passed to the macrolet does not contain the tags of the tagbody, nor the blocks, and a throughout test would probably uncover other missing things.
(sb-cltl2:
'(BLOCK B1
(TAGBODY
T1
(PROGN)
T2
(BLOCK B2
will print this:
#S(SB-KERNEL:LEXENV
:FUNS ((INJECTOR-
:VARS NIL
:BLOCKS NIL
:TAGS NIL
:TYPE-
:LAMBDA NIL
:CLEANUP NIL
:HANDLED-
:DISABLED-
:%POLICY ((COMPILATION-SPEED . 1) (DEBUG . 3) (SB-EXT:
:USER-DATA NIL)
#S(SB-KERNEL:LEXENV
:FUNS ((#:G4 SB-SYS:MACRO . #) (INJECTOR-MACRO2131 SB-SYS:MACRO . #) (#:G4 SB-SYS:MACRO . #) (#:G4 SB-SYS:MACRO . #))
:VARS NIL
:BLOCKS NIL
:TAGS NIL
:TYPE-
:LAMBDA NIL
:CLEANUP NIL
:HANDLED-
:DISABLED-
:%POLICY ((COMPILATION-SPEED . 1) (DEBUG . 3) (SB-EXT:
:USER-DATA NIL)
tags: | added: sb-cltl2 |
Changed in sbcl: | |
importance: | Undecided → Medium |
status: | New → Triaged |
This is clearly suboptimal, but given that there's no supported way (via sb-cltl2) to access block and tag names, non-critical.
The issue is with SB-WALKER not adding block and tag names into the environment in the first place.