# HG changeset patch # User coleenp # Date 1378391373 14400 # Node ID 8860c4df071b6b46d4d21ee2a3878714898362da # Parent 07116006f9a511d86c66325240f60190ad37f215 8021266: Better life cycle for objects Summary: Improve life cycle for objects Reviewed-by: art, hseigel Contributed-by: gerard.ziemski@oracle.com diff -r 07116006f9a5 -r 8860c4df071b jdk/make/common/Release.gmk --- a/jdk/make/common/Release.gmk Mon Sep 02 11:41:21 2013 +0400 +++ b/jdk/make/common/Release.gmk Thu Sep 05 10:29:33 2013 -0400 @@ -835,10 +835,6 @@ $(BOOT_JAVA_CMD) -jar $(BUILDMETAINDEX_JARFILE) \ -o meta-index *.jar @$(CD) $(JRE_IMAGE_DIR)/lib/ext && $(java-vm-cleanup) -ifeq ($(PLATFORM), macosx) - @#install jobjc, apple mac only - $(CP) $(OUTPUTDIR)/JObjC.build/JObjC.jar $(JRE_IMAGE_DIR)/lib/JObjC.jar -endif ifeq ($(PLATFORM), windows) @# Remove certain *.lib files $(CD) $(JRE_IMAGE_DIR)/lib && \ diff -r 07116006f9a5 -r 8860c4df071b jdk/make/java/Makefile --- a/jdk/make/java/Makefile Mon Sep 02 11:41:21 2013 +0400 +++ b/jdk/make/java/Makefile Thu Sep 05 10:29:33 2013 -0400 @@ -57,10 +57,6 @@ SUBDIRS += jexec endif # PLATFORM -ifeq ($(PLATFORM), macosx) - SUBDIRS += jobjc -endif # PLATFORM - include $(BUILDDIR)/common/Subdirs.gmk all build clean clobber:: diff -r 07116006f9a5 -r 8860c4df071b jdk/makefiles/CompileJavaClasses.gmk --- a/jdk/makefiles/CompileJavaClasses.gmk Mon Sep 02 11:41:21 2013 +0400 +++ b/jdk/makefiles/CompileJavaClasses.gmk Thu Sep 05 10:29:33 2013 -0400 @@ -270,11 +270,6 @@ $(JDK_TOPDIR)/src/solaris/classes/sun/util/locale/provider/HostLocaleProviderAdapterImpl.java \ $(JDK_TOPDIR)/src/solaris/classes/sun/nio/fs/GnomeFileTypeDetector.java - # JObjC.jar contains 1.5 byte-code...so skip it here :-( - # MACOSX_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/native/jobjc/src - # EXCLUDES+= tests/java/com/apple/jobjc - - EXCLUDES+= com/apple/jobjc endif # The exception handling of swing beaninfo @@ -326,44 +321,6 @@ ########################################################################################## -ifeq ($(OPENJDK_TARGET_OS),macosx) -# -# JObjC.jar is compiled with BOOT_JAVAC which (may) not support the "-h" flag. -# so we first compile classes with BOOT_JAVAC and then with JDK_JAVAC :-( -# -$(eval $(call SetupJavaCompiler,GENERATE_15BYTECODE,\ - JAVAC:=$(JAVAC),\ - FLAGS:=-source 1.5 -target 1.5 -g -bootclasspath $(BOOT_RTJAR) -cp $(JDK_OUTPUTDIR)/../langtools/dist/lib/classes.jar $(DISABLE_WARNINGS),\ - SERVER_DIR:=$(SJAVAC_SERVER_DIR),\ - SERVER_JVM:=$(SJAVAC_SERVER_JAVA))) - -$(eval $(call SetupJavaCompilation,BUILD_JOBJC,\ - SETUP:=GENERATE_15BYTECODE,\ - DISABLE_SJAVAC:=true,\ - SRC:=$(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/java \ - $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/java \ - $(JDK_OUTPUTDIR)/gensrc_jobjc/src, \ - INCLUDES := com/apple/jobjc,\ - EXCLUDES := tests/java/com/apple/jobjc,\ - BIN:=$(JDK_OUTPUTDIR)/jobjc_classes,\ - JAR:=$(JDK_OUTPUTDIR)/lib/JObjC.jar, \ - JARINDEX := true)) - -$(BUILD_JOBJC) : $(BUILD_JDK) - -$(eval $(call SetupJavaCompilation,BUILD_JOBJC_HEADERS,\ - SETUP:=GENERATE_JDKBYTECODE,\ - SRC:=$(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/java \ - $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/java \ - $(JDK_OUTPUTDIR)/gensrc_jobjc/src, \ - INCLUDES := com/apple/jobjc,\ - EXCLUDES := tests/java/com/apple/jobjc,\ - BIN:=$(JDK_OUTPUTDIR)/jobjc_classes_headers,\ - HEADERS:=$(JDK_OUTPUTDIR)/gensrc_headers_jobjc)) - -$(BUILD_JOBJC_HEADERS) : $(BUILD_JDK) - -endif ########################################################################################## @@ -402,7 +359,7 @@ ########################################################################################## -all: $(BUILD_JDK) $(BUILD_ALTCLASSES) $(BUILD_JOBJC) $(BUILD_JOBJC_HEADERS) $(COPY_EXTRA) \ +all: $(BUILD_JDK) $(BUILD_ALTCLASSES) $(COPY_EXTRA) \ $(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin \ $(BUILD_ACCESSBRIDGE_32) $(BUILD_ACCESSBRIDGE_64) \ $(BUILD_ACCESSBRIDGE_LEGACY) diff -r 07116006f9a5 -r 8860c4df071b jdk/makefiles/CompileNativeLibraries.gmk --- a/jdk/makefiles/CompileNativeLibraries.gmk Mon Sep 02 11:41:21 2013 +0400 +++ b/jdk/makefiles/CompileNativeLibraries.gmk Thu Sep 05 10:29:33 2013 -0400 @@ -3297,67 +3297,6 @@ ########################################################################################## -ifeq ($(OPENJDK_TARGET_OS), macosx) - -# Ugly hack to mimic behaviour in old build where this is built as an xcode project. -SET_SHARED_LIBRARY_NAME=-Xlinker -install_name -Xlinker /usr/local/lib/libJObjC.dylib - -$(eval $(call SetupNativeCompilation,BUILD_LIBJOBJC32,\ - LIBRARY:=JObjC,\ - OUTPUT_DIR:=$(JDK_OUTPUTDIR)/objs/libjobjc32,\ - SRC:=$(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/native \ - $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/native ,\ - LANG:=C,\ - OPTIMIZATION:=LOW, \ - CFLAGS:=-fpascal-strings \ - -fobjc-gc \ - -gdwarf-2 \ - $(CFLAGS_JDKLIB) -I$(JDK_OUTPUTDIR)/gensrc_headers_jobjc \ - -F/System/Library/Frameworks/JavaVM.framework/Frameworks \ - -m32,\ - LDFLAGS:=$(LDFLAGS_JDKLIB)\ - -m32, \ - LDFLAGS_SUFFIX:=-framework Foundation -framework JavaVM \ - -F/System/Library/Frameworks/JavaVM.framework/Frameworks \ - -framework JavaNativeFoundation \ - -lffi, \ - OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjobjc32,\ - DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES))) - -$(eval $(call SetupNativeCompilation,BUILD_LIBJOBJC64,\ - LIBRARY:=JObjC,\ - OUTPUT_DIR:=$(JDK_OUTPUTDIR)/objs/libjobjc64,\ - SRC:=$(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/native \ - $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/native ,\ - LANG:=C,\ - OPTIMIZATION:=LOW, \ - CFLAGS:=-fpascal-strings \ - -fobjc-gc \ - -gdwarf-2 \ - $(CFLAGS_JDKLIB) -I$(JDK_OUTPUTDIR)/gensrc_headers_jobjc \ - -F/System/Library/Frameworks/JavaVM.framework/Frameworks \ - , \ - LDFLAGS:=-fpascal-strings \ - -fobjc-gc \ - -gdwarf-2 \ - $(LDFLAGS_JDKLIB)\ - $(call SET_SHARED_LIBRARY_ORIGIN), \ - LDFLAGS_SUFFIX:=-framework Foundation -framework JavaVM \ - -F/System/Library/Frameworks/JavaVM.framework/Frameworks \ - -framework JavaNativeFoundation \ - -lffi, \ - OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjobjc64,\ - DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES))) - -$(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)JObjC$(SHARED_LIBRARY_SUFFIX): $(BUILD_LIBJOBJC32) $(BUILD_LIBJOBJC64) - $(LIPO) -create -output $@ $(BUILD_LIBJOBJC32) $(BUILD_LIBJOBJC64) - -BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)JObjC$(SHARED_LIBRARY_SUFFIX) - -endif - -########################################################################################## - ifndef OPENJDK ifeq ($(OPENJDK_TARGET_OS), windows) diff -r 07116006f9a5 -r 8860c4df071b jdk/makefiles/CreateJars.gmk --- a/jdk/makefiles/CreateJars.gmk Mon Sep 02 11:41:21 2013 +0400 +++ b/jdk/makefiles/CreateJars.gmk Thu Sep 05 10:29:33 2013 -0400 @@ -1028,15 +1028,6 @@ ########################################################################################## -ifeq ($(OPENJDK_TARGET_OS),macosx) - $(eval $(call SetupArchive,BUILD_JOBJC_JAR,,\ - SRCS:=$(JDK_OUTPUTDIR)/jobjc_classes,\ - JAR:=$(IMAGES_OUTPUTDIR)/lib/JObjC.jar, \ - JARINDEX:=true)) -endif - -########################################################################################## - ifndef OPENJDK $(eval $(call SetupArchive,BUILD_ALT_RT_JAR,,\ SRCS:=$(JDK_OUTPUTDIR)/altclasses_classes,\ diff -r 07116006f9a5 -r 8860c4df071b jdk/makefiles/GenerateJavaSources.gmk --- a/jdk/makefiles/GenerateJavaSources.gmk Mon Sep 02 11:41:21 2013 +0400 +++ b/jdk/makefiles/GenerateJavaSources.gmk Thu Sep 05 10:29:33 2013 -0400 @@ -83,11 +83,6 @@ include GensrcSwing.gmk GENSRC += $(GENSRC_SWING_BEANINFO) $(GENSRC_SWING_NIMBUS) -ifeq ($(OPENJDK_TARGET_OS), macosx) - include GensrcJObjC.gmk - GENSRC += $(GENSRC_JOBJC) -endif - $(GENSRC) : $(BUILD_TOOLS) all: $(GENSRC) diff -r 07116006f9a5 -r 8860c4df071b jdk/makefiles/Images.gmk --- a/jdk/makefiles/Images.gmk Mon Sep 02 11:41:21 2013 +0400 +++ b/jdk/makefiles/Images.gmk Thu Sep 05 10:29:33 2013 -0400 @@ -283,14 +283,13 @@ $(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) $(MKDIR) -p $@ -# In the old build, JObjC.jar is not part of the meta-index $(JRE_IMAGE_DIR)/lib/meta-index: $(JRE_LIB_TARGETS) $(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) - $(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index `$(LS) *.jar | $(SED) 's/JObjC\.jar//g'` + $(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar $(JDK_IMAGE_DIR)/jre/lib/meta-index: $(JDKJRE_LIB_TARGETS) $(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) - $(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index `$(LS) *.jar | $(SED) 's/JObjC\.jar//g'` + $(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar $(JRE_IMAGE_DIR)/lib/ext/meta-index: $(JRE_LIB_TARGETS) $(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) diff -r 07116006f9a5 -r 8860c4df071b jdk/makefiles/Profiles.gmk --- a/jdk/makefiles/Profiles.gmk Mon Sep 02 11:41:21 2013 +0400 +++ b/jdk/makefiles/Profiles.gmk Thu Sep 05 10:29:33 2013 -0400 @@ -109,10 +109,6 @@ ALL_JARS += $(IMAGES_OUTPUTDIR)/lib/ext/sunmscapi.jar endif -ifeq ($(OPENJDK_TARGET_OS),macosx) - ALL_JARS += $(IMAGES_OUTPUTDIR)/lib/JObjC.jar -endif - ifeq ($(PROFILE), profile_1) PROFILE_JARS := $(PROFILE_1_JARS) else ifeq ($(PROFILE), profile_2)