Closed toddATavail closed 8 years ago
I looked into this and realized there is one potential issue: in some cases the assembler does not actually know the descriptor. For example, if you use a reference. I could make it so that it fills in the arg count when the descriptor is specified inline. Is that acceptable?
It took 30 lines of code. I hope you like it.
Thanks! I will check it out today. :)
I don't actually use references in the code generated by my compiler, so what you've done is great. I just verified that it works for a large class file with hundreds of invokeinterface instructions. Thanks again!
Even the JVM authors admit that the count operand required by invokeinterface is vestigial and redundant, since this information can be deduced from the target method signature. Nonetheless Krakatau requires this (pointless) operand to be supplied. This gives the assembler low-level fidelity, but in my opinion the assembler should automatically compute the correct value when the operand is omitted. If the operand is supplied, then the assembler should behave as it does now.