diff options
| author | Cliff Click <cliffc@acm.org> | 2026-10-07 09:53:15 -0700 |
|---|---|---|
| committer | Cliff Click <cliffc@acm.org> | 2026-10-07 09:53:15 -0700 |
| commit | b2862f980f3d78012066ef1cc09d4ad58f886c0f (patch) | |
| tree | bbeab7de6ac8b556911d117989ab4bbc0324ecb5 /chapter25/src/main/java/com/seaofnodes | |
| parent | 863a6ed0ad723e06c76f392d4fb3a5f6bd22863c (diff) | |
| download | Simple-b2862f980f3d78012066ef1cc09d4ad58f886c0f.tar.gz Simple-b2862f980f3d78012066ef1cc09d4ad58f886c0f.zip | |
Pick up japanese transaltionpr262-doc-followups
A bunch of minor README fixes, missing TOC, grammer cleanup
Diffstat (limited to 'chapter25/src/main/java/com/seaofnodes')
| -rw-r--r-- | chapter25/src/main/java/com/seaofnodes/simple/codegen/Serialize.java | 9 |
1 files changed, 4 insertions, 5 deletions
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<Type,Integer>(); @@ -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 |
