38 references to Create
Microsoft.CodeAnalysis (7)
Compilation\Expression.cs (1)
14
return ConstantValue.
Create
(value);
ConstantValue.cs (2)
365
return (size == 0) ? null : ConstantValue.
Create
(size);
377
case ConstantValueTypeDiscriminator.Int32: return
Create
((int)value);
EnumConstantHelper.cs (1)
76
offsetValue = ConstantValue.
Create
((int)(previous + offset));
MetadataReader\MetadataDecoder.cs (1)
1087
return ConstantValue.
Create
(sigReader.ReadInt32());
MetadataReader\PEModule.cs (1)
3752
return ConstantValue.
Create
(reader.ReadInt32());
Operations\ControlFlowGraphBuilder.cs (1)
5255
constantValue: ConstantValue.
Create
(bits), isImplicit: true);
Microsoft.CodeAnalysis.CSharp (31)
Binder\Binder_Expressions.cs (3)
4561
ConstantValue.
Create
(knownSizes[i] ?? 0),
4786
ConstantValue.
Create
(boundInitExprOpt.Length),
5424
lengthOrCount = new BoundLiteral(expression.Syntax, ConstantValue.
Create
(length), @this.GetSpecialType(SpecialType.System_Int32, diagnostics, expression.Syntax)) { WasCompilerGenerated = true };
Binder\Binder_InterpolatedString.cs (2)
820
argumentsBuilder.Add(new BoundLiteral(syntax, ConstantValue.
Create
(baseStringLength), intType) { WasCompilerGenerated = true });
822
argumentsBuilder.Add(new BoundLiteral(syntax, ConstantValue.
Create
(numFormatHoles), intType) { WasCompilerGenerated = true });
Binder\Binder_Invocation.cs (2)
1696
defaultValue = new BoundLiteral(syntax, ConstantValue.
Create
(line), Compilation.GetSpecialType(SpecialType.System_Int32)) { WasCompilerGenerated = true };
1844
BoundExpression arraySize = new BoundLiteral(node, ConstantValue.
Create
(collectionArgs.Length), int32Type) { WasCompilerGenerated = true };
Binder\Binder_Operators.cs (1)
4732
return new BoundLiteral(node, ConstantValue.
Create
((int)-2147483648), GetSpecialType(SpecialType.System_Int32, diagnostics, node));
Binder\DecisionDagBuilder.cs (3)
512
tests.Add(new Tests.One(new BoundDagValueTest(syntax, ConstantValue.
Create
(patternLength), lengthTemp)));
3560
return ConstantValue.
Create
(offset > (int.MaxValue - value) ? int.MaxValue : value + offset);
3880
condition = new Tests.One(new BoundDagValueTest(s2.Syntax, ConstantValue.
Create
(lengthValue), s1LengthTemp));
Binder\DecisionDagBuilder_ListPatterns.cs (2)
50
? new BoundDagRelationalTest(syntax, BinaryOperatorKind.IntGreaterThanOrEqual, ConstantValue.
Create
(subpatterns.Length - 1), lengthTemp)
51
: new BoundDagValueTest(syntax, ConstantValue.
Create
(subpatterns.Length), lengthTemp)));
Binder\PatternExplainer.cs (2)
815
if (remainingValues.Any(BinaryOperatorKind.GreaterThan, ConstantValue.
Create
(int.MaxValue)))
818
if (remainingValues.Any(BinaryOperatorKind.LessThan, ConstantValue.
Create
(int.MinValue)))
Binder\Semantics\Conversions\ConversionsBase.cs (1)
1772
BoundLiteral intMaxValueLiteral = new BoundLiteral(syntaxNode, ConstantValue.
Create
(int.MaxValue), expectedAttributeType);
CodeGen\EmitStatement.cs (1)
1437
lengthBasedSwitchInfo.LengthBasedJumpTable.LengthCaseLabels.Select(p => new KeyValuePair<ConstantValue, object>(ConstantValue.
Create
(p.value), p.label)).ToArray(),
Compiler\MethodBodySynthesizer.cs (3)
106
ImmutableArray.Create<BoundExpression>(new BoundLiteral(syntax, ConstantValue.
Create
(slotIndex), intType) { WasCompilerGenerated = true }),
126
ImmutableArray.Create<BoundExpression>(new BoundLiteral(syntax, ConstantValue.
Create
(0), intType) { WasCompilerGenerated = true }),
155
ImmutableArray.Create<BoundExpression>(new BoundLiteral(syntax, ConstantValue.
Create
(targetSubmissionIndex), intType) { WasCompilerGenerated = true }),
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (2)
2168
loweredRight = MakeLiteral(rightSyntax, ConstantValue.
Create
(shiftAmount), rightType);
2181
MakeLiteral(rightSyntax, ConstantValue.
Create
(rightMask), rightType),
Lowering\LocalRewriter\LocalRewriter_Call.cs (1)
1499
ConstantValue.
Create
(0),
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (1)
858
ConstantValue.
Create
(knownLength),
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
1264
constantValue: ConstantValue.
Create
(1),
Lowering\LocalRewriter\LocalRewriter_Literal.cs (1)
100
arguments.Add(new BoundLiteral(syntax, ConstantValue.
Create
((int)value), _compilation.GetSpecialType(SpecialType.System_Int32)));
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (2)
1252
constantOne = ConstantValue.
Create
(1);
1264
constantOne = ConstantValue.
Create
(1);
Lowering\SyntheticBoundNodeFactory.cs (2)
749
return new BoundLiteral(Syntax, ConstantValue.
Create
(value), SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Int32)) { WasCompilerGenerated = true };
1126
caseBuilder.Add((ConstantValue.
Create
(value), sectionLabel));
Utilities\ValueSetFactory.IntTC.cs (1)
67
public ConstantValue ToConstantValue(int value) => ConstantValue.
Create
(value);