Troubleshooting Nashorn “Method code too large!” exception
问题 Running jjs or ScriptEngine#eval on my JavaScript (https://gist.github.com/also/005fd7c200b20f012e10) crashes with this exception and no more details: Exception in thread "main" java.lang.RuntimeException: Method code too large! at jdk.internal.org.objectweb.asm.MethodWriter.getSize(MethodWriter.java:2065) at jdk.internal.org.objectweb.asm.ClassWriter.toByteArray(ClassWriter.java:856) at jdk.nashorn.internal.codegen.ClassEmitter.toByteArray(ClassEmitter.java:577) at jdk.nashorn.internal