Fix a bug where, in static synchronized methods that had no other uses
of registers (no locals, no parameters, no method calls with arguments),
v0 would be used both to hold the object being synchronized on and to hold
a caught exception.

The result was code that, if an exception was thrown through it, would
in turn throw an IllegalMonitorStateException, as the vm would be
asked to monitor-exit the exception object and not the monitor-entered
class.

Dx test 062 has a couple new cases to cover this case as well as the
parallel instance method case (not that the latter was problematic,
but I like the symmetry).
3 files changed