Source/Packages

Runtime.NativeBranch

packages/execution/src/Runtime/NativeBranch.alpha

51 lines2 declarations2.4 KiBSHA-256 a4e025455273

def · lines 29–51

nativeIfEqual

Full file
The first guard skips the true body and its following forward jump. That jump skips the false body. Nested choices retain the surrounding loop's iteration coordinate, unlike encoding each guard as a counted loop.
29def nativeIfEqual =
30  (lambda unrestricted left : (family NativePhysicalOperand) .
31    (lambda unrestricted right : (family NativePhysicalOperand) .
32      (lambda unrestricted label : Bytes .
33        (lambda unrestricted whenEqual : (family NativePhysicalCommands) .
34          (lambda unrestricted whenDifferent : (family NativePhysicalCommands) .
35            (lambda unrestricted tail : (family NativePhysicalCommands) .
36              (nativeLaunchRecipeCommand
37                (constructor
38                  NativePhysicalOperation
39                  NativePhysicalSkipUnlessEqual
40                  left
41                  right
42                  (nativeLaunchRecipeWord (succ (nativePhysicalCommandsLength whenEqual))))
43                (bytes-append label b":choose")
44                (nativePhysicalProgramComposeCommandsAppend
45                  whenEqual
46                  (nativeWhenEqual
47                    (nativeLaunchRecipeImmediate 0)
48                    (nativeLaunchRecipeImmediate 1)
49                    (bytes-append label b":join")
50                    whenDifferent
51                    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.