Skip to content
Permalink
Browse files

Merge

  • Loading branch information
JesperIRL committed Dec 16, 2019
2 parents 820e1a7 + 49048ad commit 83163dbfe61b4ce6687ddd13d364954900a1e9ee
Showing with 10,956 additions and 1,144 deletions.
  1. +1 −0 .hgtags
  2. +38 −12 make/Bundles.gmk
  3. +19 −15 make/MacBundles.gmk
  4. +2 −0 make/common/Modules.gmk
  5. +2 −2 make/conf/jib-profiles.js
  6. +107 −0 make/gensrc/GensrcVarHandles.gmk
  7. +3 −1 src/hotspot/share/ci/ciField.cpp
  8. +47 −20 src/hotspot/share/ci/ciMethodData.cpp
  9. +1 −1 src/hotspot/share/ci/ciMethodData.hpp
  10. +5 −4 src/hotspot/share/oops/methodData.hpp
  11. +2 −6 src/java.base/share/classes/java/io/BufferedReader.java
  12. +3 −3 src/java.base/share/classes/java/io/LineNumberReader.java
  13. +494 −0 src/java.base/share/classes/java/lang/invoke/AddressVarHandleGenerator.java
  14. +39 −0 src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java
  15. +63 −0 src/java.base/share/classes/java/lang/invoke/VarHandleMemoryAddressBase.java
  16. +50 −0 src/java.base/share/classes/java/lang/invoke/VarHandles.java
  17. +6 −1 src/java.base/share/classes/java/lang/invoke/X-VarHandleByteArrayView.java.template
  18. +512 −0 src/java.base/share/classes/java/lang/invoke/X-VarHandleMemoryAddressView.java.template
  19. +48 −1 src/java.base/share/classes/java/nio/Buffer.java
  20. +16 −11 src/java.base/share/classes/java/nio/ByteBufferAs-X-Buffer.java.template
  21. +6 −4 src/java.base/share/classes/java/nio/Direct-X-Buffer-bin.java.template
  22. +25 −15 src/java.base/share/classes/java/nio/Direct-X-Buffer.java.template
  23. +61 −27 src/java.base/share/classes/java/nio/Heap-X-Buffer.java.template
  24. +8 −6 src/java.base/share/classes/java/nio/MappedByteBuffer.java
  25. +2 −2 src/java.base/share/classes/java/nio/StringCharBuffer.java
  26. +15 −6 src/java.base/share/classes/java/nio/X-Buffer.java.template
  27. +39 −0 src/java.base/share/classes/jdk/internal/access/JavaLangInvokeAccess.java
  28. +32 −0 src/java.base/share/classes/jdk/internal/access/JavaNioAccess.java
  29. +42 −0 src/java.base/share/classes/jdk/internal/access/foreign/MemoryAddressProxy.java
  30. +35 −0 src/java.base/share/classes/jdk/internal/access/foreign/MemorySegmentProxy.java
  31. +36 −0 src/java.base/share/classes/jdk/internal/access/foreign/UnmapperProxy.java
  32. +12 −5 src/java.base/share/classes/module-info.java
  33. +103 −64 src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java
  34. +5 −4 src/java.base/share/classes/sun/nio/ch/Util.java
  35. +1 −1 src/java.base/share/classes/sun/security/ssl/SSLContextImpl.java
  36. +8 −3 src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/Main.java
  37. +178 −0 src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/AbstractLayout.java
  38. +210 −0 src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/GroupLayout.java
  39. +111 −0 src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/MemoryAddress.java
  40. +268 −0 src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/MemoryHandles.java
  41. +445 −0 src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/MemoryLayout.java
  42. +138 −0 src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/MemoryLayouts.java
  43. +430 −0 src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/MemorySegment.java
  44. +111 −0 src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/PaddingLayout.java
  45. +161 −0 src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/SequenceLayout.java
  46. +140 −0 src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/ValueLayout.java
  47. +90 −0 src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/package-info.java
  48. +68 −0 src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/unsafe/ForeignUnsafe.java
  49. +216 −0 src/jdk.incubator.foreign/share/classes/jdk/internal/foreign/LayoutPath.java
  50. +117 −0 src/jdk.incubator.foreign/share/classes/jdk/internal/foreign/MemoryAddressImpl.java
  51. +119 −0 src/jdk.incubator.foreign/share/classes/jdk/internal/foreign/MemoryScope.java
  52. +209 −0 src/jdk.incubator.foreign/share/classes/jdk/internal/foreign/MemorySegmentImpl.java
  53. +157 −0 src/jdk.incubator.foreign/share/classes/jdk/internal/foreign/Utils.java
  54. +35 −0 src/jdk.incubator.foreign/share/classes/module-info.java
  55. +17 −1 .../org.graalvm.compiler.api.directives/src/org/graalvm/compiler/api/directives/GraalDirectives.java
  56. +5 −5 ...are/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64Assembler.java
  57. +12 −1 ...iler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AVXKind.java
  58. +9 −2 ...are/classes/org.graalvm.compiler.asm.sparc/src/org/graalvm/compiler/asm/sparc/SPARCAssembler.java
  59. +17 −2 ...classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64AddressNode.java
  60. +1 −1 ....graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64ArithmeticLIRGenerator.java
  61. +9 −8 ...lasses/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64LIRGenerator.java
  62. +16 −0 .../share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LIRKind.java
  63. +6 −1 .../share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/NumUtil.java
  64. +7 −0 ...are/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/Stamp.java
  65. +16 −6 ...are/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/HashMapGetTest.java
  66. +57 −0 ...es/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ObjectSubstitutionsTest.java
  67. +27 −4 ...ompiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/DebugContext.java
  68. +6 −2 ...m.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/ScopeImpl.java
  69. +1 −1 ...mpiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotBackendFactory.java
  70. +76 −0 ...r.hotspot.amd64.test/src/org/graalvm/compiler/hotspot/amd64/test/NumberOfTrailingZeroings003.java
  71. +2 −1 ...vm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotAddressLowering.java
  72. +1 −1 ...lvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotBackendFactory.java
  73. +1 −1 ...lvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotBackendFactory.java
  74. +1 −1 ...g.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CompilationWrapperTest.java
  75. +2 −1 ...sses/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CompileTheWorld.java
  76. +391 −0 ...lvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/MethodSubstitutionEffectTest.java
  77. +396 −0 ...ompiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/MethodSubstitutionForeignCallTest.java
  78. +204 −139 ...graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/WriteBarrierAdditionTest.java
  79. +1 −0 ...e/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java
  80. +3 −2 .../classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotBackendFactory.java
  81. +2 −1 ...re/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalRuntime.java
  82. +3 −1 ...es/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalRuntimeProvider.java
  83. +1 −1 ...lasses/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotReplacementsImpl.java
  84. +15 −6 ...classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/SymbolicSnippetEncoder.java
  85. +19 −24 ...raalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/DefaultHotSpotLoweringProvider.java
  86. +6 −4 ...classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotGCProvider.java
  87. +41 −5 ...rg.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotGraphBuilderPlugins.java
  88. +3 −26 ...rg.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotUnsafeSubstitutions.java
  89. +101 −0 ...es/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/FastNotifyNode.java
  90. +14 −1 ...compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotSpotG1WriteBarrierSnippets.java
  91. +6 −1 ...aalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotSpotReplacementsUtil.java
  92. +126 −0 ...es/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ObjectSnippets.java
  93. +0 −64 ...g.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ObjectSubstitutions.java
  94. +106 −0 ....graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/UnsafeCopyMemoryNode.java
  95. +104 −0 ...es/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/UnsafeSnippets.java
  96. +15 −2 ...mpiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/BciBlockMapping.java
  97. +133 −20 ...ompiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/BytecodeParser.java
  98. +19 −6 ...l.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/JsrScope.java
  99. +1 −1 ...are/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64MathPowOp.java
  100. +72 −0 .../classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/vector/AVXBlendOp.java
  101. +4 −1 ...ler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/gen/LIRGeneratorTool.java
  102. +58 −0 ...re/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/StampToolTest.java
  103. +22 −25 ...ompiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GraphDecoder.java
  104. +9 −2 ...ler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardedValueNode.java
  105. +17 −11 ...share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/FloatEqualsNode.java
  106. +1 −1 ...iler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IsNullNode.java
  107. +4 −4 ...are/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/PointerEqualsNode.java
  108. +75 −0 ...share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/SideEffectNode.java
  109. +4 −0 ...mpiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/gc/BarrierSet.java
  110. +6 −0 ...are/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/gc/CardTableBarrierSet.java
  111. +54 −3 ...iler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/gc/G1BarrierSet.java
  112. +5 −5 ...sses/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/gc/G1ReferentFieldReadBarrier.java
  113. +12 −2 .../org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/IntrinsicContext.java
  114. +54 −6 ...g.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/LoopExplosionPlugin.java
  115. +6 −1 ...er/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/HeapAccess.java
  116. +5 −4 ...piler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/type/StampTool.java
  117. +34 −357 ...vm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ConditionalEliminationPhase.java
  118. +441 −0 ...lvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ConditionalEliminationUtil.java
  119. +8 −6 ...alvm.compiler.replacements/src/org/graalvm/compiler/replacements/DefaultJavaLoweringProvider.java
  120. +9 −1 ...rg.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/IntrinsicGraphBuilder.java
  121. +27 −7 ...alvm.compiler.replacements/src/org/graalvm/compiler/replacements/StandardGraphBuilderPlugins.java
  122. +21 −8 ...raalvm.compiler.replacements/src/org/graalvm/compiler/replacements/gc/G1WriteBarrierSnippets.java
  123. +5 −2 ...iler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerAddExactNode.java
  124. +7 −5 ...lacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerAddExactOverflowNode.java
  125. +4 −0 test/jdk/TEST.groups
  126. +25 −0 test/jdk/java/foreign/TEST.properties
  127. +145 −0 test/jdk/java/foreign/TestArrays.java
  128. +555 −0 test/jdk/java/foreign/TestByteBuffer.java
  129. +96 −0 test/jdk/java/foreign/TestLayoutConstants.java
  130. +137 −0 test/jdk/java/foreign/TestLayoutPaths.java
  131. +289 −0 test/jdk/java/foreign/TestLayouts.java
  132. +459 −0 test/jdk/java/foreign/TestMemoryAccess.java
  133. +137 −0 test/jdk/java/foreign/TestMemoryAlignment.java
  134. +127 −0 test/jdk/java/foreign/TestMemoryCopy.java
  135. +232 −0 test/jdk/java/foreign/TestNative.java
  136. +196 −0 test/jdk/java/foreign/TestSegments.java
  137. +82 −0 test/jdk/java/foreign/TestSharedAccess.java
  138. +97 −0 test/jdk/java/foreign/TestSlices.java
  139. +189 −0 test/jdk/java/foreign/TestVarHandleCombinators.java
  140. +115 −0 test/jdk/java/foreign/libNativeAccess.c
  141. +3 −56 test/jdk/java/io/LineNumberReader/Read.java
  142. +15 −15 test/jdk/javax/net/ssl/compatibility/Cert.java
  143. +0 −61 test/jdk/javax/net/ssl/compatibility/JdkRelease.java
  144. +1 −1 test/jdk/javax/net/ssl/compatibility/UseCase.java
  145. +0 −1 test/jdk/javax/net/ssl/sanity/ciphersuites/SystemPropCipherSuitesOrder.java
  146. +2 −2 test/jdk/javax/swing/text/html/TestJLabelWithHTMLText.java
@@ -600,4 +600,5 @@ c16ac7a2eba4e73cb4f7ee9294dd647860eebff0 jdk-14+21
17d242844fc9e7d18b3eac97426490a9c246119e jdk-14+25
288777cf0702914e5266bc1e5d380eed9032ca41 jdk-14+26
2c724dba4c3cf9516b2152e151c9aea66b21b30b jdk-15+0
91a3f092682fc715d991a87eb6ec6f28886d2035 jdk-14+27
63e17cf29bed191ea21020b4648c9cdf893f80f5 jdk-15+1
@@ -156,6 +156,12 @@ ifeq ($(call isTargetOs, macosx)+$(DEBUG_LEVEL), true+release)
JRE_IMAGE_HOMEDIR := $(JRE_MACOSX_CONTENTS_DIR)/Home
JDK_BUNDLE_SUBDIR :=
JRE_BUNDLE_SUBDIR :=
# In certain situations, the JDK_IMAGE_DIR points to an image without the
# the symbols and demos. If so, the symobls and demos can be found in a
# separate image. These variables allow for overriding from a custom makefile.
JDK_SYMBOLS_IMAGE_DIR ?= $(JDK_IMAGE_DIR)
JDK_DEMOS_IMAGE_DIR ?= $(JDK_IMAGE_DIR)
JDK_DEMOS_IMAGE_HOMEDIR ?= $(JDK_DEMOS_IMAGE_DIR)/$(JDK_MACOSX_CONTENTS_SUBDIR)/Home
else
JDK_IMAGE_HOMEDIR := $(JDK_IMAGE_DIR)
JRE_IMAGE_HOMEDIR := $(JRE_IMAGE_DIR)
@@ -165,6 +171,12 @@ else
JDK_BUNDLE_SUBDIR := $(JDK_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
JRE_BUNDLE_SUBDIR := $(JRE_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
endif
# In certain situations, the JDK_IMAGE_DIR points to an image without the
# the symbols and demos. If so, the symobls and demos can be found in a
# separate image. These variables allow for overriding from a custom makefile.
JDK_SYMBOLS_IMAGE_DIR ?= $(JDK_IMAGE_DIR)
JDK_DEMOS_IMAGE_DIR ?= $(JDK_IMAGE_DIR)
JDK_DEMOS_IMAGE_HOMEDIR ?= $(JDK_DEMOS_IMAGE_DIR)
endif

################################################################################
@@ -176,13 +188,24 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
# There may be files with spaces in the names, so use ShellFindFiles
# explicitly.
ALL_JDK_FILES := $(call ShellFindFiles, $(JDK_IMAGE_DIR))
ifneq ($(JDK_IMAGE_DIR), $(JDK_SYMBOLS_IMAGE_DIR))
ALL_JDK_SYMBOLS_FILES := $(call ShellFindFiles, $(JDK_SYMBOLS_IMAGE_DIR))
else
ALL_JDK_SYMBOLS_FILES := $(ALL_JDK_FILES)
endif
ifneq ($(JDK_IMAGE_DIR), $(JDK_DEMOS_IMAGE_DIR))
ALL_JDK_DEMOS_FILES := $(call ShellFindFiles, $(JDK_DEMOS_IMAGE_DIR))
else
ALL_JDK_DEMOS_FILES := $(ALL_JDK_FILES)
endif

# Create special filter rules when dealing with unzipped .dSYM directories on
# macosx
ifeq ($(call isTargetOs, macosx), true)
ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), false)
JDK_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \
$(call containing, .dSYM/, $(patsubst $(JDK_IMAGE_DIR)/%, %, $(ALL_JDK_FILES))))
$(call containing, .dSYM/, $(patsubst $(JDK_IMAGE_DIR)/%, %, \
$(ALL_JDK_SYMBOLS_FILES))))
endif
endif

@@ -203,12 +226,13 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
$(filter-out \
$(JDK_IMAGE_HOMEDIR)/demo/% \
, \
$(ALL_JDK_FILES) \
$(ALL_JDK_SYMBOLS_FILES) \
) \
) \
$(call FindFiles, $(SYMBOLS_IMAGE_DIR))

TEST_DEMOS_BUNDLE_FILES := $(filter $(JDK_IMAGE_HOMEDIR)/demo/%, $(ALL_JDK_FILES))
TEST_DEMOS_BUNDLE_FILES := $(filter $(JDK_DEMOS_IMAGE_HOMEDIR)/demo/%, \
$(ALL_JDK_DEMOS_FILES))

ALL_JRE_FILES := $(call ShellFindFiles, $(JRE_IMAGE_DIR))

@@ -245,23 +269,25 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )

LEGACY_TARGETS += $(BUILD_JRE_BUNDLE)

$(eval $(call SetupBundleFile, BUILD_JDK_SYMBOLS_BUNDLE, \
BUNDLE_NAME := $(JDK_SYMBOLS_BUNDLE_NAME), \
FILES := $(JDK_SYMBOLS_BUNDLE_FILES), \
BASE_DIRS := $(JDK_IMAGE_DIR) $(wildcard $(SYMBOLS_IMAGE_DIR)), \
SUBDIR := $(JDK_BUNDLE_SUBDIR), \
UNZIP_DEBUGINFO := true, \
))
ifeq ($(COPY_DEBUG_SYMBOLS), true)
$(eval $(call SetupBundleFile, BUILD_JDK_SYMBOLS_BUNDLE, \
BUNDLE_NAME := $(JDK_SYMBOLS_BUNDLE_NAME), \
FILES := $(JDK_SYMBOLS_BUNDLE_FILES), \
BASE_DIRS := $(JDK_SYMBOLS_IMAGE_DIR) $(wildcard $(SYMBOLS_IMAGE_DIR)), \
SUBDIR := $(JDK_BUNDLE_SUBDIR), \
UNZIP_DEBUGINFO := true, \
))

PRODUCT_TARGETS += $(BUILD_JDK_SYMBOLS_BUNDLE)
PRODUCT_TARGETS += $(BUILD_JDK_SYMBOLS_BUNDLE)
endif

# The demo bundle is only created to support client tests. Ideally it should
# be built with the main test bundle, but since the prerequisites match
# better with the product build, it makes more sense to keep it there for now.
$(eval $(call SetupBundleFile, BUILD_TEST_DEMOS_BUNDLE, \
BUNDLE_NAME := $(TEST_DEMOS_BUNDLE_NAME), \
FILES := $(TEST_DEMOS_BUNDLE_FILES), \
BASE_DIRS := $(JDK_IMAGE_DIR), \
BASE_DIRS := $(JDK_DEMOS_IMAGE_DIR), \
SUBDIR := $(JDK_BUNDLE_SUBDIR), \
))

@@ -61,17 +61,15 @@ ifeq ($(call isTargetOs, macosx), true)
FILES := $(call FindFiles, $(JRE_IMAGE_DIR)), \
))

$(JDK_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib:
$(call LogInfo, Creating link $(patsubst $(OUTPUTDIR)/%,%,$@))
$(call MakeTargetDir)
$(RM) $@
$(LN) -s ../Home/lib/libjli.dylib $@

$(JRE_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib:
$(call LogInfo, Creating link $(patsubst $(OUTPUTDIR)/%,%,$@))
$(call MakeTargetDir)
$(RM) $@
$(LN) -s ../Home/lib/libjli.dylib $@
$(eval $(call SetupCopyFiles, COPY_LIBJLI_JDK, \
FILES := $(JDK_IMAGE_DIR)/lib/libjli.dylib, \
DEST := $(JDK_MACOSX_CONTENTS_DIR)/MacOS, \
))

$(eval $(call SetupCopyFiles, COPY_LIBJLI_JRE, \
FILES := $(JRE_IMAGE_DIR)/lib/libjli.dylib, \
DEST := $(JRE_MACOSX_CONTENTS_DIR)/MacOS, \
))

$(eval $(call SetupTextFileProcessing, BUILD_JDK_PLIST, \
SOURCE_FILES := $(MACOSX_PLIST_SRC)/JDK-Info.plist, \
@@ -97,13 +95,19 @@ ifeq ($(call isTargetOs, macosx), true)
@@VENDOR@@ => $(BUNDLE_VENDOR) , \
))

jdk-bundle: $(COPY_JDK_IMAGE) $(JDK_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib \
$(BUILD_JDK_PLIST)
$(SUPPORT_OUTPUTDIR)/images/_jdk_bundle_attribute_set: $(COPY_JDK_IMAGE)
$(SETFILE) -a B $(dir $(JDK_MACOSX_CONTENTS_DIR))
$(TOUCH) $@

jre-bundle: $(COPY_JRE_IMAGE) $(JRE_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib \
$(BUILD_JRE_PLIST)
$(SUPPORT_OUTPUTDIR)/images/_jre_bundle_attribute_set: $(COPY_JRE_IMAGE)
$(SETFILE) -a B $(dir $(JRE_MACOSX_CONTENTS_DIR))
$(TOUCH) $@

jdk-bundle: $(COPY_JDK_IMAGE) $(COPY_LIBJLI_JDK) \
$(BUILD_JDK_PLIST) $(SUPPORT_OUTPUTDIR)/images/_jdk_bundle_attribute_set

jre-bundle: $(COPY_JRE_IMAGE) $(COPY_LIBJLI_JRE) \
$(BUILD_JRE_PLIST) $(SUPPORT_OUTPUTDIR)/images/_jre_bundle_attribute_set

else # Not macosx

@@ -58,6 +58,7 @@ BOOT_MODULES += \
java.rmi \
java.security.sasl \
java.xml \
jdk.incubator.foreign \
jdk.internal.vm.ci \
jdk.jfr \
jdk.management \
@@ -162,6 +163,7 @@ DOCS_MODULES += \
jdk.jsobject \
jdk.jshell \
jdk.jstatd \
jdk.incubator.foreign \
jdk.localedata \
jdk.management \
jdk.management.agent \
@@ -434,15 +434,15 @@ var getJibProfilesProfiles = function (input, common, data) {
target_cpu: "x64",
dependencies: ["devkit", "cups"],
configure_args: concat(common.configure_args_64bit,
"--with-zlib=system", "--enable-dtrace"),
"--with-zlib=system", "--enable-dtrace", "--enable-deprecated-ports=yes"),
},

"solaris-sparcv9": {
target_os: "solaris",
target_cpu: "sparcv9",
dependencies: ["devkit", "cups"],
configure_args: concat(common.configure_args_64bit,
"--with-zlib=system", "--enable-dtrace"),
"--with-zlib=system", "--enable-dtrace", "--enable-deprecated-ports=yes"),
},

"windows-x64": {
@@ -159,6 +159,108 @@ endef

################################################################################

################################################################################
# Setup a rule for generating a VarHandleMemoryAddress java class
# Param 1 - Variable declaration prefix
# Param 2 - Type with first letter capitalized
define GenerateVarHandleMemoryAddress

$1_Type := $2

$1_FILENAME := $(VARHANDLES_GENSRC_DIR)/VarHandleMemoryAddressAs$$($1_Type)s.java

ifeq ($$($1_Type), Byte)
$1_type := byte
$1_BoxType := $$($1_Type)

$1_rawType := $$($1_type)
$1_RawType := $$($1_Type)
$1_RawBoxType := $$($1_BoxType)

$1_ARGS += -Kbyte
endif

ifeq ($$($1_Type), Short)
$1_type := short
$1_BoxType := $$($1_Type)

$1_rawType := $$($1_type)
$1_RawType := $$($1_Type)
$1_RawBoxType := $$($1_BoxType)
endif

ifeq ($$($1_Type), Char)
$1_type := char
$1_BoxType := Character

$1_rawType := $$($1_type)
$1_RawType := $$($1_Type)
$1_RawBoxType := $$($1_BoxType)
endif

ifeq ($$($1_Type), Int)
$1_type := int
$1_BoxType := Integer

$1_rawType := $$($1_type)
$1_RawType := $$($1_Type)
$1_RawBoxType := $$($1_BoxType)

$1_ARGS += -KCAS
$1_ARGS += -KAtomicAdd
$1_ARGS += -KBitwise
endif

ifeq ($$($1_Type), Long)
$1_type := long
$1_BoxType := $$($1_Type)

$1_rawType := $$($1_type)
$1_RawType := $$($1_Type)
$1_RawBoxType := $$($1_BoxType)

$1_ARGS += -KCAS
$1_ARGS += -KAtomicAdd
$1_ARGS += -KBitwise
endif

ifeq ($$($1_Type), Float)
$1_type := float
$1_BoxType := $$($1_Type)

$1_rawType := int
$1_RawType := Int
$1_RawBoxType := Integer

$1_ARGS += -KCAS
$1_ARGS += -KfloatingPoint
endif

ifeq ($$($1_Type), Double)
$1_type := double
$1_BoxType := $$($1_Type)

$1_rawType := long
$1_RawType := Long
$1_RawBoxType := Long

$1_ARGS += -KCAS
$1_ARGS += -KfloatingPoint
endif

$$($1_FILENAME): $(VARHANDLES_SRC_DIR)/X-VarHandleMemoryAddressView.java.template $(BUILD_TOOLS_JDK)
$$(call MakeDir, $$(@D))
$(RM) $$@
$(TOOL_SPP) -nel -K$$($1_type) \
-Dtype=$$($1_type) -DType=$$($1_Type) -DBoxType=$$($1_BoxType) \
-DrawType=$$($1_rawType) -DRawType=$$($1_RawType) -DRawBoxType=$$($1_RawBoxType) \
$$($1_ARGS) -i$$< -o$$@

GENSRC_VARHANDLES += $$($1_FILENAME)
endef

################################################################################

# List the types to generate source for, with capitalized first letter
VARHANDLES_TYPES := Boolean Byte Short Char Int Long Float Double Reference
$(foreach t, $(VARHANDLES_TYPES), \
@@ -169,6 +271,11 @@ VARHANDLES_BYTE_ARRAY_TYPES := Short Char Int Long Float Double
$(foreach t, $(VARHANDLES_BYTE_ARRAY_TYPES), \
$(eval $(call GenerateVarHandleByteArray,VAR_HANDLE_BYTE_ARRAY_$t,$t)))

# List the types to generate source for, with capitalized first letter
VARHANDLES_MEMORY_ADDRESS_TYPES := Byte Short Char Int Long Float Double
$(foreach t, $(VARHANDLES_MEMORY_ADDRESS_TYPES), \
$(eval $(call GenerateVarHandleMemoryAddress,VAR_HANDLE_MEMORY_ADDRESS_$t,$t)))

GENSRC_JAVA_BASE += $(GENSRC_VARHANDLES)

# Include custom extension post hook
@@ -219,7 +219,9 @@ static bool trust_final_non_static_fields(ciInstanceKlass* holder) {
// Never trust strangely unstable finals: System.out, etc.
return false;
// Even if general trusting is disabled, trust system-built closures in these packages.
if (holder->is_in_package("java/lang/invoke") || holder->is_in_package("sun/invoke"))
if (holder->is_in_package("java/lang/invoke") || holder->is_in_package("sun/invoke") ||
holder->is_in_package("jdk/internal/foreign") || holder->is_in_package("jdk/incubator/foreign") ||
holder->is_in_package("java/lang"))
return true;
// Trust VM unsafe anonymous classes. They are private API (jdk.internal.misc.Unsafe)
// and can't be serialized, so there is no hacking of finals going on with them.

0 comments on commit 83163db

Please sign in to comment.
You can’t perform that action at this time.