Skip to content

Commit 930fc09

Browse files
committed
Merge master HEAD into openj9-staging
Signed-off-by: J9 Build <[email protected]>
2 parents d198581 + c12562a commit 930fc09

File tree

61 files changed

+1276
-1323
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1276
-1323
lines changed

.gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,5 @@ NashornProfile.txt
4545
/src/utils/LogCompilation/target/
4646
/.project/
4747
/.settings/
48-
/.project
49-
/.classpath
50-
/.cproject
5148
/compile_commands.json
5249
/.cache

doc/ide.html

-7
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,6 @@ <h4 id="eclipse-cdt">Eclipse CDT</h4>
110110
<pre><code>make eclipse-mixed-env</code></pre>
111111
<p>Do note that this generates all features that come with both Java and
112112
C/C++ natures.</p>
113-
<p>By default, the Eclipse Workspace is located in the ide subdirectory
114-
in the build output. To share the JDK's source directory with the
115-
Eclipse Workspace, you can instead run:</p>
116-
<pre><code>make eclipse-shared-&lt;ENV&gt;-env</code></pre>
117113
<p>Eclipse support in the JDK is relatively new, so do keep in mind that
118114
not everything may work at the moment. As such, the resulting Workspace
119115
also has compilation database parsing support enabled, so you can pass
@@ -160,9 +156,6 @@ <h4 id="eclipse">Eclipse</h4>
160156
<p>If doing so results in an error, you can also import the JDK via
161157
<code>File -&gt; Import -&gt; Existing Projects into Workspace</code> as
162158
a last resort.</p>
163-
<p>Alternatively, if you want a Java Workspace inside the JDK's source
164-
directory, you can instead run:</p>
165-
<pre><code>make eclipse-shared-java-env</code></pre>
166159
<p>As mentioned above for Eclipse CDT, you can create a combined Java
167160
and C/C++ Workspace which can conveniently switch between Java and C/C++
168161
natures during development by running:</p>

doc/ide.md

-15
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,6 @@ make eclipse-mixed-env
100100
Do note that this generates all features that come with both Java and C/C++
101101
natures.
102102

103-
By default, the Eclipse Workspace is located in the ide subdirectory in the
104-
build output. To share the JDK's source directory with the Eclipse Workspace,
105-
you can instead run:
106-
107-
```
108-
make eclipse-shared-<ENV>-env
109-
```
110-
111103
Eclipse support in the JDK is relatively new, so do keep in mind that not
112104
everything may work at the moment. As such, the resulting Workspace also
113105
has compilation database parsing support enabled, so you can pass Eclipse
@@ -176,13 +168,6 @@ If doing so results in an error, you can also import the JDK via
176168
`File -> Import -> Existing Projects into Workspace`
177169
as a last resort.
178170

179-
Alternatively, if you want a Java Workspace inside the JDK's source directory,
180-
you can instead run:
181-
182-
```
183-
make eclipse-shared-java-env
184-
```
185-
186171
As mentioned above for Eclipse CDT, you can create a combined Java and C/C++
187172
Workspace which can conveniently switch between Java and C/C++ natures during
188173
development by running:

make/Main.gmk

+4-24
Original file line numberDiff line numberDiff line change
@@ -274,42 +274,22 @@ $(eval $(call SetupTarget, hotspot-ide-project, \
274274

275275
$(eval $(call SetupTarget, eclipse-java-env, \
276276
MAKEFILE := ide/eclipse/CreateWorkspace, \
277-
ARGS := --always-make WORKSPACE=java SHARED=false, \
277+
ARGS := --always-make WORKSPACE=java, \
278278
))
279279

280280
$(eval $(call SetupTarget, eclipse-hotspot-env, \
281281
MAKEFILE := ide/eclipse/CreateWorkspace, \
282-
ARGS := --always-make WORKSPACE=hotspot SHARED=false, \
282+
ARGS := --always-make WORKSPACE=hotspot, \
283283
))
284284

285285
$(eval $(call SetupTarget, eclipse-native-env, \
286286
MAKEFILE := ide/eclipse/CreateWorkspace, \
287-
ARGS := --always-make WORKSPACE=native SHARED=false, \
287+
ARGS := --always-make WORKSPACE=native, \
288288
))
289289

290290
$(eval $(call SetupTarget, eclipse-mixed-env, \
291291
MAKEFILE := ide/eclipse/CreateWorkspace, \
292-
ARGS := --always-make SHARED=false, \
293-
))
294-
295-
$(eval $(call SetupTarget, eclipse-shared-java-env, \
296-
MAKEFILE := ide/eclipse/CreateWorkspace, \
297-
ARGS := --always-make WORKSPACE=java SHARED=true, \
298-
))
299-
300-
$(eval $(call SetupTarget, eclipse-shared-hotspot-env, \
301-
MAKEFILE := ide/eclipse/CreateWorkspace, \
302-
ARGS := --always-make WORKSPACE=hotspot SHARED=true, \
303-
))
304-
305-
$(eval $(call SetupTarget, eclipse-shared-native-env, \
306-
MAKEFILE := ide/eclipse/CreateWorkspace, \
307-
ARGS := --always-make WORKSPACE=native SHARED=true, \
308-
))
309-
310-
$(eval $(call SetupTarget, eclipse-shared-mixed-env, \
311-
MAKEFILE := ide/eclipse/CreateWorkspace, \
312-
ARGS := --always-make SHARED=true, \
292+
ARGS := --always-make, \
313293
))
314294

315295
ALL_TARGETS += $(HOTSPOT_VARIANT_TARGETS) $(HOTSPOT_VARIANT_GENSRC_TARGETS) \

make/ide/eclipse/CreateWorkspace.gmk

+41-70
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@ EmitExtractedDefines = \
7878
# Remaining parameter(s) are named arguments:
7979
# NATURE - Which Eclipse Workspace nature to generate for the Workspace. Can
8080
# be one of JAVA, HOTSPOT, NATIVE, or MIXED.
81-
# SHARED - Workspace will share the same directory as the JDK if true. Can be
82-
# either true or false. Defaults to false if not specified.
8381
SetupEclipseWorkspace = $(NamedParamsMacroTemplate)
8482
define SetupEclipseWorkspaceBody
8583

@@ -95,26 +93,12 @@ define SetupEclipseWorkspaceBody
9593
$$(error Unrecognised nature $$($1_NATURE) specified for Eclipse Workspace)
9694
endif
9795

98-
ifeq ($$($1_SHARED), )
99-
$$(info Workspace sharing option not given, assuming non-shared Eclipse Workspace)
100-
$1_SHARED := false
101-
else ifeq ($$(findstring $$($1_SHARED), true false), )
102-
$$(error $$($1_NATURE) is not a boolean word)
103-
endif
104-
105-
ifeq ($$($1_SHARED), true)
106-
$1_CLASSPATH_FILE := $(TOPDIR)/.classpath
107-
$1_WORKSPACE_FILE := $(TOPDIR)/.project
108-
$1_NATIVE_FILE := $(TOPDIR)/.cproject
109-
$1_SETTINGS_FILE := $(TOPDIR)/.settings/language.settings.xml
110-
else
111-
$1_IDE_OUTPUTDIR := $(OUTPUTDIR)/ide/eclipse
112-
$1_CLASSPATH_FILE := $$($1_IDE_OUTPUTDIR)/.classpath
113-
$1_WORKSPACE_FILE := $$($1_IDE_OUTPUTDIR)/.project
114-
$1_NATIVE_FILE := $$($1_IDE_OUTPUTDIR)/.cproject
115-
$1_SETTINGS_FILE := $$($1_IDE_OUTPUTDIR)/.settings/language.settings.xml
116-
$$(call MakeDir, $$($1_IDE_OUTPUTDIR))
117-
endif
96+
$1_IDE_OUTPUTDIR := $(OUTPUTDIR)/ide/eclipse
97+
$1_CLASSPATH_FILE := $$($1_IDE_OUTPUTDIR)/.classpath
98+
$1_WORKSPACE_FILE := $$($1_IDE_OUTPUTDIR)/.project
99+
$1_NATIVE_FILE := $$($1_IDE_OUTPUTDIR)/.cproject
100+
$1_SETTINGS_FILE := $$($1_IDE_OUTPUTDIR)/.settings/language.settings.xml
101+
$$(call MakeDir, $$($1_IDE_OUTPUTDIR))
118102

119103
ifneq ($$(findstring $$($1_NATURE), HOTSPOT NATIVE MIXED), )
120104
ifeq ($$(call isCompiler, microsoft), true)
@@ -198,14 +182,11 @@ define SetupEclipseWorkspaceBody
198182
$1_MAKE := $$(call FixPath, $(MAKE))
199183
endif
200184

201-
$1_MATCHING_MAKE_TARGETS :=
202-
$1_PLAIN_MAKE_TARGETS := update-build-docs docs gensrc gendata \
203-
copy java launchers libs hotspot jdk product-images all-images test-image clean
204-
205185
# make reconfigure omitted since it is sensitive to which make was used
206-
ifeq ($$($1_SHARED), true)
207-
$1_PLAIN_MAKE_TARGETS += dist-clean
208-
endif
186+
# make dist-clean omitted since it would delete the Workspace as well
187+
$1_MATCHING_MAKE_TARGETS :=
188+
$1_PLAIN_MAKE_TARGETS := update-build-docs docs gensrc gendata copy java \
189+
launchers libs hotspot jdk product-images product-bundles all-images test-image clean
209190

210191
$1_MATCHING_MAKE_TARGETS += $$(foreach name,$$($1_PLAIN_MAKE_TARGETS), \
211192
<target name="$$(strip $$(name))" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> \
@@ -232,11 +213,7 @@ define SetupEclipseWorkspaceBody
232213

233214
TARGETS += $$($1_CREATE_NATIVE_FILE)
234215

235-
ifeq ($$($1_SHARED), true)
236-
$$(call MakeDir, $(TOPDIR)/.settings)
237-
else
238-
$$(call MakeDir, $$($1_IDE_OUTPUTDIR)/.settings)
239-
endif
216+
$$(call MakeDir, $$($1_IDE_OUTPUTDIR)/.settings)
240217

241218
$1_CSETTINGS :=
242219
$1_CXXSETTINGS :=
@@ -314,40 +291,38 @@ define SetupEclipseWorkspaceBody
314291

315292
endif
316293

317-
ifeq ($$($1_SHARED), false)
318-
ifneq ($$(findstring $$($1_NATURE), JAVA MIXED), )
319-
$1_LINKED_RESOURCES += $$(foreach src,$(JAVA_DIRS), \
320-
<link> \
321-
<name>$$(strip $$(src))</name> \
322-
<type>2</type> \
323-
<location>$$(subst \\,/,$$(call FixPath, $(TOPDIR)/$$(src)))</location> \
324-
</link>$$(NEWLINE))
325-
endif
294+
ifneq ($$(findstring $$($1_NATURE), JAVA MIXED), )
295+
$1_LINKED_RESOURCES += $$(foreach src,$(JAVA_DIRS), \
296+
<link> \
297+
<name>$$(strip $$(src))</name> \
298+
<type>2</type> \
299+
<location>$$(subst \\,/,$$(call FixPath, $(TOPDIR)/$$(src)))</location> \
300+
</link>$$(NEWLINE))
301+
endif
326302

327-
ifneq ($$(findstring $$($1_NATURE), HOTSPOT NATIVE MIXED), )
328-
# CDT includes a Makefile editor, so if CDT support was indicated there's no harm in
329-
# including the make sources as well, since the cost of indexing them is miniscule
330-
$1_LINKED_RESOURCES += \
331-
<link> \
332-
<name>make</name> \
333-
<type>2</type> \
334-
<location>$$(subst \\,/,$$(call FixPath, $(TOPDIR)/make))</location> \
335-
</link> \
336-
<link> \
337-
<name>src/hotspot</name> \
338-
<type>2</type> \
339-
<location>$$(subst \\,/,$$(call FixPath, $(TOPDIR)/src/hotspot))</location> \
340-
</link>$$(NEWLINE)
341-
endif
303+
ifneq ($$(findstring $$($1_NATURE), HOTSPOT NATIVE MIXED), )
304+
# CDT includes a Makefile editor, so if CDT support was indicated there's no harm in
305+
# including the make sources as well, since the cost of indexing them is miniscule
306+
$1_LINKED_RESOURCES += \
307+
<link> \
308+
<name>make</name> \
309+
<type>2</type> \
310+
<location>$$(subst \\,/,$$(call FixPath, $(TOPDIR)/make))</location> \
311+
</link> \
312+
<link> \
313+
<name>src/hotspot</name> \
314+
<type>2</type> \
315+
<location>$$(subst \\,/,$$(call FixPath, $(TOPDIR)/src/hotspot))</location> \
316+
</link>$$(NEWLINE)
317+
endif
342318

343-
ifneq ($$(findstring $$($1_NATURE), NATIVE MIXED), )
344-
$1_LINKED_RESOURCES += $$(foreach src,$(NATIVE_DIRS), \
345-
<link> \
346-
<name>$$(strip $$(src))</name> \
347-
<type>2</type> \
348-
<location>$$(subst \\,/,$$(call FixPath, $(TOPDIR)/$$(src)))</location> \
349-
</link>$$(NEWLINE))
350-
endif
319+
ifneq ($$(findstring $$($1_NATURE), NATIVE MIXED), )
320+
$1_LINKED_RESOURCES += $$(foreach src,$(NATIVE_DIRS), \
321+
<link> \
322+
<name>$$(strip $$(src))</name> \
323+
<type>2</type> \
324+
<location>$$(subst \\,/,$$(call FixPath, $(TOPDIR)/$$(src)))</location> \
325+
</link>$$(NEWLINE))
351326
endif
352327

353328
$$(eval $$(call SetupTextFileProcessing, $1_CREATE_WORKSPACE_FILE, \
@@ -366,22 +341,18 @@ endef
366341
ifeq ($(WORKSPACE), java)
367342
$(eval $(call SetupEclipseWorkspace, SETUP_WORKSPACE, \
368343
NATURE := JAVA, \
369-
SHARED := $(SHARED), \
370344
))
371345
else ifeq ($(WORKSPACE), hotspot)
372346
$(eval $(call SetupEclipseWorkspace, SETUP_WORKSPACE, \
373347
NATURE := HOTSPOT, \
374-
SHARED := $(SHARED), \
375348
))
376349
else ifeq ($(WORKSPACE), native)
377350
$(eval $(call SetupEclipseWorkspace, SETUP_WORKSPACE, \
378351
NATURE := NATIVE, \
379-
SHARED := $(SHARED), \
380352
))
381353
else
382354
$(eval $(call SetupEclipseWorkspace, SETUP_WORKSPACE, \
383355
NATURE := MIXED, \
384-
SHARED := $(SHARED), \
385356
))
386357
endif
387358

src/java.base/share/classes/java/lang/StringUTF16.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,8 @@
3232
import java.util.function.IntConsumer;
3333
import java.util.stream.Stream;
3434
import java.util.stream.StreamSupport;
35+
36+
import jdk.internal.misc.Unsafe;
3537
import jdk.internal.util.ArraysSupport;
3638
import jdk.internal.util.DecimalDigits;
3739
import jdk.internal.vm.annotation.ForceInline;
@@ -1658,12 +1660,10 @@ public static int lastIndexOfLatin1(byte[] src, int srcCount,
16581660

16591661
////////////////////////////////////////////////////////////////
16601662

1661-
private static native boolean isBigEndian();
1662-
16631663
private static final int HI_BYTE_SHIFT;
16641664
private static final int LO_BYTE_SHIFT;
16651665
static {
1666-
if (isBigEndian()) {
1666+
if (Unsafe.getUnsafe().isBigEndian()) {
16671667
HI_BYTE_SHIFT = 8;
16681668
LO_BYTE_SHIFT = 0;
16691669
} else {

src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -84,7 +84,7 @@ public enum Feature {
8484
/**
8585
* A key for testing.
8686
*/
87-
@JEP(number=0, title="Test Feature")
87+
@JEP(number=2_147_483_647, title="Test Feature")
8888
TEST,
8989
;
9090
}

src/java.base/share/classes/sun/invoke/util/VerifyAccess.java

+4-8
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,10 @@ public static boolean isClassAccessible(Class<?> refc,
201201
Module lookupModule = lookupClass.getModule();
202202
Module refModule = refc.getModule();
203203

204-
// early VM startup case, java.base not defined
205-
if (lookupModule == null) {
206-
assert refModule == null;
204+
// early VM startup case, java.base not defined or
205+
// module system is not fully initialized and exports are not set up
206+
if (lookupModule == null || !jdk.internal.misc.VM.isModuleSystemInited()) {
207+
assert lookupModule == refModule;
207208
return true;
208209
}
209210

@@ -230,11 +231,6 @@ public static boolean isClassAccessible(Class<?> refc,
230231
if (isModuleAccessible(refc, lookupModule, prevLookupModule))
231232
return true;
232233

233-
// not exported but allow access during VM initialization
234-
// because java.base does not have its exports setup
235-
if (!jdk.internal.misc.VM.isModuleSystemInited())
236-
return true;
237-
238234
// public class not accessible to lookupClass
239235
return false;
240236
}

src/java.base/share/classes/sun/security/ssl/X509Authentication.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,8 @@ private static SSLPossession createServerPossession(
278278
SSLLogger.finest("X509KeyManager class: " +
279279
km.getClass().getName());
280280
}
281-
String serverAlias = null;
282281
for (String keyType : keyTypes) {
282+
String serverAlias = null;
283283
if (shc.conContext.transport instanceof SSLSocketImpl socket) {
284284
serverAlias = km.chooseServerAlias(keyType,
285285
shc.peerSupportedAuthorities == null ? null :

src/java.base/share/native/libjava/String.c

+1-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 1998, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -31,14 +31,3 @@ Java_java_lang_String_intern(JNIEnv *env, jobject this)
3131
{
3232
return JVM_InternString(env, this);
3333
}
34-
35-
JNIEXPORT jboolean JNICALL
36-
Java_java_lang_StringUTF16_isBigEndian(JNIEnv *env, jclass cls)
37-
{
38-
unsigned int endianTest = 0xff000000;
39-
if (((char*)(&endianTest))[0] != 0) {
40-
return JNI_TRUE;
41-
} else {
42-
return JNI_FALSE;
43-
}
44-
}

0 commit comments

Comments
 (0)