Skip to content
This repository

Need a way to make register-ref Keys from PIR #717

Whiteknight opened this Issue · 2 comments

2 participants

Andrew Whitworth Brian Gernhardt
Andrew Whitworth

This is mostly a reminder to myself. We have a way to make Key PMCs at runtime from PIR or higher. Here is one example of that mechanism (it's ugly, but it does exist):

We either don't have, or I'm not aware of, a mechanism to create a Key which uses a register reference:

$P0[$I0; $S0] = $P1

This is going to be necessary for doing self-hosted compilation in places like PACT.

Brian Gernhardt

Creation and introspection of register-ref keys will be required. Currently trying to print arbitrary key constants loaded from a packfile will eventually cause the interpreter to die when it references a register that doesn't exist. This can't be worked around as any attempt to get the value redirects to the register in question.

Andrew Whitworth

I've added these methods to Key PMC and marked this experimental in api.yaml. I'm going to consider this issue closed. We can open a new ticket later if these methods need to be modified after testing and evaluation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.