public GCStaticEETypeNode(bool[] gcDesc, NodeFactory factory)
 {
     List<int> runLengths = new List<int>();
     bool encodingGCPointers = false;
     int currentPointerCount = 0;
     foreach (bool pointerIsGC in gcDesc)
     {
         if (encodingGCPointers == pointerIsGC)
         {
             currentPointerCount++;
         }
         else
         {
             runLengths.Add(currentPointerCount * factory.Target.PointerSize);
             encodingGCPointers = pointerIsGC;
         }
     }
     runLengths.Add(currentPointerCount);
     _runLengths = runLengths.ToArray();
     _targetPointerSize = factory.Target.PointerSize;
     _target = factory.Target;
 }
        public TypeSystemContext(TargetDetails target)
        {
            Target = target;

            _instantiatedTypes = new InstantiatedTypeKey.InstantiatedTypeKeyHashtable();

            _arrayTypes = new ArrayTypeKey.ArrayTypeKeyHashtable();

            _byRefTypes = new ByRefHashtable();

            _pointerTypes = new PointerHashtable();

            _functionPointerTypes = new FunctionPointerHashtable();

            _instantiatedMethods = new InstantiatedMethodKey.InstantiatedMethodKeyHashtable();

            _methodForInstantiatedTypes = new MethodForInstantiatedTypeKey.MethodForInstantiatedTypeKeyHashtable();

            _fieldForInstantiatedTypes = new FieldForInstantiatedTypeKey.FieldForInstantiatedTypeKeyHashtable();

            _signatureVariables = new SignatureVariableHashtable(this);
        }
 public GCStaticEETypeNode(TargetDetails target, GCPointerMap gcMap)
 {
     _gcMap = gcMap;
     _target = target;
 }
Exemple #4
0
        public ObjectWriter(string objectFilePath, NodeFactory factory)
        {
            _nativeObjectWriter = InitObjWriter(objectFilePath);
            if (_nativeObjectWriter == IntPtr.Zero)
            {
                throw new IOException("Fail to initialize Native Object Writer");
            }

            _nodeFactory = factory;
            _targetPlatform = _nodeFactory.Target;
        }
 public MetadataTypeSystemContext(TargetDetails details)
     : base(details)
 {
 }
 public FrozenStringNode(string data, TargetDetails target)
 {
     _data = data;
     _syncBlockSize = target.PointerSize;
 }
 public ReadyToRunHeaderNode(TargetDetails target)
 {
     _target = target;
 }
 public EETypeOptionalFieldsNode(EETypeOptionalFieldsBuilder fieldBuilder, TargetDetails target)
 {
     _fieldBuilder = fieldBuilder;
     _target = target;
 }
 public ModulesSectionNode(TargetDetails target)
 {
     _target = target;
 }
 public MetadataTypeSystemContext(TargetDetails details)
     : base(details)
 {
 }
 public CompilerTypeSystemContext(TargetDetails details)
     : base(details)
 {
 }
 private static int GetClassConstructorContextAlignment(TargetDetails target)
 {
     // TODO: Assert that StaticClassConstructionContext type has the expected alignment
     //       (need to make it a well known type?)
     return target.PointerSize;
 }
 public static int GetClassConstructorContextStorageSize(TargetDetails target, MetadataType type)
 {
     int alignmentRequired = Math.Max(type.NonGCStaticFieldAlignment, GetClassConstructorContextAlignment(target));
     return AlignmentHelper.AlignUp(GetClassConstructorContextSize(type.Context.Target), alignmentRequired);
 }
 public InterfaceDispatchMapTableNode(TargetDetails target)
 {
     _target = target;
 }
 public TypeLoaderTypeSystemContext(TargetDetails targetDetails) : base(targetDetails)
 {
     InitializeSystemModule(null);
 }