emitGetVariableOffRamp

fun emitGetVariableOffRamp(getOperation: L2Operation, variable: L2ReadBoxedOperand, targetSemanticValue: L2SemanticValue, makeImmutable: Boolean): L2ReadBoxedOperand

Emit the specified variable-reading instruction, and an off-ramp to deal with the case that the variable is unassigned.

Return

The L2ReadBoxedOperand into which the variable's value will be written, including having made it immutable if requested.

Parameters

getOperation
variable

The location of the variable.

makeImmutable

true if the extracted value should be made immutable, otherwise false.