1 write to _bound
Microsoft.CodeAnalysis.CSharp (1)
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
102
_bound
= new SyntheticBoundNodeFactory(null, compilationState.Type, node, compilationState, diagnostics);
147 references to _bound
Microsoft.CodeAnalysis.CSharp (147)
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (147)
31
_ExpressionType =
_bound
.WellKnownType(WellKnownType.System_Linq_Expressions_Expression);
44
_ParameterExpressionType =
_bound
.WellKnownType(WellKnownType.System_Linq_Expressions_ParameterExpression);
57
_ElementInitType =
_bound
.WellKnownType(WellKnownType.System_Linq_Expressions_ElementInit);
71
_MemberBindingType =
_bound
.WellKnownType(WellKnownType.System_Linq_Expressions_MemberBinding);
90
_MemberInfoType =
_bound
.WellKnownType(WellKnownType.System_Reflection_MemberInfo);
98
private BindingDiagnosticBag Diagnostics { get { return
_bound
.Diagnostics; } }
103
_int32Type =
_bound
.SpecialType(SpecialType.System_Int32);
104
_objectType =
_bound
.SpecialType(SpecialType.System_Object);
105
_nullableType =
_bound
.SpecialType(SpecialType.System_Nullable_T);
106
_IEnumerableType =
_bound
.SpecialType(SpecialType.System_Collections_Generic_IEnumerable_T);
172
SyntaxNode old =
_bound
.Syntax;
173
_bound
.Syntax = node.Syntax;
175
_bound
.Syntax = old;
176
return
_bound
.Convert(ExpressionType, result);
302
return
_bound
.StaticCall(WellKnownMember.System_Linq_Expressions_Expression__ArrayIndex_Expression_Expression, array, index);
306
return
_bound
.StaticCall(WellKnownMember.System_Linq_Expressions_Expression__ArrayIndex_Expression_Expressions, array, Indices(node.Indices));
323
return
_bound
.ArrayOrEmpty(ExpressionType, builder.ToImmutableAndFree());
334
return
_bound
.ArrayOrEmpty(ExpressionType, builder.ToImmutableAndFree());
340
var boundType =
_bound
.Typeof(arrayType.ElementType,
_bound
.WellKnownType(WellKnownType.System_Type));
345
return
_bound
.StaticCall(WellKnownMember.System_Linq_Expressions_Expression__NewArrayInit, boundType, Expressions(node.InitializerOpt.Initializers));
356
return
_bound
.StaticCall(WellKnownMember.System_Linq_Expressions_Expression__NewArrayBounds, boundType, Expressions(node.Bounds));
362
return
_bound
.StaticCall(WellKnownMember.System_Linq_Expressions_Expression__ArrayLength, Visit(node.Expression));
369
var operand =
_bound
.Null(
_bound
.SpecialType(SpecialType.System_Object));
375
return
_bound
.StaticCall(WellKnownMember.System_Linq_Expressions_Expression__TypeAs, Visit(node.Operand),
_bound
.Typeof(node.Type,
_bound
.WellKnownType(WellKnownType.System_Type)));
495
left =
_bound
.Default(right.Type);
499
right =
_bound
.Default(left.Type);
570
((object)methodOpt == null) ?
_bound
.StaticCall(opFactory, loweredLeft, loweredRight) :
572
_bound
.StaticCall(opFactory, loweredLeft, loweredRight,
573
_bound
.Literal(isLifted && !TypeSymbol.Equals(methodOpt.ReturnType, type, TypeCompareKind.ConsiderEverything2)),
574
_bound
.MethodInfo(methodOpt,
_bound
.WellKnownType(WellKnownType.System_Reflection_MethodInfo))) :
575
_bound
.StaticCall(opFactory, loweredLeft, loweredRight,
576
_bound
.MethodInfo(methodOpt,
_bound
.WellKnownType(WellKnownType.System_Reflection_MethodInfo)));
594
return
_bound
.SpecialType(possiblePromote);
620
var useSiteInfo = new CompoundUseSiteInfo<AssemblySymbol>(Diagnostics,
_bound
.Compilation.Assembly);
621
var kind =
_bound
.Compilation.Conversions.ClassifyConversionFromType(oldType, newType, isChecked: false, ref useSiteInfo).Kind;
641
return
_bound
.StaticCall(WellKnownMember.System_Linq_Expressions_Expression__Invoke, Visit(node.ReceiverOpt), Expressions(node.Arguments));
647
return
_bound
.StaticCall(
649
method.RequiresInstanceReceiver ? Visit(node.ReceiverOpt) :
_bound
.Null(ExpressionType),
650
_bound
.MethodInfo(method,
_bound
.WellKnownType(WellKnownType.System_Reflection_MethodInfo)),
660
return
_bound
.StaticCall(WellKnownMember.System_Linq_Expressions_Expression__Condition, condition, consequence, alternative);
711
var e2 =
_bound
.StaticCall(node.Checked && SyntaxFacts.IsCheckedOperator(method.Name) ?
714
e1,
_bound
.Typeof(resultType,
_bound
.WellKnownType(WellKnownType.System_Type)),
715
_bound
.MethodInfo(method,
_bound
.WellKnownType(WellKnownType.System_Reflection_MethodInfo)));
738
return Convert(Constant(
_bound
.Null(_objectType)), _objectType, node.Type, false, node.ExplicitCastInCode);
751
return
_bound
.StaticCall(isChecked ?
754
expr,
_bound
.Typeof(type,
_bound
.WellKnownType(WellKnownType.System_Type)));
759
var nullObject =
_bound
.Null(_objectType);
760
receiver = requiresInstanceReceiver ? nullObject : receiver.Type.IsReferenceType ? receiver :
_bound
.Convert(_objectType, receiver);
762
var createDelegate =
_bound
.WellKnownMethod(WellKnownMember.System_Reflection_MethodInfo__CreateDelegate, isOptional: true);
767
unquoted =
_bound
.Call(
_bound
.MethodInfo(method, createDelegate.ContainingType), createDelegate,
_bound
.Typeof(delegateType, createDelegate.Parameters[0].Type), receiver);
772
createDelegate =
_bound
.SpecialMethod(SpecialMember.System_Delegate__CreateDelegate);
773
unquoted =
_bound
.Call(null, createDelegate,
774
_bound
.Typeof(delegateType, createDelegate.Parameters[0].Type),
776
_bound
.MethodInfo(method, createDelegate.Parameters[2].Type));
810
var receiver = node.FieldSymbol.IsStatic ?
_bound
.Null(ExpressionType) : Visit(node.ReceiverOpt);
811
return
_bound
.StaticCall(
813
receiver,
_bound
.FieldInfo(node.FieldSymbol));
821
operand =
_bound
.Null(_objectType);
824
return
_bound
.StaticCall(WellKnownMember.System_Linq_Expressions_Expression__TypeIs, Visit(operand),
_bound
.Typeof(node.TargetType.Type,
_bound
.WellKnownType(WellKnownType.System_Type)));
830
return node.Type.IsExpressionTree() ?
_bound
.StaticCall(WellKnownMember.System_Linq_Expressions_Expression__Quote, result) : result;
841
var param =
_bound
.SynthesizedLocal(ParameterExpressionType);
843
var parameterReference =
_bound
.Local(param);
845
var parameter =
_bound
.StaticCall(
847
_bound
.Typeof(_typeMap.SubstituteType(p.Type).Type,
_bound
.WellKnownType(WellKnownType.System_Type)),
_bound
.Literal(p.Name));
848
initializers.Add(
_bound
.AssignmentExpression(parameterReference, parameter));
853
var result =
_bound
.Sequence(locals.ToImmutableAndFree(), initializers.ToImmutableAndFree(),
854
_bound
.StaticCall(
858
_bound
.ArrayOrEmpty(ParameterExpressionType, parameters.ToImmutableAndFree())));
870
return VisitObjectCreationContinued(
_bound
.StaticCall(WellKnownMember.System_Linq_Expressions_Expression__New_Type,
_bound
.Typeof(node.Type,
_bound
.WellKnownType(WellKnownType.System_Type))), node.InitializerExpressionOpt);
881
return
_bound
.StaticCall(WellKnownMember.System_Linq_Expressions_Expression__Coalesce_Lambda, left, right, MakeConversionLambda(leftConversion, lambdaParamType, node.LeftConversion.Type));
885
return
_bound
.StaticCall(WellKnownMember.System_Linq_Expressions_Expression__Coalesce, left, right);
892
ParameterSymbol lambdaParameter =
_bound
.SynthesizedParameter(fromType, parameterName);
893
var param =
_bound
.SynthesizedLocal(ParameterExpressionType);
894
var parameterReference =
_bound
.Local(param);
895
var parameter =
_bound
.StaticCall(WellKnownMember.System_Linq_Expressions_Expression__Parameter,
_bound
.Typeof(fromType,
_bound
.WellKnownType(WellKnownType.System_Type)),
_bound
.Literal(parameterName));
897
var convertedValue = Visit(
_bound
.Convert(toType,
_bound
.Parameter(lambdaParameter), conversion));
899
var result =
_bound
.Sequence(
901
ImmutableArray.Create<BoundExpression>(
_bound
.AssignmentExpression(parameterReference, parameter)),
902
_bound
.StaticCall(
905
_bound
.ArrayOrEmpty(ParameterExpressionType, ImmutableArray.Create<BoundExpression>(parameterReference))));
914
return
_bound
.Convert(MemberInfoType,
_bound
.FieldInfo((FieldSymbol)symbol));
916
return
_bound
.MethodInfo(((PropertySymbol)symbol).GetOwnOrInheritedSetMethod(),
_bound
.WellKnownType(WellKnownType.System_Reflection_MethodInfo));
918
return
_bound
.Convert(MemberInfoType,
_bound
.FieldInfo(((EventSymbol)symbol).AssociatedField));
929
return
_bound
.Convert(MemberInfoType,
_bound
.FieldInfo((FieldSymbol)symbol));
931
return
_bound
.MethodInfo(((PropertySymbol)symbol).GetOwnOrInheritedGetMethod(),
_bound
.WellKnownType(WellKnownType.System_Reflection_MethodInfo));
933
return
_bound
.Convert(MemberInfoType,
_bound
.FieldInfo(((EventSymbol)symbol).AssociatedField));
963
builder.Add(
_bound
.StaticCall(sym.Kind is SymbolKind.Property ?
972
builder.Add(
_bound
.StaticCall(sym.Kind is SymbolKind.Property ?
981
builder.Add(
_bound
.StaticCall(sym.Kind is SymbolKind.Property ?
993
return
_bound
.ArrayOrEmpty(MemberBindingType, builder.ToImmutableAndFree());
1008
BoundExpression elementInit =
_bound
.StaticCall(WellKnownMember.System_Linq_Expressions_Expression__ElementInit,
1009
_bound
.MethodInfo(i.AddMethod,
_bound
.WellKnownType(WellKnownType.System_Reflection_MethodInfo)),
1014
return
_bound
.ArrayOrEmpty(ElementInitType, builder.ToImmutableAndFree());
1039
return
_bound
.StaticCall(WellKnownMember.System_Linq_Expressions_Expression__ListInit, result, init);
1041
return
_bound
.StaticCall(WellKnownMember.System_Linq_Expressions_Expression__MemberInit, result, init);
1059
return
_bound
.StaticCall(WellKnownMember.System_Linq_Expressions_Expression__New_Type,
_bound
.Typeof(node.Type,
_bound
.WellKnownType(WellKnownType.System_Type)));
1062
var ctor =
_bound
.ConstructorInfo(node.Constructor);
1063
var args =
_bound
.Convert(_IEnumerableType.Construct(ExpressionType), Expressions(node.Arguments));
1070
membersBuilder.Add(
_bound
.MethodInfo(AnonymousTypeManager.GetAnonymousTypeProperty(anonType, i).GetMethod,
_bound
.WellKnownType(WellKnownType.System_Reflection_MethodInfo)));
1073
return
_bound
.StaticCall(WellKnownMember.System_Linq_Expressions_Expression__New_ConstructorInfo_Expressions_MemberInfos,
1074
ctor, args,
_bound
.ArrayOrEmpty(MemberInfoType, membersBuilder.ToImmutableAndFree()));
1078
return
_bound
.StaticCall(WellKnownMember.System_Linq_Expressions_Expression__New_ConstructorInfo_IEnumerableExpressions, ctor, args);
1103
var receiver = node.PropertySymbol.IsStatic ?
_bound
.Null(ExpressionType) : Visit(node.ReceiverOpt);
1123
return
_bound
.StaticCall(WellKnownMember.System_Linq_Expressions_Expression__Property, receiver,
_bound
.MethodInfo(getMethod,
_bound
.WellKnownType(WellKnownType.System_Reflection_MethodInfo)));
1191
var result =
_bound
.StaticCall(opFactory, loweredArg);
1196
?
_bound
.StaticCall(opFactory, loweredArg)
1197
:
_bound
.StaticCall(opFactory, loweredArg,
_bound
.MethodInfo(node.MethodOpt,
_bound
.WellKnownType(WellKnownType.System_Reflection_MethodInfo)));
1204
return
_bound
.StaticCall(
1206
_bound
.Convert(_objectType, node),
1207
_bound
.Typeof(node.Type,
_bound
.WellKnownType(WellKnownType.System_Type)));