Java Code Examples for jdk.internal.misc.Unsafe#getInt()

The following examples show how to use jdk.internal.misc.Unsafe#getInt() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: UnsafeRaw.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public static int int_index(Unsafe unsafe, long base, int index) throws Exception {
  return unsafe.getInt(base + (index << 2));
}
 
Example 2
Source File: UnsafeRaw.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public static int long_index(Unsafe unsafe, long base, long index) throws Exception {
  return unsafe.getInt(base + (index << 2));
}
 
Example 3
Source File: UnsafeRaw.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public static int int_index_back_ashift(Unsafe unsafe, long base, int index) throws Exception {
  return unsafe.getInt(base + (index >> 2));
}
 
Example 4
Source File: UnsafeRaw.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public static int int_index_back_lshift(Unsafe unsafe, long base, int index) throws Exception {
  return unsafe.getInt(base + (index >>> 2));
}
 
Example 5
Source File: UnsafeRaw.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public static int long_index_back_ashift(Unsafe unsafe, long base, long index) throws Exception {
  return unsafe.getInt(base + (index >> 2));
}
 
Example 6
Source File: UnsafeRaw.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public static int long_index_back_lshift(Unsafe unsafe, long base, long index) throws Exception {
  return unsafe.getInt(base + (index >>> 2));
}
 
Example 7
Source File: UnsafeRaw.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public static int int_const_12345678_index(Unsafe unsafe, long base) throws Exception {
  int idx4 = 0x12345678;
  return unsafe.getInt(base + idx4);
}
 
Example 8
Source File: UnsafeRaw.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public static int long_const_1234567890abcdef_index(Unsafe unsafe, long base) throws Exception {
  long idx5 = 0x1234567890abcdefL;
  return unsafe.getInt(base + idx5);
}
 
Example 9
Source File: UnsafeRaw.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public static int int_index_mul(Unsafe unsafe, long base, int index) throws Exception {
  return unsafe.getInt(base + (index * 4));
}
 
Example 10
Source File: UnsafeRaw.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public static int long_index_mul(Unsafe unsafe, long base, long index) throws Exception {
  return unsafe.getInt(base + (index * 4));
}
 
Example 11
Source File: UnsafeRaw.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public static int int_index_mul_scale_16(Unsafe unsafe, long base, int index) throws Exception {
  return unsafe.getInt(base + (index * 16));
}
 
Example 12
Source File: UnsafeRaw.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public static int long_index_mul_scale_16(Unsafe unsafe, long base, long index) throws Exception {
  return unsafe.getInt(base + (index * 16));
}