Beispiel #1
0
 public override FieldLayoutAlgorithm GetLayoutAlgorithmForType(DefType type)
 {
     if (type.IsObject)
     {
         return(_systemObjectFieldLayoutAlgorithm);
     }
     else if (type == UniversalCanonType)
     {
         throw new NotImplementedException();
     }
     else if (type.IsRuntimeDeterminedType)
     {
         throw new NotImplementedException();
     }
     else if (VectorOfTFieldLayoutAlgorithm.IsVectorOfTType(type))
     {
         return(_vectorOfTFieldLayoutAlgorithm);
     }
     else if (VectorFieldLayoutAlgorithm.IsVectorType(type))
     {
         return(_vectorFieldLayoutAlgorithm);
     }
     else if (Int128FieldLayoutAlgorithm.IsIntegerType(type))
     {
         return(_int128FieldLayoutAlgorithm);
     }
     else
     {
         Debug.Assert(_r2rFieldLayoutAlgorithm != null);
         return(_r2rFieldLayoutAlgorithm);
     }
 }
Beispiel #2
0
 public override FieldLayoutAlgorithm GetLayoutAlgorithmForType(DefType type)
 {
     if (type == UniversalCanonType)
     {
         return(UniversalCanonLayoutAlgorithm.Instance);
     }
     else if (type.IsRuntimeDeterminedType)
     {
         return(_runtimeDeterminedFieldLayoutAlgorithm);
     }
     else if (VectorOfTFieldLayoutAlgorithm.IsVectorOfTType(type))
     {
         return(_vectorOfTFieldLayoutAlgorithm);
     }
     else if (VectorFieldLayoutAlgorithm.IsVectorType(type))
     {
         return(_vectorFieldLayoutAlgorithm);
     }
     else if (Int128FieldLayoutAlgorithm.IsIntegerType(type))
     {
         return(_int128FieldLayoutAlgorithm);
     }
     else
     {
         return(_metadataFieldLayoutAlgorithm);
     }
 }