[foreign] RFR: Debug code for ShuffleRecipe translation

Jorn Vernee jbvernee at xs4all.nl
Mon Dec 17 18:11:29 UTC 2018


Hi,

This is another piece of debugging code I wrote while porting the binder 
to Windows that might be useful to have in the future.

This prints info on how a CallingSequence is translated into a 
ShuffleRecipe, e.g.:

Translating CallingSequence:
   CallingSequence: {
     Flags:
     STACK_ARGUMENT_SLOT
     VECTOR_ARGUMENT_REGISTER
     INTEGER_ARGUMENT_REGISTER
       Storage { INTEGER_ARGUMENT_REGISTER[0] (size=8) } : arg0 @ 0x0
       Storage { INTEGER_ARGUMENT_REGISTER[1] (size=8) } : arg1 @ 0x0
     VECTOR_RETURN_REGISTER
     INTEGER_RETURN_REGISTER
       Storage { INTEGER_RETURN_REGISTER[0] (size=8) } : __retval @ 0x0
     X87_RETURN_REGISTER
   }

into:
   ShuffleRecipe: {
     Arguments: {
       BUFFER: []
       STACK: []
       VECTOR: []
       INTEGER: [PULL, PULL]
       X87: []
     }
     Returns: {
       BUFFER: []
       STACK: []
       VECTOR: []
       INTEGER: [PULL]
       X87: []
     }
   }

This is guarded by the flag 
`-Djdk.internal.foreign.abi.ShuffleRecipe.DEBUG=true`.

Webrev: 
http://cr.openjdk.java.net/~jvernee/panama/webrevs/shuffledebug/webrev.01/

Please let me know what you think.

Thanks,
Jorn



More information about the panama-dev mailing list