150 references to CompilationFlags
System.Core (150)
Microsoft\Scripting\Compiler\LambdaCompiler.Address.cs (11)
30
EmitAddress(node, type,
CompilationFlags
.EmitExpressionStart);
37
private void EmitAddress(Expression node, Type type,
CompilationFlags
flags) {
39
bool emitStart = (flags &
CompilationFlags
.EmitExpressionStartMask) ==
CompilationFlags
.EmitExpressionStart;
40
CompilationFlags
startEmitted = emitStart ? EmitExpressionStart(node) :
CompilationFlags
.EmitNoExpressionStart;
209
EmitExpression(node,
CompilationFlags
.EmitAsNoTail |
CompilationFlags
.EmitNoExpressionStart);
221
CompilationFlags
startEmitted = EmitExpressionStart(node);
235
EmitAddress(node, type,
CompilationFlags
.EmitAsNoTail |
CompilationFlags
.EmitNoExpressionStart);
Microsoft\Scripting\Compiler\LambdaCompiler.Binary.cs (3)
35
EmitBinaryExpression(expr,
CompilationFlags
.EmitAsNoTail);
38
private void EmitBinaryExpression(Expression expr,
CompilationFlags
flags) {
100
private void EmitBinaryMethod(BinaryExpression b,
CompilationFlags
flags) {
Microsoft\Scripting\Compiler\LambdaCompiler.ControlFlow.cs (11)
62
private void EmitLabelExpression(Expression expr,
CompilationFlags
flags) {
91
flags = UpdateEmitExpressionStartFlag(flags,
CompilationFlags
.EmitExpressionStart);
99
private void EmitGotoExpression(Expression expr,
CompilationFlags
flags) {
103
var
tailCall = flags &
CompilationFlags
.EmitAsTailCallMask;
104
if (tailCall !=
CompilationFlags
.EmitAsNoTail) {
109
tailCall = labelInfo.CanReturn ?
CompilationFlags
.EmitAsTail :
CompilationFlags
.EmitAsNoTail;
117
flags = UpdateEmitExpressionStartFlag(flags,
CompilationFlags
.EmitExpressionStart);
131
private void EmitUnreachable(Expression node,
CompilationFlags
flags) {
132
if (node.Type != typeof(void) && (flags &
CompilationFlags
.EmitAsVoidType) == 0) {
Microsoft\Scripting\Compiler\LambdaCompiler.Expressions.cs (69)
53
private static
CompilationFlags
UpdateEmitAsTailCallFlag(
CompilationFlags
flags,
CompilationFlags
newValue) {
54
Debug.Assert(newValue ==
CompilationFlags
.EmitAsTail || newValue ==
CompilationFlags
.EmitAsMiddle || newValue ==
CompilationFlags
.EmitAsNoTail);
55
var
oldValue = flags &
CompilationFlags
.EmitAsTailCallMask;
62
private static
CompilationFlags
UpdateEmitExpressionStartFlag(
CompilationFlags
flags,
CompilationFlags
newValue) {
63
Debug.Assert(newValue ==
CompilationFlags
.EmitExpressionStart || newValue ==
CompilationFlags
.EmitNoExpressionStart);
64
var
oldValue = flags &
CompilationFlags
.EmitExpressionStartMask;
71
private static
CompilationFlags
UpdateEmitAsTypeFlag(
CompilationFlags
flags,
CompilationFlags
newValue) {
72
Debug.Assert(newValue ==
CompilationFlags
.EmitAsDefaultType || newValue ==
CompilationFlags
.EmitAsVoidType);
73
var
oldValue = flags &
CompilationFlags
.EmitAsTypeMask;
83
EmitExpression(node,
CompilationFlags
.EmitAsNoTail |
CompilationFlags
.EmitExpressionStart);
91
EmitExpressionAsVoid(node,
CompilationFlags
.EmitAsNoTail);
94
private void EmitExpressionAsVoid(Expression node,
CompilationFlags
flags) {
97
CompilationFlags
startEmitted = EmitExpressionStart(node);
101
EmitAssign((BinaryExpression)node,
CompilationFlags
.EmitAsVoidType);
104
Emit((BlockExpression)node, UpdateEmitAsTypeFlag(flags,
CompilationFlags
.EmitAsVoidType));
107
EmitThrow((UnaryExpression)node,
CompilationFlags
.EmitAsVoidType);
110
EmitGotoExpression(node, UpdateEmitAsTypeFlag(flags,
CompilationFlags
.EmitAsVoidType));
119
EmitExpression(node, UpdateEmitExpressionStartFlag(flags,
CompilationFlags
.EmitNoExpressionStart));
121
EmitExpression(node,
CompilationFlags
.EmitAsNoTail |
CompilationFlags
.EmitNoExpressionStart);
129
private void EmitExpressionAsType(Expression node, Type type,
CompilationFlags
flags) {
142
EmitExpression(node, UpdateEmitExpressionStartFlag(flags,
CompilationFlags
.EmitExpressionStart));
149
private
CompilationFlags
EmitExpressionStart(Expression node) {
151
return
CompilationFlags
.EmitExpressionStart;
153
return
CompilationFlags
.EmitNoExpressionStart;
156
private void EmitExpressionEnd(
CompilationFlags
flags) {
157
if ((flags &
CompilationFlags
.EmitExpressionStartMask) ==
CompilationFlags
.EmitExpressionStart) {
166
private void EmitInvocationExpression(Expression expr,
CompilationFlags
flags) {
189
private void EmitInlinedInvoke(InvocationExpression invoke,
CompilationFlags
flags) {
206
flags = UpdateEmitAsTailCallFlag(flags,
CompilationFlags
.EmitAsNoTail);
236
private void EmitIndexAssignment(BinaryExpression node,
CompilationFlags
flags) {
239
var
emitAs = flags &
CompilationFlags
.EmitAsTypeMask;
258
if (emitAs !=
CompilationFlags
.EmitAsVoidType) {
266
if (emitAs !=
CompilationFlags
.EmitAsVoidType) {
304
private void EmitMethodCallExpression(Expression expr,
CompilationFlags
flags) {
311
EmitMethodCallExpression(expr,
CompilationFlags
.EmitAsNoTail);
315
EmitMethodCall(obj, method, methodCallExpr,
CompilationFlags
.EmitAsNoTail);
318
private void EmitMethodCall(Expression obj, MethodInfo method, IArgumentProvider methodCallExpr,
CompilationFlags
flags) {
335
EmitMethodCall(mi, args, objectType,
CompilationFlags
.EmitAsNoTail);
339
private void EmitMethodCall(MethodInfo mi, IArgumentProvider args, Type objectType,
CompilationFlags
flags) {
355
if ((flags &
CompilationFlags
.EmitAsTailCallMask) ==
CompilationFlags
.EmitAsTail && !MethodHasByRefParameter(mi)) {
584
private void EmitVariableAssignment(BinaryExpression node,
CompilationFlags
flags) {
586
var
emitAs = flags &
CompilationFlags
.EmitAsTypeMask;
589
if (emitAs !=
CompilationFlags
.EmitAsVoidType) {
611
EmitAssign((BinaryExpression)expr,
CompilationFlags
.EmitAsDefaultType);
614
private void EmitAssign(BinaryExpression node,
CompilationFlags
emitAs) {
648
private void EmitMemberAssignment(BinaryExpression node,
CompilationFlags
flags) {
662
var
emitAs = flags &
CompilationFlags
.EmitAsTypeMask;
663
if (emitAs !=
CompilationFlags
.EmitAsVoidType) {
680
if (emitAs !=
CompilationFlags
.EmitAsVoidType) {
Microsoft\Scripting\Compiler\LambdaCompiler.Generated.cs (7)
28
private void EmitExpression(Expression node,
CompilationFlags
flags) {
34
_guard.RunOnEmptyStack((LambdaCompiler @this, Expression n,
CompilationFlags
f) => @this.EmitExpression(n, f), this, node, flags);
40
bool emitStart = (flags &
CompilationFlags
.EmitExpressionStartMask) ==
CompilationFlags
.EmitExpressionStart;
42
CompilationFlags
startEmitted = emitStart ? EmitExpressionStart(node) :
CompilationFlags
.EmitNoExpressionStart;
44
flags = flags &
CompilationFlags
.EmitAsTailCallMask;
Microsoft\Scripting\Compiler\LambdaCompiler.Lambda.cs (6)
135
impl.EmitLambdaBody(_scope, false,
CompilationFlags
.EmitAsNoTail);
151
CompilationFlags
tailCallFlag = _lambda.TailCall ?
CompilationFlags
.EmitAsTail :
CompilationFlags
.EmitAsNoTail;
164
private void EmitLambdaBody(CompilerScope parent, bool inlined,
CompilationFlags
flags) {
179
flags = UpdateEmitExpressionStartFlag(flags,
CompilationFlags
.EmitExpressionStart);
Microsoft\Scripting\Compiler\LambdaCompiler.Logical.cs (17)
36
private void EmitConditionalExpression(Expression expr,
CompilationFlags
flags) {
45
if ((flags &
CompilationFlags
.EmitAsTailCallMask) ==
CompilationFlags
.EmitAsTail) {
279
private void EmitMethodAndAlso(BinaryExpression b,
CompilationFlags
flags) {
300
if ((flags &
CompilationFlags
.EmitAsTailCallMask) ==
CompilationFlags
.EmitAsTail) {
320
private void EmitAndAlsoBinaryExpression(Expression expr,
CompilationFlags
flags) {
406
private void EmitMethodOrElse(BinaryExpression b,
CompilationFlags
flags) {
427
if ((flags &
CompilationFlags
.EmitAsTailCallMask) ==
CompilationFlags
.EmitAsTail) {
436
private void EmitOrElseBinaryExpression(Expression expr,
CompilationFlags
flags) {
479
CompilationFlags
startEmitted = EmitExpressionStart(node);
499
EmitExpression(node,
CompilationFlags
.EmitAsNoTail |
CompilationFlags
.EmitNoExpressionStart);
512
EmitExpression(node,
CompilationFlags
.EmitAsNoTail |
CompilationFlags
.EmitNoExpressionStart);
527
EmitBinaryMethod(node,
CompilationFlags
.EmitAsNoTail);
Microsoft\Scripting\Compiler\LambdaCompiler.Statements.cs (19)
34
private void EmitBlockExpression(Expression expr,
CompilationFlags
flags) {
36
Emit((BlockExpression)expr, UpdateEmitAsTypeFlag(flags,
CompilationFlags
.EmitAsDefaultType));
39
private void Emit(BlockExpression node,
CompilationFlags
flags) {
42
CompilationFlags
emitAs = flags &
CompilationFlags
.EmitAsTypeMask;
45
CompilationFlags
tailCall = flags &
CompilationFlags
.EmitAsTailCallMask;
59
CompilationFlags
tailCallFlag;
60
if (tailCall !=
CompilationFlags
.EmitAsNoTail) {
65
tailCallFlag =
CompilationFlags
.EmitAsTail;
69
tailCallFlag =
CompilationFlags
.EmitAsMiddle;
72
tailCallFlag =
CompilationFlags
.EmitAsNoTail;
83
if (emitAs ==
CompilationFlags
.EmitAsVoidType || node.Type == typeof(void)) {
159
private void EmitSwitchExpression(Expression expr,
CompilationFlags
flags) {
319
private bool TryEmitSwitchInstruction(SwitchExpression node,
CompilationFlags
flags) {
430
private void EmitSwitchCases(SwitchExpression node, Label[] labels, bool[] isGoto, Label @default, Label end,
CompilationFlags
flags) {
447
if ((flags &
CompilationFlags
.EmitAsTailCallMask) ==
CompilationFlags
.EmitAsTail) {
556
private bool TryEmitHashtableSwitch(SwitchExpression node,
CompilationFlags
flags) {
Microsoft\Scripting\Compiler\LambdaCompiler.Unary.cs (7)
58
EmitThrow((UnaryExpression)expr,
CompilationFlags
.EmitAsDefaultType);
61
private void EmitThrow(UnaryExpression expr,
CompilationFlags
flags) {
74
private void EmitUnaryExpression(Expression expr,
CompilationFlags
flags) {
78
private void EmitUnary(UnaryExpression node,
CompilationFlags
flags) {
279
private void EmitConvertUnaryExpression(Expression expr,
CompilationFlags
flags) {
283
private void EmitConvert(UnaryExpression node,
CompilationFlags
flags) {
335
private void EmitUnaryMethod(UnaryExpression node,
CompilationFlags
flags) {