public IReadOnlyList <IMemberDefinition> ObjectDefinition(IObjectDefiniton @object) { UpdateDefinedBy(@object.Scope, OrType.Make <IInternalMethodDefinition, IImplementationDefinition, IEntryPointDefinition, IBlockDefinition, IRootScope, IObjectDefiniton>(@object)); var membersReferenced = Walk(@object.Assignments); return(membersReferenced .Except(staticMembers) .Except(@object.Scope.Members.Select(x => x.Value.Value)).ToArray()); }
public IInterpetedOperation <IInterpetedAnyType> ObjectDefinition(IObjectDefiniton codeElement) { if (backing.TryGetValue(codeElement, out var res)) { return(res); } else { var op = new InterpetedObjectDefinition(); backing.Add(codeElement, op); op.Init(new InterpetedScopeTemplate(codeElement.Scope, codeElement.Scope.ToVerifiableType()), codeElement.Assignments.Select(x => AssignOperation(x).Cast <IInterpetedAssignOperation <IInterpetedAnyType> >()).ToArray() ); return(op); } }
public Nothing ObjectDefinition(IObjectDefiniton codeElement) { if (codeElement.Scope.Members.Values.Any(x => x.Static)) { // atleast not right now throw new Exception("a member can't be static"); } foreach (var member in codeElement.Scope.Members.Values.Select(x => x.Value)) { lookup.AddTacField(OrType.Make <IObjectDefiniton, IInterfaceType, ITypeOr>(codeElement), member); } var next = Push(codeElement); next.Walk(codeElement.Assignments); return(new Nothing()); }