src/java.base/share/classes/java/nio/Bits.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File jdk Cdiff src/java.base/share/classes/java/nio/Bits.java

src/java.base/share/classes/java/nio/Bits.java

Print this page
rev 13675 : imported patch unsafecopyswap
rev 13676 : [mq]: unsafecopyswap2

*** 1,7 **** /* ! * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 806,816 **** offset += size; } } /** ! * Copy and byte swap 16 bit elements from a heap array to off-heap memory * * @param src * the source array, must be a 16-bit primitive array type * @param srcPos * byte offset within source array of the first element to read --- 806,816 ---- offset += size; } } /** ! * Copy and unconditionally byte swap 16 bit elements from a heap array to off-heap memory * * @param src * the source array, must be a 16-bit primitive array type * @param srcPos * byte offset within source array of the first element to read
*** 822,832 **** static void copyFromCharArray(Object src, long srcPos, long dstAddr, long length) { unsafe.copySwapMemory(src, unsafe.arrayBaseOffset(src.getClass()) + srcPos, null, dstAddr, length, 2); } /** ! * Copy and byte swap 16 bit elements from off-heap memory to a heap array * * @param srcAddr * source address * @param dst * destination array, must be a 16-bit primitive array type --- 822,832 ---- static void copyFromCharArray(Object src, long srcPos, long dstAddr, long length) { unsafe.copySwapMemory(src, unsafe.arrayBaseOffset(src.getClass()) + srcPos, null, dstAddr, length, 2); } /** ! * Copy and unconditionally byte swap 16 bit elements from off-heap memory to a heap array * * @param srcAddr * source address * @param dst * destination array, must be a 16-bit primitive array type
*** 838,848 **** static void copyToCharArray(long srcAddr, Object dst, long dstPos, long length) { unsafe.copySwapMemory(null, srcAddr, dst, unsafe.arrayBaseOffset(dst.getClass()) + dstPos, length, 2); } /** ! * Copy and byte swap 16 bit elements from a heap array to off-heap memory * * @param src * the source array, must be a 16-bit primitive array type * @param srcPos * byte offset within source array of the first element to read --- 838,848 ---- static void copyToCharArray(long srcAddr, Object dst, long dstPos, long length) { unsafe.copySwapMemory(null, srcAddr, dst, unsafe.arrayBaseOffset(dst.getClass()) + dstPos, length, 2); } /** ! * Copy and unconditionally byte swap 16 bit elements from a heap array to off-heap memory * * @param src * the source array, must be a 16-bit primitive array type * @param srcPos * byte offset within source array of the first element to read
*** 854,864 **** static void copyFromShortArray(Object src, long srcPos, long dstAddr, long length) { unsafe.copySwapMemory(src, unsafe.arrayBaseOffset(src.getClass()) + srcPos, null, dstAddr, length, 2); } /** ! * Copy and byte swap 16 bit elements from off-heap memory to a heap array * * @param srcAddr * source address * @param dst * destination array, must be a 16-bit primitive array type --- 854,864 ---- static void copyFromShortArray(Object src, long srcPos, long dstAddr, long length) { unsafe.copySwapMemory(src, unsafe.arrayBaseOffset(src.getClass()) + srcPos, null, dstAddr, length, 2); } /** ! * Copy and unconditionally byte swap 16 bit elements from off-heap memory to a heap array * * @param srcAddr * source address * @param dst * destination array, must be a 16-bit primitive array type
*** 870,880 **** static void copyToShortArray(long srcAddr, Object dst, long dstPos, long length) { unsafe.copySwapMemory(null, srcAddr, dst, unsafe.arrayBaseOffset(dst.getClass()) + dstPos, length, 2); } /** ! * Copy and byte swap 32 bit elements from a heap array to off-heap memory * * @param src * the source array, must be a 32-bit primitive array type * @param srcPos * byte offset within source array of the first element to read --- 870,880 ---- static void copyToShortArray(long srcAddr, Object dst, long dstPos, long length) { unsafe.copySwapMemory(null, srcAddr, dst, unsafe.arrayBaseOffset(dst.getClass()) + dstPos, length, 2); } /** ! * Copy and unconditionally byte swap 32 bit elements from a heap array to off-heap memory * * @param src * the source array, must be a 32-bit primitive array type * @param srcPos * byte offset within source array of the first element to read
*** 886,896 **** static void copyFromIntArray(Object src, long srcPos, long dstAddr, long length) { unsafe.copySwapMemory(src, unsafe.arrayBaseOffset(src.getClass()) + srcPos, null, dstAddr, length, 4); } /** ! * Copy and byte swap 32 bit elements from off-heap memory to a heap array * * @param srcAddr * source address * @param dst * destination array, must be a 32-bit primitive array type --- 886,896 ---- static void copyFromIntArray(Object src, long srcPos, long dstAddr, long length) { unsafe.copySwapMemory(src, unsafe.arrayBaseOffset(src.getClass()) + srcPos, null, dstAddr, length, 4); } /** ! * Copy and unconditionally byte swap 32 bit elements from off-heap memory to a heap array * * @param srcAddr * source address * @param dst * destination array, must be a 32-bit primitive array type
*** 902,912 **** static void copyToIntArray(long srcAddr, Object dst, long dstPos, long length) { unsafe.copySwapMemory(null, srcAddr, dst, unsafe.arrayBaseOffset(dst.getClass()) + dstPos, length, 4); } /** ! * Copy and byte swap 64 bit elements from a heap array to off-heap memory * * @param src * the source array, must be a 64-bit primitive array type * @param srcPos * byte offset within source array of the first element to read --- 902,912 ---- static void copyToIntArray(long srcAddr, Object dst, long dstPos, long length) { unsafe.copySwapMemory(null, srcAddr, dst, unsafe.arrayBaseOffset(dst.getClass()) + dstPos, length, 4); } /** ! * Copy and unconditionally byte swap 64 bit elements from a heap array to off-heap memory * * @param src * the source array, must be a 64-bit primitive array type * @param srcPos * byte offset within source array of the first element to read
*** 918,928 **** static void copyFromLongArray(Object src, long srcPos, long dstAddr, long length) { unsafe.copySwapMemory(src, unsafe.arrayBaseOffset(src.getClass()) + srcPos, null, dstAddr, length, 8); } /** ! * Copy and byte swap 64 bit elements from off-heap memory to a heap array * * @param srcAddr * source address * @param dst * destination array, must be a 64-bit primitive array type --- 918,928 ---- static void copyFromLongArray(Object src, long srcPos, long dstAddr, long length) { unsafe.copySwapMemory(src, unsafe.arrayBaseOffset(src.getClass()) + srcPos, null, dstAddr, length, 8); } /** ! * Copy and unconditionally byte swap 64 bit elements from off-heap memory to a heap array * * @param srcAddr * source address * @param dst * destination array, must be a 64-bit primitive array type
src/java.base/share/classes/java/nio/Bits.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File