readFloat

Return an L2ReadFloatOperand for the given L2SemanticUnboxedFloat. The TypeRestriction must have been proven by the VM. If the semantic value only has a boxed form, generate code to unbox it.

In the case that unboxing may fail, a branch to the supplied onFailure L2BasicBlock will be generated. If the unboxing cannot fail (or if a corresponding L2FloatRegister already exists), no branch will lead to onFailure, which can be determined by the client by testing L2BasicBlock.currentlyReachable.

In any case, the generation position after this call is along the success path. This may itself be unreachable in the event that the unboxing will always fail.

Return

The unboxed L2ReadFloatOperand.

Parameters

semanticUnboxed

The L2SemanticUnboxedFloat to read as an unboxed float.

onFailure

Where to jump in the event that an L2_JUMP_IF_UNBOX_FLOAT fails. The manifest at this location will not contain bindings for the unboxed float (since unboxing was not possible).