dup2_x1, pop2, dup_x2 , and now you have arrayref at the top of the stack. But in general, it is easier to use local variables, and the final result after JIT should not differ.
As others have noted, your second part of the question does not make much sense. Objects are not needed in variables, and you can select and use an array without storing it in any variable.
But I suspect that you intend to track access, for example x[0]=1 , and assign it to x, and this can be achieved by analyzing the data stream. You will track aload and where these values will be used, and if your arrayref is directly from aload, you know that the array came from a variable.
source share