Source/Packages

Runtime.NativeRegionFrame

packages/execution/src/Runtime/NativeRegionFrame.alpha

321 lines25 declarations13.0 KiBSHA-256 62648683cf5f

def · lines 216–271

nativeFrameReceive

Full file
Read/compare the locally known header before any body read. The trailer has its own region, so digest padding cannot destroy the peer's claim. Every failure is fatal to this stream; partial bytes are never consumed.
216def nativeFrameReceive =
217  (lambda unrestricted layout : (family RegionFrameLayout) .
218    (lambda unrestricted descriptor : (family NativePhysicalOperand) .
219      (lambda unrestricted timeout : (family NativePhysicalOperand) .
220        (lambda unrestricted attempts : (family NativePhysicalOperand) .
221          (lambda unrestricted slot : Nat .
222            (lambda unrestricted tail : (family NativePhysicalCommands) .
223              (frameNativeRequirePhase
224                layout
225                (constructor NativeFramePhase NativeFrameUnissued)
226                (frameNativePhase
227                  layout
228                  (constructor NativeFramePhase NativeFrameActive)
229                  (frameNativeIO
230                    0
231                    descriptor
232                    (frameHeaderAt layout)
233                    (bytes-length (frameHeader layout))
234                    timeout
235                    attempts
236                    slot
237                    (frameNativeCompare
238                      (frameHeaderAt layout)
239                      (frameExpectedAt layout)
240                      (bytes-length (frameHeader layout))
241                      slot
242                      b"frame-header-mismatch"
243                      (frameNativeIO
244                        0
245                        descriptor
246                        (framePayloadAt layout)
247                        (framePayloadBytes layout)
248                        timeout
249                        attempts
250                        slot
251                        (frameNativeIO
252                          0
253                          descriptor
254                          (frameReceivedAt layout)
255                          regionFrameDigestBytes
256                          timeout
257                          attempts
258                          slot
259                          (frameNativeHash
260                            layout
261                            slot
262                            (frameNativeCompare
263                              (frameComputedAt layout)
264                              (frameReceivedAt layout)
265                              regionFrameDigestBytes
266                              slot
267                              b"frame-digest-mismatch"
268                              (frameNativePhase
269                                layout
270                                (constructor NativeFramePhase NativeFrameValidated)
271                                tail)))))))))))))))

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.