From b2862f980f3d78012066ef1cc09d4ad58f886c0f Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Wed, 7 Oct 2026 09:53:15 -0700 Subject: Pick up japanese transaltion A bunch of minor README fixes, missing TOC, grammer cleanup --- .../src/main/java/com/seaofnodes/simple/codegen/Serialize.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'chapter25/src/main/java') diff --git a/chapter25/src/main/java/com/seaofnodes/simple/codegen/Serialize.java b/chapter25/src/main/java/com/seaofnodes/simple/codegen/Serialize.java index a8cd315f..27253c5e 100644 --- a/chapter25/src/main/java/com/seaofnodes/simple/codegen/Serialize.java +++ b/chapter25/src/main/java/com/seaofnodes/simple/codegen/Serialize.java @@ -63,9 +63,8 @@ abstract public class Serialize { Type.TAGOFFS(); BAOS baos = new BAOS(); - // C0D2 adds independent pointer access permissions to serialized types. - // A - Print a header - baos.write('C').write('0').write('D').write('2'); + // A - Print the C0DE header. The format is not versioned yet. + baos.write('C').write('0').write('D').write('E'); // Count unique Types var types = new HashMap(); @@ -218,7 +217,7 @@ abstract public class Serialize { Type.TAGOFFS(); // A - Read a header - if( bais.read()!='C' || bais.read()!='0' || bais.read()!='D' || bais.read()!='2' ) + if( bais.read()!='C' || bais.read()!='0' || bais.read()!='D' || bais.read()!='E' ) throw new IllegalArgumentException("Unsupported serialized IR format; rebuild the object file"); // B - Packed read of #strings, then strings @@ -247,7 +246,7 @@ abstract public class Serialize { String[] strs = elf._strs; if( strs == null ) { // A - Read a header - if( bais.read() != 'C' || bais.read() != '0' || bais.read() != 'D' || bais.read() != '2' ) + if( bais.read() != 'C' || bais.read() != '0' || bais.read() != 'D' || bais.read() != 'E' ) throw new IllegalArgumentException( "Unsupported serialized IR format; rebuild the object file" ); // B - Packed read of #strings, then strings -- cgit v1.2.3