New pseudo instruction CodeBuilder.setDebugOption
Øystein Myhre Andersen
o.myhre at gmail.com
Sat Mar 9 15:25:04 UTC 2024
*Proposal:*
Add a new pseudo instruction:
CodeBuilder.setDebugOption(int kind, int level)
Meaning:
kind == 1 // CodeListing
2 .. n // Reserved
when kind == 1
level == 0 // Off
1 // code listing as when "stack size mismatch" error.
2 // with additional Thread.dumpstack();
3 .. n // Reserved
Or something like it.
*Motivation:*
I am building a code generator for the Open Source Simula
<https://portablesimula.github.io/github.io/> compiler.
During debugging, it would be nice to be able to see the code that is
generated and possibly where the individual instructions were generated
from.
This is particularly interesting for errors such as: "stack size mismatch",
"operand stack underflow", etc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/classfile-api-dev/attachments/20240309/104a1a25/attachment-0001.htm>
More information about the classfile-api-dev
mailing list