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