1 write to _factory
Microsoft.CodeAnalysis.VisualBasic (1)
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter.vb (1)
46_factory = New SyntheticBoundNodeFactory(Nothing, currentMethod, node, compilationState, diagnostics)
185 references to _factory
Microsoft.CodeAnalysis.VisualBasic (185)
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter.vb (88)
47_expressionType = _factory.WellKnownType(WellKnownType.System_Linq_Expressions_Expression) 54_elementInitType = Me._factory.WellKnownType(WellKnownType.System_Linq_Expressions_ElementInit) 63_memberBindingType = Me._factory.WellKnownType(WellKnownType.System_Linq_Expressions_MemberBinding) 72_memberInfoType = Me._factory.WellKnownType(WellKnownType.System_Reflection_MemberInfo) 81_int32Type = _factory.SpecialType(SpecialType.System_Int32) 90_objectType = _factory.SpecialType(SpecialType.System_Object) 126Return _factory.Diagnostics 182Return VisitInternal(Me._factory.Literal("Diagnostics Generated")) 193Dim old As SyntaxNode = _factory.Syntax 194_factory.Syntax = node.Syntax 196_factory.Syntax = old 202Return _factory.Convert(_expressionType, result) 323Dim parameterExpressionType = _factory.WellKnownType(WellKnownType.System_Linq_Expressions_ParameterExpression) 333Dim param = _factory.SynthesizedLocal(parameterExpressionType) 334Dim parameterReference = _factory.Local(param, False) 335Dim parameterReferenceLValue = _factory.Local(param, True) 342_factory.[Typeof]( 344_factory.WellKnownType(WellKnownType.System_Type)), 345_factory.Literal(p.Name)) 347initializers.Add(_factory.AssignmentExpression(parameterReferenceLValue, parameter)) 357Dim result = _factory.Sequence(locals.ToImmutableAndFree(), 363_factory.Array(parameterExpressionType, parameters.ToImmutableAndFree()))) 397If(method.IsShared, _factory.Null(_expressionType), receiverOpt), 398_factory.MethodInfo(method, _factory.WellKnownType(WellKnownType.System_Reflection_MethodInfo)), ConvertArgumentsIntoArray(node.Arguments)) 410rewrittenReceiver = _factory.Null(_expressionType) 426_factory.FieldInfo(field)) 437rewrittenReceiver = _factory.Null(_expressionType) 448_factory.MethodInfo(getMethod, _factory.WellKnownType(WellKnownType.System_Reflection_MethodInfo))) 468receiverOpt = Me._factory.Convert(Me.ObjectType, Me._factory.Null()) 481receiverOpt = Me._factory.Convert(Me.ObjectType, receiverOpt) 490Dim createDelegate = DirectCast(Binder.GetWellKnownTypeMember(Me._factory.Compilation, WellKnownMember.System_Reflection_MethodInfo__CreateDelegate, useSiteInfo), MethodSymbol) 496Dim methodInfo As BoundExpression = Me._factory.MethodInfo(targetMethod, createDelegate.ContainingType) 499result = Me._factory.Call(methodInfo, 501Me._factory.[Typeof](delegateType, createDelegate.Parameters(0).Type), 506createDelegate = DirectCast(Me._factory.SpecialMember(SpecialMember.System_Delegate__CreateDelegate4), MethodSymbol) 509result = Me._factory.Call(Me._factory.Null(Me.ObjectType), 511Me._factory.[Typeof](delegateType, createDelegate.Parameters(0).Type), 513Me._factory.MethodInfo(targetMethod, createDelegate.Parameters(2).Type), 514Me._factory.Literal(False)) 546Return _factory.Array(_expressionType, newExpr.AsImmutableOrNull()) 562_factory.[Typeof](node.Type, _factory.WellKnownType(WellKnownType.System_Type))), node.InitializerOpt) 620_factory.Convert(MemberInfoType, Me._factory.FieldInfo(DirectCast(leftSymbol, FieldSymbol))), 621Me._factory.MethodInfo((DirectCast(leftSymbol, PropertySymbol)).SetMethod, _factory.WellKnownType(WellKnownType.System_Reflection_MethodInfo))) 623newInitializers(i) = _factory.Convert( 633Return _factory.Array(MemberBindingType, newInitializers.AsImmutableOrNull()) 651newInitializers(i) = _factory.Convert( 655_factory.MethodInfo([call].Method, _factory.WellKnownType(WellKnownType.System_Reflection_MethodInfo)), 661Return _factory.Array(ElementInitType, newInitializers.AsImmutableOrNull()) 674_factory.[Typeof](node.Type, _factory.WellKnownType(WellKnownType.System_Type))) 677Dim ctor = _factory.ConstructorInfo(node.ConstructorOpt) 687methodInfos(i) = Me._factory.Convert(Me.MemberInfoType, Me._factory.MethodInfo(properties(i).GetMethod, _factory.WellKnownType(WellKnownType.System_Reflection_MethodInfo))) 692_factory.Convert(_factory.SpecialType(SpecialType.System_Collections_Generic_IEnumerable_T).Construct(_expressionType), 694Me._factory.Array(Me.MemberInfoType, methodInfos.AsImmutableOrNull())) 721DirectCast(Me._factory.SpecialMember(SpecialMember.System_Array__LongLength), PropertySymbol).GetMethod, 736Dim boundType As BoundExpression = _factory.[Typeof](arrayType.ElementType, _factory.WellKnownType(WellKnownType.System_Type)) 751Return _factory.Array(_expressionType, newArgs.AsImmutableOrNull) 755Return ConvertRuntimeHelperToExpressionTree(WellKnownMember.System_Linq_Expressions_Expression__TypeIs, Visit(node.Operand), _factory.[Typeof](node.TargetType, _factory.WellKnownType(WellKnownType.System_Type))) 767_factory.MethodInfo(method, _factory.WellKnownType(WellKnownType.System_Reflection_MethodInfo)), 768_factory.Array(_expressionType, params)) 773Return ConvertRuntimeHelperToExpressionTree(WellKnownMember.System_Linq_Expressions_Expression__Default, _factory.[Typeof](type, _factory.WellKnownType(WellKnownType.System_Type))) 779_factory.ConstructorInfo(helper), 780_factory.Array(_expressionType, argument)) 785Return _factory.Convert(_expressionType, ConvertRuntimeHelperToExpressionTree(WellKnownMember.System_Linq_Expressions_Expression__Negate_Expression, expr)) 791Return ConvertRuntimeHelperToExpressionTree(WellKnownMember.System_Linq_Expressions_Expression__New_Type, _factory.[Typeof](type, _factory.WellKnownType(WellKnownType.System_Type))) 807Return _factory.Convert( 811_factory.Convert(Me.ObjectType, node), _factory.[Typeof](type, _factory.WellKnownType(WellKnownType.System_Type)))) 828Dim helper As MethodSymbol = _factory.WellKnownMember(Of MethodSymbol)(helperMethod) 835Return New BoundCall(_factory.Syntax, helper, methodGroupOpt:=Nothing, receiverOpt:=Nothing, 841Return _factory.BadExpression(arguments)
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_BinaryOperator.vb (37)
78Me._factory.Literal(isLifted), 79_factory.MethodInfo(node.Call.Method, _factory.WellKnownType(WellKnownType.System_Reflection_MethodInfo))) 88_factory.MethodInfo(node.Call.Method, _factory.WellKnownType(WellKnownType.System_Reflection_MethodInfo))) 178_factory.MethodInfo(operand.Call.Method, _factory.WellKnownType(WellKnownType.System_Reflection_MethodInfo))) 273left, right, Me._factory.Literal(resultType.IsNullableType), _factory.MethodInfo(helper, _factory.WellKnownType(WellKnownType.System_Reflection_MethodInfo))) 308Dim newType As TypeSymbol = If(operandIsNullable, Me._factory.NullableOf(operandUnderlyingType), operandUnderlyingType) 318Dim newType As TypeSymbol = If(operandIsNullable, Me._factory.NullableOf(Me.Int32Type), Me.Int32Type) 325left, right, Me._factory.Literal(resultType.IsNullableType), 326Me._factory.Null(_factory.WellKnownType(WellKnownType.System_Reflection_MethodInfo))) 352Dim systemBool As TypeSymbol = _factory.SpecialType(SpecialType.System_Boolean) 403Return _factory.BadExpression(Visit(node.Left), Visit(node.Right)) 408Return _factory.BadExpression(Visit(node.Left), Visit(node.Right)) 411helper = Me._factory.WellKnownMember(Of MethodSymbol)(WellKnownMember.System_Math__PowDoubleDouble) 413Return _factory.BadExpression(Visit(node.Left), Visit(node.Right)) 427left, right, _factory.MethodInfo(helper, _factory.WellKnownType(WellKnownType.System_Reflection_MethodInfo))) 459result = Convert(result, If(resultTypeIsNullable, Me._factory.NullableOf(resultUnderlyingType), resultUnderlyingType), isChecked) 522loweredOperand = Convert(loweredOperand, If(isNullable, Me._factory.NullableOf(underlyingType), underlyingType), False) 527loweredOperand = Convert(loweredOperand, If(isNullable, Me._factory.NullableOf(Me.Int32Type), Me.Int32Type), checked) 576result = Convert(result, Me._factory.NullableOf(Me.Int32Type), isChecked) 590_factory.Convert(_expressionType, 593Me._factory.Convert(Me.ObjectType, Me._factory.Literal(shiftMask)), 594Me._factory.Typeof(Me.Int32Type, _factory.WellKnownType(WellKnownType.System_Type)))) 599Dim int32Nullable As TypeSymbol = If(isNullable, Me._factory.NullableOf(Me.Int32Type), Nothing) 605loweredOperand = _factory.Convert(_expressionType, 653Return DirectCast(_factory.SpecialMember(specialHelper), MethodSymbol) 680Return DirectCast(_factory.SpecialMember(specialHelper), MethodSymbol) 719Return Me._factory.WellKnownMember(Of MethodSymbol)(wellKnownHelper) 784Return Me._factory.Convert(resultType, [call])
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_ConditionalExpresion.vb (16)
65Return Me._factory.SynthesizedParameter(paramType, s_coalesceLambdaParameterName) 69Return Me._factory.Parameter(paramSymbol).MakeRValue() 73Dim parameterExpressionType As TypeSymbol = _factory.WellKnownType(WellKnownType.System_Linq_Expressions_ParameterExpression) 75Dim paramLocalSymbol As LocalSymbol = Me._factory.SynthesizedLocal(parameterExpressionType) 76Dim parameterReference As BoundLocal = Me._factory.Local(paramLocalSymbol, True) 79_factory.[Typeof](lambdaParameter.Type, _factory.WellKnownType(WellKnownType.System_Type)), 80_factory.Literal(s_coalesceLambdaParameterName)) 87Me._factory.Sequence(ImmutableArray.Create(Of LocalSymbol)( 90Me._factory.AssignmentExpression(parameterReference, parameter)), 94Me._factory.Array( 115Return Me._factory.Convert(toType, CreateUserDefinedNullableToUnderlyingConversion(parameter, parameterType, isChecked), isChecked) 117Return Me._factory.Convert(toType, parameter, isChecked) 129Dim helper As MethodSymbol = DirectCast(Me._factory.SpecialMember( 134Return Me._factory.Convert(underlyingType, expression, isChecked) 214parameter = Me._factory.Convert(expectedParameterType, parameter, isChecked)
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_Conversion.vb (33)
73Return Convert(Visit(Me._factory.Null(Me.ObjectType)), typeTo, False) 113type = type.ExpressionTargetDelegate(Me._factory.Compilation) 114Dim result = _factory.Convert(_expressionType, VisitLambdaInternal(node, DirectCast(type, NamedTypeSymbol))) 212helperOperandType = Me._factory.NullableOf(helperOperandType) 217helperReturnType = Me._factory.NullableOf(helperReturnType) 235Dim helper As MethodSymbol = Me._factory.WellKnownMember(Of MethodSymbol)(WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToGenericParameter_T_Object) 236Return [Call](_factory.Null(_expressionType), helper.Construct(typeTo), rewrittenOperand) 247Return ConvertIfNeeded(objectConversion, _factory.SpecialType(SpecialType.System_Object), typeTo, False) 257helper = _factory.WellKnownMember(Of Symbol)(WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToCharArrayRankOneString) 258argumentType = _factory.SpecialType(SpecialType.System_String) 260helper = _factory.WellKnownMember(Of Symbol)(WellKnownMember.Microsoft_VisualBasic_CompilerServices_Conversions__ToCharArrayRankOneObject) 261argumentType = _factory.SpecialType(SpecialType.System_Object) 276typeBeforeNegation = _factory.SpecialType(SpecialType.System_Int32) 284typeBeforeNegation = Me._factory.NullableOf(typeBeforeNegation) 312Return Me._factory.SpecialType(SpecialType.System_SByte) 314Return Me._factory.SpecialType(SpecialType.System_Int16) 316Return Me._factory.SpecialType(SpecialType.System_Int32) 318Return Me._factory.SpecialType(SpecialType.System_Int64) 329Dim helper As MethodSymbol = DirectCast(Me._factory.SpecialMember( 348Dim helper As MethodSymbol = DirectCast(Me._factory.SpecialMember( 405_factory.[Typeof](type, _factory.WellKnownType(WellKnownType.System_Type))) 415expr = _factory.Convert(_expressionType, expr) 418Return _factory.Convert( 425_factory.[Typeof](type, _factory.WellKnownType(WellKnownType.System_Type)))) 430Return _factory.Convert( 435_factory.[Typeof](type, _factory.WellKnownType(WellKnownType.System_Type)), 436_factory.MethodInfo(helper, _factory.WellKnownType(WellKnownType.System_Reflection_MethodInfo)))) 610Return Me._factory.WellKnownMember(Of MethodSymbol)(wellKnownHelper) 612Return DirectCast(_factory.SpecialMember(specialHelper), MethodSymbol)
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_UnaryOperator.vb (11)
49argument, Me._factory.MethodInfo(method, _factory.WellKnownType(WellKnownType.System_Reflection_MethodInfo)))) 73Return ConvertRuntimeHelperToExpressionTree(helper, argument, Me._factory.MethodInfo(method, _factory.WellKnownType(WellKnownType.System_Reflection_MethodInfo))) 101result = Convert(result, If(origArgTypeIsNullable, Me._factory.NullableOf(origArgUnderlyingType), origArgUnderlyingType), isChecked) 140Return ConvertRuntimeHelperToExpressionTree(WellKnownMember.System_Linq_Expressions_Expression__Coalesce_Lambda, Visit(userDefinedOperator.Operand), Visit(Me._factory.Literal(False)), coalesceLambda) 151Return ConvertRuntimeHelperToExpressionTree(WellKnownMember.System_Linq_Expressions_Expression__Coalesce, Visit(operand), Visit(Me._factory.Literal(False))) 193_factory.MethodInfo(node.Call.Method, _factory.WellKnownType(WellKnownType.System_Reflection_MethodInfo))) 228Return DirectCast(_factory.SpecialMember(specialHelper), MethodSymbol) 247Return Me._factory.WellKnownMember(Of MethodSymbol)(wellKnownHelper)