Assembles already-admitted payloads without re-copying them through source
syntax. The runtime builder performs one final materialization.
362def nativePhysicalEmbeddedAssemble =
363 (lambda unrestricted host : (family NativePhysicalEmbeddedPayload) .
364 (lambda unrestricted program : (family NativePhysicalEmbeddedPayload) .
365 (lambda unrestricted qmd : (family NativePhysicalEmbeddedPayload) .
366 (lambda unrestricted pushbuffer : (family NativePhysicalEmbeddedPayload) .
367 (lambda unrestricted gpfifo : (family NativePhysicalEmbeddedPayload) .
368 (let unrestricted hostLength =
369 (bytes-length (nativePhysicalEmbeddedPayloadMaterial host))
370 in
371 (let unrestricted programOffset = hostLength in
372 (let unrestricted qmdOffset =
373 (naturalAdd
374 programOffset
375 (bytes-length (nativePhysicalEmbeddedPayloadMaterial program)))
376 in
377 (let unrestricted pushbufferOffset =
378 (naturalAdd
379 qmdOffset
380 (bytes-length (nativePhysicalEmbeddedPayloadMaterial qmd)))
381 in
382 (let unrestricted gpfifoOffset =
383 (naturalAdd
384 pushbufferOffset
385 (bytes-length (nativePhysicalEmbeddedPayloadMaterial pushbuffer)))
386 in
387 (let unrestricted manifestOffset =
388 (naturalAdd
389 gpfifoOffset
390 (bytes-length (nativePhysicalEmbeddedPayloadMaterial gpfifo)))
391 in
392 (let unrestricted artifactLength =
393 (naturalAdd
394 manifestOffset
395 (naturalAdd
396 nativePhysicalEmbeddedManifestLength
397 nativePhysicalEmbeddedFooterLength))
398 in
399 (let unrestricted hostDescriptor =
400 (nativePhysicalEmbeddedMakeDescriptor
401 (constructor
402 NativePhysicalEmbeddedComponentKind
403 NativePhysicalEmbeddedHostELF)
404 zero
405 host)
406 in
407 (let unrestricted programDescriptor =
408 (nativePhysicalEmbeddedMakeDescriptor
409 (constructor
410 NativePhysicalEmbeddedComponentKind
411 NativePhysicalEmbeddedProgramTable)
412 programOffset
413 program)
414 in
415 (let unrestricted qmdDescriptor =
416 (nativePhysicalEmbeddedMakeDescriptor
417 (constructor
418 NativePhysicalEmbeddedComponentKind
419 NativePhysicalEmbeddedQMDTable)
420 qmdOffset
421 qmd)
422 in
423 (let unrestricted pushbufferDescriptor =
424 (nativePhysicalEmbeddedMakeDescriptor
425 (constructor
426 NativePhysicalEmbeddedComponentKind
427 NativePhysicalEmbeddedPushbuffer)
428 pushbufferOffset
429 pushbuffer)
430 in
431 (let unrestricted gpfifoDescriptor =
432 (nativePhysicalEmbeddedMakeDescriptor
433 (constructor
434 NativePhysicalEmbeddedComponentKind
435 NativePhysicalEmbeddedGPFIFO)
436 gpfifoOffset
437 gpfifo)
438 in
439 (let unrestricted manifestBytes =
440 (nativePhysicalEmbeddedManifestCanonicalBytes
441 hostDescriptor
442 programDescriptor
443 qmdDescriptor
444 pushbufferDescriptor
445 gpfifoDescriptor)
446 in
447 (let unrestricted footerBytes =
448 (nativePhysicalEmbeddedFooterBytes manifestOffset)
449 in
450 (let unrestricted artifactBytes =
451 (bytes-builder-build
452 (bytes-builder-append
453 (bytes-builder-chunk
454 (nativePhysicalEmbeddedPayloadMaterial host))
455 (bytes-builder-append
456 (bytes-builder-chunk
457 (nativePhysicalEmbeddedPayloadMaterial program))
458 (bytes-builder-append
459 (bytes-builder-chunk
460 (nativePhysicalEmbeddedPayloadMaterial qmd))
461 (bytes-builder-append
462 (bytes-builder-chunk
463 (nativePhysicalEmbeddedPayloadMaterial pushbuffer))
464 (bytes-builder-append
465 (bytes-builder-chunk
466 (nativePhysicalEmbeddedPayloadMaterial gpfifo))
467 (bytes-builder-append
468 (bytes-builder-chunk manifestBytes)
469 (bytes-builder-chunk footerBytes))))))))
470 in
471 (let unrestricted manifest =
472 (constructor
473 NativePhysicalEmbeddedManifest
474 NativePhysicalEmbeddedManifestValue
475 nativePhysicalEmbeddedVersion
476 hostDescriptor
477 programDescriptor
478 qmdDescriptor
479 pushbufferDescriptor
480 gpfifoDescriptor
481 manifestBytes
482 manifestOffset
483 artifactLength)
484 in
485 (constructor
486 NativePhysicalEmbeddedBuildResult
487 NativePhysicalEmbeddedBuildSucceeded
488 (constructor
489 NativePhysicalEmbeddedArtifact
490 NativePhysicalEmbeddedArtifactValue
491 artifactBytes
492 manifest)))))))))))))))))))))))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.