mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8234049: Implementation of Memory Access API (Incubator)
Co-authored-by: Vlaidmir Ivanov <vladimir.x.ivanov@oracle.com> Reviewed-by: alanb, psandoz, chegar, rriggs, plevart, briangoetz, jrose, adinn, vlivanov
This commit is contained in:
parent
7cdecd8981
commit
8f4f088a12
59 changed files with 7849 additions and 147 deletions
|
@ -33,6 +33,7 @@ class XXX {
|
|||
|
||||
private $type$ get$Type$(long a) {
|
||||
try {
|
||||
checkSegment();
|
||||
$memtype$ x = UNSAFE.get$Memtype$Unaligned(null, a, bigEndian);
|
||||
return $fromBits$(x);
|
||||
} finally {
|
||||
|
@ -61,6 +62,7 @@ class XXX {
|
|||
private ByteBuffer put$Type$(long a, $type$ x) {
|
||||
#if[rw]
|
||||
try {
|
||||
checkSegment();
|
||||
$memtype$ y = $toBits$(x);
|
||||
UNSAFE.put$Memtype$Unaligned(null, a, y, bigEndian);
|
||||
} finally {
|
||||
|
@ -104,13 +106,13 @@ class XXX {
|
|||
0,
|
||||
size,
|
||||
size,
|
||||
address + off))
|
||||
address + off, segment))
|
||||
: ($Type$Buffer)(new ByteBufferAs$Type$Buffer$RW$L(this,
|
||||
-1,
|
||||
0,
|
||||
size,
|
||||
size,
|
||||
address + off)));
|
||||
address + off, segment)));
|
||||
} else {
|
||||
return (nativeByteOrder
|
||||
? ($Type$Buffer)(new Direct$Type$Buffer$RW$U(this,
|
||||
|
@ -118,13 +120,13 @@ class XXX {
|
|||
0,
|
||||
size,
|
||||
size,
|
||||
off))
|
||||
off, segment))
|
||||
: ($Type$Buffer)(new Direct$Type$Buffer$RW$S(this,
|
||||
-1,
|
||||
0,
|
||||
size,
|
||||
size,
|
||||
off)));
|
||||
off, segment)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue