History

Added some missing classes from java/nio, fixed some bad things

Dmitry Kabak (userdima committed 13 years ago

Commit 7d47bc81 parent b1be22084 files · +40111 −23Browse files

Showing the changes to java/pkg/java/nio/Bits.java (1 of 84 files). Show all

Unified · Split

java/pkg/java/nio/Bits.java+18−14
@@ -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

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t