3 overrides of Int32Value
Microsoft.CodeAnalysis (3)
ConstantValueSpecialized.cs (3)
587
public override int
Int32Value
802
public override int
Int32Value
889
public override int
Int32Value
135 references to Int32Value
Microsoft.CodeAnalysis (12)
CodeGen\ILBuilderEmit.cs (2)
592
EmitIntConstant(value.
Int32Value
);
599
EmitNativeIntConstant(value.
Int32Value
);
CodeGen\SwitchIntegralJumpTableEmitter.cs (1)
487
default: return value.
Int32Value
;
ConstantValue.cs (6)
69
public virtual long Int64Value { get { return
Int32Value
; } }
525
case ConstantValueTypeDiscriminator.Int32: return Boxes.Box(
Int32Value
);
529
case ConstantValueTypeDiscriminator.NInt: return Boxes.Box(
Int32Value
);
584
return
Int32Value
< 0;
786
writer.WriteInt32(this.
Int32Value
);
823
ConstantValueTypeDiscriminator.NInt or ConstantValueTypeDiscriminator.Int32 =>
Int32Value
.ToString(provider),
ConstantValueSpecialized.cs (2)
825
return base.Equals(other) && _value == other.
Int32Value
;
912
return base.Equals(other) && _value == other.
Int32Value
;
EnumConstantHelper.cs (1)
72
long previous = constantValue.
Int32Value
;
Microsoft.CodeAnalysis.CSharp (122)
Binder\Binder_Conversions.cs (4)
3473
int int32Value = value.
Int32Value
;
3513
int nintValue = value.
Int32Value
;
3668
case ConstantValueTypeDiscriminator.Int32: return (decimal)value.
Int32Value
;
3670
case ConstantValueTypeDiscriminator.NInt: return (decimal)value.
Int32Value
;
Binder\Binder_Expressions.cs (6)
4735
return constantValue.
Int32Value
;
4756
return constantValue.
Int32Value
< 0;
9498
if (convertedIndex.ConstantValueOpt is { SpecialType: SpecialType.System_Int32,
Int32Value
: int constIndex })
9579
if (hatExpression.Operand.ConstantValueOpt is { SpecialType: SpecialType.System_Int32,
Int32Value
: int constIndex })
9585
else if (convertedIndex is BoundConversion { Operand: { ConstantValueOpt: { SpecialType: SpecialType.System_Int32,
Int32Value
: int constIndex } } operand })
9592
arguments[0] is { ConstantValueOpt: { SpecialType: SpecialType.System_Int32,
Int32Value
: int constIndex1 } } index &&
Binder\Binder_InterpolatedString.cs (2)
107
int alignmentValue = alignmentConstant.
Int32Value
;
112
diagnostics.Add(ErrorCode.WRN_AlignmentMagnitude, alignment.Syntax.Location, alignmentConstant.
Int32Value
, magnitudeLimit);
Binder\Binder_Operators.cs (76)
2376
return valueLeft.
Int32Value
+ valueRight.
Int32Value
;
2380
return valueLeft.
Int32Value
- valueRight.
Int32Value
;
2384
return valueLeft.
Int32Value
* valueRight.
Int32Value
;
2388
return valueLeft.
Int32Value
/ valueRight.
Int32Value
;
2390
return valueLeft.
Int32Value
% valueRight.
Int32Value
;
2393
var int32Value = valueLeft.
Int32Value
<< valueRight.
Int32Value
;
2394
var int64Value = valueLeft.Int64Value << valueRight.
Int32Value
;
2399
var uint32Value = valueLeft.UInt32Value << valueRight.
Int32Value
;
2400
var uint64Value = valueLeft.UInt64Value << valueRight.
Int32Value
;
2419
return valueLeft.
Int32Value
+ valueRight.
Int32Value
;
2427
return valueLeft.
Int32Value
- valueRight.
Int32Value
;
2435
return valueLeft.
Int32Value
* valueRight.
Int32Value
;
2445
if (valueLeft.
Int32Value
== int.MinValue && valueRight.
Int32Value
== -1)
2450
return valueLeft.
Int32Value
/ valueRight.
Int32Value
;
2475
return valueLeft.
Int32Value
+ valueRight.
Int32Value
;
2483
return valueLeft.
Int32Value
- valueRight.
Int32Value
;
2491
return valueLeft.
Int32Value
* valueRight.
Int32Value
;
2499
return valueLeft.
Int32Value
/ valueRight.
Int32Value
;
2858
return valueLeft.
Int32Value
<< valueRight.
Int32Value
;
2860
return valueLeft.Int64Value << valueRight.
Int32Value
;
2862
return valueLeft.UInt32Value << valueRight.
Int32Value
;
2864
return valueLeft.UInt64Value << valueRight.
Int32Value
;
2867
return valueLeft.
Int32Value
>> valueRight.
Int32Value
;
2869
return (int)(((uint)valueLeft.
Int32Value
) >> valueRight.
Int32Value
); // Switch to `valueLeft.Int32Value >>> valueRight.Int32Value` once >>> becomes available
2871
return (valueLeft.
Int32Value
>= 0) ? valueLeft.
Int32Value
>> valueRight.
Int32Value
: null;
2873
return valueLeft.Int64Value >> valueRight.
Int32Value
;
2875
return (long)(((ulong)valueLeft.Int64Value) >> valueRight.
Int32Value
); // Switch to `valueLeft.Int64Value >>> valueRight.Int32Value` once >>> becomes available
2880
return valueLeft.UInt32Value >> valueRight.
Int32Value
;
2883
return valueLeft.UInt64Value >> valueRight.
Int32Value
;
2888
return valueLeft.
Int32Value
& valueRight.
Int32Value
;
2900
return valueLeft.
Int32Value
| valueRight.
Int32Value
;
2912
return valueLeft.
Int32Value
^ valueRight.
Int32Value
;
2936
return valueLeft.
Int32Value
== valueRight.
Int32Value
;
2956
return valueLeft.
Int32Value
!= valueRight.
Int32Value
;
2972
return valueLeft.
Int32Value
< valueRight.
Int32Value
;
2988
return valueLeft.
Int32Value
> valueRight.
Int32Value
;
3004
return valueLeft.
Int32Value
<= valueRight.
Int32Value
;
3020
return valueLeft.
Int32Value
>= valueRight.
Int32Value
;
3036
return (valueRight.
Int32Value
!= -1) ? valueLeft.
Int32Value
% valueRight.
Int32Value
: 0;
4367
return +value.
Int32Value
;
4374
return ~value.
Int32Value
;
4395
return -value.
Int32Value
;
4411
return -value.
Int32Value
;
4425
return -value.
Int32Value
;
4565
return valueRight.
Int32Value
== 0;
Binder\DecisionDagBuilder.cs (3)
2226
Debug.Assert(t.Value.
Int32Value
>= 0);
2227
if (t.Value.
Int32Value
== 0)
2266
int value = constant.
Int32Value
;
Binder\PatternExplainer.cs (1)
405
int lengthValue = lengthValues.Sample.
Int32Value
;
Binder\Semantics\Conversions\ConversionsBase.cs (2)
1368
int value = constantValue.IsBad ? 0 : constantValue.
Int32Value
;
2078
return value.
Int32Value
== 0;
CodeGen\EmitArrayInitializer.cs (1)
531
lengthForConstructor = length.ConstantValueOpt.
Int32Value
;
FlowAnalysis\DefiniteAssignment.cs (1)
1596
(elementAccess.Argument.ConstantValueOpt is { SpecialType: SpecialType.System_Int32,
Int32Value
: 0 } ||
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (1)
793
cases = node.Cases.SelectAsArray(p => (ConstantValue.Create((long)p.value.
Int32Value
), p.label));
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (5)
2161
int shiftAmount = rightConstantValue.
Int32Value
& rightMask;
2236
&& rightConstantValue.
Int32Value
is >= 0 and <= 0x1F)
2239
int shiftAmount = rightConstantValue.
Int32Value
;
2337
if (sizeOfExpression.ConstantValueOpt?.
Int32Value
== 1)
2359
if (constVal == null || constVal.
Int32Value
< 0)
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (8)
278
if (startExpr.ConstantValueOpt is { SpecialType: SpecialType.System_Int32,
Int32Value
: 0 } &&
279
rangeSizeExpr.ConstantValueOpt is { SpecialType: SpecialType.System_Int32,
Int32Value
: >= 0 and int rangeSizeConst } &&
309
makeOffsetInput is { ConstantValueOpt.
Int32Value
: var offset })
345
if (index.ConstantValueOpt is { SpecialType: SpecialType.System_Int32,
Int32Value
: int constIndex })
661
if (loweredExpr.ConstantValueOpt?.
Int32Value
== 0)
1002
if (startExpr.ConstantValueOpt?.
Int32Value
== 0)
1006
else if (startExpr.ConstantValueOpt is {
Int32Value
: var startConst } && endExpr.ConstantValueOpt is {
Int32Value
: var endConst })
Lowering\LocalRewriter\LocalRewriter_StackAlloc.cs (4)
31
if (rewrittenCount.ConstantValueOpt?.
Int32Value
== 0)
122
int size = sizeConst.
Int32Value
;
129
var count = countConst.
Int32Value
;
143
if (sizeConst?.
Int32Value
== 1)
Symbols\Compilation_WellKnownMembers.cs (4)
728
int constantVal = ignoreSymbolStoreDebuggingMode.GetConstantValue(ConstantFieldsInProgress.Empty, earlyDecodingWellKnownAttributes: false).
Int32Value
;
750
constantVal |= defaultDebuggingMode.GetConstantValue(ConstantFieldsInProgress.Empty, earlyDecodingWellKnownAttributes: false).
Int32Value
;
751
constantVal |= disableOptimizationsDebuggingMode.GetConstantValue(ConstantFieldsInProgress.Empty, earlyDecodingWellKnownAttributes: false).
Int32Value
;
762
constantVal |= enableEncDebuggingMode.GetConstantValue(ConstantFieldsInProgress.Empty, earlyDecodingWellKnownAttributes: false).
Int32Value
;
Symbols\Source\SourceFixedFieldSymbol.cs (1)
105
int int32Value = sizeConstant.
Int32Value
;
Utilities\ValueSetFactory.IntTC.cs (1)
65
public int FromConstantValue(ConstantValue constantValue) => constantValue.IsBad ? 0 : constantValue.
Int32Value
;
Utilities\ValueSetFactory.NintValueSet.cs (2)
74
bool IValueSet.All(BinaryOperatorKind relation, ConstantValue value) => value.IsBad || All(relation, value.
Int32Value
);
85
bool IValueSet.Any(BinaryOperatorKind relation, ConstantValue value) => value.IsBad || Any(relation, value.
Int32Value
);
Microsoft.CodeAnalysis.UnitTests (1)
CorLibTypesTests.cs (1)
129
Assert.Equal(1, cv1.
Int32Value
);