示例#1
0
 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);
        }
示例#3
0
 public GCStaticEETypeNode(TargetDetails target, GCPointerMap gcMap)
 {
     _gcMap = gcMap;
     _target = target;
 }
示例#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)
 {
 }
示例#6
0
 public FrozenStringNode(string data, TargetDetails target)
 {
     _data = data;
     _syncBlockSize = target.PointerSize;
 }
示例#7
0
 public ReadyToRunHeaderNode(TargetDetails target)
 {
     _target = target;
 }
 public EETypeOptionalFieldsNode(EETypeOptionalFieldsBuilder fieldBuilder, TargetDetails target)
 {
     _fieldBuilder = fieldBuilder;
     _target = target;
 }
示例#9
0
 public ModulesSectionNode(TargetDetails target)
 {
     _target = target;
 }
 public MetadataTypeSystemContext(TargetDetails details)
     : base(details)
 {
 }
 public CompilerTypeSystemContext(TargetDetails details)
     : base(details)
 {
 }
示例#12
0
 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;
 }
示例#13
0
 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);
 }