Source/Packages

Runtime.NativePhysicalImagePlan

packages/execution/src/Runtime/NativePhysicalImagePlan.alpha

69 lines11 declarations3.7 KiBSHA-256 2ad64c2e7487

family · lines 56–58

NativePhysicalPackedImage

Full file
A packed image: the x86-64 host's V4 image, compressed by the compiler and unpacked once by the interpreter (Runtime.NativePhysicalNative) when the executable starts. Container: magic ALPXLZ01, version 1 (u64), unpacked length (u64), packed length (u64), then LZ sequences. A sequence is a token (high nibble: literal count; low nibble: match length minus 4; either nibble 15 continues in bytes of 255 and a final remainder), the literals, a 16-bit little-endian distance 1 .. 65535 back into the bytes already produced, and the match length's continuation; matches may overlap their own output, and the last sequence carries literals only. The interpreter unpacks into the pages after the file's last page, which the executable's load segment reserves (Compiler.ELF), writable while it writes them and read+execute before anything in them runs. It refuses (exit 109) a wrong version, a literal or match past the stream or past the declared length, a distance reaching before the output, and an output that is not exactly the declared length. The unpacked image is byte-identical to the V4 image, so execution is unchanged; only its bytes on disk are compressed.
56family NativePhysicalPackedImage : Type 0
57constructor NativePhysicalPackedImageOf
58field unrestricted nativePhysicalPackedImageProgram : (family NativePhysicalProgram)

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.