예제 #1
0
파일: dynamic.cs 프로젝트: mdae/MonoRT
 public StaticDataClass()
     : base(new RootDeclSpace(new NamespaceEntry(null, null, null)),
            new MemberName(CompilerGeneratedClass.MakeName(null, "c", "DynamicSites", 0)),
            Modifiers.INTERNAL | Modifiers.STATIC)
 {
     ModFlags &= ~Modifiers.SEALED;
 }
예제 #2
0
        public Method CreateFinallyHost(ExceptionStatement block)
        {
            var method = new Method(IteratorHost, null, TypeManager.system_void_expr, Modifiers.COMPILER_GENERATED,
                                    new MemberName(CompilerGeneratedClass.MakeName("", "", "Finally", finally_hosts_counter++), loc),
                                    ParametersCompiled.EmptyReadOnlyParameters, null);

            method.Block = new ToplevelBlock(method.Compiler, method.ParameterInfo, loc);
            method.Block.AddStatement(new TryFinallyBlockProxyStatement(this, block));

            // Cannot it add to IteratorHost because it'd be emitted before nested
            // anonoymous methods which could capture shared variable

            return(method);
        }