jvm - Why are there some methods in java.base cannot be compiled by AOT compiler -


according jep-295 (http://openjdk.java.net/jeps/295)

there methods in java.base causing compilation failure, why?

it appreciated can me can realize limitation of openjdk aot compiler.

see documentation linking to:

current aot limitations ...

may not compile java code uses dynamically generated classes , bytecode (lambda expressions, invoke dynamic).

these limitations may addressed in future releases.

thus 2 potential explanations:

  1. the methods not compile fall known limitations
  2. otherwise, bug in "brand new, experimental" product

most "option 2" better explanation - see again link.

it contains list of methods fail compilation, error occurs:

cat java.base-list.txt  # jaotc: java.lang.stackoverflowerror exclude sun.util.resources.localenames.getcontents()[[ljava/lang/object; exclude sun.util.resources.timezonenames.getcontents()[[ljava/lang/object; exclude sun.util.resources.cldr.localenames.getcontents()[[ljava/lang/object; exclude sun.util.resources..*.localenames_.*.getcontents\(\)\[\[ljava/lang/object; exclude sun.util.resources..*.localenames_.*_.*.getcontents\(\)\[\[ljava/lang/object; exclude sun.util.resources..*.timezonenames_.*.getcontents\(\)\[\[ljava/lang/object; exclude sun.util.resources..*.timezonenames_.*_.*.getcontents\(\)\[\[ljava/lang/object; # java.lang.error: trampoline must not defined bootstrap classloader exclude sun.reflect.misc.trampoline.<clinit>()v exclude sun.reflect.misc.trampoline.invoke(ljava/lang/reflect/method;ljava/lang/object;[ljava/lang/object;)ljava/lang/object; # jvm asserts exclude com.sun.crypto.provider.aeswrapcipher.engineunwrap([bljava/lang/string;i)ljava/security/key; exclude sun.security.ssl.* exclude sun.net.registereddomain.<clinit>()v # huge methods exclude jdk.internal.module.systemmodules.descriptors()[ljava/lang/module/moduledescriptor; 

and when check sources, example getcontents() - no lambdas there.

so methods fail compilation most likely caused fact new compiler "not yet ready" compile arbitrary java source code!


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -