Source/Packages

Runtime.NativeLaunchRecipeLoad

packages/execution/src/Runtime/NativeLaunchRecipeLoad.alpha

228 lines16 declarations11.9 KiBSHA-256 b9d848b14a5f

def · lines 98–137

nativeLaunchRecipeLoadCommands

Full file
Load one recipe: pread64 it from the executable at its component offset into the staging area, expand it into the destination, and require the routine to report exactly the table's extent. `executable` is the operand holding the /proc/self/exe descriptor.
98def nativeLaunchRecipeLoadCommands =
99  (lambda unrestricted executable : (family NativePhysicalOperand) .
100    (lambda unrestricted stagingAddress : Nat .
101      (lambda unrestricted recipeOffset : Nat .
102        (lambda unrestricted recipeExtent : Nat .
103          (lambda unrestricted destination : Nat .
104            (lambda unrestricted tableExtent : Nat .
105              (lambda unrestricted resultSlot : Nat .
106                (lambda unrestricted errorIdentity : Bytes .
107                  (lambda unrestricted tail : (family NativePhysicalCommands) .
108                    (nativeLaunchRecipeCommand
109                      (constructor NativePhysicalOperation NativePhysicalSystemCall
110                        (nativeLaunchRecipeImmediate 17)
111                        (nativeLaunchRecipeArguments
112                          executable
113                          (nativeLaunchRecipeImmediate stagingAddress)
114                          (nativeLaunchRecipeImmediate recipeExtent)
115                          (nativeLaunchRecipeImmediate recipeOffset))
116                        b""
117                        (nativeLaunchRecipeStore resultSlot))
118                      errorIdentity
119                      (nativeLaunchRecipeAssertEqual
120                        (nativeLaunchRecipeSlotValue resultSlot)
121                        (nativeLaunchRecipeImmediate recipeExtent)
122                        errorIdentity
123                        (nativeLaunchRecipeCommand
124                          (constructor NativePhysicalOperation NativePhysicalMachineRoutine
125                            nativeLaunchRecipeRoutineBytes
126                            (nativeLaunchRecipeArguments
127                              (nativeLaunchRecipeImmediate stagingAddress)
128                              (nativeLaunchRecipeImmediate recipeExtent)
129                              (nativeLaunchRecipeImmediate destination)
130                              (nativeLaunchRecipeImmediate tableExtent))
131                            (nativeLaunchRecipeStore resultSlot))
132                          errorIdentity
133                          (nativeLaunchRecipeAssertEqual
134                            (nativeLaunchRecipeSlotValue resultSlot)
135                            (nativeLaunchRecipeImmediate tableExtent)
136                            errorIdentity
137                            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.