diff --git a/Build.proj b/Build.proj
index 697fbf0d..68812e8c 100644
--- a/Build.proj
+++ b/Build.proj
@@ -75,7 +75,7 @@
-
+
diff --git a/Directory.Build.props b/Directory.Build.props
index a9c79692..d0f08a20 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -4,7 +4,7 @@
$(MSBuildThisFileDirectory)
- $(DlrRootDir)\Build
+ $(DlrRootDir)\Packaging\Targets
true
@@ -16,8 +16,8 @@
1000
Dynamic Language Runtime
- DLR Open Source Team
- © DLR Contributors
+ Riverside Valley Corporation
+ © .NET Foundation and Contributors
$(MajorVersion).$(MinorVersion).$(MicroVersion).$(AssemblyRevision)
$(MajorVersion).$(MinorVersion).$(MicroVersion).$(AssemblyFileRevision)
$(MSBuildProjectName) $(MajorVersion).$(MinorVersion).$(MicroVersion) $(ReleaseLevel) $(ReleaseSerial)
diff --git a/Dynamic.sln b/Dynamic.sln
index 729b5815..95c811e2 100644
--- a/Dynamic.sln
+++ b/Dynamic.sln
@@ -10,11 +10,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClrAssembly", "Tests\ClrAss
{EB66B766-6354-4208-A3D4-AACBDCB5C3B3} = {EB66B766-6354-4208-A3D4-AACBDCB5C3B3}
EndProjectSection
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Dynamic", "Dynamic\Microsoft.Dynamic.csproj", "{EB66B766-6354-4208-A3D4-AACBDCB5C3B3}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Riverside.Dynamic", "Dynamic\Riverside.Dynamic.csproj", "{EB66B766-6354-4208-A3D4-AACBDCB5C3B3}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Scripting", "Scripting\Microsoft.Scripting.csproj", "{02FF0909-F5AD-48CF-A86A-345E721B7E40}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Riverside.Scripting", "Scripting\Riverside.Scripting.csproj", "{02FF0909-F5AD-48CF-A86A-345E721B7E40}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Scripting.Metadata", "Metadata\Microsoft.Scripting.Metadata.csproj", "{ACDD9B9E-8FE6-439C-9521-1CCBA47F6143}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Riverside.Scripting.Metadata", "Metadata\Riverside.Scripting.Metadata.csproj", "{ACDD9B9E-8FE6-439C-9521-1CCBA47F6143}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Metadata", "Tests\Metadata\Metadata.csproj", "{848BBEB0-63E6-4736-B60C-23A9D733593D}"
EndProject
@@ -49,9 +49,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "nuget", "nuget", "{88E65B67
Package\nuget\DynamicLanguageRuntime.nuspec = Package\nuget\DynamicLanguageRuntime.nuspec
EndProjectSection
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Dynamic.Test", "Tests\Microsoft.Dynamic.Test\Microsoft.Dynamic.Test.csproj", "{CBDDAD40-D44E-458A-AA53-9A6DB62EC4A1}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Riverside.Dynamic.Test", "Tests\Riverside.Dynamic.Test\Riverside.Dynamic.Test.csproj", "{CBDDAD40-D44E-458A-AA53-9A6DB62EC4A1}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Scripting.Test", "Tests\Microsoft.Scripting.Test\Microsoft.Scripting.Test.csproj", "{56B4AA3A-42BC-4CA6-A022-703A777332AF}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Riverside.Scripting.Test", "Tests\Riverside.Scripting.Test\Riverside.Scripting.Test.csproj", "{56B4AA3A-42BC-4CA6-A022-703A777332AF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/Dynamic/Actions/ActionBinder.cs b/Dynamic/Actions/ActionBinder.cs
index 0b3004db..37286187 100644
--- a/Dynamic/Actions/ActionBinder.cs
+++ b/Dynamic/Actions/ActionBinder.cs
@@ -9,16 +9,16 @@
using System.Linq.Expressions;
using System.Reflection;
-using Microsoft.Scripting.Actions.Calls;
-using Microsoft.Scripting.Generation;
-using Microsoft.Scripting.Runtime;
-using Microsoft.Scripting.Utils;
-using AstUtils = Microsoft.Scripting.Ast.Utils;
+using Riverside.Scripting.Actions.Calls;
+using Riverside.Scripting.Generation;
+using Riverside.Scripting.Runtime;
+using Riverside.Scripting.Utils;
+using AstUtils = Riverside.Scripting.Ast.Utils;
-namespace Microsoft.Scripting.Actions {
+namespace Riverside.Scripting.Actions {
///
/// Provides binding semantics for a language. This include conversions as well as support
- /// for producing rules for actions. These optimized rules are used for calling methods,
+ /// for producing rules for actions. These optimized rules are used for calling methods,
/// performing operators, and getting members using the ActionBinder's conversion semantics.
///
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling")]
@@ -27,7 +27,7 @@ public abstract class ActionBinder {
///
/// Determines if the binder should allow access to non-public members.
- ///
+ ///
/// By default the binder does not allow access to non-public members. Base classes
/// can inherit and override this value to customize whether or not private binding
/// is available.
@@ -105,7 +105,7 @@ public virtual Expression ConvertExpression(Expression expr, Type toType, Conver
///
/// Gets the members that are visible from the provided type of the specified name.
- ///
+ ///
/// The default implemetnation first searches the type, then the flattened heirachy of the type, and then
/// registered extension methods.
///
@@ -186,7 +186,7 @@ public ErrorInfo MakeStaticPropertyInstanceAccessError(PropertyTracker tracker,
///
/// Called when a set is attempting to assign to a field or property from a derived class through the base class.
- ///
+ ///
/// The default behavior is to allow the assignment.
///
public virtual ErrorInfo MakeStaticAssignFromDerivedTypeError(Type accessingType, DynamicMetaObject self, MemberTracker assigning, DynamicMetaObject assignedValue, OverloadResolverFactory context) {
@@ -220,7 +220,7 @@ public virtual ErrorInfo MakeStaticAssignFromDerivedTypeError(Type accessingType
///
/// Creates an ErrorInfo object when a static property is accessed from an instance member. The default behavior is throw
- /// an exception indicating that static members properties be accessed via an instance. Languages can override this to
+ /// an exception indicating that static members properties be accessed via an instance. Languages can override this to
/// customize the exception, message, or to produce an ErrorInfo object which reads or writes to the property being accessed.
///
/// The static property being accessed through an instance
@@ -270,7 +270,7 @@ public virtual ErrorInfo MakeConversionError(Type toType, Expression value) {
///
/// Provides a way for the binder to provide a custom error message when lookup fails. Just
/// doing this for the time being until we get a more robust error return mechanism.
- ///
+ ///
/// Deprecated, use the non-generic version instead
///
public virtual ErrorInfo MakeMissingMemberError(Type type, DynamicMetaObject self, string name) {
@@ -295,7 +295,7 @@ public virtual ErrorInfo MakeMissingMemberErrorForDelete(Type type, DynamicMetaO
}
#endregion
-
+
public virtual string GetTypeName(Type t) {
return t.Name;
}
@@ -376,7 +376,7 @@ public virtual IList GetExtensionTypes(Type t) {
///
/// Provides an opportunity for languages to replace all MemberTracker's with their own type.
- ///
+ ///
/// Alternatlely a language can expose MemberTracker's directly.
///
/// The member which is being returned to the user.
diff --git a/Dynamic/Actions/Argument.cs b/Dynamic/Actions/Argument.cs
index a6feeb9b..5d658ad2 100644
--- a/Dynamic/Actions/Argument.cs
+++ b/Dynamic/Actions/Argument.cs
@@ -5,10 +5,10 @@
using System;
using System.Linq.Expressions;
-using Microsoft.Scripting.Utils;
-using AstUtils = Microsoft.Scripting.Ast.Utils;
+using Riverside.Scripting.Utils;
+using AstUtils = Riverside.Scripting.Ast.Utils;
-namespace Microsoft.Scripting.Actions {
+namespace Riverside.Scripting.Actions {
///
/// TODO: Alternatively, it should be sufficient to remember indices for this, list, dict and block.
///
diff --git a/Dynamic/Actions/ArgumentType.cs b/Dynamic/Actions/ArgumentType.cs
index 02011289..a574e6a6 100644
--- a/Dynamic/Actions/ArgumentType.cs
+++ b/Dynamic/Actions/ArgumentType.cs
@@ -2,12 +2,12 @@
// The .NET Foundation licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
-namespace Microsoft.Scripting.Actions {
+namespace Riverside.Scripting.Actions {
///
/// Convention for an individual argument at a callsite.
- ///
- /// Multiple different callsites can match against a single declaration.
- /// Some argument kinds can be "unrolled" into multiple arguments, such as list and dictionary.
+ ///
+ /// Multiple different callsites can match against a single declaration.
+ /// Some argument kinds can be "unrolled" into multiple arguments, such as list and dictionary.
///
public enum ArgumentType {
///
@@ -23,7 +23,7 @@ public enum ArgumentType {
Named,
///
- /// Argument containing a list of arguments.
+ /// Argument containing a list of arguments.
/// In Python: foo(*(1,2*2,3)) would match 'def foo(a,b,c)' with 3 declared arguments such that (a,b,c)=(1,4,3).
/// it could also match 'def foo(*l)' with 1 declared argument such that l=(1,4,3)
///
diff --git a/Dynamic/Actions/BoundMemberTracker.cs b/Dynamic/Actions/BoundMemberTracker.cs
index 7ad7bc95..bc07e5ac 100644
--- a/Dynamic/Actions/BoundMemberTracker.cs
+++ b/Dynamic/Actions/BoundMemberTracker.cs
@@ -5,9 +5,9 @@
using System;
using System.Dynamic;
-using Microsoft.Scripting.Actions.Calls;
+using Riverside.Scripting.Actions.Calls;
-namespace Microsoft.Scripting.Actions {
+namespace Riverside.Scripting.Actions {
public class BoundMemberTracker : MemberTracker {
public BoundMemberTracker(MemberTracker tracker, DynamicMetaObject instance) {
BoundTo = tracker;
diff --git a/Dynamic/Actions/CallSignature.cs b/Dynamic/Actions/CallSignature.cs
index 32c368bc..30668eff 100644
--- a/Dynamic/Actions/CallSignature.cs
+++ b/Dynamic/Actions/CallSignature.cs
@@ -8,17 +8,17 @@
using System.Linq.Expressions;
using System.Text;
-using Microsoft.Scripting.Generation;
-using Microsoft.Scripting.Utils;
-using AstUtils = Microsoft.Scripting.Ast.Utils;
+using Riverside.Scripting.Generation;
+using Riverside.Scripting.Utils;
+using AstUtils = Riverside.Scripting.Ast.Utils;
-namespace Microsoft.Scripting.Actions {
+namespace Riverside.Scripting.Actions {
///
/// Richly represents the signature of a callsite.
///
public struct CallSignature : IEquatable {
// TODO: invariant _infos != null ==> _argumentCount == _infos.Length
-
+
///
/// Array of additional meta information about the arguments, such as named arguments.
/// Null for a simple signature that's just an expression list. eg: foo(a*b,c,d)
@@ -31,14 +31,14 @@ public struct CallSignature : IEquatable {
private readonly int _argumentCount;
///
- /// All arguments are unnamed and matched by position.
+ /// All arguments are unnamed and matched by position.
///
public bool IsSimple => _infos == null;
public int ArgumentCount {
get {
Debug.Assert(_infos == null || _infos.Length == _argumentCount);
- return _argumentCount;
+ return _argumentCount;
}
}
@@ -48,7 +48,7 @@ public CallSignature(CallSignature signature) {
_infos = signature.GetArgumentInfos();
_argumentCount = signature._argumentCount;
}
-
+
public CallSignature(int argumentCount) {
ContractUtils.Requires(argumentCount >= 0, nameof(argumentCount));
_argumentCount = argumentCount;
@@ -135,7 +135,7 @@ public override string ToString() {
if (_infos == null) {
return "Simple";
}
-
+
StringBuilder sb = new StringBuilder("(");
for (int i = 0; i < _infos.Length; i++) {
if (i > 0) {
@@ -174,7 +174,7 @@ public CallSignature InsertArgumentAt(int index, Argument info) {
if (info.IsSimple) {
return new CallSignature(_argumentCount + 1);
}
-
+
return new CallSignature(ArrayUtils.InsertAt(GetArgumentInfos(), index, info));
}
@@ -239,7 +239,7 @@ public bool HasKeywordArgument() {
}
return false;
}
-
+
public ArgumentType GetArgumentKind(int index) {
// TODO: Contract.Requires(index >= 0 && index < _argumentCount, "index");
return _infos?[index].Kind ?? ArgumentType.Simple;
@@ -298,7 +298,7 @@ public Expression CreateExpression() {
args[i] = _infos[i].CreateExpression();
}
return Expression.New(
- typeof(CallSignature).GetConstructor(new Type[] { typeof(Argument[]) }),
+ typeof(CallSignature).GetConstructor(new Type[] { typeof(Argument[]) }),
Expression.NewArrayInit(typeof(Argument), args)
);
}
diff --git a/Dynamic/Actions/Calls/ActualArguments.cs b/Dynamic/Actions/Calls/ActualArguments.cs
index 3806ad7a..5df0bb6a 100644
--- a/Dynamic/Actions/Calls/ActualArguments.cs
+++ b/Dynamic/Actions/Calls/ActualArguments.cs
@@ -8,9 +8,9 @@
using System.Dynamic;
using System.Linq;
-using Microsoft.Scripting.Utils;
+using Riverside.Scripting.Utils;
-namespace Microsoft.Scripting.Actions.Calls {
+namespace Riverside.Scripting.Actions.Calls {
public sealed class ActualArguments {
public ActualArguments(IList args, IList namedArgs, IList argNames,
int hiddenCount, int collapsedCount, int firstSplattedArg, int splatIndex) {
@@ -74,9 +74,9 @@ internal int ToSplattedItemIndex(int collapsedArgIndex) {
index < Arguments.Count ? Arguments[index] : NamedArguments[index - Arguments.Count];
///
- /// Binds named arguments to the parameters. Returns a permutation of indices that captures the relationship between
+ /// Binds named arguments to the parameters. Returns a permutation of indices that captures the relationship between
/// named arguments and their corresponding parameters. Checks for duplicate and unbound named arguments.
- /// Ensures that for all i: namedArgs[i] binds to parameters[args.Length + bindingPermutation[i]]
+ /// Ensures that for all i: namedArgs[i] binds to parameters[args.Length + bindingPermutation[i]]
///
internal bool TryBindNamedArguments(MethodCandidate method, out ArgumentBinding binding, out CallFailure failure) {
if (NamedArguments.Count == 0) {
diff --git a/Dynamic/Actions/Calls/ApplicableCandidate.cs b/Dynamic/Actions/Calls/ApplicableCandidate.cs
index 4cf3b5a0..5cdf78a1 100644
--- a/Dynamic/Actions/Calls/ApplicableCandidate.cs
+++ b/Dynamic/Actions/Calls/ApplicableCandidate.cs
@@ -2,9 +2,9 @@
// The .NET Foundation licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
-using Microsoft.Scripting.Utils;
+using Riverside.Scripting.Utils;
-namespace Microsoft.Scripting.Actions.Calls {
+namespace Riverside.Scripting.Actions.Calls {
public sealed class ApplicableCandidate {
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")]
public readonly MethodCandidate Method;
diff --git a/Dynamic/Actions/Calls/ArgBuilder.cs b/Dynamic/Actions/Calls/ArgBuilder.cs
index a4056a21..c4344cc0 100644
--- a/Dynamic/Actions/Calls/ArgBuilder.cs
+++ b/Dynamic/Actions/Calls/ArgBuilder.cs
@@ -6,11 +6,11 @@
using System.Linq.Expressions;
using System.Reflection;
-namespace Microsoft.Scripting.Actions.Calls {
+namespace Riverside.Scripting.Actions.Calls {
///
/// ArgBuilder provides an argument value used by the MethodBinder. One ArgBuilder exists for each
- /// physical parameter defined on a method.
- ///
+ /// physical parameter defined on a method.
+ ///
/// Contrast this with ParameterWrapper which represents the logical argument passed to the method.
///
public abstract class ArgBuilder {
diff --git a/Dynamic/Actions/Calls/ArgumentBinding.cs b/Dynamic/Actions/Calls/ArgumentBinding.cs
index edea0c67..a6c4313d 100644
--- a/Dynamic/Actions/Calls/ArgumentBinding.cs
+++ b/Dynamic/Actions/Calls/ArgumentBinding.cs
@@ -2,9 +2,9 @@
// The .NET Foundation licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
-using Microsoft.Scripting.Utils;
+using Riverside.Scripting.Utils;
-namespace Microsoft.Scripting.Actions.Calls {
+namespace Riverside.Scripting.Actions.Calls {
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes")] // TODO
public struct ArgumentBinding {
private static readonly int[] _EmptyBinding = System.Array.Empty();
diff --git a/Dynamic/Actions/Calls/BindingResult.cs b/Dynamic/Actions/Calls/BindingResult.cs
index 4dd2bc1d..fa89f3da 100644
--- a/Dynamic/Actions/Calls/BindingResult.cs
+++ b/Dynamic/Actions/Calls/BindingResult.cs
@@ -2,13 +2,13 @@
// The .NET Foundation licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
-namespace Microsoft.Scripting.Actions.Calls {
+namespace Riverside.Scripting.Actions.Calls {
///
/// Indicates the specific type of failure, if any, from binding to a method.
///
public enum BindingResult {
///
- /// The binding succeeded. Only one method was applicable or had the best conversion.
+ /// The binding succeeded. Only one method was applicable or had the best conversion.
///
Success,
@@ -26,7 +26,7 @@ public enum BindingResult {
/// None of the target method(s) can successfully be called. The failure can be due to:
/// 1. Arguments could not be successfully converted for the call
/// 2. Keyword arguments could not be assigned to positional arguments
- /// 3. Keyword arguments could be assigned but would result in an argument being assigned
+ /// 3. Keyword arguments could be assigned but would result in an argument being assigned
/// multiple times (keyword and positional arguments conflit or dupliate keyword arguments).
///
CallFailure,
diff --git a/Dynamic/Actions/Calls/BindingTarget.cs b/Dynamic/Actions/Calls/BindingTarget.cs
index 51f52ba2..3f5a6e80 100644
--- a/Dynamic/Actions/Calls/BindingTarget.cs
+++ b/Dynamic/Actions/Calls/BindingTarget.cs
@@ -7,10 +7,10 @@
using System.Linq.Expressions;
using System.Reflection;
-namespace Microsoft.Scripting.Actions.Calls {
+namespace Riverside.Scripting.Actions.Calls {
///
/// Encapsulates the result of an attempt to bind to one or methods using the OverloadResolver.
- ///
+ ///
/// Users should first check the Result property to see if the binding was successful or
/// to determine the specific type of failure that occured. If the binding was successful
/// MakeExpression can then be called to create an expression which calls the method.
@@ -44,7 +44,7 @@ internal BindingTarget(string name, int actualArgumentCount, int[] expectedArgCo
}
///
- /// Creates a new BindingTarget when the method binding has failued due to
+ /// Creates a new BindingTarget when the method binding has failued due to
/// one or more arguments which could not be converted or assigned to corresponding parameters.
///
internal BindingTarget(string name, int actualArgumentCount, CallFailure[] failures) {
@@ -79,7 +79,7 @@ internal BindingTarget(string name, BindingResult result) {
///
/// Gets an Expression which calls the binding target if the method binding succeeded.
- ///
+ ///
/// Throws InvalidOperationException if the binding failed.
///
public Expression MakeExpression() {
@@ -138,7 +138,7 @@ public Expression MakeExpression() {
///
/// Gets the MetaObjects which we originally did binding against in their restricted form.
- ///
+ ///
/// The members of the array correspond to each of the arguments. All members of the array
/// have a value.
///
diff --git a/Dynamic/Actions/Calls/ByRefReturnBuilder.cs b/Dynamic/Actions/Calls/ByRefReturnBuilder.cs
index e70d3c1e..1392dba9 100644
--- a/Dynamic/Actions/Calls/ByRefReturnBuilder.cs
+++ b/Dynamic/Actions/Calls/ByRefReturnBuilder.cs
@@ -5,9 +5,9 @@
using System.Collections.Generic;
using System.Linq.Expressions;
-using AstUtils = Microsoft.Scripting.Ast.Utils;
+using AstUtils = Riverside.Scripting.Ast.Utils;
-namespace Microsoft.Scripting.Actions.Calls {
+namespace Riverside.Scripting.Actions.Calls {
using Ast = Expression;
internal sealed class ByRefReturnBuilder : ReturnBuilder {
diff --git a/Dynamic/Actions/Calls/CallFailure.cs b/Dynamic/Actions/Calls/CallFailure.cs
index f2225142..87d9e6fb 100644
--- a/Dynamic/Actions/Calls/CallFailure.cs
+++ b/Dynamic/Actions/Calls/CallFailure.cs
@@ -5,16 +5,16 @@
using System.Collections.Generic;
using System.Diagnostics;
-using Microsoft.Scripting.Utils;
+using Riverside.Scripting.Utils;
-namespace Microsoft.Scripting.Actions.Calls {
+namespace Riverside.Scripting.Actions.Calls {
///
/// Represents the reason why a call to a specific method could not be performed by the OverloadResolver.
- ///
+ ///
/// The reason for the failure is specified by the CallFailureReason property. Once this property
/// has been consulted the other properties can be consulted for more detailed information regarding
/// the failure.
- ///
+ ///
/// If reason is ConversionFailure the ConversionResults property will be non-null.
/// If reason is UnassignableKeyword the KeywordArguments property will be non-null and include
/// the keywords which could not be assigned.
@@ -65,7 +65,7 @@ internal CallFailure(MethodCandidate candidate, CallFailureReason reason) {
public MethodCandidate Candidate { get; }
///
- /// Gets the reason for the call failure which determines the other
+ /// Gets the reason for the call failure which determines the other
/// properties of the CallFailure which should be consulted.
///
public CallFailureReason Reason { get; }
diff --git a/Dynamic/Actions/Calls/CallFailureReason.cs b/Dynamic/Actions/Calls/CallFailureReason.cs
index 2bba5570..8b11414c 100644
--- a/Dynamic/Actions/Calls/CallFailureReason.cs
+++ b/Dynamic/Actions/Calls/CallFailureReason.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
-namespace Microsoft.Scripting.Actions.Calls {
+namespace Riverside.Scripting.Actions.Calls {
public enum CallFailureReason {
///
/// Default value, their was no CallFailure.
@@ -20,7 +20,7 @@ public enum CallFailureReason {
UnassignableKeyword,
///
- /// One or more keyword arguments were duplicated or would have taken the spot of a
+ /// One or more keyword arguments were duplicated or would have taken the spot of a
/// provided positional argument.
///
DuplicateKeyword,
diff --git a/Dynamic/Actions/Calls/Candidate.cs b/Dynamic/Actions/Calls/Candidate.cs
index 29b59a11..0ffae0d2 100644
--- a/Dynamic/Actions/Calls/Candidate.cs
+++ b/Dynamic/Actions/Calls/Candidate.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
-namespace Microsoft.Scripting.Actions.Calls {
+namespace Riverside.Scripting.Actions.Calls {
public enum Candidate {
Equivalent = 0,
One = +1,
diff --git a/Dynamic/Actions/Calls/CandidateSet.cs b/Dynamic/Actions/Calls/CandidateSet.cs
index d759f6ab..d9bb659b 100644
--- a/Dynamic/Actions/Calls/CandidateSet.cs
+++ b/Dynamic/Actions/Calls/CandidateSet.cs
@@ -5,7 +5,7 @@
using System.Collections.Generic;
using System.Diagnostics;
-namespace Microsoft.Scripting.Actions.Calls {
+namespace Riverside.Scripting.Actions.Calls {
///
/// Represents a collection of MethodCandidate's which all accept the
/// same number of logical parameters. For example a params method
diff --git a/Dynamic/Actions/Calls/ConversionResult.cs b/Dynamic/Actions/Calls/ConversionResult.cs
index de3fab29..33e2e1f6 100644
--- a/Dynamic/Actions/Calls/ConversionResult.cs
+++ b/Dynamic/Actions/Calls/ConversionResult.cs
@@ -5,9 +5,9 @@
using System;
using System.Collections.Generic;
-using Microsoft.Scripting.Utils;
+using Riverside.Scripting.Utils;
-namespace Microsoft.Scripting.Actions.Calls {
+namespace Riverside.Scripting.Actions.Calls {
///
/// Represents information about a failure to convert an argument from one
/// type to another.
diff --git a/Dynamic/Actions/Calls/DefaultArgBuilder.cs b/Dynamic/Actions/Calls/DefaultArgBuilder.cs
index 1e740aa7..aa057fa4 100644
--- a/Dynamic/Actions/Calls/DefaultArgBuilder.cs
+++ b/Dynamic/Actions/Calls/DefaultArgBuilder.cs
@@ -6,17 +6,17 @@
using System.Linq.Expressions;
using System.Reflection;
-using Microsoft.Scripting.Generation;
-using Microsoft.Scripting.Utils;
-using AstUtils = Microsoft.Scripting.Ast.Utils;
+using Riverside.Scripting.Generation;
+using Riverside.Scripting.Utils;
+using AstUtils = Riverside.Scripting.Ast.Utils;
-namespace Microsoft.Scripting.Actions.Calls {
+namespace Riverside.Scripting.Actions.Calls {
///
/// ArgBuilder which provides a default parameter value for a method call.
///
internal sealed class DefaultArgBuilder : ArgBuilder {
- public DefaultArgBuilder(ParameterInfo info)
+ public DefaultArgBuilder(ParameterInfo info)
: base(info) {
Assert.NotNull(info);
}
diff --git a/Dynamic/Actions/Calls/DefaultOverloadResolver.cs b/Dynamic/Actions/Calls/DefaultOverloadResolver.cs
index 21160e2f..41136f18 100644
--- a/Dynamic/Actions/Calls/DefaultOverloadResolver.cs
+++ b/Dynamic/Actions/Calls/DefaultOverloadResolver.cs
@@ -9,12 +9,12 @@
using System.Dynamic;
using System.Linq.Expressions;
using System.Reflection;
-using Microsoft.Scripting.Actions.Calls;
-using Microsoft.Scripting.Runtime;
-using Microsoft.Scripting.Utils;
-using AstUtils = Microsoft.Scripting.Ast.Utils;
+using Riverside.Scripting.Actions.Calls;
+using Riverside.Scripting.Runtime;
+using Riverside.Scripting.Utils;
+using AstUtils = Riverside.Scripting.Ast.Utils;
-namespace Microsoft.Scripting.Actions {
+namespace Riverside.Scripting.Actions {
using Ast = Expression;
internal sealed class DefaultOverloadResolverFactory : OverloadResolverFactory {
@@ -133,7 +133,7 @@ protected override void GetNamedArguments(out IList namedArgs
objects.TrimExcess();
argNames = names;
namedArgs = objects;
- } else {
+ } else {
argNames = ArrayUtils.EmptyStrings;
namedArgs = DynamicMetaObject.EmptyMetaObjects;
}
@@ -249,7 +249,7 @@ public override ErrorInfo MakeInvalidParametersError(BindingTarget target) {
private ErrorInfo MakeInvalidSplatteeError(BindingTarget target) {
return ErrorInfo.FromException(
- Ast.Call(typeof(BinderOps).GetMethod(nameof(BinderOps.InvalidSplatteeError)),
+ Ast.Call(typeof(BinderOps).GetMethod(nameof(BinderOps.InvalidSplatteeError)),
AstUtils.Constant(target.Name),
AstUtils.Constant(Binder.GetTypeName(_invalidSplattee.GetLimitType()))
)
diff --git a/Dynamic/Actions/Calls/InstanceBuilder.cs b/Dynamic/Actions/Calls/InstanceBuilder.cs
index d6d07a4b..92ca83c4 100644
--- a/Dynamic/Actions/Calls/InstanceBuilder.cs
+++ b/Dynamic/Actions/Calls/InstanceBuilder.cs
@@ -6,12 +6,12 @@
using System.Linq.Expressions;
using System.Reflection;
-using Microsoft.Scripting.Generation;
-using AstUtils = Microsoft.Scripting.Ast.Utils;
+using Riverside.Scripting.Generation;
+using AstUtils = Riverside.Scripting.Ast.Utils;
-namespace Microsoft.Scripting.Actions.Calls {
+namespace Riverside.Scripting.Actions.Calls {
using Ast = Expression;
-
+
public class InstanceBuilder {
// Index of actual argument expression or -1 if the instance is null.
private readonly int _index;
@@ -48,8 +48,8 @@ private void GetCallableMethod(RestrictedArguments args, ref MethodInfo method)
// will call the same thing but is visible. If this fails we still bind anyway - it's
// the callers responsibility to filter out non-visible methods.
//
- // We use limit type of the meta instance so that we can access methods inherited to that type
- // as accessible via an interface implemented by the type. The type might be internal and the methods
+ // We use limit type of the meta instance so that we can access methods inherited to that type
+ // as accessible via an interface implemented by the type. The type might be internal and the methods
// might not be accessible otherwise.
method = CompilerHelpers.TryGetCallableMethod(args.GetObject(_index).LimitType, method);
}
diff --git a/Dynamic/Actions/Calls/KeywordArgBuilder.cs b/Dynamic/Actions/Calls/KeywordArgBuilder.cs
index b95e2690..0d950680 100644
--- a/Dynamic/Actions/Calls/KeywordArgBuilder.cs
+++ b/Dynamic/Actions/Calls/KeywordArgBuilder.cs
@@ -7,16 +7,16 @@
using System.Linq.Expressions;
using System.Reflection;
-namespace Microsoft.Scripting.Actions.Calls {
+namespace Riverside.Scripting.Actions.Calls {
///
- /// ArgBuilder which provides a value for a keyword argument.
- ///
- /// The KeywordArgBuilder calculates its position at emit time using it's initial
- /// offset within the keyword arguments, the number of keyword arguments, and the
- /// total number of arguments provided by the user. It then delegates to an
+ /// ArgBuilder which provides a value for a keyword argument.
+ ///
+ /// The KeywordArgBuilder calculates its position at emit time using it's initial
+ /// offset within the keyword arguments, the number of keyword arguments, and the
+ /// total number of arguments provided by the user. It then delegates to an
/// underlying ArgBuilder which only receives the single correct argument.
- ///
- /// Delaying the calculation of the position to emit time allows the method binding to be
+ ///
+ /// Delaying the calculation of the position to emit time allows the method binding to be
/// done without knowing the exact the number of arguments provided by the user. Hence,
/// the method binder can be dependent only on the set of method overloads and keyword names,
/// but not the user arguments. While the number of user arguments could be determined
@@ -26,7 +26,7 @@ internal sealed class KeywordArgBuilder : ArgBuilder {
private readonly int _kwArgCount, _kwArgIndex;
private readonly ArgBuilder _builder;
- public KeywordArgBuilder(ArgBuilder builder, int kwArgCount, int kwArgIndex)
+ public KeywordArgBuilder(ArgBuilder builder, int kwArgCount, int kwArgIndex)
: base(builder.ParameterInfo) {
Debug.Assert(BuilderExpectsSingleParameter(builder));
diff --git a/Dynamic/Actions/Calls/KeywordConstructorReturnBuilder.cs b/Dynamic/Actions/Calls/KeywordConstructorReturnBuilder.cs
index 749a8127..3a460d67 100644
--- a/Dynamic/Actions/Calls/KeywordConstructorReturnBuilder.cs
+++ b/Dynamic/Actions/Calls/KeywordConstructorReturnBuilder.cs
@@ -7,10 +7,10 @@
using System.Linq.Expressions;
using System.Reflection;
-using Microsoft.Scripting.Runtime;
-using AstUtils = Microsoft.Scripting.Ast.Utils;
+using Riverside.Scripting.Runtime;
+using AstUtils = Riverside.Scripting.Ast.Utils;
-namespace Microsoft.Scripting.Actions.Calls {
+namespace Riverside.Scripting.Actions.Calls {
///
/// Updates fields/properties of the returned value with unused keyword parameters.
@@ -42,7 +42,7 @@ internal override Expression ToExpression(OverloadResolver resolver, IList
/// MethodCandidate represents the different possible ways of calling a method or a set of method overloads.
@@ -128,15 +128,15 @@ public IList GetParameters() {
///
/// Builds a new MethodCandidate which takes count arguments and the provided list of keyword arguments.
- ///
+ ///
/// The basic idea here is to figure out which parameters map to params or a dictionary params and
- /// fill in those spots w/ extra ParameterWrapper's.
+ /// fill in those spots w/ extra ParameterWrapper's.
///
internal MethodCandidate MakeParamsExtended(int count, IList names) {
Debug.Assert(Overload.IsVariadic);
List newParameters = new List(count);
-
+
// keep track of which named args map to a real argument, and which ones
// map to the params dictionary.
List unusedNames = new List(names);
@@ -235,7 +235,7 @@ private MethodCandidate MakeParamsExtended(string[] names, int[] nameIndices, Li
newArgBuilders.Add(ab);
curArg++;
} else {
- // CodeContext, null, default, etc... we don't consume an
+ // CodeContext, null, default, etc... we don't consume an
// actual incoming argument.
newArgBuilders.Add(ab);
}
diff --git a/Dynamic/Actions/Calls/NarrowingLevel.cs b/Dynamic/Actions/Calls/NarrowingLevel.cs
index d1ba87f8..dd7f7d88 100644
--- a/Dynamic/Actions/Calls/NarrowingLevel.cs
+++ b/Dynamic/Actions/Calls/NarrowingLevel.cs
@@ -2,14 +2,14 @@
// The .NET Foundation licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
-namespace Microsoft.Scripting.Actions.Calls {
+namespace Riverside.Scripting.Actions.Calls {
///
- /// Narrowing conversions are conversions that cannot be proved to always succeed, conversions that are
- /// known to possibly lose information, and conversions across domains of types sufficiently different
- /// to merit narrowing notation like casts.
- ///
+ /// Narrowing conversions are conversions that cannot be proved to always succeed, conversions that are
+ /// known to possibly lose information, and conversions across domains of types sufficiently different
+ /// to merit narrowing notation like casts.
+ ///
/// Its upto every language to define the levels for conversions. The narrowling levels can be used by
- /// for method overload resolution, where the overload is based on the parameter types (and not the number
+ /// for method overload resolution, where the overload is based on the parameter types (and not the number
/// of parameters).
///
public enum NarrowingLevel {
diff --git a/Dynamic/Actions/Calls/OutArgBuilder.cs b/Dynamic/Actions/Calls/OutArgBuilder.cs
index bd640aeb..d54339cb 100644
--- a/Dynamic/Actions/Calls/OutArgBuilder.cs
+++ b/Dynamic/Actions/Calls/OutArgBuilder.cs
@@ -6,10 +6,10 @@
using System.Linq.Expressions;
using System.Reflection;
-using Microsoft.Scripting.Utils;
-using AstUtils = Microsoft.Scripting.Ast.Utils;
+using Riverside.Scripting.Utils;
+using AstUtils = Riverside.Scripting.Ast.Utils;
-namespace Microsoft.Scripting.Actions.Calls {
+namespace Riverside.Scripting.Actions.Calls {
///
/// Builds the argument for an out argument when not passed a StrongBox. The out parameter
/// is returned as an additional return value.
@@ -19,7 +19,7 @@ internal sealed class OutArgBuilder : ArgBuilder {
private readonly bool _isRef;
private ParameterExpression _tmp;
- public OutArgBuilder(ParameterInfo info)
+ public OutArgBuilder(ParameterInfo info)
: base(info) {
_parameterType = info.ParameterType.IsByRef ? info.ParameterType.GetElementType() : info.ParameterType;
diff --git a/Dynamic/Actions/Calls/OverloadInfo.cs b/Dynamic/Actions/Calls/OverloadInfo.cs
index 3b564ff5..ac2b59c2 100644
--- a/Dynamic/Actions/Calls/OverloadInfo.cs
+++ b/Dynamic/Actions/Calls/OverloadInfo.cs
@@ -8,12 +8,12 @@
using System.Diagnostics;
using System.Reflection;
-using Microsoft.Scripting.Generation;
-using Microsoft.Scripting.Utils;
+using Riverside.Scripting.Generation;
+using Riverside.Scripting.Utils;
-namespace Microsoft.Scripting.Actions.Calls {
+namespace Riverside.Scripting.Actions.Calls {
///
- /// Defines a method overload abstraction for the purpose of overload resolution.
+ /// Defines a method overload abstraction for the purpose of overload resolution.
/// It provides the overload resolver the metadata it needs to perform the resolution.
///
///
@@ -57,7 +57,7 @@ public virtual bool IsParamDictionary(int parameterIndex) {
/// The method arity can vary, i.e. the method has params array or params dict parameters.
///
public abstract bool IsVariadic { get; }
-
+
public abstract bool IsGenericMethodDefinition { get; }
public abstract bool IsGenericMethod { get; }
public abstract bool ContainsGenericParameters { get; }
@@ -101,7 +101,7 @@ public virtual bool IsParamDictionary(int parameterIndex) {
///
///
/// Not thread safe.
- /// WARNING: This is a temporary API that will undergo breaking changes in future versions.
+ /// WARNING: This is a temporary API that will undergo breaking changes in future versions.
///
public class ReflectionOverloadInfo : OverloadInfo {
[Flags]
@@ -136,7 +136,7 @@ public override ParameterInfo ReturnParameter {
return method != null ? method.ReturnParameter : null;
}
}
-
+
public override IList GenericArguments => _genericArguments ?? (_genericArguments = new ReadOnlyCollection(_method.GetGenericArguments()));
public override Type DeclaringType => _method.DeclaringType;
@@ -161,7 +161,7 @@ public override bool IsExtension {
}
public override bool IsVariadic {
- get {
+ get {
if ((_flags & _Flags.KnownVariadic) == 0) {
_flags |= _Flags.KnownVariadic | (IsVariadicInternal() ? _Flags.IsVariadic : 0);
}
@@ -184,7 +184,7 @@ private bool IsVariadicInternal() {
public override bool IsGenericMethodDefinition => _method.IsGenericMethodDefinition;
public override bool ContainsGenericParameters {
- get {
+ get {
if ((_flags & _Flags.KnownContainsGenericParameters) == 0) {
_flags |= _Flags.KnownContainsGenericParameters | (_method.ContainsGenericParameters ? _Flags.ContainsGenericParameters : 0);
}
diff --git a/Dynamic/Actions/Calls/OverloadResolver.cs b/Dynamic/Actions/Calls/OverloadResolver.cs
index b2b512e6..5ee2aae2 100644
--- a/Dynamic/Actions/Calls/OverloadResolver.cs
+++ b/Dynamic/Actions/Calls/OverloadResolver.cs
@@ -11,47 +11,47 @@
using System.Reflection;
using System.Text;
-using Microsoft.Scripting.Generation;
-using Microsoft.Scripting.Runtime;
-using Microsoft.Scripting.Utils;
-using AstUtils = Microsoft.Scripting.Ast.Utils;
+using Riverside.Scripting.Generation;
+using Riverside.Scripting.Runtime;
+using Riverside.Scripting.Utils;
+using AstUtils = Riverside.Scripting.Ast.Utils;
-namespace Microsoft.Scripting.Actions.Calls {
+namespace Riverside.Scripting.Actions.Calls {
///
/// Provides binding and overload resolution to .NET methods.
- ///
+ ///
/// MethodBinder's can be used for:
- /// generating new AST code for calling a method
+ /// generating new AST code for calling a method
/// calling a method via reflection at runtime
/// (not implemented) performing an abstract call
- ///
+ ///
/// MethodBinder's support default arguments, optional arguments, by-ref (in and out), and keyword arguments.
- ///
+ ///
/// Implementation Details:
- ///
+ ///
/// The MethodBinder works by building up a CandidateSet for each number of effective arguments that can be
/// passed to a set of overloads. For example a set of overloads such as:
/// foo(object a, object b, object c)
/// foo(int a, int b)
- ///
+ ///
/// would have 2 target sets - one for 3 parameters and one for 2 parameters. For parameter arrays
/// we fallback and create the appropriately sized CandidateSet on demand.
- ///
+ ///
/// Each CandidateSet consists of a set of MethodCandidate's. Each MethodCandidate knows the flattened
/// parameters that could be received. For example for a function such as:
/// foo(params int[] args)
- ///
+ ///
/// When this method is in a CandidateSet of size 3 the MethodCandidate takes 3 parameters - all of them
- /// ints; if it's in a CandidateSet of size 4 it takes 4 parameters. Effectively a MethodCandidate is
+ /// ints; if it's in a CandidateSet of size 4 it takes 4 parameters. Effectively a MethodCandidate is
/// a simplified view that allows all arguments to be treated as required positional arguments.
- ///
+ ///
/// Each MethodCandidate in turn refers to a MethodTarget. The MethodTarget is composed of a set
/// of ArgBuilder's and a ReturnBuilder which know how to consume the positional arguments and pass
/// them to the appropriate argument of the destination method. This includes routing keyword
/// arguments to the correct position, providing the default values for optional arguments, etc...
- ///
- /// After binding is finished the MethodCandidates are thrown away and a BindingTarget is returned.
+ ///
+ /// After binding is finished the MethodCandidates are thrown away and a BindingTarget is returned.
/// The BindingTarget indicates whether the binding was successful and if not any additional information
/// that should be reported to the user about the failed binding. It also exposes the MethodTarget which
/// allows consumers to get the flattened list of required parameters for the call. MethodCandidates
@@ -65,7 +65,7 @@ public abstract partial class OverloadResolver {
private IList _argNames;
private Dictionary _candidateSets; // the methods as they map from # of arguments -> the possible CandidateSet's.
private List _paramsCandidates; // the methods which are params methods which need special treatment because they don't have fixed # of args
-
+
// built as arguments are processed:
private ActualArguments _actualArguments;
private int _maxAccessedCollapsedArg;
@@ -98,7 +98,7 @@ internal ParameterExpression GetTemporary(Type type, string name) {
///
/// Resolves a method overload and returns back a BindingTarget.
- ///
+ ///
/// The BindingTarget can then be tested for the success or particular type of
/// failure that prevents the method from being called. If successfully bound the BindingTarget
/// contains a list of argument meta-objects with additional restrictions that ensure the selection
@@ -124,10 +124,10 @@ public BindingTarget ResolveOverload(string methodName, IList meth
_methodName = methodName;
_minLevel = minLevel;
_maxLevel = maxLevel;
-
+
// step 1:
GetNamedArguments(out IList namedArgs, out _argNames);
-
+
// uses arg names:
BuildCandidateSets(methods);
@@ -231,9 +231,9 @@ private void BuildCandidateSets(IEnumerable methods) {
AddBasicMethodTargets(method);
}
-
+
if (_paramsCandidates != null) {
- // For all the methods that take a params array, create MethodCandidates that clash with the
+ // For all the methods that take a params array, create MethodCandidates that clash with the
// other overloads of the method
foreach (MethodCandidate candidate in _paramsCandidates) {
foreach (int count in _candidateSets.Keys) {
@@ -293,7 +293,7 @@ private void AddSimpleTarget(MethodCandidate target) {
if (BindToUnexpandedParams(target)) {
AddTarget(target);
}
-
+
if (_paramsCandidates == null) {
_paramsCandidates = new List();
}
@@ -336,7 +336,7 @@ public ActualArguments GetActualArguments() {
if (_actualArguments == null) {
throw new InvalidOperationException("Actual arguments have not been built yet.");
}
- return _actualArguments;
+ return _actualArguments;
}
protected virtual void GetNamedArguments(out IList namedArgs, out IList argNames) {
@@ -365,7 +365,7 @@ internal BindingTarget MakeBindingTarget(CandidateSet targetSet) {
return MakeFailedBindingTarget(nameBindingFailures.ToArray());
}
- // go through all available narrowing levels selecting candidates.
+ // go through all available narrowing levels selecting candidates.
for (NarrowingLevel level = _minLevel; level <= _maxLevel; level++) {
failures?.Clear();
@@ -394,7 +394,7 @@ internal BindingTarget MakeBindingTarget(CandidateSet targetSet) {
var bestCandidate = SelectBestCandidate(applicable, level);
if (bestCandidate != null) {
return MakeSuccessfulBindingTarget(bestCandidate, potential, level, targetSet);
- }
+ }
return MakeAmbiguousBindingTarget(applicable);
}
@@ -414,7 +414,7 @@ private List EnsureMatchingNamedArgs(List
var result = new List();
foreach (MethodCandidate candidate in candidates) {
// skip params dictionaries - we want to only pick up the methods normalized
- // to have argument names (which we created because the MethodBinder gets
+ // to have argument names (which we created because the MethodBinder gets
// created w/ keyword arguments).
if (!candidate.HasParamsDictionary) {
if (_actualArguments.TryBindNamedArguments(candidate, out ArgumentBinding namesBinding, out CallFailure callFailure)) {
@@ -427,7 +427,7 @@ private List EnsureMatchingNamedArgs(List
return result;
}
- private List SelectCandidatesWithConvertibleArgs(List candidates, NarrowingLevel level,
+ private List SelectCandidatesWithConvertibleArgs(List candidates, NarrowingLevel level,
ref List failures) {
bool hasGenericCandidates = false;
@@ -604,7 +604,7 @@ private static bool IsOverloadedOnParameter(int argIndex, int argCount, IList levelTwo) {
return Candidate.Two;
}
-
+
return Candidate.Ambiguous;
}
@@ -937,7 +937,7 @@ public virtual Expression GetDynamicConversion(Expression value, Type type) {
#endregion
#region Step 5: Results, Errors
-
+
private int[] GetExpectedArgCounts() {
if (_candidateSets.Count == 0 && _paramsCandidates == null) {
return EmptyArray.Instance;
@@ -1132,7 +1132,7 @@ private void GetSplatLimits(out int preSplatLimit, out int postSplatLimit) {
int preCount = -1;
int postCount = -1;
- // For all the methods that take a params array, create MethodCandidates that clash with the
+ // For all the methods that take a params array, create MethodCandidates that clash with the
// other overloads of the method
foreach (MethodCandidate candidate in _paramsCandidates) {
preCount = System.Math.Max(preCount, candidate.ParamsArrayIndex);
diff --git a/Dynamic/Actions/Calls/OverloadResolverFactory.cs b/Dynamic/Actions/Calls/OverloadResolverFactory.cs
index 94fbfa3b..705ab5dc 100644
--- a/Dynamic/Actions/Calls/OverloadResolverFactory.cs
+++ b/Dynamic/Actions/Calls/OverloadResolverFactory.cs
@@ -4,9 +4,9 @@
using System.Collections.Generic;
using System.Dynamic;
-using Microsoft.Scripting.Runtime;
+using Riverside.Scripting.Runtime;
-namespace Microsoft.Scripting.Actions.Calls {
+namespace Riverside.Scripting.Actions.Calls {
public abstract class OverloadResolverFactory {
public abstract DefaultOverloadResolver CreateOverloadResolver(IList args, CallSignature signature, CallTypes callType);
}
diff --git a/Dynamic/Actions/Calls/ParameterMapping.cs b/Dynamic/Actions/Calls/ParameterMapping.cs
index 595a532f..a803369a 100644
--- a/Dynamic/Actions/Calls/ParameterMapping.cs
+++ b/Dynamic/Actions/Calls/ParameterMapping.cs
@@ -10,9 +10,9 @@
using System.Reflection;
using System.Runtime.CompilerServices;
-using Microsoft.Scripting.Utils;
+using Riverside.Scripting.Utils;
-namespace Microsoft.Scripting.Actions.Calls {
+namespace Riverside.Scripting.Actions.Calls {
public sealed class ParameterMapping {
private readonly OverloadResolver _resolver;
private readonly IList _argNames;
@@ -109,20 +109,20 @@ public void MapParameter(ParameterInfo pi) {
indexForArgBuilder = ArgIndex++;
} else {
// keyword argument, we just tell the simple arg builder to consume arg 0.
- // KeywordArgBuilder will then pass in the correct single argument based
+ // KeywordArgBuilder will then pass in the correct single argument based
// upon the actual argument number provided by the user.
indexForArgBuilder = 0;
}
// if the parameter is default we need to build a default arg builder and then
- // build a reduced method at the end.
+ // build a reduced method at the end.
if (!pi.IsMandatory()) {
// We need to build the default builder even if we have a parameter for it already to
- // get good consistency of our error messages. But consider a method like
+ // get good consistency of our error messages. But consider a method like
// def foo(a=1, b=2) and the user calls it as foo(b=3). Then adding the default
// value breaks an otherwise valid call. This is because we only generate MethodCandidates
// filling in the defaults from right to left (so the method - 1 arg requires a,
- // and the method minus 2 args requires b). So we only add the default if it's
+ // and the method minus 2 args requires b). So we only add the default if it's
// a positional arg or we don't already have a default value.
if (nameIndex == -1 || !_hasDefaults) {
_defaultArguments.Add(new DefaultArgBuilder(pi));
@@ -164,10 +164,10 @@ private void MapParameterReduceByRef(ParameterInfo pi) {
Debug.Assert(_returnArgs != null);
// TODO:
- // Is this reduction necessary? What if
- // 1) we had an implicit conversion StrongBox -> T& and
+ // Is this reduction necessary? What if
+ // 1) we had an implicit conversion StrongBox -> T& and
// 2) all out parameters were treated as optional StrongBox parameters? (if not present we return the result in a return value)
-
+
int indexForArgBuilder = 0;
int nameIndex = -1;
@@ -295,7 +295,7 @@ private ReturnBuilder MakeReturnBuilder(BitArray specialParameters) {
ReturnBuilder returnBuilder = (_returnArgs != null) ?
new ByRefReturnBuilder(_returnArgs) :
new ReturnBuilder(Overload.ReturnType);
-
+
if (_argNames.Count > 0 && _resolver.AllowMemberInitialization(Overload)) {
List unusedNames = GetUnusedArgNames(specialParameters);
List bindableMembers = GetBindableMembers(returnBuilder.ReturnType, unusedNames);
@@ -305,7 +305,7 @@ private ReturnBuilder MakeReturnBuilder(BitArray specialParameters) {
foreach (MemberInfo mi in bindableMembers) {
PropertyInfo pi = mi as PropertyInfo;
var type = (pi != null) ? pi.PropertyType : ((FieldInfo)mi).FieldType;
-
+
_parameters.Add(new ParameterWrapper(null, type, mi.Name, ParameterBindingFlags.None));
nameIndices.Add(_argNames.IndexOf(mi.Name));
}
diff --git a/Dynamic/Actions/Calls/ParameterWrapper.cs b/Dynamic/Actions/Calls/ParameterWrapper.cs
index 7a0f1bc2..b7fcf462 100644
--- a/Dynamic/Actions/Calls/ParameterWrapper.cs
+++ b/Dynamic/Actions/Calls/ParameterWrapper.cs
@@ -7,9 +7,9 @@
using System.Diagnostics;
using System.Reflection;
-using Microsoft.Scripting.Utils;
+using Riverside.Scripting.Utils;
-namespace Microsoft.Scripting.Actions.Calls {
+namespace Riverside.Scripting.Actions.Calls {
[Flags]
public enum ParameterBindingFlags {
None = 0,
@@ -25,7 +25,7 @@ public enum ParameterBindingFlags {
/// of a method with byref parameters will be represented using a ParameterWrapper of the underlying
/// element type, since the logical view of the byref-reduced signature is that the argument will be
/// passed by value (and the updated value is included in the return value).
- ///
+ ///
/// Contrast this with ArgBuilder which represents the real physical argument passed to the method.
///
public sealed class ParameterWrapper {
@@ -42,8 +42,8 @@ public ParameterWrapper(Type type, string name, bool prohibitNull)
}
[Obsolete("Use ParameterBindingAttributes overload")]
- public ParameterWrapper(ParameterInfo info, Type type, string name, bool prohibitNull, bool isParams, bool isParamsDict, bool isHidden)
- : this(info, type, name,
+ public ParameterWrapper(ParameterInfo info, Type type, string name, bool prohibitNull, bool isParams, bool isParamsDict, bool isHidden)
+ : this(info, type, name,
(prohibitNull ? ParameterBindingFlags.ProhibitNull : 0) |
(isParams ? ParameterBindingFlags.IsParamArray : 0) |
(isParamsDict ? ParameterBindingFlags.IsParamDictionary : 0) |
@@ -52,7 +52,7 @@ public ParameterWrapper(ParameterInfo info, Type type, string name, bool prohibi
public ParameterWrapper(ParameterInfo info, Type type, string name, ParameterBindingFlags flags) {
ContractUtils.RequiresNotNull(type, nameof(type));
-
+
Type = type;
ParameterInfo = info;
_flags = flags;
@@ -108,8 +108,8 @@ internal static int IndexOfParamsArray(IList parameters) {
///
internal ParameterWrapper Expand() {
Debug.Assert(IsParamsArray);
- return new ParameterWrapper(ParameterInfo, Type.GetElementType(), null,
- (ProhibitNullItems ? ParameterBindingFlags.ProhibitNull : 0) |
+ return new ParameterWrapper(ParameterInfo, Type.GetElementType(), null,
+ (ProhibitNullItems ? ParameterBindingFlags.ProhibitNull : 0) |
(IsHidden ? ParameterBindingFlags.IsHidden : 0)
);
}
diff --git a/Dynamic/Actions/Calls/ParamsArgBuilder.cs b/Dynamic/Actions/Calls/ParamsArgBuilder.cs
index f06e09b1..de140253 100644
--- a/Dynamic/Actions/Calls/ParamsArgBuilder.cs
+++ b/Dynamic/Actions/Calls/ParamsArgBuilder.cs
@@ -8,17 +8,17 @@
using System.Linq.Expressions;
using System.Reflection;
-using Microsoft.Scripting.Utils;
-using AstUtils = Microsoft.Scripting.Ast.Utils;
+using Riverside.Scripting.Utils;
+using AstUtils = Riverside.Scripting.Ast.Utils;
-namespace Microsoft.Scripting.Actions.Calls {
+namespace Riverside.Scripting.Actions.Calls {
internal sealed class ParamsArgBuilder : ArgBuilder {
private readonly int _start;
private readonly int _expandedCount;
private readonly Type _elementType;
- internal ParamsArgBuilder(ParameterInfo info, Type elementType, int start, int expandedCount)
+ internal ParamsArgBuilder(ParameterInfo info, Type elementType, int start, int expandedCount)
: base(info) {
Assert.NotNull(elementType);
@@ -30,7 +30,7 @@ internal ParamsArgBuilder(ParameterInfo info, Type elementType, int start, int e
_elementType = elementType;
}
- // Consumes all expanded arguments.
+ // Consumes all expanded arguments.
// Collapsed arguments are fetched from resolver provided storage, not from actual argument expressions.
public override int ConsumedArgumentCount => _expandedCount;
@@ -67,11 +67,11 @@ protected internal override Expression ToExpression(OverloadResolver resolver, R
Expression.ArrayAccess(arrayVariable, Expression.Add(AstUtils.Constant(itemIndex), indexVariable)),
resolver.Convert(
new DynamicMetaObject(
- resolver.GetSplattedItemExpression(Expression.Add(AstUtils.Constant(splatIndex - firstSplatted), indexVariable)),
+ resolver.GetSplattedItemExpression(Expression.Add(AstUtils.Constant(splatIndex - firstSplatted), indexVariable)),
BindingRestrictions.Empty
),
null,
- ParameterInfo,
+ ParameterInfo,
_elementType
)
),
@@ -86,7 +86,7 @@ protected internal override Expression ToExpression(OverloadResolver resolver, R
}
Debug.Assert(!hasBeenUsed[i]);
- hasBeenUsed[i] = true;
+ hasBeenUsed[i] = true;
result[e++] = Expression.Assign(
Expression.ArrayAccess(arrayVariable, AstUtils.Constant(itemIndex++)),
diff --git a/Dynamic/Actions/Calls/ParamsDictArgBuilder.cs b/Dynamic/Actions/Calls/ParamsDictArgBuilder.cs
index dbab56b0..1b25ee5e 100644
--- a/Dynamic/Actions/Calls/ParamsDictArgBuilder.cs
+++ b/Dynamic/Actions/Calls/ParamsDictArgBuilder.cs
@@ -9,11 +9,11 @@
using System.Linq.Expressions;
using System.Reflection;
-using Microsoft.Scripting.Runtime;
-using Microsoft.Scripting.Utils;
-using AstUtils = Microsoft.Scripting.Ast.Utils;
+using Riverside.Scripting.Runtime;
+using Riverside.Scripting.Utils;
+using AstUtils = Riverside.Scripting.Ast.Utils;
-namespace Microsoft.Scripting.Actions.Calls {
+namespace Riverside.Scripting.Actions.Calls {
///
/// Builds the parameter for a params dictionary argument - this collects all the extra name/value
@@ -24,7 +24,7 @@ internal sealed class ParamsDictArgBuilder : ArgBuilder {
private readonly int[] _nameIndexes;
private readonly int _argIndex;
- public ParamsDictArgBuilder(ParameterInfo info, int argIndex, string[] names, int[] nameIndexes)
+ public ParamsDictArgBuilder(ParameterInfo info, int argIndex, string[] names, int[] nameIndexes)
: base(info) {
Assert.NotNull(info, names, nameIndexes);
diff --git a/Dynamic/Actions/Calls/ReferenceArgBuilder.cs b/Dynamic/Actions/Calls/ReferenceArgBuilder.cs
index bc887c84..8f101951 100644
--- a/Dynamic/Actions/Calls/ReferenceArgBuilder.cs
+++ b/Dynamic/Actions/Calls/ReferenceArgBuilder.cs
@@ -8,11 +8,11 @@
using System.Reflection;
using System.Runtime.CompilerServices;
-using Microsoft.Scripting.Utils;
-using AstUtils = Microsoft.Scripting.Ast.Utils;
-using RuntimeHelpers = Microsoft.Scripting.Runtime.ScriptingRuntimeHelpers;
+using Riverside.Scripting.Utils;
+using AstUtils = Riverside.Scripting.Ast.Utils;
+using RuntimeHelpers = Riverside.Scripting.Runtime.ScriptingRuntimeHelpers;
-namespace Microsoft.Scripting.Actions.Calls {
+namespace Riverside.Scripting.Actions.Calls {
///
/// An argument that the user wants to explicitly pass by-reference (with copy-in copy-out semantics).
diff --git a/Dynamic/Actions/Calls/RestrictedArguments.cs b/Dynamic/Actions/Calls/RestrictedArguments.cs
index 14930465..f89c0f0c 100644
--- a/Dynamic/Actions/Calls/RestrictedArguments.cs
+++ b/Dynamic/Actions/Calls/RestrictedArguments.cs
@@ -8,9 +8,9 @@
using System.Diagnostics;
using System.Dynamic;
-using Microsoft.Scripting.Utils;
+using Riverside.Scripting.Utils;
-namespace Microsoft.Scripting.Actions.Calls {
+namespace Riverside.Scripting.Actions.Calls {
public sealed class RestrictedArguments {
private readonly DynamicMetaObject[] _objects;
private readonly Type[] _types;
diff --git a/Dynamic/Actions/Calls/ReturnBuilder.cs b/Dynamic/Actions/Calls/ReturnBuilder.cs
index ac97a85e..cbaf4ec7 100644
--- a/Dynamic/Actions/Calls/ReturnBuilder.cs
+++ b/Dynamic/Actions/Calls/ReturnBuilder.cs
@@ -7,7 +7,7 @@
using System.Diagnostics;
using System.Linq.Expressions;
-namespace Microsoft.Scripting.Actions.Calls {
+namespace Riverside.Scripting.Actions.Calls {
internal class ReturnBuilder {
///
diff --git a/Dynamic/Actions/Calls/ReturnReferenceArgBuilder.cs b/Dynamic/Actions/Calls/ReturnReferenceArgBuilder.cs
index ba7f657b..32bfd6f7 100644
--- a/Dynamic/Actions/Calls/ReturnReferenceArgBuilder.cs
+++ b/Dynamic/Actions/Calls/ReturnReferenceArgBuilder.cs
@@ -5,7 +5,7 @@
using System.Linq.Expressions;
using System.Reflection;
-namespace Microsoft.Scripting.Actions.Calls {
+namespace Riverside.Scripting.Actions.Calls {
///
/// Builds a parameter for a reference argument when a StrongBox has not been provided. The
diff --git a/Dynamic/Actions/Calls/SimpleArgBuilder.cs b/Dynamic/Actions/Calls/SimpleArgBuilder.cs
index f547bd3a..d0d81e9a 100644
--- a/Dynamic/Actions/Calls/SimpleArgBuilder.cs
+++ b/Dynamic/Actions/Calls/SimpleArgBuilder.cs
@@ -7,9 +7,9 @@
using System.Linq.Expressions;
using System.Reflection;
-using Microsoft.Scripting.Utils;
+using Riverside.Scripting.Utils;
-namespace Microsoft.Scripting.Actions.Calls {
+namespace Riverside.Scripting.Actions.Calls {
///
/// SimpleArgBuilder produces the value produced by the user as the argument value. It
/// also tracks information about the original parameter and is used to create extended
@@ -32,7 +32,7 @@ public SimpleArgBuilder(Type parameterType, int index, bool isParams, bool isPar
public SimpleArgBuilder(ParameterInfo info, int index)
: this(info, info.ParameterType, index, info.IsParamArray(), info.IsParamDictionary()) {
}
-
+
public SimpleArgBuilder(ParameterInfo info, Type parameterType, int index, bool isParams, bool isParamsDict)
: base(info) {
ContractUtils.Requires(index >= 0);
@@ -67,7 +67,7 @@ protected internal override Expression ToExpression(OverloadResolver resolver, R
Debug.Assert(hasBeenUsed.Length == args.Length);
Debug.Assert(Index < args.Length);
Debug.Assert(!hasBeenUsed[Index]);
-
+
hasBeenUsed[Index] = true;
return resolver.Convert(args.GetObject(Index), args.GetType(Index), ParameterInfo, _parameterType);
}
diff --git a/Dynamic/Actions/Calls/TypeInferer.cs b/Dynamic/Actions/Calls/TypeInferer.cs
index 2e5f9ec7..e1c59eca 100644
--- a/Dynamic/Actions/Calls/TypeInferer.cs
+++ b/Dynamic/Actions/Calls/TypeInferer.cs
@@ -9,11 +9,11 @@
using System.Reflection;
using System.Runtime.CompilerServices;
-using Microsoft.Scripting.Generation;
-using Microsoft.Scripting.Runtime;
-using Microsoft.Scripting.Utils;
+using Riverside.Scripting.Generation;
+using Riverside.Scripting.Runtime;
+using Riverside.Scripting.Utils;
-namespace Microsoft.Scripting.Actions.Calls {
+namespace Riverside.Scripting.Actions.Calls {
public static class TypeInferer {
private static ArgumentInputs EnsureInputs(Dictionary dict, Type type) {
if (!dict.TryGetValue(type, out ArgumentInputs res)) {
@@ -61,7 +61,7 @@ internal static MethodCandidate InferGenericMethod(ApplicableCandidate/*!*/ cand
// not all types we're inferred
return null;
}
-
+
OverloadInfo newMethod = target.MakeGenericMethod(genArgs);
List newWrappers = CreateNewWrappers(candidate.Method, newMethod, target);
@@ -228,9 +228,9 @@ private static bool IsDependentConstraint(Dictionary> dependenc
/// Builds a mapping based upon generic parameter constraints between related generic
/// parameters. This is then used to sort the generic parameters so that we can process
/// the least dependent parameters first. For example given the method:
- ///
- /// void Foo{T0, T1}(T0 x, T1 y) where T0 : T1
- ///
+ ///
+ /// void Foo{T0, T1}(T0 x, T1 y) where T0 : T1
+ ///
/// We need to first infer the type information for T1 before we infer the type information
/// for T0 so that we can ensure the constraints are correct.
///
@@ -309,12 +309,12 @@ private static void AddOneInput(Dictionary inputs, Dynamic
/// Walks the nested generic hierarchy to construct all of the generic parameters referred
/// to by this type. For example if getting the generic parameters for the x parameter on
/// the method:
- ///
+ ///
/// void Foo{T0, T1}(Dictionary{T0, T1} x);
- ///
+ ///
/// We would add both typeof(T0) and typeof(T1) to the list of generic arguments.
///
- private static void CollectGenericParameters(Type type, List containedGenArgs) {
+ private static void CollectGenericParameters(Type type, List containedGenArgs) {
if (type.IsGenericParameter) {
if (!containedGenArgs.Contains(type)) {
containedGenArgs.Add(type);
@@ -335,9 +335,9 @@ private static void CollectGenericParameters(Type type, List containedGenA
///
/// Maps a single type parameter to the possible parameters and DynamicMetaObjects
/// we can get inference from. For example for the signature:
- ///
+ ///
/// void Foo{T0, T1}(T0 x, T1 y, IList{T1} z);
- ///
+ ///
/// We would have one ArgumentInput for T0 which holds onto the DMO providing the argument
/// value for x. We would also have one ArgumentInput for T1 which holds onto the 2 DMOs
/// for y and z. Associated with y would be a GenericParameterInferer and associated with
@@ -388,7 +388,7 @@ public Type GetBestType(OverloadResolver/*!*/ resolver, Dictionary/*
/// Provides generic type inference for a single parameter.
///
///
- /// For example:
+ /// For example:
/// M{T}(T x)
/// M{T}(IList{T} x)
/// M{T}(ref T x)
@@ -425,7 +425,7 @@ internal static Type GetInferedType(OverloadResolver/*!*/ resolver, Type/*!*/ ge
/// Provides generic type inference for a single parameter.
///
///
- /// For example:
+ /// For example:
/// M{T}(T x)
/// M{T}(IList{T} x)
/// M{T}(ref T x)
@@ -470,7 +470,7 @@ public static Type GetInferedType(Type/*!*/ genericParameter, Type/*!*/ paramete
}
argType = argType.BaseType;
}
-
+
return null;
}
@@ -500,7 +500,7 @@ private static Type GetInferedTypeForInterface(Type/*!*/ genericParameter, Type/
///
/// Checks if the constraints are violated by the given input for the specified generic method parameter.
- ///
+ ///
/// This method must be supplied with a mapping for any dependent generic method type parameters which
/// this one can be constrained to. For example for the signature "void Foo{T0, T1}(T0 x, T1 y) where T0 : T1".
/// we cannot know if the constraints are violated unless we know what we have calculated T1 to be.
@@ -516,7 +516,7 @@ private static Type MatchGenericParameter(Type genericParameter, Type closedType
///
/// Finds all occurences of genericParameter in openType and the corresponding concrete types in closedType.
- /// Returns true iff all occurences of the generic parameter in the open type correspond to the same concrete type in the closed type
+ /// Returns true iff all occurences of the generic parameter in the open type correspond to the same concrete type in the closed type
/// and this type satisfies given constraints. Returns the concrete type in match if so.
///
private static bool MatchGenericParameter(Type genericParameter, Type closedType, Type openType, Dictionary binding, ref Type match) {
diff --git a/Dynamic/Actions/ComboActionRewriter.cs b/Dynamic/Actions/ComboActionRewriter.cs
index adc916cd..3667df9b 100644
--- a/Dynamic/Actions/ComboActionRewriter.cs
+++ b/Dynamic/Actions/ComboActionRewriter.cs
@@ -9,7 +9,7 @@
using System.Linq.Expressions;
using System.Reflection;
-namespace Microsoft.Scripting.Actions {
+namespace Riverside.Scripting.Actions {
///
/// A tree rewriter which will find dynamic sites which consume dynamic sites and
/// turn them into a single combo dynamic site. The combo dynamic site will then run the
@@ -118,7 +118,7 @@ protected override Expression VisitDynamic(DynamicExpression node) {
inputs.Add(rewritten);
} else {
// this argument is doing something we don't understand - we have to leave
- // it as is (an input we consume) and all the remaining arguments need to be
+ // it as is (an input we consume) and all the remaining arguments need to be
// evaluated normally as this could have side effects on them.
foundSideEffectingArgs = true;
myInfo.Add(ParameterMappingInfo.Parameter(inputs.Count));
diff --git a/Dynamic/Actions/ComboBinder.cs b/Dynamic/Actions/ComboBinder.cs
index 2af1a56d..58f7b37f 100644
--- a/Dynamic/Actions/ComboBinder.cs
+++ b/Dynamic/Actions/ComboBinder.cs
@@ -9,9 +9,9 @@
using System.Runtime.CompilerServices;
using System.Text;
-using Microsoft.Scripting.Utils;
+using Riverside.Scripting.Utils;
-namespace Microsoft.Scripting.Actions {
+namespace Riverside.Scripting.Actions {
///
/// A binder which can combine multiple binders into a single dynamic site. The creator
/// of this needs to perform the mapping of parameters, constants, and sub-site expressions
@@ -52,7 +52,7 @@ public override DynamicMetaObject Bind(DynamicMetaObject target, params DynamicM
restrictions = restrictions.Merge(next.Restrictions);
if (next.Expression.NodeType == ExpressionType.Throw) {
- // end of the line... the expression is throwing, none of the other
+ // end of the line... the expression is throwing, none of the other
// binders will have an opportunity to run.
steps.Add(next.Expression);
break;
diff --git a/Dynamic/Actions/ConditionalBuilder.cs b/Dynamic/Actions/ConditionalBuilder.cs
index 9cfefcec..5665a1ac 100644
--- a/Dynamic/Actions/ConditionalBuilder.cs
+++ b/Dynamic/Actions/ConditionalBuilder.cs
@@ -7,10 +7,10 @@
using System.Dynamic;
using System.Linq.Expressions;
-using Microsoft.Scripting.Utils;
-using AstUtils = Microsoft.Scripting.Ast.Utils;
+using Riverside.Scripting.Utils;
+using AstUtils = Riverside.Scripting.Ast.Utils;
-namespace Microsoft.Scripting.Actions {
+namespace Riverside.Scripting.Actions {
///
/// Builds up a series of conditionals when the False clause isn't yet known. We can
diff --git a/Dynamic/Actions/ConstructorTracker.cs b/Dynamic/Actions/ConstructorTracker.cs
index 83db6bb2..c9315b89 100644
--- a/Dynamic/Actions/ConstructorTracker.cs
+++ b/Dynamic/Actions/ConstructorTracker.cs
@@ -5,7 +5,7 @@
using System;
using System.Reflection;
-namespace Microsoft.Scripting.Actions {
+namespace Riverside.Scripting.Actions {
public class ConstructorTracker : MemberTracker {
private readonly ConstructorInfo _ctor;
diff --git a/Dynamic/Actions/ConversionResultKind.cs b/Dynamic/Actions/ConversionResultKind.cs
index fc383580..376182d4 100644
--- a/Dynamic/Actions/ConversionResultKind.cs
+++ b/Dynamic/Actions/ConversionResultKind.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
-namespace Microsoft.Scripting.Actions {
+namespace Riverside.Scripting.Actions {
///
/// Determines the result of a conversion action. The result can either result in an exception, a value that
/// has been successfully converted or default(T), or a true/false result indicating if the value can be converted.
@@ -18,7 +18,7 @@ public enum ConversionResultKind {
ExplicitCast,
///
/// Attempts to perform available implicit conversions and returns default(ReturnType) if no conversions can be performed.
- ///
+ ///
/// If the return type of the rule is a value type then the return value will be zero-initialized. If the return type
/// of the rule is object or another class then the return type will be null (even if the conversion is to a value type).
/// This enables ImplicitTry to be used to do TryConvertTo even if the type is value type (and the difference between
@@ -26,9 +26,9 @@ public enum ConversionResultKind {
///
ImplicitTry,
///
- /// Attempts to perform available implicit and explicit conversions and returns default(ReturnType) if no conversions
+ /// Attempts to perform available implicit and explicit conversions and returns default(ReturnType) if no conversions
/// can be performed.
- ///
+ ///
/// If the return type of the rule is a value type then the return value will be zero-initialized. If the return type
/// of the rule is object or another class then the return type will be null (even if the conversion is to a value type).
/// This enables ExplicitTry to be used to do TryConvertTo even if the type is value type (and the difference between
diff --git a/Dynamic/Actions/CustomTracker.cs b/Dynamic/Actions/CustomTracker.cs
index 8e4d5eb4..0a659c3a 100644
--- a/Dynamic/Actions/CustomTracker.cs
+++ b/Dynamic/Actions/CustomTracker.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
-namespace Microsoft.Scripting.Actions {
+namespace Riverside.Scripting.Actions {
///
/// A custom member tracker which enables languages to plug in arbitrary
/// members into the lookup process.
diff --git a/Dynamic/Actions/DefaultBinder.Conversions.cs b/Dynamic/Actions/DefaultBinder.Conversions.cs
index 418f3a67..d1ff5f30 100644
--- a/Dynamic/Actions/DefaultBinder.Conversions.cs
+++ b/Dynamic/Actions/DefaultBinder.Conversions.cs
@@ -8,13 +8,13 @@
using System.Linq.Expressions;
using System.Reflection;
-using Microsoft.Scripting.Actions.Calls;
-using Microsoft.Scripting.Generation;
-using Microsoft.Scripting.Runtime;
-using Microsoft.Scripting.Utils;
-using AstUtils = Microsoft.Scripting.Ast.Utils;
+using Riverside.Scripting.Actions.Calls;
+using Riverside.Scripting.Generation;
+using Riverside.Scripting.Runtime;
+using Riverside.Scripting.Utils;
+using AstUtils = Riverside.Scripting.Ast.Utils;
-namespace Microsoft.Scripting.Actions {
+namespace Riverside.Scripting.Actions {
public partial class DefaultBinder : ActionBinder {
public DynamicMetaObject ConvertTo(Type toType, ConversionResultKind kind, DynamicMetaObject arg) {
@@ -30,11 +30,11 @@ public DynamicMetaObject ConvertTo(Type toType, ConversionResultKind kind, Dynam
ContractUtils.RequiresNotNull(arg, nameof(arg));
// try all the conversions - first look for conversions against the expression type,
- // these can be done w/o any additional tests. Then look for conversions against the
+ // these can be done w/o any additional tests. Then look for conversions against the
// restricted type.
BindingRestrictions typeRestrictions = arg.Restrictions.Merge(BindingRestrictionsHelpers.GetRuntimeTypeRestriction(arg.Expression, arg.GetLimitType()));
- DynamicMetaObject res =
+ DynamicMetaObject res =
TryConvertToObject(toType, arg.Expression.Type, arg, typeRestrictions) ??
TryAllConversions(resolverFactory, toType, kind, arg.Expression.Type, typeRestrictions, arg) ??
TryAllConversions(resolverFactory, toType, kind, arg.GetLimitType(), typeRestrictions, arg) ??
@@ -133,7 +133,7 @@ private DynamicMetaObject TryOneConversion(ConversionResultKind kind, Type toTyp
}
///
- /// Checks if any of the members of the MemberGroup provide the applicable conversion and
+ /// Checks if any of the members of the MemberGroup provide the applicable conversion and
/// if so uses it to build a conversion rule.
///
private static DynamicMetaObject TryUserDefinedConversion(ConversionResultKind kind, Type toType, Type type, MemberGroup conversions, bool isImplicit, BindingRestrictions restrictions, DynamicMetaObject arg) {
@@ -345,15 +345,15 @@ private static DynamicMetaObject MakeSimpleConversionTarget(Type toType, Binding
/*
if (toType.IsValueType && _rule.ReturnType == typeof(object) && Expression.Type == typeof(object)) {
- // boxed value type is being converted back to object. We've done
- // the type check, there's no need to unbox & rebox the value. infact
+ // boxed value type is being converted back to object. We've done
+ // the type check, there's no need to unbox & rebox the value. infact
// it breaks calls on instance methods so we need to avoid it.
_rule.Target =
_rule.MakeReturn(
Binder,
Expression
);
- }
+ }
* */
}
@@ -477,9 +477,9 @@ private static Expression GetExtensibleValue(Type extType, DynamicMetaObject arg
}
///
- /// Helper that checks if fromType is an Extensible of T or a subtype of
+ /// Helper that checks if fromType is an Extensible of T or a subtype of
/// Extensible of T and if so returns the T. Otherwise it returns fromType.
- ///
+ ///
/// This is used to treat extensible types the same as their underlying types.
///
private static Type GetUnderlyingType(Type fromType) {
diff --git a/Dynamic/Actions/DefaultBinder.DeleteMember.cs b/Dynamic/Actions/DefaultBinder.DeleteMember.cs
index 5139f30b..f6c8e5e9 100644
--- a/Dynamic/Actions/DefaultBinder.DeleteMember.cs
+++ b/Dynamic/Actions/DefaultBinder.DeleteMember.cs
@@ -6,13 +6,13 @@
using System.Dynamic;
using System.Reflection;
-using Microsoft.Scripting.Actions.Calls;
-using Microsoft.Scripting.Runtime;
-using Microsoft.Scripting.Utils;
+using Riverside.Scripting.Actions.Calls;
+using Riverside.Scripting.Runtime;
+using Riverside.Scripting.Utils;
-using AstUtils = Microsoft.Scripting.Ast.Utils;
+using AstUtils = Riverside.Scripting.Ast.Utils;
-namespace Microsoft.Scripting.Actions {
+namespace Riverside.Scripting.Actions {
public partial class DefaultBinder : ActionBinder {
public DynamicMetaObject DeleteMember(string name, DynamicMetaObject target) {
@@ -85,7 +85,7 @@ private static Type GetDeclaringMemberType(MemberGroup group) {
private void MakePropertyDeleteStatement(SetOrDeleteMemberInfo delInfo, DynamicMetaObject instance, MethodInfo delete) {
delInfo.Body.FinishCondition(
- instance == null ?
+ instance == null ?
MakeCallExpression(delInfo.ResolutionFactory, delete) :
MakeCallExpression(delInfo.ResolutionFactory, delete, instance)
);
diff --git a/Dynamic/Actions/DefaultBinder.GetMember.cs b/Dynamic/Actions/DefaultBinder.GetMember.cs
index 0a5d3ace..a066ad42 100644
--- a/Dynamic/Actions/DefaultBinder.GetMember.cs
+++ b/Dynamic/Actions/DefaultBinder.GetMember.cs
@@ -9,16 +9,16 @@
using System.Reflection;
using System.Runtime.CompilerServices;
-using Microsoft.Scripting.Actions.Calls;
-using Microsoft.Scripting.Runtime;
-using Microsoft.Scripting.Utils;
-using AstUtils = Microsoft.Scripting.Ast.Utils;
+using Riverside.Scripting.Actions.Calls;
+using Riverside.Scripting.Runtime;
+using Riverside.Scripting.Utils;
+using AstUtils = Riverside.Scripting.Ast.Utils;
-namespace Microsoft.Scripting.Actions {
+namespace Riverside.Scripting.Actions {
public partial class DefaultBinder : ActionBinder {
///
- /// Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod
+ /// Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod
/// GetBoundMember, and StrongBox instances.
///
///
@@ -30,7 +30,7 @@ public partial class DefaultBinder : ActionBinder {
///
///
/// Returns a DynamicMetaObject which represents the value that will be returned when the member is accessed.
- ///
+ ///
/// The returned DynamicMetaObject may be strongly typed to a value type which needs boxing before being
/// returned from a standard DLR GetMemberBinder. The language is responsible for performing any boxing
/// so that it has an opportunity to perform custom boxing.
@@ -46,7 +46,7 @@ public DynamicMetaObject GetMember(string name, DynamicMetaObject target) {
}
///
- /// Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod
+ /// Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod
/// GetBoundMember, and StrongBox instances.
///
///
@@ -61,7 +61,7 @@ public DynamicMetaObject GetMember(string name, DynamicMetaObject target) {
///
///
/// Returns a DynamicMetaObject which represents the value that will be returned when the member is accessed.
- ///
+ ///
/// The returned DynamicMetaObject may be strongly typed to a value type which needs boxing before being
/// returned from a standard DLR GetMemberBinder. The language is responsible for performing any boxing
/// so that it has an opportunity to perform custom boxing.
@@ -77,7 +77,7 @@ public DynamicMetaObject GetMember(string name, DynamicMetaObject target, Overlo
}
///
- /// Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod
+ /// Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod
/// GetBoundMember, and StrongBox instances.
///
///
@@ -99,7 +99,7 @@ public DynamicMetaObject GetMember(string name, DynamicMetaObject target, Overlo
///
///
/// Returns a DynamicMetaObject which represents the value that will be returned when the member is accessed.
- ///
+ ///
/// The returned DynamicMetaObject may be strongly typed to a value type which needs boxing before being
/// returned from a standard DLR GetMemberBinder. The language is responsible for performing any boxing
/// so that it has an opportunity to perform custom boxing.
@@ -121,7 +121,7 @@ public DynamicMetaObject GetMember(string name, DynamicMetaObject target, Overlo
}
///
- /// Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod
+ /// Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod
/// GetBoundMember, and StrongBox instances.
///
///
@@ -140,7 +140,7 @@ public DynamicMetaObject GetMember(string name, DynamicMetaObject target, Overlo
///
///
/// Returns a DynamicMetaObject which represents the value that will be returned when the member is accessed.
- ///
+ ///
/// The returned DynamicMetaObject may be strongly typed to a value type which needs boxing before being
/// returned from a standard DLR GetMemberBinder. The language is responsible for performing any boxing
/// so that it has an opportunity to perform custom boxing.
@@ -166,7 +166,7 @@ private DynamicMetaObject MakeGetMemberTarget(GetMemberInfo getMemInfo, DynamicM
DynamicMetaObject self = target;
target = target.Restrict(target.GetLimitType());
- // Specially recognized types: TypeTracker, NamespaceTracker, and StrongBox.
+ // Specially recognized types: TypeTracker, NamespaceTracker, and StrongBox.
// TODO: TypeTracker and NamespaceTracker should technically be IDO's.
MemberGroup members = MemberGroup.EmptyGroup;
if (typeof(TypeTracker).IsAssignableFrom(targetType)) {
@@ -253,7 +253,7 @@ private void MakeSuccessfulMemberAccess(GetMemberInfo getMemInfo, DynamicMetaObj
MakeTypeBody(getMemInfo, selfType, members);
break;
case TrackerTypes.Method:
- // turn into a MethodGroup
+ // turn into a MethodGroup
MakeGenericBodyWorker(getMemInfo, selfType, ReflectionCache.GetMethodGroup(getMemInfo.Name, members), self);
break;
case TrackerTypes.Event:
@@ -279,7 +279,7 @@ private void MakeSuccessfulMemberAccess(GetMemberInfo getMemInfo, DynamicMetaObj
private void MakeGenericBody(GetMemberInfo getMemInfo, Type instanceType, MemberGroup members, DynamicMetaObject instance) {
MemberTracker bestMember = members[0];
if (members.Count > 1) {
- // if we were given multiple members pick the member closest to the type...
+ // if we were given multiple members pick the member closest to the type...
Type bestMemberDeclaringType = members[0].DeclaringType;
for (int i = 1; i < members.Count; i++) {
diff --git a/Dynamic/Actions/DefaultBinder.Invoke.cs b/Dynamic/Actions/DefaultBinder.Invoke.cs
index e8966fc4..7dad711e 100644
--- a/Dynamic/Actions/DefaultBinder.Invoke.cs
+++ b/Dynamic/Actions/DefaultBinder.Invoke.cs
@@ -9,13 +9,13 @@
using System.Linq.Expressions;
using System.Reflection;
-using Microsoft.Scripting.Actions.Calls;
-using Microsoft.Scripting.Generation;
-using Microsoft.Scripting.Runtime;
-using Microsoft.Scripting.Utils;
-using AstUtils = Microsoft.Scripting.Ast.Utils;
+using Riverside.Scripting.Actions.Calls;
+using Riverside.Scripting.Generation;
+using Riverside.Scripting.Runtime;
+using Riverside.Scripting.Utils;
+using AstUtils = Riverside.Scripting.Ast.Utils;
-namespace Microsoft.Scripting.Actions {
+namespace Riverside.Scripting.Actions {
public partial class DefaultBinder : ActionBinder {
// TODO: Rename Call to Invoke, obsolete Call
@@ -33,7 +33,7 @@ public partial class DefaultBinder : ActionBinder {
public DynamicMetaObject Call(CallSignature signature, DynamicMetaObject target, params DynamicMetaObject[] args) {
return Call(signature, new DefaultOverloadResolverFactory(this), target, args);
}
-
+
///
/// Provides default binding for performing a call on the specified meta objects.
///
@@ -108,8 +108,8 @@ private DynamicMetaObject MakeMetaMethodCall(CallSignature signature, OverloadRe
#region Target acquisition
///
- /// Gets a TargetInfo object for performing a call on this object.
- ///
+ /// Gets a TargetInfo object for performing a call on this object.
+ ///
/// If this object is a delegate we bind to the Invoke method.
/// If this object is a MemberGroup or MethodGroup we bind to the methods in the member group.
/// If this object is a BoundMemberTracker we bind to the methods with the bound instance.
@@ -143,8 +143,8 @@ private static TargetInfo TryGetMethodGroupTargets(DynamicMetaObject target, Dyn
}
///
- /// Binds to the methods in a member group.
- ///
+ /// Binds to the methods in a member group.
+ ///
/// TODO: We should really only have either MemberGroup or MethodGroup, not both.
///
private static TargetInfo TryGetMemberGroupTargets(DynamicMetaObject target, DynamicMetaObject[] args, MemberGroup mg) {
diff --git a/Dynamic/Actions/DefaultBinder.MethodCalls.cs b/Dynamic/Actions/DefaultBinder.MethodCalls.cs
index 2edd09fb..9a270214 100644
--- a/Dynamic/Actions/DefaultBinder.MethodCalls.cs
+++ b/Dynamic/Actions/DefaultBinder.MethodCalls.cs
@@ -10,13 +10,13 @@
using System.Linq.Expressions;
using System.Reflection;
-using Microsoft.Scripting.Actions.Calls;
-using Microsoft.Scripting.Generation;
-using Microsoft.Scripting.Runtime;
-using Microsoft.Scripting.Utils;
-using AstUtils = Microsoft.Scripting.Ast.Utils;
+using Riverside.Scripting.Actions.Calls;
+using Riverside.Scripting.Generation;
+using Riverside.Scripting.Runtime;
+using Riverside.Scripting.Utils;
+using AstUtils = Riverside.Scripting.Ast.Utils;
-namespace Microsoft.Scripting.Actions {
+namespace Riverside.Scripting.Actions {
public partial class DefaultBinder : ActionBinder {
@@ -95,7 +95,7 @@ out BindingTarget _
/// The resulting binding target which can be used for producing error information.
/// The name of the method or null to use the name from targets.
/// A meta object which results from the call.
- public DynamicMetaObject CallMethod(DefaultOverloadResolver resolver, IList targets, BindingRestrictions restrictions, string name,
+ public DynamicMetaObject CallMethod(DefaultOverloadResolver resolver, IList targets, BindingRestrictions restrictions, string name,
NarrowingLevel minLevel, NarrowingLevel maxLevel, out BindingTarget target) {
ContractUtils.RequiresNotNull(resolver, nameof(resolver));
ContractUtils.RequiresNotNullItems(targets, nameof(targets));
@@ -126,7 +126,7 @@ internal static string GetTargetName(IList targets) {
// TODO: revisit
private DynamicMetaObject MakeInvalidParametersRule(DefaultOverloadResolver binder, BindingRestrictions restrictions, BindingTarget bt) {
var args = binder.Arguments;
-
+
BindingRestrictions restriction = MakeSplatTests(binder.CallType, binder.Signature, true, args);
// restrict to the exact type of all parameters for errors
diff --git a/Dynamic/Actions/DefaultBinder.Operations.cs b/Dynamic/Actions/DefaultBinder.Operations.cs
index e401d329..2320035b 100644
--- a/Dynamic/Actions/DefaultBinder.Operations.cs
+++ b/Dynamic/Actions/DefaultBinder.Operations.cs
@@ -11,17 +11,17 @@
using System.Reflection;
using System.Text;
-using Microsoft.Scripting.Actions.Calls;
-using Microsoft.Scripting.Generation;
-using Microsoft.Scripting.Runtime;
-using Microsoft.Scripting.Utils;
-using AstUtils = Microsoft.Scripting.Ast.Utils;
+using Riverside.Scripting.Actions.Calls;
+using Riverside.Scripting.Generation;
+using Riverside.Scripting.Runtime;
+using Riverside.Scripting.Utils;
+using AstUtils = Riverside.Scripting.Ast.Utils;
-namespace Microsoft.Scripting.Actions {
+namespace Riverside.Scripting.Actions {
public partial class DefaultBinder : ActionBinder {
[Obsolete("You should use the overload which takes ExpressionType instead")]
- public DynamicMetaObject DoOperation(string operation, params DynamicMetaObject[] args) {
+ public DynamicMetaObject DoOperation(string operation, params DynamicMetaObject[] args) {
return DoOperation(operation, new DefaultOverloadResolverFactory(this), args);
}
@@ -112,10 +112,10 @@ public DynamicMetaObject GetCallSignatures(DynamicMetaObject target) {
public DynamicMetaObject GetIsCallable(DynamicMetaObject target) {
// IsCallable() is tightly tied to Call actions. So in general, we need the call-action providers to also
- // provide IsCallable() status.
+ // provide IsCallable() status.
// This is just a rough fallback. We could also attempt to simulate the default CallBinder logic to see
- // if there are any applicable calls targets, but that would be complex (the callbinder wants the argument list,
- // which we don't have here), and still not correct.
+ // if there are any applicable calls targets, but that would be complex (the callbinder wants the argument list,
+ // which we don't have here), and still not correct.
BindingRestrictions restrictions = BindingRestrictions.GetTypeRestriction(target.Expression, target.LimitType);
bool callable = false;
@@ -173,7 +173,7 @@ private DynamicMetaObject MakeComparisonRule(OperatorInfo info, OverloadResolver
TryInvertedComparison(info, resolverFactory, args[0], args) ?? // inverted binding on the 2nd type
TryNullComparisonRule(args) ?? // see if we're comparing to null w/ an object ref or a Nullable
TryPrimitiveCompare(info, args) ?? // see if this is a primitive type where we're comparing the two values.
- MakeOperatorError(info, args); // no comparisons are possible
+ MakeOperatorError(info, args); // no comparisons are possible
}
private DynamicMetaObject TryComparisonMethod(OperatorInfo info, OverloadResolverFactory resolverFactory, DynamicMetaObject target, DynamicMetaObject[] args) {
@@ -236,7 +236,7 @@ private DynamicMetaObject TryInvertedComparison(OperatorInfo info, OverloadResol
OperatorInfo revInfo = OperatorInfo.GetOperatorInfo(revOp);
Debug.Assert(revInfo != null);
- // try the 1st type's opposite function result negated
+ // try the 1st type's opposite function result negated
MethodBase[] targets = GetApplicableMembers(target.GetLimitType(), revInfo);
if (targets.Length > 0) {
return TryMakeInvertedBindingTarget(resolverFactory, targets, args);
@@ -529,7 +529,7 @@ private MethodInfo[] GetMethodsFromDefaults(IEnumerable defaults, In
if (pi != null) {
if (op == IndexType.Get) {
- MethodInfo method = pi.GetGetMethod(PrivateBinding);
+ MethodInfo method = pi.GetGetMethod(PrivateBinding);
if (method != null) methods.Add(method);
} else if (op == IndexType.Set) {
MethodInfo method = pi.GetSetMethod(PrivateBinding);
@@ -618,7 +618,7 @@ private MethodInfo[] GetApplicableMembers(Type t, OperatorInfo info) {
// filter down to just methods
return FilterNonMethods(t, members);
}
-
+
private static MethodInfo[] FilterNonMethods(Type t, MemberGroup members) {
Assert.NotNull(t, members);
diff --git a/Dynamic/Actions/DefaultBinder.SetMember.cs b/Dynamic/Actions/DefaultBinder.SetMember.cs
index 018ec904..356bcaeb 100644
--- a/Dynamic/Actions/DefaultBinder.SetMember.cs
+++ b/Dynamic/Actions/DefaultBinder.SetMember.cs
@@ -10,17 +10,17 @@
using System.Reflection;
using System.Runtime.CompilerServices;
-using Microsoft.Scripting.Actions.Calls;
-using Microsoft.Scripting.Generation;
-using Microsoft.Scripting.Runtime;
-using Microsoft.Scripting.Utils;
-using AstUtils = Microsoft.Scripting.Ast.Utils;
+using Riverside.Scripting.Actions.Calls;
+using Riverside.Scripting.Generation;
+using Riverside.Scripting.Runtime;
+using Riverside.Scripting.Utils;
+using AstUtils = Riverside.Scripting.Ast.Utils;
-namespace Microsoft.Scripting.Actions {
+namespace Riverside.Scripting.Actions {
public partial class DefaultBinder : ActionBinder {
///
- /// Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod
+ /// Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod
/// GetBoundMember, and StrongBox instances.
///
///
@@ -36,9 +36,9 @@ public partial class DefaultBinder : ActionBinder {
public DynamicMetaObject SetMember(string name, DynamicMetaObject target, DynamicMetaObject value) {
return SetMember(name, target, value, new DefaultOverloadResolverFactory(this));
}
-
+
///
- /// Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod
+ /// Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod
/// GetBoundMember, and StrongBox instances.
///
///
@@ -69,7 +69,7 @@ public DynamicMetaObject SetMember(string name, DynamicMetaObject target, Dynami
}
///
- /// Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod
+ /// Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod
/// GetBoundMember, and StrongBox instances.
///
///
@@ -89,9 +89,9 @@ public DynamicMetaObject SetMember(string name, DynamicMetaObject target, Dynami
public DynamicMetaObject SetMember(string name, DynamicMetaObject target, DynamicMetaObject value, DynamicMetaObject errorSuggestion) {
return SetMember(name, target, value, errorSuggestion, new DefaultOverloadResolverFactory(this));
}
-
+
///
- /// Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod
+ /// Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod
/// GetBoundMember, and StrongBox instances.
///
///
@@ -128,7 +128,7 @@ public DynamicMetaObject SetMember(string name, DynamicMetaObject target, Dynami
private DynamicMetaObject MakeSetMemberTarget(SetOrDeleteMemberInfo memInfo, DynamicMetaObject target, DynamicMetaObject value, DynamicMetaObject errorSuggestion) {
Type type = target.GetLimitType();
DynamicMetaObject self = target;
-
+
target = target.Restrict(target.GetLimitType());
memInfo.Body.Restrictions = target.Restrictions;
@@ -252,14 +252,14 @@ private void MakePropertyRule(SetOrDeleteMemberInfo memInfo, DynamicMetaObject i
true,
instance,
target
- ),
+ ),
typeof(object)
)
);
} else if (info.IsStatic && info.DeclaringType != targetType) {
memInfo.Body.FinishError(
errorSuggestion ?? MakeError(
- MakeStaticAssignFromDerivedTypeError(targetType, instance, info, target, memInfo.ResolutionFactory),
+ MakeStaticAssignFromDerivedTypeError(targetType, instance, info, target, memInfo.ResolutionFactory),
typeof(object)
)
);
@@ -345,14 +345,14 @@ private void MakeFieldRule(SetOrDeleteMemberInfo memInfo, DynamicMetaObject inst
} else if (field.IsInitOnly || field.IsLiteral) {
memInfo.Body.FinishError(
errorSuggestion ?? MakeError(
- MakeReadOnlyMemberError(targetType, memInfo.Name),
+ MakeReadOnlyMemberError(targetType, memInfo.Name),
typeof(object)
)
);
} else if (field.IsStatic && targetType != field.DeclaringType) {
memInfo.Body.FinishError(
errorSuggestion ?? MakeError(
- MakeStaticAssignFromDerivedTypeError(targetType, instance, field, target, memInfo.ResolutionFactory),
+ MakeStaticAssignFromDerivedTypeError(targetType, instance, field, target, memInfo.ResolutionFactory),
typeof(object)
)
);
@@ -436,8 +436,8 @@ private bool MakeOperatorSetMemberBody(SetOrDeleteMemberInfo memInfo, DynamicMet
memInfo.Body.AddVariable(tmp);
var callMo = MakeCallExpression(
- memInfo.ResolutionFactory,
- setMem,
+ memInfo.ResolutionFactory,
+ setMem,
self.Clone(AstUtils.Convert(self.Expression, type)),
new DynamicMetaObject(AstUtils.Constant(memInfo.Name), BindingRestrictions.Empty, memInfo.Name),
target.Clone(tmp)
diff --git a/Dynamic/Actions/DefaultBinder.cs b/Dynamic/Actions/DefaultBinder.cs
index a1fc9e90..ab57d41a 100644
--- a/Dynamic/Actions/DefaultBinder.cs
+++ b/Dynamic/Actions/DefaultBinder.cs
@@ -9,16 +9,16 @@
using System.Reflection;
using System.Text;
-using Microsoft.Scripting.Actions.Calls;
-using Microsoft.Scripting.Runtime;
-using Microsoft.Scripting.Utils;
-using AstUtils = Microsoft.Scripting.Ast.Utils;
+using Riverside.Scripting.Actions.Calls;
+using Riverside.Scripting.Runtime;
+using Riverside.Scripting.Utils;
+using AstUtils = Riverside.Scripting.Ast.Utils;
-namespace Microsoft.Scripting.Actions {
+namespace Riverside.Scripting.Actions {
///
/// Provides binding semantics for a language. This include conversions as well as support
- /// for producing rules for actions. These optimized rules are used for calling methods,
+ /// for producing rules for actions. These optimized rules are used for calling methods,
/// performing operators, and getting members using the ActionBinder's conversion semantics.
///
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling")]
@@ -43,7 +43,7 @@ public virtual ErrorInfo MakeUndeletableMemberError(Type type, string name) {
///
/// Called when the user is accessing a protected or private member on a get.
- ///
+ ///
/// The default implementation allows access to the fields or properties using reflection.
///
public virtual ErrorInfo MakeNonPublicMemberGetError(OverloadResolverFactory resolverFactory, MemberTracker member, Type type, DynamicMetaObject instance) {
@@ -177,10 +177,10 @@ public MethodInfo GetMethod(Type type, string name) {
return null;
}
-
+
private static MethodInfo GetSpecialNameMethod(Type type, string name) {
MethodInfo res = null;
-
+
foreach (MethodInfo candidate in type.GetInheritedMethods(name).WithBindingFlags(BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static)) {
if (candidate.IsSpecialName) {
if (object.ReferenceEquals(res, null)) {
@@ -193,7 +193,7 @@ private static MethodInfo GetSpecialNameMethod(Type type, string name) {
return res;
}
-
+
private static Exception AmbiguousMatch(Type type, string name) {
throw new AmbiguousMatchException(
$"Found multiple SpecialName methods for {name} on type {type}"
diff --git a/Dynamic/Actions/DynamicSiteHelper.cs b/Dynamic/Actions/DynamicSiteHelper.cs
index cfcd96b9..09ce2d9a 100644
--- a/Dynamic/Actions/DynamicSiteHelper.cs
+++ b/Dynamic/Actions/DynamicSiteHelper.cs
@@ -9,10 +9,10 @@
using System.Runtime.CompilerServices;
using System.Threading;
-using Microsoft.Scripting.Generation;
-using Microsoft.Scripting.Utils;
+using Riverside.Scripting.Generation;
+using Riverside.Scripting.Utils;
-namespace Microsoft.Scripting.Actions {
+namespace Riverside.Scripting.Actions {
// TODO: replace this class with calls to Expression.GetDelegateType
public static class DynamicSiteHelpers {
@@ -202,10 +202,10 @@ public static bool IsInvisibleDlrStackFrame(MethodBase mb) {
return true;
}
- //Filters out methods in Microsoft.Scripting namespaces.
- if (mb.DeclaringType != null &&
+ //Filters out methods in Riverside.Scripting namespaces.
+ if (mb.DeclaringType != null &&
mb.DeclaringType.Namespace != null &&
- mb.DeclaringType.Namespace.StartsWith("Microsoft.Scripting", StringComparison.Ordinal)) {
+ mb.DeclaringType.Namespace.StartsWith("Riverside.Scripting", StringComparison.Ordinal)) {
return true;
}
diff --git a/Dynamic/Actions/ErrorInfo.cs b/Dynamic/Actions/ErrorInfo.cs
index 0e1671b5..d7ef1f9c 100644
--- a/Dynamic/Actions/ErrorInfo.cs
+++ b/Dynamic/Actions/ErrorInfo.cs
@@ -6,21 +6,21 @@
using System.Diagnostics;
using System.Linq.Expressions;
-using Microsoft.Scripting.Utils;
+using Riverside.Scripting.Utils;
-namespace Microsoft.Scripting.Actions {
+namespace Riverside.Scripting.Actions {
///
- /// Encapsulates information about the result that should be produced when
+ /// Encapsulates information about the result that should be produced when
/// a OldDynamicAction cannot be performed. The ErrorInfo can hold one of:
- /// an expression which creates an Exception to be thrown
- /// an expression which produces a value which should be returned
+ /// an expression which creates an Exception to be thrown
+ /// an expression which produces a value which should be returned
/// directly to the user and represents an error has occured (for
/// example undefined in JavaScript)
/// an expression which produces a value which should be returned
/// directly to the user but does not actually represent an error.
- ///
+ ///
/// ErrorInfo's are produced by an ActionBinder in response to a failed
- /// binding.
+ /// binding.
///
public sealed class ErrorInfo {
///
diff --git a/Dynamic/Actions/ErrorMetaObject.cs b/Dynamic/Actions/ErrorMetaObject.cs
index a7b7d492..b14a147d 100644
--- a/Dynamic/Actions/ErrorMetaObject.cs
+++ b/Dynamic/Actions/ErrorMetaObject.cs
@@ -5,7 +5,7 @@
using System.Dynamic;
using System.Linq.Expressions;
-namespace Microsoft.Scripting.Actions {
+namespace Riverside.Scripting.Actions {
///
/// A MetaObject which was produced as the result of a failed binding.
///
diff --git a/Dynamic/Actions/EventTracker.cs b/Dynamic/Actions/EventTracker.cs
index f8b02a75..9e24cccb 100644
--- a/Dynamic/Actions/EventTracker.cs
+++ b/Dynamic/Actions/EventTracker.cs
@@ -10,18 +10,18 @@
using System.Runtime.InteropServices;
using System.Threading;
-using Microsoft.Scripting.Actions.Calls;
-using Microsoft.Scripting.Generation;
-using Microsoft.Scripting.Runtime;
-using Microsoft.Scripting.Utils;
+using Riverside.Scripting.Actions.Calls;
+using Riverside.Scripting.Generation;
+using Riverside.Scripting.Runtime;
+using Riverside.Scripting.Utils;
-namespace Microsoft.Scripting.Actions {
+namespace Riverside.Scripting.Actions {
public class EventTracker : MemberTracker {
- // For each instance of the class that declares the event there is a list of pairs in a table
- // (like if we added an instance field for each instance event into its declaring class).
+ // For each instance of the class that declares the event there is a list of pairs in a table
+ // (like if we added an instance field for each instance event into its declaring class).
// We use _staticTarget for a static event (it is bound to its declaring type).
- // Each pair in the list holds on the stub handler that was added to the event delegate chain and the callable
- // object that is passed to +=/-= operators.
+ // Each pair in the list holds on the stub handler that was added to the event delegate chain and the callable
+ // object that is passed to +=/-= operators.
private WeakDictionary