示例#1
0
        private IType CompileArrayEnumerator(IType elemType)
        {
            var genericType = _host.CorlibTypes[GenericTypeId.ArrayEnumeratorT];
            var enumerator  = _host.TypeFactory.MakeGenericType(genericType, elemType);

            _host.CompileClass(enumerator);

            foreach (var method in enumerator.Methods)
            {
                _host.CompileMethod(method);
            }

            return(enumerator);
        }
示例#2
0
        private JsClass CompileClass(IType type)
        {
            var klass = _host.CompileClass(type);

            _host.CompileFields(type, false);

            if (type.IsNullableInstance())
            {
                JsStruct.CompileCopy(klass);
            }

            return(klass);
        }
示例#3
0
 private JsClass CompileClass(IType type)
 {
     return(_host.CompileClass(type));
 }