Beispiel #1
0
        private void EmitProtocolCallsites(TypeBuilder tb)
        {
            int count = ProtocolCallsites.count();

            CachedTypeFields = new List<FieldBuilder>(count);

            for (int i = 0; i < count; i++)
            {
                CachedTypeFields.Add(tb.DefineField(CachedClassName(i), typeof(Type), FieldAttributes.Public|FieldAttributes.Static));
            }
        }
Beispiel #2
0
        private void EmitProtocolCallsites(TypeBuilder tb)
        {
            int count = ProtocolCallsites.count();

            _cachedTypeFields      = new List <FieldBuilder>(count);
            _cachedProtoFnFields   = new List <FieldBuilder>(count);
            _cachedProtoImplFields = new List <FieldBuilder>(count);


            for (int i = 0; i < count; i++)
            {
                _cachedTypeFields.Add(tb.DefineField(CachedClassName(i), typeof(Type), FieldAttributes.Public));
                _cachedProtoFnFields.Add(tb.DefineField(CachedProtoFnName(i), typeof(AFunction), FieldAttributes.Public));
                _cachedProtoImplFields.Add(tb.DefineField(CachedProtoImplName(i), typeof(IFn), FieldAttributes.Public));
            }
        }