Source/Packages

Runtime.NativePhysicalNativeELF

packages/execution/src/Runtime/NativePhysicalNativeELF.alpha

622 lines68 declarations26.2 KiBSHA-256 10815f9a5c49

def · lines 525–538

nativePhysicalPackedImageReserve

Full file
the unpacked image's length (container bytes 16 .. 23), page-rounded
525def nativePhysicalPackedImageReserve =
526  (lambda unrestricted container : Bytes .
527    (let unrestricted unpacked =
528      (naturalAdd (nativePhysicalPackedImageWord container 16)
529        (naturalAdd (naturalMultiply 256 (nativePhysicalPackedImageWord container 17))
530          (naturalAdd (naturalMultiply 65536 (nativePhysicalPackedImageWord container 18))
531            (naturalAdd (naturalMultiply 16777216 (nativePhysicalPackedImageWord container 19))
532              (naturalAdd (naturalMultiply 4294967296 (nativePhysicalPackedImageWord container 20))
533                (naturalAdd (naturalMultiply 1099511627776 (nativePhysicalPackedImageWord container 21))
534                  (naturalAdd (naturalMultiply 281474976710656 (nativePhysicalPackedImageWord container 22))
535                    (naturalMultiply 72057594037927936 (nativePhysicalPackedImageWord container 23)))))))))
536      in
537      (naturalMultiply elfPageBytes
538        (naturalDivideUnchecked (naturalAdd unpacked (naturalSaturatingSubtract elfPageBytes 1)) elfPageBytes))))

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.