Skip to content
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.

Update FFI related code for compilation in JDK20 #12

Merged
Changes from 1 commit
Commits
Show all changes
180 commits
Select commit Hold shift + click to select a range
27dddd2
8298054: ProblemList jdk/jfr/api/consumer/recordingstream/TestStop.java
Dec 3, 2022
10918d0
8297683: Use enhanced-for cycle instead of Enumeration in java.securi…
Dec 4, 2022
be3d641
8298068: ProblemList tests failing due to JDK-8297235
Dec 4, 2022
c980078
8298067: Persistent test failures after 8296012
TheShermanTanker Dec 4, 2022
fee185d
8297609: Add application/wasm MIME type for wasm file extension
Karm Dec 5, 2022
de95b07
8297264: C2: Cast node is not processed again in CCP and keeps a wron…
chhagedorn Dec 5, 2022
8d12ee3
8296907: VMError: add optional callstacks, siginfo for secondary errors
tstuefe Dec 5, 2022
65fb984
8296384: [TESTBUG] sun/security/provider/SecureRandom/AbstractDrbg/Sp…
sendaoYan Dec 5, 2022
2e4790b
8297794: Deprecate JMX Management Applets for Removal
kevinjwalls Dec 5, 2022
13cc5b0
8297974: ClassCastException in com.sun.tools.javac.comp.AttrRecover.d…
lahodaj Dec 5, 2022
edaf390
8296545: C2 Blackholes should allow load optimizations
shipilev Dec 5, 2022
bd2fa1e
8291769: Translation of switch with record patterns could be improved
lahodaj Dec 5, 2022
1d80fd8
8297766: Remove UseMallocOnly development option
afshin-zafari Dec 5, 2022
3a1d3ea
8295044: Implementation of Foreign Function and Memory API (Second Pr…
mcimadamore Dec 5, 2022
16b01ab
8296477: Foreign linker implementation update following JEP 434
JornVernee Dec 5, 2022
880ba6f
8297606: [AIX] Broken build after JDK-8295475
Dec 5, 2022
67ec451
8297495: j.u.concurrent updates for JDK 20
Dec 5, 2022
0fd8212
8297733: Refactor Cast binding to enum
JornVernee Dec 5, 2022
d9be7dd
8296619: Upgrade jQuery to 3.6.1
hns Dec 5, 2022
ce2873b
8273357: SecurityManager deprecation warning from java/awt/regtesthel…
prrace Dec 5, 2022
05e1813
8297489: Modify TextAreaTextEventTest.java as to verify the content c…
ravigupta30 Dec 5, 2022
7ea801d
8298043: jdk/jfr/api/consumer/recordingstream/TestStop.java failed wi…
egahlin Dec 5, 2022
dde93c2
8298123: Problem List MaximizedToIconified.java on macOS
prrace Dec 5, 2022
8cb11a3
Check for illegal bits in SelfSuspendDisablerTest
babsingh Dec 5, 2022
f6c499c
8293453: tools/jpackage/share/AddLShortcutTest.java "Failed: Check th…
Dec 6, 2022
20c2d0f
8296489: tools/jpackage/windows/WinL10nTest.java fails with timeout
Dec 6, 2022
371da37
8298027: Remove SCCS id's from awt jtreg tests
jayathirthrao Dec 6, 2022
cca4ba7
8295184: Printing messages with a RecordComponentElement does not inc…
Dec 6, 2022
1d80bf3
8297247: Add GarbageCollectorMXBean for Remark and Cleanup pause time…
linade Dec 6, 2022
cd74f9f
8297951: C2: Create skeleton predicates for all If nodes in loop pred…
chhagedorn Dec 6, 2022
14958f6
8298057: (fs) Remove PollingWatchService.POLLING_INIT_DELAY
Dec 6, 2022
8bb13a6
8267617: Certificate's IP x509 NameConstraints raises ArrayIndexOutOf…
djelinski Dec 6, 2022
08e6d76
8297963: Partially fix string expansion issues in UTIL_DEFUN_NAMED an…
TheShermanTanker Dec 6, 2022
5ab7eba
8297689: Fix incorrect result of Short.reverseBytes() call in loops
Dec 6, 2022
bfd9c6a
8297172: Fix some issues of auto-vectorization of `Long.bitCount/numb…
Dec 6, 2022
39506ae
8297186: G1 triggers unnecessary full GCs when heap utilization is low
Dec 6, 2022
ef0f430
8296024: Usage of DirectBuffer::address should be guarded
minborg Dec 6, 2022
58a6343
8297687: new URI(S,S,S,S) throws exception with incorrect index posit…
dfuch Dec 6, 2022
3ebc090
8297602: Compiler crash with type annotation and generic record durin…
biboudis Dec 6, 2022
838acbe
Merge pull request #529 from babsingh/fix_SelfSuspendDisablerTest_jdk…
keithc-ca Dec 6, 2022
ba881a1
8297379: Enable the ByteBuffer path of Poly1305 optimizations
vpaprotsk Dec 6, 2022
e07662f
8298142: Update internal comment on language features in SourceVersion
jddarcy Dec 6, 2022
3414f8c
8297450: ScaledTextFieldBorderTest.java fails when run with -show par…
rajamah Dec 6, 2022
57543c6
8293412: Remove unnecessary java.security.egd overrides
Dec 6, 2022
de73ef9
8298178: Update to use jtreg 7.1.1
sormuras Dec 6, 2022
d9933c4
8295724: VirtualMachineError: Out of space in CodeCache for method ha…
TheRealMDoerr Dec 6, 2022
279f855
8296507: GCM using more memory than necessary with in-place operations
Dec 6, 2022
a42ccce
8298214: ProblemList java/util/concurrent/forkjoin/AsyncShutdownNow.java
Dec 6, 2022
6238a61
8298221: Problem list gc/metaspace/CompressedClassSpaceSizeInJmapHeap…
plummercj Dec 6, 2022
50555bc
8297804: (tz) Update Timezone Data to 2022g
gnu-andrew Dec 7, 2022
329d933
8290432: C2 compilation fails with assert(node->_last_del == _last) f…
y1yang0 Dec 7, 2022
9674a5c
8297976: Remove sun.net.ProgressMonitor and related classes
djelinski Dec 7, 2022
ca5e57a
4677581: ColorModel.getComponentSize()-wrong conditions for ArrayInde…
mrserb Dec 7, 2022
afb513f
8296672: Implementation of Virtual Threads (Second Preview)
Dec 7, 2022
fde6d81
8286666: JEP 429: Implementation of Scoped Values (Incubator)
Dec 7, 2022
5aab2ff
8298108: Add a regression test for JDK-8297684
jerboaa Dec 7, 2022
928ae5a
8298184: Incorrect record component type in record patterns
lahodaj Dec 7, 2022
e0d3e25
8269820: C2 PhaseIdealLoop::do_unroll get wrong opaque node
rwestrel Dec 7, 2022
9f84352
8298177: Various java.lang.invoke cleanups
cl4es Dec 7, 2022
ee019c8
8298274: Problem list TestSPISigned on Windows
jerboaa Dec 7, 2022
5dfc18c
8297298: SequenceInputStream should override transferTo
mkarg Dec 7, 2022
dd6008a
8165943: LineBreakMeasurer does not measure correctly if TextAttribut…
Dec 7, 2022
953fa21
8157023: Integrate NMT with JFR
kstefanj Dec 7, 2022
0984b96
8298303: (fs) temporarily remove Path.getExtension
Dec 7, 2022
77a2ae3
8281236: (D)TLS key exchange named groups
XueleiFan Dec 7, 2022
a814a4a
8295803: Console should be usable in jshell and other environments
naotoj Dec 7, 2022
d86509d
8298099: [JVMCI] decouple libgraal from JVMCI module at runtime
Dec 7, 2022
cf3ec6d
8282578: AIOOBE in javax.sound.sampled.Clip
Dec 8, 2022
48cafcd
8294047: HttpResponseInputStream swallows interrupts
DarraghClarke Dec 8, 2022
6a1b1fc
8296198: JFileChooser throws InternalError java.lang.InternalError wi…
Dec 8, 2022
d4225d1
8298323: trivial typo in JOptionPane.OK_OPTION
prsadhuk Dec 8, 2022
9ffa992
8296896: Change virtual Thread.yield to use external submit
Dec 8, 2022
64da3d5
8298341: Ensure heap growth in TestNativeMemoryUsageEvents.java
kstefanj Dec 8, 2022
d2d0af5
8294588: Auto vectorize half precision floating point conversion APIs
Dec 8, 2022
763f2d8
8287397: Print top-level exception when snippet fails to read file
anthonyvdotbe Dec 8, 2022
5d8837d
8298033: Character.codePoint{At|Before}(char[], int, int) doesn't do …
Dec 8, 2022
38ad009
8298375: Bad copyright header in test/jdk/java/lang/Character/Supplem…
jaikiran Dec 8, 2022
18ece53
8290850: C2: create_new_if_for_predicate() does not clone pinned phi …
chhagedorn Dec 8, 2022
0136f80
8298175: JFR: Common timestamp for periodic events
egahlin Dec 8, 2022
fa11dff
8298272: Clean up ProblemList
TobiHartmann Dec 8, 2022
629c8a9
8298173: GarbageCollectionNotificationContentTest test failed: no dec…
kevinjwalls Dec 8, 2022
8a8a49d
8297718: Make NMT free:ing protocol more granular
jdksjolen Dec 8, 2022
04dc52c
8298129: Let checkpoint event sizes grow beyond u4 limit
Dec 8, 2022
c8bc900
8298383: JFR: GenerateJfrFiles.java lacks copyright header
egahlin Dec 8, 2022
5027d63
8298255: JFR provide information about dynamization of number of comp…
MBaesken Dec 8, 2022
84b53b9
8297642: PhaseIdealLoop::only_has_infinite_loops must detect all loop…
eme64 Dec 8, 2022
3f4bea4
8298402: ProblemList javax/swing/JFileChooser/4847375/bug4847375.java…
Dec 8, 2022
52fce26
8297988: NPE in JavacTypes.getOverriddenMethods from doclint
lahodaj Dec 9, 2022
55bb5b6
8298455: JFR: Add logging to TestClose.java
egahlin Dec 9, 2022
56ffd05
8298340: java/net/httpclient/CancelRequestTest.java fails with Assert…
dfuch Dec 9, 2022
a573eab
8298353: C2 fails with assert(opaq->outcnt() == 1 && opaq->in(1) == l…
rwestrel Dec 9, 2022
76c3e53
8298463: tools/javac/modules/EdgeCases.java fails on Windows after JD…
lahodaj Dec 9, 2022
1fd5290
8298459: Fix msys2 linking and handling out of tree build directory f…
RealCLanger Dec 11, 2022
c1a499e
8298271: java/security/SignedJar/spi-calendar-provider/TestSPISigned.…
jerboaa Dec 12, 2022
1ae9ee8
8297288: Example code in Scanner class
naotoj Dec 12, 2022
848bef7
8298488: [macos13] tools/jpackage tests failing with "Exit code: 137"…
Dec 12, 2022
3f7413c
8295857: Clarify that cleanup code can be skipped when the JVM termin…
Dec 13, 2022
8db8156
8297305: Clarify that javax.lang.model.util.Elements.overrides is irr…
jddarcy Dec 13, 2022
ebbc6cc
8298700: Typo in DocTree comment
jonathan-gibbons Dec 13, 2022
88a1997
8298527: Cygwin's uname -m returns different string than before
RealCLanger Dec 14, 2022
7bf415c
8298425: System.console().readLine() hangs in jshell
lahodaj Dec 14, 2022
25fe5fc
8298296: gc/TestFullGCCount.java fails with "System.gc collections mi…
Dec 14, 2022
99e5723
8298649: JFR: RemoteRecordingStream support for checkpoint event size…
egahlin Dec 14, 2022
1009395
8297235: ZGC: assert(regs[i] != regs[j]) failed: Multiple uses of reg…
xmas92 Dec 14, 2022
a1c9197
8298277: Replace "session" with "scope" for FFM access
minborg Dec 14, 2022
57fa99e
8298785: gc/TestFullGCCount.java fails with "invalid boolean value: `…
Dec 14, 2022
4ae4fda
8298727: Trees.getPath may crash for unnamed package
lahodaj Dec 15, 2022
5a960f6
8298050: Add links to graph output for javadoc
minborg Dec 15, 2022
868fa8c
7093322: (fs spec) Files.newBufferedWriter should be clear when codin…
Dec 15, 2022
1648313
8298888: ProblemList gc/g1/TestVerifyGCType.java on linux and macosx
Dec 16, 2022
9c58ee4
8298083: The "CheckBox/RadioButton[Enabled/Disabled].textForeground" …
mrserb Dec 16, 2022
0e6893a
8297979: ZGC: Ensure consistent MemoryUsage from MemoryMXBean.getHeap…
kstefanj Dec 16, 2022
1ac6deb
8287699: jdk/jfr/api/consumer/TestRecordingFileWrite.java fails with …
Dec 16, 2022
d338204
8298797: Specification of some restricted methods is incorrect
mcimadamore Dec 16, 2022
8901d2a
8298919: Add a regression test for JDK-8298520
TobiHartmann Dec 16, 2022
ca2f0a2
8298133: JDK 20 RDP1 L10n resource files update - msgdrop 10
Dec 16, 2022
eed8f60
8298976: ProblemList java/util/concurrent/ExecutorService/CloseTest.j…
Dec 16, 2022
5036aa9
8298217: Regressions 30-110% in SwingMark on MacOS, more so on aarch64
aghaisas Dec 17, 2022
98f9ca7
8298970: Problem list java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java
Dec 17, 2022
e200807
8298905: Test "java/awt/print/PrinterJob/ImagePrinting/PrintARGBImage…
Dec 17, 2022
0238f8b
8298987: ProblemList jdk/internal/vm/Continuation/Fuzz.java#default w…
Dec 17, 2022
94aa269
8298894: java/lang/Thread/virtual/stress/Skynet.java timed out and th…
Dec 19, 2022
3792815
8277074: Qualified exported types show up in JavaDoc
hns Dec 19, 2022
2a2d2a1
4512626: Non-editable JTextArea provides no visual indication of keyb…
Dec 19, 2022
6559d0a
8298699: java/lang/reflect/IllegalArgumentsTest.java times out with s…
Dec 19, 2022
8dd7efc
4958969: ObjectOutputStream example leads to non-working code
Dec 19, 2022
ca15441
8298215: gc/g1/TestVerifyGCType.java failed with "Missing expected ve…
Dec 20, 2022
aa8508b
8298784: JFR: Test chunk integrity
egahlin Dec 20, 2022
72cbf2f
8298162: Test PrintClasses hits assert when run with code that retran…
coleenp Dec 20, 2022
73e9339
8299123: [BACKOUT] 4512626 Non-editable JTextArea provides no visual …
Dec 20, 2022
9fd90d8
8299147: Minor accessibility errors in the specs and man index pages
jonathan-gibbons Dec 20, 2022
8758cff
8298947: compiler/codecache/MHIntrinsicAllocFailureTest.java fails in…
TheRealMDoerr Dec 20, 2022
27c55eb
8299156: Broken link in jdk.compiler/module-info.java
jonathan-gibbons Dec 20, 2022
eaff1f3
8298588: WebSockets: HandshakeUrlEncodingTest unnecessarily depends o…
RealCLanger Dec 21, 2022
12e9b41
8298726: (fs) Change PollingWatchService to record last modified time…
Dec 21, 2022
88cf373
8299077: [REDO] JDK-4512626 Non-editable JTextArea provides no visual…
Dec 22, 2022
2bb5c24
8298176: remove OpaqueZeroTripGuardPostLoop once main-loop disappears
rwestrel Dec 22, 2022
de677fd
8299207: [Testbug] Add back test/jdk/java/awt/Graphics2D/DrawPrimitiv…
aghaisas Dec 22, 2022
51fd72f
8299015: Ensure that HttpResponse.BodySubscribers.ofFile writes all b…
ChrisHegarty Dec 22, 2022
ccef9d2
8299230: Use https: in links
Dec 22, 2022
1f80fbe
8299237: add ArraysSupport.newLength test to a test group
Dec 22, 2022
418e34e
8299241: jdk/jfr/api/consumer/streaming/TestJVMCrash.java generates u…
Dec 23, 2022
bd46768
8298592: Add java man page documentation for ChaCha20 and Poly1305 in…
Dec 29, 2022
2e2ece0
8288204: GVN Crash: assert() failed: correct memory chain
TobiHartmann Jan 3, 2023
7d81be7
8299235: broken link referencing missing id
Jan 3, 2023
0c8bf9a
8298324: Unable to run shell test with make
erikj79 Jan 3, 2023
81ba131
8299483: ProblemList java/text/Format/NumberFormat/CurrencyFormat.java
Jan 3, 2023
d56e007
8293824: gc/whitebox/TestConcMarkCycleWB.java failed "RuntimeExceptio…
Jan 4, 2023
e1230b1
Add OpenJ9PropsExt properties for docker.support
JasonFengJ9 Jan 3, 2023
bbc49f2
Correct padding of struct layouts
keithc-ca Jan 3, 2023
ec43c64
Merge pull request #1 from JasonFengJ9/dockersupport
pshipton Jan 4, 2023
65627c6
Merge pull request #2 from keithc-ca/padding
pshipton Jan 4, 2023
220bcf4
8299561: VaList.empty() doesn't return a list associated with the glo…
mcimadamore Jan 5, 2023
592f21a
Include PRODUCT_SUFFIX in J9PRODUCT_NAME
pshipton Dec 12, 2022
a845c6f
Handle thread interrupted status at CRIU single threaded mode
JasonFengJ9 Dec 13, 2022
a83acef
Enable CRIU on x86
tajila Dec 6, 2022
8a48e4f
Update copyright dates
keithc-ca Jan 5, 2023
9a5a657
Fix problem building openssl when ccache is enabled
keithc-ca Jan 5, 2023
ae2eb07
8298525: javadoc crashes with "UnsupportedOperationException: Not yet…
pavelrappo Jan 5, 2023
8da95bb
Merge pull request #3 from keithc-ca/cherry
JasonFengJ9 Jan 5, 2023
06cf032
Merge pull request #4 from keithc-ca/ccache_and_openssl
pshipton Jan 6, 2023
4a39b38
8299528: IR test: TestEor3AArch64.java fails on aarch64
Jan 6, 2023
3156529
8299740: CaptureCallState is missing @Preview annotation
mcimadamore Jan 6, 2023
a1f7540
8299705: JCov coverage runs depend on jdk_symbols
shurymury Jan 6, 2023
2729f17
Remove unused OPENJDK_THREAD_SUPPORT & J9VM_OPT_OPENJDK_THREAD_SUPPORT
JasonFengJ9 Jan 6, 2023
dbff3c7
Merge pull request #5 from JasonFengJ9/rmopenjdkthread
pshipton Jan 9, 2023
9397bba
8299689: Make use of JLine for Console as "opt-in"
naotoj Jan 9, 2023
39490e7
8299693: Change to Xcode12.4+1.1 devkit for building on macOS at Oracle
vidmik Jan 10, 2023
c8c85a4
8299733: AArch64: "unexpected literal addressing mode" assertion fail…
nick-arm Jan 10, 2023
2089247
8299715: IR test: VectorGatherScatterTest.java fails with SVE randomly
Jan 11, 2023
855532b
8299227: host `exif.org` not found in link in doc comment
Jan 11, 2023
0c032ab
8299849: Revert JDK-8294461: wrong effectively final determination by…
lahodaj Jan 11, 2023
ce8c0cf
8299862: OfAddress setter should disallow heap segments
mcimadamore Jan 11, 2023
196565c
Add JPP tags at GensrcCharsetMapping.gmk
JasonFengJ9 Jan 6, 2023
2d486c3
Remove reference to opt_openjdkThreadSupport
keithc-ca Jan 11, 2023
0d87697
Merge pull request #6 from JasonFengJ9/addjpptags
keithc-ca Jan 11, 2023
09cb1f2
Merge pull request #7 from keithc-ca/rm_opt_openjdkThreadSupport
pshipton Jan 11, 2023
c4fdc10
Merge master jdk-20+31 into openj9-staging
JasonFengJ9 Jan 17, 2023
69b40f9
[FFI] Replace part of FFI APIs with the latest APIs in JDK20
Jan 24, 2023
7608d05
Disable FFI related code in OpenJDK for JDK20
Jan 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Disable FFI related code in OpenJDK for JDK20
The change is to disable all downcall & upcall code
specific to FFI in OpenJDK for the moment to ensure
it gets compiled in JDK20 as we have been working
on the changes in OpenJDK & OpenJ9 to deal with
the latest APIs intended for JEP434.

Signed-off-by: ChengJin01 <jincheng@ca.ibm.com>
  • Loading branch information
ChengJin01 committed Feb 1, 2023
commit 7608d052f84ababb6336b865e975792d76e180a5
4 changes: 2 additions & 2 deletions src/java.base/share/classes/java/lang/foreign/VaList.java
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@

/*
* ===========================================================================
* (c) Copyright IBM Corp. 2022, 2022 All Rights Reserved
* (c) Copyright IBM Corp. 2022, 2023 All Rights Reserved
* ===========================================================================
*/

@@ -115,7 +115,7 @@
*/
@PreviewFeature(feature=PreviewFeature.Feature.FOREIGN)
public sealed interface VaList permits WinVaList, SysVVaList, LinuxAArch64VaList, MacOsAArch64VaList,
SysVPPC64leVaList, SysVS390xVaList, AixPPC64VaList, SharedUtils.EmptyVaList {
SysVPPC64leVaList, SysVS390xVaList, AixPPC64VaList, SharedUtils.EmptyVaList {

/**
* Reads the next value as an {@code int} and advances this variable argument list's position. The behavior of this
Original file line number Diff line number Diff line change
@@ -154,15 +154,16 @@ public Bindings getBindings(MethodType mt, FunctionDescriptor cDesc, boolean for
}

/* Replace DowncallLinker in OpenJDK with the implementation of DowncallLinker specific to OpenJ9 */
public static MethodHandle arrangeDowncall(MethodType mt, FunctionDescriptor cDesc, LinkerOptions options) {
MethodHandle handle = DowncallLinker.getBoundMethodHandle(mt, cDesc);
return handle;
public MethodHandle arrangeDowncall(MethodType mt, FunctionDescriptor cDesc, LinkerOptions options) {
// MethodHandle handle = DowncallLinker.getBoundMethodHandle(mt, cDesc, options);
// return handle;
return null;
}

/* Replace UpcallLinker in OpenJDK with the implementation of UpcallLinker specific to OpenJ9 */
public static MemorySegment arrangeUpcall(MethodHandle target, MethodType mt, FunctionDescriptor cDesc, SegmentScope session) {
MethodHandle handle = DowncallLinker.getBoundMethodHandle(mt, cDesc);
return handle;
public MemorySegment arrangeUpcall(MethodHandle target, MethodType mt, FunctionDescriptor cDesc, SegmentScope session) {
// return UpcallLinker.make(target, mt, cDesc, session);
return null;
}

private static boolean isInMemoryReturn(Optional<MemoryLayout> returnLayout) {
Original file line number Diff line number Diff line change
@@ -74,8 +74,8 @@ public static VaList newVaList(Consumer<VaList.Builder> actions, SegmentScope sc
return builder.build();
}

public static VaList newVaListOfAddress(long addr, SegmentScope scope) {
return AixPPC64VaList.ofAddress(addr, scope);
public static VaList newVaListOfAddress(long address, SegmentScope scope) {
return AixPPC64VaList.ofAddress(address, scope);
}

public static VaList emptyVaList() {
Original file line number Diff line number Diff line change
@@ -50,12 +50,14 @@ public class CallArranger {

/* Replace DowncallLinker in OpenJDK with the implementation of DowncallLinker specific to OpenJ9 */
public static MethodHandle arrangeDowncall(MethodType mt, FunctionDescriptor cDesc, LinkerOptions options) {
MethodHandle handle = DowncallLinker.getBoundMethodHandle(mt, cDesc);
return handle;
// MethodHandle handle = DowncallLinker.getBoundMethodHandle(mt, cDesc, options);
// return handle;
return null;
}

/* Replace UpcallLinker in OpenJDK with the implementation of UpcallLinker specific to OpenJ9 */
public static MemorySegment arrangeUpcall(MethodHandle target, MethodType mt, FunctionDescriptor cDesc, SegmentScope session) {
return UpcallLinker.make(target, mt, cDesc, session);
// return UpcallLinker.make(target, mt, cDesc, session);
return null;
}
}
Original file line number Diff line number Diff line change
@@ -50,12 +50,14 @@ public class CallArranger {

/* Replace DowncallLinker in OpenJDK with the implementation of DowncallLinker specific to OpenJ9 */
public static MethodHandle arrangeDowncall(MethodType mt, FunctionDescriptor cDesc, LinkerOptions options) {
MethodHandle handle = DowncallLinker.getBoundMethodHandle(mt, cDesc);
return handle;
// MethodHandle handle = DowncallLinker.getBoundMethodHandle(mt, cDesc, options);
// return handle;
return null;
}

/* Replace UpcallLinker in OpenJDK with the implementation of UpcallLinker specific to OpenJ9 */
public static MemorySegment arrangeUpcall(MethodHandle target, MethodType mt, FunctionDescriptor cDesc, SegmentScope session) {
return UpcallLinker.make(target, mt, cDesc, session);
// return UpcallLinker.make(target, mt, cDesc, session);
return null;
}
}
Original file line number Diff line number Diff line change
@@ -74,8 +74,8 @@ public static VaList newVaList(Consumer<VaList.Builder> actions, SegmentScope sc
return builder.build();
}

public static VaList newVaListOfAddress(long addr, SegmentScope scope) {
return SysVPPC64leVaList.ofAddress(addr, scope);
public static VaList newVaListOfAddress(long address, SegmentScope scope) {
return SysVPPC64leVaList.ofAddress(address, scope);
}

public static VaList emptyVaList() {
Original file line number Diff line number Diff line change
@@ -50,12 +50,14 @@ public class CallArranger {

/* Replace DowncallLinker in OpenJDK with the implementation of DowncallLinker specific to OpenJ9 */
public static MethodHandle arrangeDowncall(MethodType mt, FunctionDescriptor cDesc, LinkerOptions options) {
MethodHandle handle = DowncallLinker.getBoundMethodHandle(mt, cDesc);
return handle;
// MethodHandle handle = DowncallLinker.getBoundMethodHandle(mt, cDesc, options);
// return handle;
return null;
}

/* Replace UpcallLinker in OpenJDK with the implementation of UpcallLinker specific to OpenJ9 */
public static MemorySegment arrangeUpcall(MethodHandle target, MethodType mt, FunctionDescriptor cDesc, SegmentScope session) {
return UpcallLinker.make(target, mt, cDesc, session);
// return UpcallLinker.make(target, mt, cDesc, session);
return null;
}
}
Original file line number Diff line number Diff line change
@@ -74,8 +74,8 @@ public static VaList newVaList(Consumer<VaList.Builder> actions, SegmentScope sc
return builder.build();
}

public static VaList newVaListOfAddress(long addr, SegmentScope scope) {
return SysVS390xVaList.ofAddress(addr, scope);
public static VaList newVaListOfAddress(long address, SegmentScope scope) {
return SysVS390xVaList.ofAddress(address, scope);
}

public static VaList emptyVaList() {
Original file line number Diff line number Diff line change
@@ -128,13 +128,15 @@ public static Bindings getBindings(MethodType mt, FunctionDescriptor cDesc, bool

/* Replace DowncallLinker in OpenJDK with the implementation of DowncallLinker specific to OpenJ9 */
public static MethodHandle arrangeDowncall(MethodType mt, FunctionDescriptor cDesc, LinkerOptions options) {
MethodHandle handle = DowncallLinker.getBoundMethodHandle(mt, cDesc);
return handle;
// MethodHandle handle = DowncallLinker.getBoundMethodHandle(mt, cDesc, options);
// return handle;
return null;
}

/* Replace UpcallLinker in OpenJDK with the implementation of UpcallLinker specific to OpenJ9 */
public static MemorySegment arrangeUpcall(MethodHandle target, MethodType mt, FunctionDescriptor cDesc, SegmentScope session) {
return UpcallLinker.make(target, mt, cDesc, session);
// return UpcallLinker.make(target, mt, cDesc, session);
return null;
}

private static boolean isInMemoryReturn(Optional<MemoryLayout> returnLayout) {
Original file line number Diff line number Diff line change
@@ -128,13 +128,15 @@ void setReturnBindings(Class<?> carrier, MemoryLayout layout) {

/* Replace DowncallLinker in OpenJDK with the implementation of DowncallLinker specific to OpenJ9 */
public static MethodHandle arrangeDowncall(MethodType mt, FunctionDescriptor cDesc, LinkerOptions options) {
MethodHandle handle = DowncallLinker.getBoundMethodHandle(mt, cDesc);
return handle;
// MethodHandle handle = DowncallLinker.getBoundMethodHandle(mt, cDesc, options);
// return handle;
return null;
}

/* Replace UpcallLinker in OpenJDK with the implementation of UpcallLinker specific to OpenJ9 */
public static MemorySegment arrangeUpcall(MethodHandle target, MethodType mt, FunctionDescriptor cDesc, SegmentScope session) {
return UpcallLinker.make(target, mt, cDesc, session);
// return UpcallLinker.make(target, mt, cDesc, session);
return null;
}

private static boolean isInMemoryReturn(Optional<MemoryLayout> returnLayout) {
4 changes: 2 additions & 2 deletions test/jdk/java/foreign/TestVarArgs.java
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@

/*
* ===========================================================================
* (c) Copyright IBM Corp. 2022, 2022 All Rights Reserved
* (c) Copyright IBM Corp. 2022, 2023 All Rights Reserved
* ===========================================================================
*/

@@ -140,7 +140,7 @@ private static void check(int index, MemorySegment ptr, List<Arg> args) {
/* Vararg float is promoted to double (8 bytes) in native (See libVarArgs.c)
* in which case float must be converted back from double at the same memory
* address in java on the Big-Endian(BE) platforms such as AIX.
*/
*/
if (isAixOS && (layout instanceof ValueLayout) && (((ValueLayout)layout).carrier() == float.class)) {
MemorySegment doubleSegmt = MemorySegment.ofAddress(ptr, JAVA_DOUBLE.byteSize(), session);
seg.set(JAVA_FLOAT, 0, (float)doubleSegmt.get(JAVA_DOUBLE, 0));
4 changes: 2 additions & 2 deletions test/jdk/java/foreign/valist/VaListTest.java
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@

/*
* ===========================================================================
* (c) Copyright IBM Corp. 2022, 2022 All Rights Reserved
* (c) Copyright IBM Corp. 2022, 2023 All Rights Reserved
* ===========================================================================
*/

@@ -45,7 +45,7 @@
* java.base/jdk.internal.foreign.abi.aarch64.windows
* java.base/jdk.internal.foreign.abi.ppc64.aix
* java.base/jdk.internal.foreign.abi.ppc64.sysv
* java.base/jdk.internal.foreign.abi.s390x.sysv
* java.base/jdk.internal.foreign.abi.s390x.sysv
* @run testng/othervm --enable-native-access=ALL-UNNAMED VaListTest
*/