* Remove IExprWithObject and ExprWithArgs.OptionalObject
No longer used.
* Remove CLR_PostIncrement/Decrement
Rename CLR_PreIncrement/Decrement to CLR_Increment/Decrement as it
covers both pre- and post- cases.
* Remove Symbol.IsVirtual()
Commit migrated from https://github.com/dotnet/corefx/commit/
0a61a146f78eb396d057eae9734d3f6e335d9a8b
<Compile Include="Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ExprWithType.cs" />
<Compile Include="Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Field.cs" />
<Compile Include="Microsoft\CSharp\RuntimeBinder\Semantics\Tree\FieldInfo.cs" />
- <Compile Include="Microsoft\CSharp\RuntimeBinder\Semantics\Tree\IExprWithObject.cs" />
<Compile Include="Microsoft\CSharp\RuntimeBinder\Semantics\Tree\List.cs" />
<Compile Include="Microsoft\CSharp\RuntimeBinder\Semantics\Tree\LocalVariable.cs" />
<Compile Include="Microsoft\CSharp\RuntimeBinder\Semantics\Tree\MemberGroup.cs" />
return SpecialNames.CLR_False;
case ExpressionType.Increment:
- return SpecialNames.CLR_PreIncrement;
+ return SpecialNames.CLR_Increment;
case ExpressionType.Decrement:
- return SpecialNames.CLR_PreDecrement;
+ return SpecialNames.CLR_Decrement;
}
}
}
return assem == sym.GetAssembly() || sym.InternalsVisibleTo(assem);
}
- /* Returns if the symbol is virtual. */
- public bool IsVirtual()
- {
- switch (_kind)
- {
- case SYMKIND.SK_MethodSymbol:
- return ((MethodSymbol)this).isVirtual;
-
- case SYMKIND.SK_EventSymbol:
- MethodSymbol methAdd = ((EventSymbol)this).methAdd;
- return methAdd != null && methAdd.isVirtual;
-
- case SYMKIND.SK_PropertySymbol:
- PropertySymbol prop = ((PropertySymbol)this);
- MethodSymbol meth = prop.GetterMethod ?? prop.SetterMethod;
- return meth != null && meth.isVirtual;
-
- default:
- return false;
- }
- }
-
public bool IsOverride()
{
switch (_kind)
namespace Microsoft.CSharp.RuntimeBinder.Semantics
{
- internal abstract class ExprWithArgs : ExprWithType, IExprWithObject
+ internal abstract class ExprWithArgs : ExprWithType
{
protected ExprWithArgs(ExpressionKind kind, CType type)
: base(kind, type)
public ExprMemberGroup MemberGroup { get; set; }
- public Expr OptionalObject
- {
- get => MemberGroup.OptionalObject;
- set => MemberGroup.OptionalObject = value;
- }
-
public Expr OptionalArguments { get; set; }
public abstract SymWithType GetSymWithType();
namespace Microsoft.CSharp.RuntimeBinder.Semantics
{
- internal sealed class ExprField : ExprWithType, IExprWithObject
+ internal sealed class ExprField : ExprWithType
{
public ExprField(CType type, Expr optionalObject, FieldWithType field)
: base(ExpressionKind.Field, type)
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-namespace Microsoft.CSharp.RuntimeBinder.Semantics
-{
- internal interface IExprWithObject
- {
- Expr OptionalObject { get; set; }
- }
-}
namespace Microsoft.CSharp.RuntimeBinder.Semantics
{
- internal sealed class ExprMemberGroup : ExprWithType, IExprWithObject
+ internal sealed class ExprMemberGroup : ExprWithType
{
public ExprMemberGroup(EXPRFLAG flags, Name name, TypeArray typeArgs, SYMKIND symKind, CType parentType, MethodOrPropertySymbol pMPS, Expr optionalObject, CMemberLookupResults memberLookupResults)
: base(ExpressionKind.MemberGroup, MethodGroupType.Instance)
public const string CLR_True = "op_True";
public const string CLR_False = "op_False";
- public const string CLR_PreIncrement = "op_Increment";
- public const string CLR_PostIncrement = "op_Increment";
- public const string CLR_PreDecrement = "op_Decrement";
- public const string CLR_PostDecrement = "op_Decrement";
+ public const string CLR_Increment = "op_Increment";
+ public const string CLR_Decrement = "op_Decrement";
}
}
case SpecialNames.CLR_OnesComplement:
case SpecialNames.CLR_True:
case SpecialNames.CLR_False:
- case SpecialNames.CLR_PreIncrement:
- case SpecialNames.CLR_PreDecrement:
+ case SpecialNames.CLR_Increment:
+ case SpecialNames.CLR_Decrement:
return true;
}
}