private void UpdateMasks(ITypeRef/*!*/typeRef, int index)
{
Debug.Assert(index >= 0 && index < TypeRefMask.IndicesCount);
ulong mask = (ulong)1 << index;
if (typeRef.IsObject) _isObjectMask |= mask;
if (typeRef.IsArray) _isArrayMask |= mask;
if (typeRef.IsLambda) _isLambdaMask |= mask;
if (typeRef.IsPrimitiveType)
{
_isPrimitiveMask |= mask;
switch (typeRef.TypeCode)
{
case PhpTypeCode.Boolean:
_isBoolMask = mask;
break;
case PhpTypeCode.Long:
_isLongMask |= mask;
break;
case PhpTypeCode.Double:
_isDoubleMask = mask;
break;
case PhpTypeCode.String:
_isStringMask = mask;
break;
case PhpTypeCode.WritableString:
_isWritableStringMask = mask;
break;
}
}
}