< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/CompressEncoding.java

Print this page

        

*** 32,49 **** public CompressEncoding(long base, int shift) { this.base = base; this.shift = shift; } - public int compress(long ptr) { - if (ptr == 0L) { - return 0; - } else { - return (int) ((ptr - base) >>> shift); - } - } - public boolean hasBase() { return base != 0; } public boolean hasShift() { --- 32,41 ----
*** 56,73 **** public int getShift() { return shift; } - public long uncompress(int ptr) { - if (ptr == 0) { - return 0L; - } else { - return ((ptr & 0xFFFFFFFFL) << shift) + base; - } - } - @Override public String toString() { return "base: " + base + " shift: " + shift; } --- 48,57 ----
*** 83,92 **** @Override public boolean equals(Object obj) { if (obj instanceof CompressEncoding) { CompressEncoding other = (CompressEncoding) obj; return base == other.base && shift == other.shift; - } else { - return false; } } } --- 67,75 ---- @Override public boolean equals(Object obj) { if (obj instanceof CompressEncoding) { CompressEncoding other = (CompressEncoding) obj; return base == other.base && shift == other.shift; } + return false; } }
< prev index next >