RFR(M): 8204615: [lworld] C2 support for java.lang.Object methods on value types

Roland Westrelin rwestrel at redhat.com
Thu Jul 5 13:18:22 UTC 2018


Hi Tobias,

> Based on [1], I've implemented C2 support for java.lang.Object methods on value types. Most of the
> changes are required to deoptimize in the slow path for monitorenter on a value type. The problem is
> that C2 compiled code for monitorenter cannot handle an exception installed by the runtime, so we
> need to deoptimize the compiled caller if there's a pending exception (see
> SharedRuntime::complete_monitor_locking_C()).
>
> During deoptimization, we need to update the bci in vframeArray.cpp to make sure that we continue
> execution in the range of the exception handler (see comments around line 210). I'm not sure if all
> the changes to the deoptimization/locking code are correct but I've added lots of tests and could
> not find any problems.

After deoptimization, is the monitorenter re-executed by the
interpreter? Do we deoptimize with a pending exception?

Roland.


More information about the valhalla-dev mailing list