Source/Packages

Runtime.NativeIndependentTree

packages/execution/src/Runtime/NativeIndependentTree.alpha

607 lines29 declarations27.9 KiBSHA-256 1a2ac79dd64d

def · lines 218–288

nitWithLayout

Full file
218def nitWithLayout =
219  (lambda unrestricted slots : Nat .
220    (lambda unrestricted system : (family IndependentStateSystem slots) .
221      (lambda unrestricted fanout : Nat .
222        (lambda unrestricted role : Nat .
223          (lambda unrestricted epoch : Nat .
224            (lambda unrestricted base : Nat .
225              (lambda unrestricted scratchWords : Nat .
226                (lambda unrestricted available : Nat .
227                  (lambda unrestricted emit : (pi unrestricted layout : (family NativeIndependentTreeLayout) . Bytes) .
228                    (let unrestricted digest =
229                      (niIdentityDigest slots system)
230                      in
231                      (eliminate
232                        StdResult
233                        (lambda unrestricted result : (family StdResult (family RegionFrameLayoutFailure) (family RegionFrameLayout)) .
234                          Bytes)
235                        (planRegionFrameLayout
236                          (niIdentity slots system digest 2 1 0)
237                          nativeTreeCommitmentBytes
238                          512
239                          base
240                          available)
241                        (branch StdFailure error . b"")
242                        (branch
243                          StdSuccess
244                          commitment
245                          .
246                          (eliminate
247                            StdResult
248                            (lambda unrestricted result : (family StdResult (family RegionFrameLayoutFailure) (family RegionFrameLayout)) .
249                              Bytes)
250                            (planRegionFrameLayout
251                              (niIdentity slots system digest 3 0 1)
252                              nativePointwiseWordBytes
253                              512
254                              (frameAlign (frameEnd commitment))
255                              available)
256                            (branch StdFailure error . b"")
257                            (branch
258                              StdSuccess
259                              release
260                              .
261                              (eliminate
262                                StdResult
263                                (lambda unrestricted result : (family StdResult (family NativeCheckpointFailure) (family NativeTreeCheckpoint)) .
264                                  Bytes)
265                                (planNativeTreeCheckpoint
266                                  (nitContext slots system)
267                                  (niRegions slots system)
268                                  fanout
269                                  (niOwners slots system)
270                                  role
271                                  (nitOwnOf slots system)
272                                  epoch
273                                  (frameAlign (frameEnd release))
274                                  available)
275                                (branch StdFailure error . b"")
276                                (branch
277                                  StdSuccess
278                                  checkpoint
279                                  .
280                                  (emit
281                                    (constructor
282                                      NativeIndependentTreeLayout
283                                      NativeIndependentTreeLayoutOf
284                                      commitment
285                                      release
286                                      checkpoint
287                                      scratchWords
288                                      digest))))))))))))))))))

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.