Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
Whiteknight opened this Issue · 2 comments

2 participants

@Whiteknight

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):

https://github.com/Whiteknight/parrot-linear-algebra/blob/master/t/testlib/matrixtestfactory.nqp#L7

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
@Benabik
Collaborator

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.

@Whiteknight

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.