private IStrongBox GetStrongBox(int index)
{
// We lookup the closure using two ints:
// 1. The high dword is the number of parents to go up
// 2. The low dword is the index into that array
long closureKey = _indexes[index];
// walk up the parent chain to find the real environment
object[] result = _data;
for (int parents = (int)(closureKey >> 32); parents > 0; parents--)
{
result = HoistedLocals.GetParent(result);
}
// Return the variable storage
return (IStrongBox)result[(int)closureKey];
}
}