Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLTL2 readers fail on bytecode environments #1579

Open
Bike opened this issue May 2, 2024 · 0 comments
Open

CLTL2 readers fail on bytecode environments #1579

Bike opened this issue May 2, 2024 · 0 comments
Labels

Comments

@Bike
Copy link
Member

Bike commented May 2, 2024

For example,

(let (x)
  (macrolet ((e (&environment e) (clasp-cltl2:variable-information 'x e)))
    (e)))

compiled as bytecode results in an error: The slot CLEAVIR-ENVIRONMENT::%TYPE in the object #<CLEAVIR-ENVIRONMENT:LEXICAL-VARIABLE-INFO @0x7c6ef516a309> is unbound.

The problem lies in the cleavir-env readers for bytecode lexenvs, which are a bit half-assed - as the comment says, "this will probably not go well". function-info is possibly also a bit broken, and the other env readers like optimize probably need some elbow grease as well.

It would be pretty easy to "fix" this by putting in dummy types (i.e. T) but thanks to the BTB changes, all this information is accessible somewhere or another in the lexenv, and we probably ought to extract it.

This has been an issue for at least a few weeks. paulapatience noticed it when I changed eval to always go through bytecode.

@Bike Bike added the bug label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant