Source/Packages

Runtime.NativeFloatPlan

packages/execution/src/Runtime/NativeFloatPlan.alpha

238 lines9 declarations9.6 KiBSHA-256 e708b925915d

def · lines 81–114

nativeNumericConvert

Full file
One typed format boundary, realized by the maintained host float commands. Values occupy admitted word slots; binary32 words use the low half. Identity copies bits. Narrowing is visible in the source program and is never inserted by framing. The enclosing planner checks the producer/consumer endpoints.
81def nativeNumericConvert =
82  (lambda unrestricted error : Bytes .
83    (lambda unrestricted conversion : (family StdNumericConversion) .
84      (lambda unrestricted destination : Nat .
85        (lambda unrestricted source : (family NativePhysicalOperand) .
86          (eliminate
87            StdNumericConversion
88            (lambda unrestricted current : (family StdNumericConversion) .
89              (pi unrestricted tail : (family NativePhysicalCommands) .
90                (family NativePhysicalCommands)))
91            conversion
92            (branch
93              StdNumericKeepFormat
94              format
95              .
96              (nativeMemoryStoreWord64 error destination source))
97            (branch
98              StdNumericWidenBinary32
99              .
100              (nativeFloat64
101                error
102                (constructor NativePhysicalFloat64Operation NativePhysicalFloat64FromBinary32)
103                destination
104                source
105                (nativeLaunchRecipeImmediate 0)))
106            (branch
107              StdNumericRoundBinary64
108              .
109              (nativeFloat64
110                error
111                (constructor NativePhysicalFloat64Operation NativePhysicalFloat64ToBinary32)
112                destination
113                source
114                (nativeLaunchRecipeImmediate 0))))))))

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.