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 (_simdHelper.IsVectorOfT(type))
     {
         return(_vectorFieldLayoutAlgorithm);
     }
     else if (VectorIntrinsicFieldLayoutAlgorithm.IsVectorType(type))
     {
         return(_vectorIntrinsicFieldLayoutAlgorithm);
     }
     else
     {
         Debug.Assert(_r2rFieldLayoutAlgorithm != null);
         return(_r2rFieldLayoutAlgorithm);
     }
 }
Esempio n. 2
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 (type.IsIntrinsic && (type.Name == "Vector`1") && (type.Namespace == "System.Numerics"))
     {
         return(_vectorFieldLayoutAlgorithm);
     }
     else if (VectorIntrinsicFieldLayoutAlgorithm.IsVectorType(type))
     {
         return(_vectorIntrinsicFieldLayoutAlgorithm);
     }
     else
     {
         Debug.Assert(_r2rFieldLayoutAlgorithm != null);
         return(_r2rFieldLayoutAlgorithm);
     }
 }
 public ReadyToRunCompilerContext(TargetDetails details, SharedGenericsMode genericsMode)
     : base(details, genericsMode)
 {
     _r2rFieldLayoutAlgorithm             = new ReadyToRunMetadataFieldLayoutAlgorithm();
     _systemObjectFieldLayoutAlgorithm    = new SystemObjectFieldLayoutAlgorithm(_r2rFieldLayoutAlgorithm);
     _vectorFieldLayoutAlgorithm          = new VectorFieldLayoutAlgorithm(_r2rFieldLayoutAlgorithm);
     _vectorIntrinsicFieldLayoutAlgorithm = new VectorIntrinsicFieldLayoutAlgorithm(_r2rFieldLayoutAlgorithm);
 }