コード例 #1
0
 public MethodMakerVisitor(ModuleBuilder moduleBuilder, WhoDefinedMemberByMethodlike extensionLookup, RealizedMethodLookup realizedMethodLookup, AssemblerTypeTracker typeCache)
 {
     this.moduleBuilder        = moduleBuilder ?? throw new ArgumentNullException(nameof(moduleBuilder));
     this.extensionLookup      = extensionLookup ?? throw new ArgumentNullException(nameof(extensionLookup));
     this.realizedMethodLookup = realizedMethodLookup ?? throw new ArgumentNullException(nameof(realizedMethodLookup));
     this.typeTracker          = typeCache ?? throw new ArgumentNullException(nameof(typeCache));
 }
コード例 #2
0
ファイル: MemberKindVisitor.cs プロジェクト: Prototypist1/Tac
        public static (MemberKindVisitor, MemberKindLookup) Make(WhoDefinedMemberByMethodlike extensionLookup, IProject <Assembly, object> project)
        {
            MemberKindLookup lookup = new MemberKindLookup();
            //
            // TODO
            // we can add project.DependencyScope directly to the lookups
            // this doesn't really need to happen in here, the MemberKindVisitor isn't involved at all
            // but it is a nessisray part of the flow
            //foreach (var member in project.DependencyScope.Members) {
            //    lookup.AddDependency(xxx, member);
            //}

            var res = new MemberKindVisitor(new List <IOrType <IEntryPointDefinition, IImplementationDefinition, IInternalMethodDefinition, IRootScope> >()
            {
            }, lookup, extensionLookup);

            //res.Init();
            return(res, lookup);
        }
コード例 #3
0
ファイル: ClosureWalker.cs プロジェクト: Prototypist1/Tac
 public ClosureVisitor(WhoDefinedMemberByMethodlike extensionLookup, HashSet <IMemberDefinition> staticMembers)
 {
     this.extensionLookup = extensionLookup ?? throw new ArgumentNullException(nameof(extensionLookup));
     this.staticMembers   = staticMembers ?? throw new ArgumentNullException(nameof(staticMembers));
 }
コード例 #4
0
ファイル: MemberKindVisitor.cs プロジェクト: Prototypist1/Tac
 private MemberKindVisitor(IReadOnlyList <IOrType <IEntryPointDefinition, IImplementationDefinition, IInternalMethodDefinition, IRootScope> > stack, MemberKindLookup lookup, WhoDefinedMemberByMethodlike extensionLookup)
 {
     this.stack           = stack ?? throw new ArgumentNullException(nameof(stack));
     this.lookup          = lookup ?? throw new ArgumentNullException(nameof(lookup));
     this.extensionLookup = extensionLookup ?? throw new ArgumentNullException(nameof(extensionLookup));
 }