Showing the changes to java/pkg/java/nio/Bits.java (1 of 84 files). Show all
Unified · Split
| @@ -571,20 +571,24 @@ class Bits { // package-private · 570 unmodified lines | |||
| 571 | } | 571 | } |
| 572 | 572 | ||
| 573 | static { | 573 | static { |
| 574 | long a = unsafe.allocateMemory(8); | 574 | // [Inferno] < |
| 575 | try { | 575 | //long a = unsafe.allocateMemory(8); |
| 576 | unsafe.putLong(a, 0x0102030405060708L); | 576 | //try { |
| 577 | byte b = unsafe.getByte(a); | 577 | // unsafe.putLong(a, 0x0102030405060708L); |
| 578 | switch (b) { | 578 | // byte b = unsafe.getByte(a); |
| 579 | case 0x01: byteOrder = ByteOrder.BIG_ENDIAN; break; | 579 | // switch (b) { |
| 580 | case 0x08: byteOrder = ByteOrder.LITTLE_ENDIAN; break; | 580 | // case 0x01: byteOrder = ByteOrder.BIG_ENDIAN; break; |
| 581 | default: | 581 | // case 0x08: byteOrder = ByteOrder.LITTLE_ENDIAN; break; |
| 582 | assert false; | 582 | // default: |
| 583 | byteOrder = null; | 583 | // assert false; |
| 584 | } | 584 | // byteOrder = null; |
| 585 | } finally { | 585 | // } |
| 586 | unsafe.freeMemory(a); | 586 | //} finally { |
| 587 | } | 587 | // unsafe.freeMemory(a); |
| 588 | //} | ||
| 589 | // [Inferno] = | ||
| 590 | byteOrder = ByteOrder.LITTLE_ENDIAN; | ||
| 591 | // [Inferno] > | ||
| 588 | } | 592 | } |
| 589 | 593 | ||
| 590 | 594 | ||