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)
1398
Public Overrides ReadOnly Property
ConstantValueOpt
As ConstantValue
1559
Public Overrides ReadOnly Property
ConstantValueOpt
As ConstantValue
1950
Public Overrides ReadOnly Property
ConstantValueOpt
As ConstantValue
2023
Public Overrides ReadOnly Property
ConstantValueOpt
As ConstantValue
2115
Public Overrides ReadOnly Property
ConstantValueOpt
As ConstantValue
2338
Public Overrides ReadOnly Property
ConstantValueOpt
As ConstantValue
2402
Public Overrides ReadOnly Property
ConstantValueOpt
As ConstantValue
3076
Public Overrides ReadOnly Property
ConstantValueOpt
As ConstantValue
9143
Public Overrides ReadOnly Property
ConstantValueOpt
As ConstantValue
2 writes to ConstantValueOpt
Microsoft.CodeAnalysis.VisualBasic (2)
Semantics\Conversions.vb (2)
1634
result = TryFoldConstantNumericOrBooleanConversion(constantExpression.
ConstantValueOpt
, sourceType, targetDestinationType,
1679
result = TryFoldConstantNumericOrBooleanConversion(constantExpression.
ConstantValueOpt
, underlyingSourceType, underlyingDestination,
150 references to ConstantValueOpt
Microsoft.CodeAnalysis.VisualBasic (146)
Analysis\FlowAnalysis\AbstractFlowPass.vb (5)
314
Dim constantValue = node.
ConstantValueOpt
329
Dim constantValue = node.
ConstantValueOpt
1433
If node.TestExpression.IsConstant AndAlso node.TestExpression.
ConstantValueOpt
.IsNothing Then
1449
If node.Receiver.
ConstantValueOpt
.IsNothing Then
1842
Debug.Assert(node.ConditionOpt.
ConstantValueOpt
Is Nothing)
Binding\Binder_Attributes.vb (2)
747
Return CreateTypedConstant(node.Type, node.
ConstantValueOpt
.Value)
857
If lastIndex.IsConstant AndAlso Not lastIndex.
ConstantValueOpt
.IsDefaultValue Then
Binding\Binder_Expressions.vb (10)
1413
Return New BoundConversion(expr.Syntax, expr, ConversionKind.WideningNothingLiteral, False, False, expr.
ConstantValueOpt
,
1955
constVal = If(boundConditionArg.
ConstantValueOpt
.BooleanValue, boundWhenTrueArg.
ConstantValueOpt
, boundWhenFalseArg.
ConstantValueOpt
)
1969
Not candidate.
ConstantValueOpt
.IsBad AndAlso
2024
(boundFirstArg.IsNothingLiteral OrElse boundFirstArg.
ConstantValueOpt
.IsString) Then
2029
constVal = boundSecondArg.
ConstantValueOpt
2037
constVal = boundFirstArg.
ConstantValueOpt
4295
Dim lowerBoundConstantValueOpt As ConstantValue = lowerBound.
ConstantValueOpt
4377
Dim upperBoundConstantValueOpt As ConstantValue = upperBound.
ConstantValueOpt
Binding\Binder_InterpolatedString.vb (2)
49
If alignmentOpt.IsConstant AndAlso alignmentOpt.
ConstantValueOpt
.IsIntegral Then
51
Dim constantValue = alignmentOpt.
ConstantValueOpt
Binding\Binder_Invocation.vb (5)
1091
If arguments.Length = 1 AndAlso arguments(0).IsConstant AndAlso Not arguments(0).
ConstantValueOpt
.IsBad Then
1103
Dim argumentConstantValue = arguments(0).
ConstantValueOpt
1127
Dim argumentValue = arguments(0).
ConstantValueOpt
.Int32Value
1143
Dim constantValue = arguments(0).
ConstantValueOpt
1174
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
245
If init.
ConstantValueOpt
IsNot Nothing Then
CodeGen\EmitExpression.vb (3)
30
Dim constantValue = expression.
ConstantValueOpt
879
Dim constVal = receiver.
ConstantValueOpt
1682
If rightType.IsReferenceType OrElse (right.
ConstantValueOpt
IsNot Nothing AndAlso rightType.SpecialType <> SpecialType.System_Decimal) Then
CodeGen\EmitOperators.vb (7)
141
If child.Kind <> BoundKind.BinaryOperator OrElse child.
ConstantValueOpt
IsNot Nothing Then
160
If child.Kind <> BoundKind.BinaryOperator OrElse child.
ConstantValueOpt
IsNot Nothing Then
311
Dim shiftConst = expression.Right.
ConstantValueOpt
326
Dim shiftConst = expression.Right.
ConstantValueOpt
467
Dim constant = binOp.Left.
ConstantValueOpt
471
constant = comparand.
ConstantValueOpt
604
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)
429
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)
637
If node.
ConstantValueOpt
IsNot Nothing Then
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter_BinaryOperator.vb (1)
449
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 (7)
194
If testExpr.
ConstantValueOpt
.IsNothing Then
329
Debug.Assert(node.Condition.
ConstantValueOpt
.IsBoolean OrElse
330
node.Condition.
ConstantValueOpt
.IsNothing OrElse
331
node.Condition.
ConstantValueOpt
.IsString)
333
Dim value As Boolean = If(node.Condition.
ConstantValueOpt
.IsBoolean,
334
node.Condition.
ConstantValueOpt
.BooleanValue,
335
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_InterpolatedString.vb (2)
143
Debug.Assert(interpolation.AlignmentOpt.IsConstant AndAlso interpolation.AlignmentOpt.
ConstantValueOpt
.IsIntegral)
145
.Append(interpolation.AlignmentOpt.
ConstantValueOpt
.Int64Value.ToString(Globalization.CultureInfo.InvariantCulture))
Lowering\LocalRewriter\LocalRewriter_NullableHelpers.vb (1)
524
Dim ifConditionConst = condition.
ConstantValueOpt
Lowering\LocalRewriter\LocalRewriter_PropertyAccess.vb (1)
53
node.
ConstantValueOpt
,
Lowering\LocalRewriter\LocalRewriter_SelectCase.vb (2)
362
constant = simpleCaseClause.ValueOpt.
ConstantValueOpt
371
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)
709
Dim v1 = l.ValueOpt.
ConstantValueOpt
.Int32Value
Lowering\UseTwiceRewriter.vb (2)
181
Dim constantValue As ConstantValue = value.
ConstantValueOpt
472
(result.Second.Kind = BoundKind.Literal AndAlso result.First.
ConstantValueOpt
IsNot Nothing) OrElse
Lowering\WithExpressionRewriter.vb (1)
156
Dim constantValue As ConstantValue = value.
ConstantValueOpt
Operations\VisualBasicOperationFactory.vb (13)
317
constantValue = expression.
ConstantValueOpt
363
Dim constantValue As ConstantValue = boundAssignmentOperator.
ConstantValueOpt
376
Dim constantValue As ConstantValue = boundAssignmentOperator.
ConstantValueOpt
517
Dim constantValue As ConstantValue = boundUserDefinedUnaryOperator.
ConstantValueOpt
589
Dim constantValue As ConstantValue = boundUserDefinedBinaryOperator.
ConstantValueOpt
630
Dim constantValue As ConstantValue = boundUserDefinedShortCircuitingOperator.
ConstantValueOpt
652
Dim constantValue As ConstantValue = boundBadExpression.
ConstantValueOpt
669
Dim constantValue As ConstantValue = boundTypeArguments.
ConstantValueOpt
689
Dim objectCreationOperation = New ObjectCreationOperation(boundAttribute.Constructor, initializer, DeriveArguments(boundAttribute), _semanticModel, boundAttribute.Syntax, boundAttribute.Type, boundAttribute.
ConstantValueOpt
, isImplicit:=True)
722
Dim constantValue As ConstantValue = boundConversionOrCast.
ConstantValueOpt
826
Dim constantValue As ConstantValue = boundObjectCreationExpression.
ConstantValueOpt
1562
Dim constantValue As ConstantValue = boundInterpolatedString.
ConstantValueOpt
1652
Dim constantValue As ConstantValue = boundNullableIsTrueOperator.
ConstantValueOpt
Operations\VisualBasicOperationFactory_Methods.vb (1)
522
boundOperand.
ConstantValueOpt
,
Semantics\Conversions.vb (5)
708
Dim sourceValue As ConstantValue = source.
ConstantValueOpt
723
Return source.
ConstantValueOpt
874
Dim sourceValue As ConstantValue = source.
ConstantValueOpt
1582
Debug.Assert(constantExpression.
ConstantValueOpt
IsNot Nothing)
1584
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
Microsoft.CodeAnalysis.VisualBasic.ExpressionEvaluator.ExpressionCompiler (3)
CompilationContext.vb (2)
515
Debug.Assert(expression.
ConstantValueOpt
Is Nothing)
522
resultProperties = expression.ExpressionSymbol.GetResultProperties(flags, expression.
ConstantValueOpt
IsNot Nothing)
Rewriters\CapturedVariableRewriter.vb (1)
38
If TryCast(node, BoundExpression)?.
ConstantValueOpt
IsNot Nothing Then
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Semantics\Conversions.vb (1)
523
Assert.Equal(literal.
ConstantValueOpt
, resultValue)