Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


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

Whiteknight opened this Issue · 2 comments

2 participants


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.

@Whiteknight Whiteknight was assigned

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.


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.

@Whiteknight Whiteknight closed this
@Whiteknight Whiteknight removed their assignment
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.