"Downgrade" Vineflower to 1.10.1 release (#10423)

* "Downgrade" Vineflower to 1.10.1 release

The main thing we lose from the 1.11 snapshots is a recent fix for redundant casts.

* Thanks intellij

* a
This commit is contained in:
Jason Penilla
2024-04-16 12:44:59 -07:00
parent 14b0751f02
commit 76be2651ca
25 changed files with 68 additions and 64 deletions

View File

@@ -76,9 +76,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public static long asLong(int x, int y, int z) {
- long l = 0L;
- l |= (x & PACKED_X_MASK) << X_OFFSET;
- l |= (y & PACKED_Y_MASK) << 0;
- return l | (z & PACKED_Z_MASK) << Z_OFFSET;
- l |= ((long)x & PACKED_X_MASK) << X_OFFSET;
- l |= ((long)y & PACKED_Y_MASK) << 0;
- return l | ((long)z & PACKED_Z_MASK) << Z_OFFSET;
+ return (((long) x & (long) 67108863) << 38) | (((long) y & (long) 4095)) | (((long) z & (long) 67108863) << 12); // Paper - inline constants and simplify
}
@@ -180,9 +180,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
public static long asLong(int x, int y, int z) {
- long l = 0L;
- l |= (x & 4194303L) << 42;
- l |= (y & 1048575L) << 0;
- return l | (z & 4194303L) << 20;
- l |= ((long)x & 4194303L) << 42;
- l |= ((long)y & 1048575L) << 0;
- return l | ((long)z & 4194303L) << 20;
+ return (((long) x & 4194303L) << 42) | (((long) y & 1048575L)) | (((long) z & 4194303L) << 20); // Paper - Simplify to reduce instruction count
}