Пример #1
0
        public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
        {
            ObjectDataSignatureBuilder dataBuilder = new ObjectDataSignatureBuilder();

            if (!relocsOnly)
            {
                dataBuilder.AddSymbol(this);

                EcmaModule       targetModule = factory.SignatureContext.GetTargetModule(_fieldDesc);
                SignatureContext innerContext = dataBuilder.EmitFixup(factory, _fixupKind, targetModule, factory.SignatureContext);

                if (_fixupKind == ReadyToRunFixupKind.Check_FieldOffset)
                {
                    dataBuilder.EmitInt(_fieldDesc.Offset.AsInt);
                }

                dataBuilder.EmitFieldSignature(_fieldDesc, innerContext);
            }

            return(dataBuilder.ToObjectData());
        }