declare method
void
declare(})
Implementation
void declare(
int slot,
dynamic value, {
required bool isMutable,
required bool isInitialized,
bool reuseCell = false,
}) {
_mutable[slot] = isMutable;
_initialized[slot] = isInitialized;
if (_hasCapturedSlots && capturedSlots.contains(slot)) {
final current = slots[slot];
if (reuseCell && current is HTVariableCell) {
current.declare(
value,
mutable: isMutable,
initialized: isInitialized,
);
} else {
slots[slot] = HTVariableCell(
_name(slot),
value,
isMutable: isMutable,
isInitialized: isInitialized,
);
}
} else {
slots[slot] = value;
}
}