13 overrides of ConstantValueOpt
Microsoft.CodeAnalysis.VisualBasic (13)
BoundTree\BoundFieldAccess.vb (1)
36
Public Overrides ReadOnly Property
ConstantValueOpt
As ConstantValue
BoundTree\BoundLiteral.vb (1)
12
Public Overrides ReadOnly Property
ConstantValueOpt
As ConstantValue
BoundTree\BoundLocal.vb (1)
39
Public Overrides ReadOnly Property
ConstantValueOpt
As ConstantValue
BoundTree\BoundParenthesized.vb (1)
19
Public Overrides ReadOnly Property
ConstantValueOpt
As ConstantValue
Generated\BoundNodes.xml.Generated.vb (9)
1417
Public Overrides ReadOnly Property
ConstantValueOpt
As ConstantValue
1578
Public Overrides ReadOnly Property
ConstantValueOpt
As ConstantValue
1969
Public Overrides ReadOnly Property
ConstantValueOpt
As ConstantValue
2042
Public Overrides ReadOnly Property
ConstantValueOpt
As ConstantValue
2134
Public Overrides ReadOnly Property
ConstantValueOpt
As ConstantValue
2357
Public Overrides ReadOnly Property
ConstantValueOpt
As ConstantValue
2421
Public Overrides ReadOnly Property
ConstantValueOpt
As ConstantValue
3095
Public Overrides ReadOnly Property
ConstantValueOpt
As ConstantValue
9178
Public Overrides ReadOnly Property
ConstantValueOpt
As ConstantValue
2 writes to ConstantValueOpt
Microsoft.CodeAnalysis.VisualBasic (2)
Semantics\Conversions.vb (2)
1638
result = TryFoldConstantNumericOrBooleanConversion(constantExpression.
ConstantValueOpt
, sourceType, targetDestinationType,
1683
result = TryFoldConstantNumericOrBooleanConversion(constantExpression.
ConstantValueOpt
, underlyingSourceType, underlyingDestination,
136 references to ConstantValueOpt
Microsoft.CodeAnalysis.VisualBasic (136)
Analysis\FlowAnalysis\AbstractFlowPass.vb (5)
306
Dim constantValue = node.
ConstantValueOpt
321
Dim constantValue = node.
ConstantValueOpt
1449
If node.TestExpression.IsConstant AndAlso node.TestExpression.
ConstantValueOpt
.IsNothing Then
1465
If node.Receiver.
ConstantValueOpt
.IsNothing Then
1858
Debug.Assert(node.ConditionOpt.
ConstantValueOpt
Is Nothing)
Binding\Binder_Attributes.vb (2)
750
Return CreateTypedConstant(node.Type, node.
ConstantValueOpt
.Value)
860
If lastIndex.IsConstant AndAlso Not lastIndex.
ConstantValueOpt
.IsDefaultValue Then
Binding\Binder_Expressions.vb (10)
1438
Return New BoundConversion(expr.Syntax, expr, ConversionKind.WideningNothingLiteral, False, False, expr.
ConstantValueOpt
,
1980
constVal = If(boundConditionArg.
ConstantValueOpt
.BooleanValue, boundWhenTrueArg.
ConstantValueOpt
, boundWhenFalseArg.
ConstantValueOpt
)
1994
Not candidate.
ConstantValueOpt
.IsBad AndAlso
2049
(boundFirstArg.IsNothingLiteral OrElse boundFirstArg.
ConstantValueOpt
.IsString) Then
2054
constVal = boundSecondArg.
ConstantValueOpt
2062
constVal = boundFirstArg.
ConstantValueOpt
4322
Dim lowerBoundConstantValueOpt As ConstantValue = lowerBound.
ConstantValueOpt
4404
Dim upperBoundConstantValueOpt As ConstantValue = upperBound.
ConstantValueOpt
Binding\Binder_InterpolatedString.vb (4)
49
If alignmentOpt.IsConstant AndAlso alignmentOpt.
ConstantValueOpt
.IsIntegral Then
51
Dim constantValue = alignmentOpt.
ConstantValueOpt
196
Debug.Assert(interpolation.AlignmentOpt.IsConstant AndAlso interpolation.AlignmentOpt.
ConstantValueOpt
.IsIntegral)
198
.Append(interpolation.AlignmentOpt.
ConstantValueOpt
.Int64Value.ToString(Globalization.CultureInfo.InvariantCulture))
Binding\Binder_Invocation.vb (5)
1089
If arguments.Length = 1 AndAlso arguments(0).IsConstant AndAlso Not arguments(0).
ConstantValueOpt
.IsBad Then
1101
Dim argumentConstantValue = arguments(0).
ConstantValueOpt
1125
Dim argumentValue = arguments(0).
ConstantValueOpt
.Int32Value
1141
Dim constantValue = arguments(0).
ConstantValueOpt
1172
Dim argumentValue = arguments(0).
ConstantValueOpt
.Int32Value
Binding\Binder_SelectCase.vb (12)
596
operand.
ConstantValueOpt
Is Nothing OrElse
597
Not SwitchConstantValueHelper.IsValidSwitchCaseLabelConstant(operand.
ConstantValueOpt
) Then
624
lowerBound.
ConstantValueOpt
Is Nothing OrElse
625
upperBound.
ConstantValueOpt
Is Nothing OrElse
626
Not SwitchConstantValueHelper.IsValidSwitchCaseLabelConstant(lowerBound.
ConstantValueOpt
) OrElse
627
Not SwitchConstantValueHelper.IsValidSwitchCaseLabelConstant(upperBound.
ConstantValueOpt
) Then
643
value.
ConstantValueOpt
Is Nothing OrElse
644
Not SwitchConstantValueHelper.IsValidSwitchCaseLabelConstant(value.
ConstantValueOpt
) Then
670
Debug.Assert(lowerBound.
ConstantValueOpt
IsNot Nothing)
672
Debug.Assert(upperBound.
ConstantValueOpt
IsNot Nothing)
676
If IsInvalidSelectCaseRange(lowerBound.
ConstantValueOpt
, upperBound.
ConstantValueOpt
) Then
Binding\Binder_Utils.vb (4)
1313
If boundExpression.
ConstantValueOpt
IsNot Nothing Then
1315
Return If(nonConstantDetected, Nothing, boundExpression.
ConstantValueOpt
)
1419
Return operand.
ConstantValueOpt
1469
nestedConstValue = conversionToUnderlying.
ConstantValueOpt
BoundTree\BoundBinaryConditionalExpression.vb (1)
29
(TestExpression.IsConstant AndAlso Not TestExpression.
ConstantValueOpt
.IsNothing) OrElse
BoundTree\BoundExpression.vb (2)
14
Return Me.
ConstantValueOpt
IsNot Nothing
70
ValidateConstantValue(Me.Type, Me.
ConstantValueOpt
)
BoundTree\BoundExpressionExtensions.vb (13)
27
Dim constValue As ConstantValue = node.
ConstantValueOpt
41
constValue = DirectCast(node, BoundConversion).Operand.
ConstantValueOpt
48
constValue = DirectCast(node, BoundDirectCast).Operand.
ConstantValueOpt
53
constValue = DirectCast(node, BoundTryCast).Operand.
ConstantValueOpt
385
Dim c = expr.
ConstantValueOpt
394
Return expr.
ConstantValueOpt
Is ConstantValue.True
402
Return expr.
ConstantValueOpt
Is ConstantValue.False
429
Return expression.
ConstantValueOpt
.Int16Value
432
Return expression.
ConstantValueOpt
.Int32Value
435
If expression.
ConstantValueOpt
.Int64Value <= Integer.MaxValue AndAlso expression.
ConstantValueOpt
.Int64Value >= Integer.MinValue Then
436
Return CInt(expression.
ConstantValueOpt
.Int64Value)
457
Dim constantValue = node.
ConstantValueOpt
BoundTree\BoundLocalDeclaration.vb (1)
44
InitializerOpt.IsConstant AndAlso InitializerOpt.
ConstantValueOpt
.IsNothing))
BoundTree\BoundParenthesized.vb (1)
21
Return Expression.
ConstantValueOpt
CodeGen\EmitArrayInitializer.vb (4)
82
Return init.
ConstantValueOpt
Is Nothing OrElse
83
(includeConstants AndAlso Not init.
ConstantValueOpt
.IsDefaultValue)
180
Dim initConstantValueOpt As ConstantValue = init.
ConstantValueOpt
247
If init.
ConstantValueOpt
IsNot Nothing Then
CodeGen\EmitExpression.vb (5)
32
Dim constantValue = expression.
ConstantValueOpt
884
Dim constVal = receiver.
ConstantValueOpt
1363
If(expr.WhenTrue.
ConstantValueOpt
?.IsIntegralValueZeroOrOne(isOneWhenTrue), False) AndAlso
1364
If(expr.WhenFalse.
ConstantValueOpt
?.IsIntegralValueZeroOrOne(isOneWhenFalse), False) AndAlso
1805
If rightType.IsReferenceType OrElse (right.
ConstantValueOpt
IsNot Nothing AndAlso rightType.SpecialType <> SpecialType.System_Decimal) Then
CodeGen\EmitOperators.vb (8)
158
If child.Kind <> BoundKind.BinaryOperator OrElse child.
ConstantValueOpt
IsNot Nothing Then
177
If child.Kind <> BoundKind.BinaryOperator OrElse child.
ConstantValueOpt
IsNot Nothing Then
328
Dim shiftConst = expression.Right.
ConstantValueOpt
343
Dim shiftConst = expression.Right.
ConstantValueOpt
484
Dim constant = binOp.Left.
ConstantValueOpt
488
constant = comparand.
ConstantValueOpt
616
Dim constValue = condition.
ConstantValueOpt
646
Dim constValue = condition.
ConstantValueOpt
CodeGen\EmitStatement.vb (5)
504
Dim constOp As ConstantValue = condition.Left.
ConstantValueOpt
509
constOp = condition.Right.
ConstantValueOpt
671
Dim constExprValue = condition.
ConstantValueOpt
999
constant = simpleCaseClause.ValueOpt.
ConstantValueOpt
1008
constant = relationalCaseClause.ValueOpt.
ConstantValueOpt
CodeGen\Optimizer\StackScheduler.Analyzer.vb (3)
123
Dim result = If(node.
ConstantValueOpt
Is Nothing,
907
If child.Kind <> BoundKind.BinaryOperator OrElse child.
ConstantValueOpt
IsNot Nothing Then
920
If child.Kind <> BoundKind.BinaryOperator OrElse child.
ConstantValueOpt
IsNot Nothing Then
CodeGen\Optimizer\StackScheduler.Rewriter.vb (3)
48
If asExpression IsNot Nothing AndAlso asExpression.
ConstantValueOpt
IsNot Nothing Then
64
If child.Kind <> BoundKind.BinaryOperator OrElse child.
ConstantValueOpt
IsNot Nothing Then
77
If child.Kind <> BoundKind.BinaryOperator OrElse child.
ConstantValueOpt
IsNot Nothing Then
Compilation\SemanticModel.vb (1)
433
constValue = lowerExpr.
ConstantValueOpt
Lowering\AsyncRewriter\AsyncRewriter.vb (1)
412
Return New CapturedConstantExpression(expression.
ConstantValueOpt
,
Lowering\Diagnostics\DiagnosticsPass_ExpressionLambdas.vb (1)
19
If initializer IsNot Nothing AndAlso initializer.Kind = BoundKind.ObjectInitializerExpression AndAlso node.
ConstantValueOpt
Is Nothing Then
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter.vb (1)
665
If node.
ConstantValueOpt
IsNot Nothing Then
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_BinaryOperator.vb (1)
573
result = MaskShiftCountOperand(result, shiftedType, shiftMask, result.
ConstantValueOpt
, isChecked)
Lowering\Instrumentation\DebugInfoInjector_SequencePoints.vb (1)
54
Dim valueExpression = If(condition.
ConstantValueOpt
Is Nothing,
Lowering\LocalRewriter\LocalRewriter.vb (2)
294
Dim constantValue = node.
ConstantValueOpt
703
Dim constValue As ConstantValue = value.
ConstantValueOpt
Lowering\LocalRewriter\LocalRewriter_AssignmentOperator.vb (2)
239
node.
ConstantValueOpt
,
358
Debug.Assert(nodeToCheck.
ConstantValueOpt
.IsNothing)
Lowering\LocalRewriter\LocalRewriter_ConditionalAccess.vb (1)
89
If rewrittenReceiver.
ConstantValueOpt
.IsNothing Then
Lowering\LocalRewriter\LocalRewriter_ConditionalExpressions.vb (8)
189
If testExpr.
ConstantValueOpt
.IsNothing Then
246
If rewrittenRight.
ConstantValueOpt
IsNot Nothing OrElse
338
Debug.Assert(node.Condition.
ConstantValueOpt
.IsBoolean OrElse
339
node.Condition.
ConstantValueOpt
.IsNothing OrElse
340
node.Condition.
ConstantValueOpt
.IsString)
342
Dim value As Boolean = If(node.Condition.
ConstantValueOpt
.IsBoolean,
343
node.Condition.
ConstantValueOpt
.BooleanValue,
344
node.Condition.
ConstantValueOpt
.IsString)
Lowering\LocalRewriter\LocalRewriter_Conversion.vb (1)
405
If rewrittenOperand.
ConstantValueOpt
Is ConstantValue.Nothing Then
Lowering\LocalRewriter\LocalRewriter_ForTo.vb (6)
107
ElseIf rewrittenStep.
ConstantValueOpt
Is Nothing AndAlso
132
literal = RewriteDecimalConstant(literal, literal.
ConstantValueOpt
, Me._topMethod, Me._diagnostics)
313
Dim initialConst = rewrittenInitialValue.
ConstantValueOpt
318
Dim limitConst = rewrittenLimit.
ConstantValueOpt
325
Dim stepConst = rewrittenStep.
ConstantValueOpt
693
Dim constStep = stepValue.
ConstantValueOpt
Lowering\LocalRewriter\LocalRewriter_NullableHelpers.vb (1)
545
Dim ifConditionConst = condition.
ConstantValueOpt
Lowering\LocalRewriter\LocalRewriter_PropertyAccess.vb (1)
53
node.
ConstantValueOpt
,
Lowering\LocalRewriter\LocalRewriter_SelectCase.vb (2)
358
constant = simpleCaseClause.ValueOpt.
ConstantValueOpt
367
constant = relationalCaseClause.ValueOpt.
ConstantValueOpt
Lowering\LocalRewriter\LocalRewriter_StringConcat.vb (6)
149
If elseExpr.
ConstantValueOpt
IsNot Nothing AndAlso elseExpr.
ConstantValueOpt
.StringValue = "" Then
168
Dim leftConst As ConstantValue = loweredLeft.
ConstantValueOpt
169
Dim rightConst As ConstantValue = loweredRight.
ConstantValueOpt
194
Return (operand.
ConstantValueOpt
IsNot Nothing AndAlso String.IsNullOrEmpty(operand.
ConstantValueOpt
.StringValue)) OrElse
Lowering\SyntheticBoundNodeFactory.vb (1)
713
Dim v1 = l.ValueOpt.
ConstantValueOpt
.Int32Value
Lowering\UseTwiceRewriter.vb (2)
183
Dim constantValue As ConstantValue = value.
ConstantValueOpt
509
(result.Second.Kind = BoundKind.Literal AndAlso result.First.
ConstantValueOpt
IsNot Nothing) OrElse
Lowering\WithExpressionRewriter.vb (1)
163
Dim constantValue As ConstantValue = value.
ConstantValueOpt
Semantics\Conversions.vb (5)
712
Dim sourceValue As ConstantValue = source.
ConstantValueOpt
727
Return source.
ConstantValueOpt
878
Dim sourceValue As ConstantValue = source.
ConstantValueOpt
1586
Debug.Assert(constantExpression.
ConstantValueOpt
IsNot Nothing)
1588
If constantExpression.
ConstantValueOpt
.IsBad Then
Semantics\Operators.vb (3)
714
Dim operandValue As ConstantValue = operand.
ConstantValueOpt
1037
Dim leftConstantValue As ConstantValue = left.
ConstantValueOpt
1038
Dim rightConstantValue As ConstantValue = right.
ConstantValueOpt