3 ms·
Out of those 204 plenty are the exact same functionality for different types though. Sure, there is invokedynamic/static/virtual that is a bit more complicated
by kaba0 4y ago
Out of those 204 plenty are the exact same functionality for different types though.
Sure, there is invokedynamic/static/virtual that is a bit more complicated (they basically do runtime linking at first run), but I have implemented them and it is not harder than other pieces of a runtime.
Every method has an exception handler description, which is basically a series of instruction address ranges — if the thrown exception came from there, it jumps to the handler specified by the first match. If not, it propagates up. “Finally” clause is syntactic sugar only.
Sure, these are hard to get right, but that is inherent in the domain to a degree. You need many many “integration” tests - I wrote a test runner that runs the same program with OpenJDK and my implementation and compared their outputs.