152 references to CompilationFlags
System.Linq.Expressions (152)
System\Linq\Expressions\Compiler\LambdaCompiler.Address.cs (11)
15
EmitAddress(node, type,
CompilationFlags
.EmitExpressionStart);
22
private void EmitAddress(Expression node, Type type,
CompilationFlags
flags)
25
bool emitStart = (flags &
CompilationFlags
.EmitExpressionStartMask) ==
CompilationFlags
.EmitExpressionStart;
26
CompilationFlags
startEmitted = emitStart ? EmitExpressionStart(node) :
CompilationFlags
.EmitNoExpressionStart;
221
EmitExpression(node,
CompilationFlags
.EmitAsNoTail |
CompilationFlags
.EmitNoExpressionStart);
234
CompilationFlags
startEmitted = EmitExpressionStart(node);
251
EmitAddress(node, type,
CompilationFlags
.EmitAsNoTail |
CompilationFlags
.EmitNoExpressionStart);
System\Linq\Expressions\Compiler\LambdaCompiler.Binary.cs (3)
17
EmitBinaryExpression(expr,
CompilationFlags
.EmitAsNoTail);
20
private void EmitBinaryExpression(Expression expr,
CompilationFlags
flags)
93
private void EmitBinaryMethod(BinaryExpression b,
CompilationFlags
flags)
System\Linq\Expressions\Compiler\LambdaCompiler.ControlFlow.cs (11)
51
private void EmitLabelExpression(Expression expr,
CompilationFlags
flags)
85
flags = UpdateEmitExpressionStartFlag(flags,
CompilationFlags
.EmitExpressionStart);
93
private void EmitGotoExpression(Expression expr,
CompilationFlags
flags)
98
CompilationFlags
tailCall = flags &
CompilationFlags
.EmitAsTailCallMask;
99
if (tailCall !=
CompilationFlags
.EmitAsNoTail)
105
tailCall = labelInfo.CanReturn ?
CompilationFlags
.EmitAsTail :
CompilationFlags
.EmitAsNoTail;
117
flags = UpdateEmitExpressionStartFlag(flags,
CompilationFlags
.EmitExpressionStart);
131
private void EmitUnreachable(Expression node,
CompilationFlags
flags)
133
if (node.Type != typeof(void) && (flags &
CompilationFlags
.EmitAsVoidType) == 0)
System\Linq\Expressions\Compiler\LambdaCompiler.Expressions.cs (71)
37
private static
CompilationFlags
UpdateEmitAsTailCallFlag(
CompilationFlags
flags,
CompilationFlags
newValue)
39
Debug.Assert(newValue ==
CompilationFlags
.EmitAsTail || newValue ==
CompilationFlags
.EmitAsMiddle || newValue ==
CompilationFlags
.EmitAsNoTail);
40
CompilationFlags
oldValue = flags &
CompilationFlags
.EmitAsTailCallMask;
47
private static
CompilationFlags
UpdateEmitExpressionStartFlag(
CompilationFlags
flags,
CompilationFlags
newValue)
49
Debug.Assert(newValue ==
CompilationFlags
.EmitExpressionStart || newValue ==
CompilationFlags
.EmitNoExpressionStart);
50
CompilationFlags
oldValue = flags &
CompilationFlags
.EmitExpressionStartMask;
57
private static
CompilationFlags
UpdateEmitAsTypeFlag(
CompilationFlags
flags,
CompilationFlags
newValue)
59
Debug.Assert(newValue ==
CompilationFlags
.EmitAsDefaultType || newValue ==
CompilationFlags
.EmitAsVoidType);
60
CompilationFlags
oldValue = flags &
CompilationFlags
.EmitAsTypeMask;
71
EmitExpression(node,
CompilationFlags
.EmitAsNoTail |
CompilationFlags
.EmitExpressionStart);
80
EmitExpressionAsVoid(node,
CompilationFlags
.EmitAsNoTail);
83
private void EmitExpressionAsVoid(Expression node,
CompilationFlags
flags)
87
CompilationFlags
startEmitted = EmitExpressionStart(node);
92
EmitAssign((AssignBinaryExpression)node,
CompilationFlags
.EmitAsVoidType);
95
Emit((BlockExpression)node, UpdateEmitAsTypeFlag(flags,
CompilationFlags
.EmitAsVoidType));
98
EmitThrow((UnaryExpression)node,
CompilationFlags
.EmitAsVoidType);
101
EmitGotoExpression(node, UpdateEmitAsTypeFlag(flags,
CompilationFlags
.EmitAsVoidType));
111
EmitExpression(node, UpdateEmitExpressionStartFlag(flags,
CompilationFlags
.EmitNoExpressionStart));
115
EmitExpression(node,
CompilationFlags
.EmitAsNoTail |
CompilationFlags
.EmitNoExpressionStart);
123
private void EmitExpressionAsType(Expression node, Type type,
CompilationFlags
flags)
142
EmitExpression(node, UpdateEmitExpressionStartFlag(flags,
CompilationFlags
.EmitExpressionStart));
149
private
CompilationFlags
EmitExpressionStart(Expression node)
153
return
CompilationFlags
.EmitExpressionStart;
155
return
CompilationFlags
.EmitNoExpressionStart;
158
private void EmitExpressionEnd(
CompilationFlags
flags)
160
if ((flags &
CompilationFlags
.EmitExpressionStartMask) ==
CompilationFlags
.EmitExpressionStart)
170
private void EmitInvocationExpression(Expression expr,
CompilationFlags
flags)
192
EmitMethodCall(expr, expr.Type.GetInvokeMethod(), node,
CompilationFlags
.EmitAsNoTail |
CompilationFlags
.EmitExpressionStart);
195
private void EmitInlinedInvoke(InvocationExpression invoke,
CompilationFlags
flags)
215
flags = UpdateEmitAsTailCallFlag(flags,
CompilationFlags
.EmitAsNoTail);
249
private void EmitIndexAssignment(AssignBinaryExpression node,
CompilationFlags
flags)
255
CompilationFlags
emitAs = flags &
CompilationFlags
.EmitAsTypeMask;
277
if (emitAs !=
CompilationFlags
.EmitAsVoidType)
286
if (emitAs !=
CompilationFlags
.EmitAsVoidType)
353
private void EmitMethodCallExpression(Expression expr,
CompilationFlags
flags)
362
EmitMethodCallExpression(expr,
CompilationFlags
.EmitAsNoTail);
367
EmitMethodCall(obj, method, methodCallExpr,
CompilationFlags
.EmitAsNoTail);
370
private void EmitMethodCall(Expression? obj, MethodInfo method, IArgumentProvider methodCallExpr,
CompilationFlags
flags)
394
EmitMethodCall(mi, args, objectType,
CompilationFlags
.EmitAsNoTail);
398
private void EmitMethodCall(MethodInfo mi, IArgumentProvider args, Type? objectType,
CompilationFlags
flags)
415
if ((flags &
CompilationFlags
.EmitAsTailCallMask) ==
CompilationFlags
.EmitAsTail && !MethodHasByRefParameter(mi))
701
private void EmitVariableAssignment(AssignBinaryExpression node,
CompilationFlags
flags)
704
CompilationFlags
emitAs = flags &
CompilationFlags
.EmitAsTypeMask;
715
if (emitAs !=
CompilationFlags
.EmitAsVoidType)
742
EmitAssign((AssignBinaryExpression)expr,
CompilationFlags
.EmitAsDefaultType);
745
private void EmitAssign(AssignBinaryExpression node,
CompilationFlags
emitAs)
785
private void EmitMemberAssignment(AssignBinaryExpression node,
CompilationFlags
flags)
803
CompilationFlags
emitAs = flags &
CompilationFlags
.EmitAsTypeMask;
804
if (emitAs !=
CompilationFlags
.EmitAsVoidType)
824
if (emitAs !=
CompilationFlags
.EmitAsVoidType)
System\Linq\Expressions\Compiler\LambdaCompiler.Generated.cs (7)
13
private void EmitExpression(Expression node,
CompilationFlags
flags)
20
_guard.RunOnEmptyStack((LambdaCompiler @this, Expression n,
CompilationFlags
f) => @this.EmitExpression(n, f), this, node, flags);
26
bool emitStart = (flags &
CompilationFlags
.EmitExpressionStartMask) ==
CompilationFlags
.EmitExpressionStart;
28
CompilationFlags
startEmitted = emitStart ? EmitExpressionStart(node) :
CompilationFlags
.EmitNoExpressionStart;
30
flags = flags &
CompilationFlags
.EmitAsTailCallMask;
System\Linq\Expressions\Compiler\LambdaCompiler.Lambda.cs (6)
150
impl.EmitLambdaBody(_scope, false,
CompilationFlags
.EmitAsNoTail);
194
CompilationFlags
tailCallFlag = _lambda.TailCall ?
CompilationFlags
.EmitAsTail :
CompilationFlags
.EmitAsNoTail;
207
private void EmitLambdaBody(CompilerScope? parent, bool inlined,
CompilationFlags
flags)
225
flags = UpdateEmitExpressionStartFlag(flags,
CompilationFlags
.EmitExpressionStart);
System\Linq\Expressions\Compiler\LambdaCompiler.Logical.cs (17)
15
private void EmitConditionalExpression(Expression expr,
CompilationFlags
flags)
26
if ((flags &
CompilationFlags
.EmitAsTailCallMask) ==
CompilationFlags
.EmitAsTail)
276
private void EmitMethodAndAlso(BinaryExpression b,
CompilationFlags
flags)
289
if ((flags &
CompilationFlags
.EmitAsTailCallMask) ==
CompilationFlags
.EmitAsTail)
310
private void EmitAndAlsoBinaryExpression(Expression expr,
CompilationFlags
flags)
382
private void EmitMethodOrElse(BinaryExpression b,
CompilationFlags
flags)
395
if ((flags &
CompilationFlags
.EmitAsTailCallMask) ==
CompilationFlags
.EmitAsTail)
404
private void EmitOrElseBinaryExpression(Expression expr,
CompilationFlags
flags)
459
CompilationFlags
startEmitted = EmitExpressionStart(node);
481
EmitExpression(node,
CompilationFlags
.EmitAsNoTail |
CompilationFlags
.EmitNoExpressionStart);
498
EmitExpression(node,
CompilationFlags
.EmitAsNoTail |
CompilationFlags
.EmitNoExpressionStart);
516
EmitBinaryMethod(node,
CompilationFlags
.EmitAsNoTail);
System\Linq\Expressions\Compiler\LambdaCompiler.Statements.cs (19)
18
private void EmitBlockExpression(Expression expr,
CompilationFlags
flags)
21
Emit((BlockExpression)expr, UpdateEmitAsTypeFlag(flags,
CompilationFlags
.EmitAsDefaultType));
24
private void Emit(BlockExpression node,
CompilationFlags
flags)
35
CompilationFlags
emitAs = flags &
CompilationFlags
.EmitAsTypeMask;
37
CompilationFlags
tailCall = flags &
CompilationFlags
.EmitAsTailCallMask;
43
CompilationFlags
tailCallFlag;
44
if (tailCall !=
CompilationFlags
.EmitAsNoTail)
51
tailCallFlag =
CompilationFlags
.EmitAsTail;
57
tailCallFlag =
CompilationFlags
.EmitAsMiddle;
62
tailCallFlag =
CompilationFlags
.EmitAsNoTail;
73
if (emitAs ==
CompilationFlags
.EmitAsVoidType || node.Type == typeof(void))
160
private void EmitSwitchExpression(Expression expr,
CompilationFlags
flags)
363
private bool TryEmitSwitchInstruction(SwitchExpression node,
CompilationFlags
flags)
485
private void EmitSwitchCases(SwitchExpression node, Label[] labels, bool[] isGoto, Label @default, Label end,
CompilationFlags
flags)
506
if ((flags &
CompilationFlags
.EmitAsTailCallMask) ==
CompilationFlags
.EmitAsTail)
635
private bool TryEmitHashtableSwitch(SwitchExpression node,
CompilationFlags
flags)
System\Linq\Expressions\Compiler\LambdaCompiler.Unary.cs (7)
41
EmitThrow((UnaryExpression)expr,
CompilationFlags
.EmitAsDefaultType);
44
private void EmitThrow(UnaryExpression expr,
CompilationFlags
flags)
61
private void EmitUnaryExpression(Expression expr,
CompilationFlags
flags)
66
private void EmitUnary(UnaryExpression node,
CompilationFlags
flags)
281
private void EmitConvertUnaryExpression(Expression expr,
CompilationFlags
flags)
286
private void EmitConvert(UnaryExpression node,
CompilationFlags
flags)
350
private void EmitUnaryMethod(UnaryExpression node,
CompilationFlags
flags)