Example #1
0
        private void CreateTypeObject(TypeDesc typeDesc)
        {
            if (typeDesc.BaseClass != null && !_typesHeap.ContainsType(typeDesc.BaseClass.Metadata))
            {
                throw new InvalidOperationException("Base class for this class was not loaded into domain. Load base class first");
            }

            VTableBuilder vtb = new VTableBuilder(typeDesc, null);

            var vtBuilder = new VTableBuilder(typeDesc, null);

            if (typeDesc.BaseClass != null)
            {
                vtBuilder.CloneBaseVTable(_typesHeap.GetTypeObject(typeDesc.BaseClass.Metadata).VTable);
            }

            VTable vTable = vtBuilder.ExtendBaseTypeVTable().Create();


            //Add to heap
            TypeObject typeObj = new TypeObject(typeDesc.Metadata, typeDesc, vTable);

            _typesHeap.AddTypeObject(typeDesc.Metadata, typeObj);
        }
Example #2
0
        public VTable Create()
        {
            VTable vTable = new VTable(_methodsTable, _ioTable);

            return(vTable);
        }
Example #3
0
        //public Int32 HeapObjAddr;

        public TypeObject(ClassToken token, TypeDesc typeDesc, VTable vTable)
        {
            TypeDesc = typeDesc;
            VTable   = vTable;
            Token    = token;
        }