RFR(M) 8168792: [AOT] problems in MethodHandle with aot-compiled java.base
vladimir.kozlov at oracle.com
Tue Dec 20 19:24:21 UTC 2016
On 12/20/16 11:06 AM, Igor Veresov wrote:
> It was hack that was added to fold through loads of $assertionsDisabled (otherwise aot doesn’t fold loads, that’s an exception). So the load would become a false constant if assertions where enabled for jaotc or true if they were disabled. With how we want handle assertions now it’s not needed anymore. I’ll push the appropriate change to graal-core as well.
>> On Dec 20, 2016, at 10:45 AM, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:
>> Can you explain removal of code in HotSpotNodePlugin.java ?
>> Otherwise changes seem fine.
>> On 12/20/16 10:22 AM, Igor Veresov wrote:
>>> This basically adds assertions support for AOT. It operates as follows:
>>> 1. By default the asserts are compiled away. That is the load from
>>> $assertionsDisabled is replaced with a true constant. At runtime if the
>>> user enables assertions for the class that is in the AOT library, that
>>> class is rejected and all AOT dependees are made not entrant and deopted.
>>> 2. If —enable-assertions flag is specified to jaotc, the loads from
>>> $assertionsDisabled are not folded. The resulting code is good for
>>> executing with or without assertions enabled.
>>> Webrev: http://cr.openjdk.java.net/~iveresov/8168792/webrev.00/
More information about the hotspot-compiler-dev