From 10b29b4ca81bd8b8ea3e22a78fbc03d28f0fd970 Mon Sep 17 00:00:00 2001 From: Erik Joelsson Date: Mon, 12 Mar 2018 17:49:08 +0100 Subject: [PATCH 1/2] 8199428: install-file macro fails on filenames with space on Solaris Reviewed-by: tbell, ihse --- make/common/MakeBase.gmk | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/make/common/MakeBase.gmk b/make/common/MakeBase.gmk index 3698ef8a8f0f8..1731f59977148 100644 --- a/make/common/MakeBase.gmk +++ b/make/common/MakeBase.gmk @@ -518,12 +518,14 @@ ifeq ($(OPENJDK_TARGET_OS),solaris) define install-file $(call MakeTargetDir) $(RM) '$(call DecodeSpace, $@)' - if [ '$(call DecodeSpace, $(dir $@))' != \ + if [ '$(call DecodeSpace, $(dir $(call EncodeSpace, $@)))' != \ '$(call DecodeSpace, $(dir $(call EncodeSpace, $<)))' ]; then \ - $(CP) -f -r -P '$(call DecodeSpace, $<)' '$(call DecodeSpace, $(@D))'; \ - if [ '$(call DecodeSpace, $(@F))' != \ + $(CP) -f -r -P '$(call DecodeSpace, $<)' \ + '$(call DecodeSpace, $(dir $(call EncodeSpace, $@)))'; \ + if [ '$(call DecodeSpace, $(notdir $(call EncodeSpace, $@)))' != \ '$(call DecodeSpace, $(notdir $(call EncodeSpace, $(<))))' ]; then \ - $(MV) '$(call DecodeSpace, $(@D)/$( Date: Mon, 12 Mar 2018 18:31:02 +0100 Subject: [PATCH 2/2] 8199453: Enable link-time generation of constructor forms Reviewed-by: alanb, psandoz, mchung --- .../java/lang/invoke/InvokerBytecodeGenerator.java | 9 ++++----- .../jlink/internal/plugins/GenerateJLIClassesPlugin.java | 3 ++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java b/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java index 5813b72b008fc..6887e70c0d6b9 100644 --- a/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java +++ b/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java @@ -669,6 +669,7 @@ private static MemberName lookupPregenerated(LambdaForm form, MethodType invoker case PUT_LONG: // fall-through case PUT_FLOAT: // fall-through case PUT_DOUBLE: // fall-through + case DIRECT_NEW_INVOKE_SPECIAL: // fall-through case DIRECT_INVOKE_INTERFACE: // fall-through case DIRECT_INVOKE_SPECIAL: // fall-through case DIRECT_INVOKE_STATIC: // fall-through @@ -1864,13 +1865,11 @@ private byte[] generateNamedFunctionInvokerImpl(MethodTypeForm typeForm) { * Emit a bogus method that just loads some string constants. This is to get the constants into the constant pool * for debugging purposes. */ - private void bogusMethod(Object... os) { + private void bogusMethod(Object os) { if (DUMP_CLASS_FILES) { mv = cw.visitMethod(Opcodes.ACC_STATIC, "dummy", "()V", null, null); - for (Object o : os) { - mv.visitLdcInsn(o.toString()); - mv.visitInsn(Opcodes.POP); - } + mv.visitLdcInsn(os.toString()); + mv.visitInsn(Opcodes.POP); mv.visitInsn(Opcodes.RETURN); mv.visitMaxs(0, 0); mv.visitEnd(); diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java index edcbb6fdf61ea..146783dcaa90d 100644 --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java @@ -147,7 +147,8 @@ private static Map> defaultDMHMethods() { "L_I", "L_L", "L_V", "LD_L", "LF_L", "LI_I", "LII_L", "LLI_L", "LL_V", "LL_L", "L3_L", "L4_L", "L5_L", "L6_L", "L7_L", "L8_L", "L9_L", "L10_L", "L10I_L", "L10II_L", "L10IIL_L", - "L11_L", "L12_L", "L13_L", "L14_L", "L14I_L", "L14II_L") + "L11_L", "L12_L", "L13_L", "L14_L", "L14I_L", "L14II_L"), + DMH_NEW_INVOKE_SPECIAL, Set.of("L_L", "LL_L") ); }