Source/Packages

Checkpoint.NativeTreePublication

packages/execution/persistence/src/Checkpoint/NativeTreePublication.alpha

1,138 lines56 declarations55.0 KiBSHA-256 a6e4225ebb3a

def · lines 545–581

nativeTreePrepareOwn

Full file
Prepare this role's own shards from its state and record each one's descriptor and payload digest in its group manifest.
545def nativeTreePrepareOwn =
546  (lambda unrestricted plan : (family NativeTreeCheckpoint) .
547    (lambda unrestricted stateAt : Nat .
548      (lambda unrestricted offsetOf : (pi unrestricted shard : (family NativeRegionShard) . Nat) .
549        (lambda unrestricted paths : (family NativeTreePaths) .
550          (lambda unrestricted tail : (family NativePhysicalCommands) .
551            (stdListFold
552              (family NativeRegionShard)
553              (pi unrestricted index : Nat . (family NativePhysicalCommands))
554              (lambda unrestricted shard : (family NativeRegionShard) .
555                (lambda unrestricted next : (pi unrestricted index : Nat . (family NativePhysicalCommands)) .
556                  (lambda unrestricted index : Nat .
557                    (nativeRegionPrepareShard
558                      shard
559                      (nativeMemoryState stateAt)
560                      (nativeMemoryState (naturalAdd stateAt (offsetOf shard)))
561                      (nativeTreeArgument (nativeTreeShardCandidate paths index))
562                      (nativeTreeArgument (nativeTreeShardCommitted paths index))
563                      (nativeTreeArgument (nativeTreeDirectory paths))
564                      nativePeerListenerSlot
565                      nativePeerScratchSlot
566                      (nativeMemoryCopyPayload
567                        (nativeTreeRecordAt (nativeTreeGroup plan) index)
568                        (nativeRegionDescriptor
569                          (nativeRegionOrdinal shard)
570                          (nativeRegionInterval shard))
571                        (nativeMemoryCopyOperands
572                          (nativeMemoryState
573                            (nativeTreeRecordDigestAt (nativeTreeGroup plan) index))
574                          (nativeMemoryState (nativeTreeLayoutDigestAt (nativeRegionLayout shard)))
575                          checkpointEnvelopeDigestBytes
576                          nativePeerScratchSlot
577                          b"tree-shard-record"
578                          (next (succ index))))))))
579              (lambda unrestricted index : Nat . tail)
580              (nativeTreeShards plan)
581              0))))))

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.