+1 -Sundar
On Thursday 25 September 2014 09:43 PM, Marcus Lagergren wrote:
For some reason the JDK9 relies on old nashorn.jars in the JDK when building Nasgen. This makes the JDK build of 9 crash when I started referring to a new Nashorn class. This is fundamentally an infra problem but in order for me to go to sleep peacefully I’m submitting a patch that makes the JDK build again. Please review: (basically just using text instead of class references for type descriptors) diff -r f0b5e3900a10 buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/MethodGenerator.java --- a/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/MethodGenerator.java Thu Sep 25 15:53:47 2014 +0200 +++ b/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/MethodGenerator.java Thu Sep 25 18:13:12 2014 +0200 @@ -85,7 +85,6 @@ import jdk.internal.org.objectweb.asm.Handle; import jdk.internal.org.objectweb.asm.MethodVisitor; import jdk.internal.org.objectweb.asm.Type; -import jdk.nashorn.internal.objects.annotations.SpecializedFunction.LinkLogic;/*** Base class for all method generating classes. @@ -98,7 +97,7 @@ private final Type returnType; private final Type[] argumentTypes;- static final Type EMPTY_LINK_LOGIC_TYPE = Type.getType(LinkLogic.getEmptyLinkLogicClass());+ static final Type EMPTY_LINK_LOGIC_TYPE = Type.getType("Ljdk/nashorn/internal/objects/annotations/SpecializedFunction$LinkLogic$Empty;");MethodGenerator(final MethodVisitor mv, final int access, final String name, final String descriptor) {super(Main.ASM_VERSION, mv); diff -r f0b5e3900a10 buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInfo.java --- a/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInfo.java Thu Sep 25 15:53:47 2014 +0200 +++ b/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInfo.java Thu Sep 25 18:13:12 2014 +0200 @@ -38,7 +38,6 @@ import jdk.nashorn.internal.objects.annotations.ScriptClass; import jdk.nashorn.internal.objects.annotations.Setter; import jdk.nashorn.internal.objects.annotations.SpecializedFunction; -import jdk.nashorn.internal.objects.annotations.SpecializedFunction.LinkLogic; import jdk.nashorn.internal.objects.annotations.Where; import jdk.nashorn.internal.tools.nasgen.MemberInfo.Kind;@@ -56,8 +55,8 @@static final String SETTER_ANNO_DESC = Type.getDescriptor(Setter.class); static final String PROPERTY_ANNO_DESC = Type.getDescriptor(Property.class); static final String WHERE_ENUM_DESC = Type.getDescriptor(Where.class); - static final String LINK_LOGIC_DESC = Type.getDescriptor(LinkLogic.class); static final String SPECIALIZED_FUNCTION = Type.getDescriptor(SpecializedFunction.class); + static final String LINK_LOGIC_DESC = "Ljdk/nashorn/internal/objects/annotations/SpecializedFunction$LinkLogic;";static final Map<String, Kind> annotations = new HashMap<>();
