Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2009-10-23 21:12:44 +0400
committerMarek Safar <marek.safar@gmail.com>2009-10-23 21:12:44 +0400
commit29ea371d66e6d3c251b3fe724c9a5faadd83ec20 (patch)
treec59c563971a58fc6bd2df9fce19427ed62c8452d /mcs/class/dlr
parent4d729569c0b1af8722a350f326c05da77e4ccea0 (diff)
2009-10-23 Marek Safar <marek.safar@gmail.com>
* Updated to r33356. svn path=/trunk/mcs/; revision=144747
Diffstat (limited to 'mcs/class/dlr')
-rw-r--r--mcs/class/dlr/ChangeLog4
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Dynamic/Microsoft.Dynamic.Build.csproj453
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Dynamic/Microsoft.Dynamic.csproj527
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Dynamic/Properties/AssemblyInfo.cs38
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/BinaryOperationBinder.cs16
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/BindingRestrictions.cs21
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/CallInfo.cs25
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/CallSite.cs32
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/CallSiteBinder.cs26
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/CallSiteHelpers.cs10
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/CallSiteOps.cs12
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/ConvertBinder.cs10
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/CreateInstanceBinder.cs10
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/DeleteIndexBinder.cs10
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/DeleteMemberBinder.cs10
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/DynamicMetaObject.cs20
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/DynamicMetaObjectBinder.cs30
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/DynamicObject.cs24
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/ExpandoClass.cs14
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/ExpandoObject.cs33
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/GetIndexBinder.cs10
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/GetMemberBinder.cs10
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/IDynamicMetaObjectProvider.cs12
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/InvokeBinder.cs10
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/InvokeMemberBinder.cs10
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/RuleCache.cs10
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/SetIndexBinder.cs10
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/SetMemberBinder.cs10
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/UnaryOperationBinder.cs16
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/UpdateDelegates.Generated.cs13
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/BinaryExpression.cs13
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/BlockExpression.cs13
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/CatchBlock.cs15
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ConditionalExpression.cs13
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ConstantExpression.cs13
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/DebugInfoExpression.cs13
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/DebugViewWriter.cs18
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/DefaultExpression.cs9
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/DynamicExpression.cs35
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ElementInit.cs22
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/Expression.DebuggerProxy.cs13
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/Expression.cs36
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ExpressionStringBuilder.cs18
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ExpressionType.cs8
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ExpressionVisitor.cs18
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/GotoExpression.cs15
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/IArgumentProvider.cs11
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/IndexExpression.cs43
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/InvocationExpression.cs33
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/LabelExpression.cs9
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/LabelTarget.cs13
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/LambdaExpression.cs27
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ListArgumentProvider.cs16
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ListInitExpression.cs17
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/LoopExpression.cs15
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MemberAssignment.cs13
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MemberBinding.cs9
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MemberExpression.cs21
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MemberInitExpression.cs41
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MemberListBinding.cs41
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MemberMemberBinding.cs13
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MethodCallExpression.cs107
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/NewArrayExpression.cs19
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/NewExpression.cs17
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ParameterExpression.cs17
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/RuntimeVariablesExpression.cs29
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/SwitchCase.cs21
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/SwitchExpression.cs17
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/SymbolDocumentInfo.cs61
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/TryExpression.cs13
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/TypeBinaryExpression.cs17
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/TypeUtils.cs22
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/UnaryExpression.cs206
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/AnalyzedTree.cs16
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/AssemblyGen.cs23
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/BoundConstants.cs22
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/Closure.cs6
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/CompilerScope.Storage.cs13
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/CompilerScope.cs18
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/ConstantCheck.cs14
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/DebugInfoGenerator.cs25
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/DelegateHelpers.Generated.cs19
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/DelegateHelpers.cs13
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/ExpressionQuoter.cs20
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/HoistedLocals.cs16
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/ILGen.cs34
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/KeyedQueue.cs13
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LabelInfo.cs24
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Address.cs13
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Binary.cs13
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.ControlFlow.cs12
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Expressions.cs19
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Generated.cs12
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Lambda.cs17
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Logical.cs13
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Statements.cs13
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Unary.cs17
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.cs34
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/OffsetTrackingILGenerator.cs11
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/RuntimeVariableList.cs15
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/Set.cs11
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/StackSpiller.Bindings.cs16
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/StackSpiller.Generated.cs12
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/StackSpiller.Temps.cs13
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/StackSpiller.cs17
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/SymbolDocumentGenerator.cs31
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/VariableBinder.cs12
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/GlobalSuppressions.cs22
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Microsoft.Scripting.Core.csproj13
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Microsoft.Scripting.ExtensionAttribute.csproj2
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Properties/AssemblyInfo.cs8
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Properties/ExtensionAssemblyInfo.cs4
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Stubs.cs8
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/Action.cs13
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/CacheDict.cs8
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/CollectionExtensions.cs21
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/ContractUtils.cs26
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/ExceptionFactory.Generated.cs225
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/Extension.cs4
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/Function.cs12
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/Helpers.cs16
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/IRuntimeVariables.cs6
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/ReadOnlyCollectionBuilder.cs21
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/ReadOnlyDictionary.cs16
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/ReferenceEqualityComparer.cs10
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/StrongBox.cs6
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/TrueReadOnlyCollection.cs10
-rw-r--r--mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/TypeExtensions.cs6
128 files changed, 1815 insertions, 1795 deletions
diff --git a/mcs/class/dlr/ChangeLog b/mcs/class/dlr/ChangeLog
index 8f776ba8742..294c36fde8e 100644
--- a/mcs/class/dlr/ChangeLog
+++ b/mcs/class/dlr/ChangeLog
@@ -1,3 +1,7 @@
+2009-10-23 Marek Safar <marek.safar@gmail.com>
+
+ * Updated to r33356.
+
2009-08-04 Marek Safar <marek.safar@gmail.com>
* Updated to r26623.
diff --git a/mcs/class/dlr/Runtime/Microsoft.Dynamic/Microsoft.Dynamic.Build.csproj b/mcs/class/dlr/Runtime/Microsoft.Dynamic/Microsoft.Dynamic.Build.csproj
index 4ef033a4cc5..003f5788f42 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Dynamic/Microsoft.Dynamic.Build.csproj
+++ b/mcs/class/dlr/Runtime/Microsoft.Dynamic/Microsoft.Dynamic.Build.csproj
@@ -9,6 +9,8 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>pdbonly</DebugType>
<BinPlaceSymbols>false</BinPlaceSymbols>
+ <WarningLevel>4</WarningLevel>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<RunCodeAnalysis>false</RunCodeAnalysis>
<GenerateAssemblyAttribute>false</GenerateAssemblyAttribute>
<OutputPath>$(SolutionDir)\..\Bin\40\</OutputPath>
@@ -16,8 +18,8 @@
<SignAssembly Condition="'$(SignAssembly)' == '' And Exists('$(AssemblyOriginatorKeyFile)')">true</SignAssembly>
<SignedSym Condition="'$(SignAssembly)' == 'true'">SIGNED</SignedSym>
<DelaySign>true</DelaySign>
- <DefineConstants>MICROSOFT_DYNAMIC;$(SignedSym)</DefineConstants>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <DefineConstants>CLR4;$(SignedSym)</DefineConstants>
+ <BaseAddress>857735168</BaseAddress>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D4AE44AD-07B9-41DC-BB3B-1FDCDE3C987D}</ProjectGuid>
@@ -42,87 +44,401 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System" />
<Reference Include="System.Core" />
- </ItemGroup>
- <ItemGroup>
- <TextStringResource Include="System.Dynamic.txt">
- <ResFile>System.Dynamic</ResFile>
- <Sealed>true</Sealed>
- <Visibility>internal</Visibility>
- <GenerateResource>true</GenerateResource>
- <FullClassName>System.Dynamic.SR</FullClassName>
- <Parameterize>true</Parameterize>
- </TextStringResource>
+ <Reference Include="System" Condition=" $(SilverlightBuild) != 'true' " />
+ <Reference Include="System.Configuration" Condition=" $(SilverlightBuild) != 'true' " />
+ <Reference Include="mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" Condition=" '$(SilverlightBuild)' == 'true' ">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>$(SilverlightSdkPath)\mscorlib.dll</HintPath>
+ </Reference>
+ <Reference Include="System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" Condition=" '$(SilverlightBuild)' == 'true' ">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>$(SilverlightSdkPath)\System.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Numerics" Condition=" $(SilverlightBuild) != 'true' " />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Runtime.Remoting" Condition=" $(SilverlightBuild) != 'true' " />
+ <Reference Include="System.Xml" Condition=" $(SilverlightBuild) != 'true' " />
+ <ProjectReference Include="..\Microsoft.Scripting\Microsoft.Scripting.Build.csproj">
+ <Name>Microsoft.Scripting</Name>
+ </ProjectReference>
</ItemGroup>
<!-- Begin Generated Project Items By GenerateSystemCoreCsproj.py -->
<ItemGroup>
<!-- -->
<!-- -->
<!-- -->
- <Compile Include="ArgBuilder.cs" />
- <Compile Include="Assert.cs" />
- <Compile Include="BoolArgBuilder.cs" />
- <Compile Include="BoundDispEvent.cs" />
- <Compile Include="CollectionExtensions.cs" />
- <Compile Include="ComBinder.cs" />
- <Compile Include="ComBinderHelpers.cs" />
- <Compile Include="ComDispIds.cs" />
- <Compile Include="ComEventDesc.cs" />
- <Compile Include="ComEventSink.cs" />
- <Compile Include="ComEventSinkProxy.cs" />
- <Compile Include="ComEventSinksContainer.cs" />
- <Compile Include="ComFallbackMetaObject.cs" />
- <Compile Include="ComHresults.cs" />
- <Compile Include="ComInterop.cs" />
- <Compile Include="ComInvokeAction.cs" />
- <Compile Include="ComInvokeBinder.cs" />
- <Compile Include="ComMetaObject.cs" />
- <Compile Include="ComMethodDesc.cs" />
- <Compile Include="ComObject.cs" />
- <Compile Include="ComRuntimeHelpers.cs" />
- <Compile Include="ComTypeClassDesc.cs" />
- <Compile Include="ComTypeDesc.cs" />
- <Compile Include="ComTypeEnumDesc.cs" />
- <Compile Include="ComTypeLibDesc.cs" />
- <Compile Include="ContractUtils.cs" />
- <Compile Include="ConversionArgBuilder.cs" />
- <Compile Include="ConvertArgBuilder.cs" />
- <Compile Include="ConvertibleArgBuilder.cs" />
- <Compile Include="CurrencyArgBuilder.cs" />
- <Compile Include="DateTimeArgBuilder.cs" />
- <Compile Include="DispatchArgBuilder.cs" />
- <Compile Include="DispCallable.cs" />
- <Compile Include="DispCallableMetaObject.cs" />
- <Compile Include="ErrorArgBuilder.cs" />
- <Compile Include="ExcepInfo.cs" />
- <Compile Include="Helpers.cs" />
- <Compile Include="IDispatchComObject.cs" />
- <Compile Include="IDispatchMetaObject.cs" />
- <Compile Include="NullArgBuilder.cs" />
- <Compile Include="SimpleArgBuilder.cs" />
- <Compile Include="SplatCallSite.cs" />
- <Compile Include="StringArgBuilder.cs" />
- <Compile Include="TypeUtils.cs" />
- <Compile Include="UnknownArgBuilder.cs" />
- <Compile Include="VarEnumSelector.cs" />
- <Compile Include="Variant.cs" />
- <Compile Include="VariantArgBuilder.cs" />
- <Compile Include="VariantArray.cs" />
- <Compile Include="VariantBuilder.cs" />
+ <Compile Include="DebugOptions.cs" />
+ <Compile Include="GlobalSuppressions.cs" />
+ <Compile Include="IValueEquality.cs" />
+ <Compile Include="KeyboardInterruptException.cs" />
+ <Compile Include="MultiRuntimeAwareAttribute.cs" />
+ <Compile Include="MutableTuple.cs" />
+ <Compile Include="PerfTrack.cs" />
+ <Compile Include="SourceFileContentProvider.cs" />
+ <Compile Include="SpecSharp.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <!-- -->
+ <!-- Actions -->
+ <!-- -->
+ <Compile Include="Actions\ActionBinder.cs" />
+ <Compile Include="Actions\Argument.cs" />
+ <Compile Include="Actions\ArgumentType.cs" />
+ <Compile Include="Actions\BinderHelpers.cs" />
+ <Compile Include="Actions\BoundMemberTracker.cs" />
+ <Compile Include="Actions\CallSignature.cs" />
+ <Compile Include="Actions\ComboActionRewriter.cs" />
+ <Compile Include="Actions\ComboBinder.cs" />
+ <Compile Include="Actions\ConditionalBuilder.cs" />
+ <Compile Include="Actions\ConstructorTracker.cs" />
+ <Compile Include="Actions\ConversionResultKind.cs" />
+ <Compile Include="Actions\CustomTracker.cs" />
+ <Compile Include="Actions\DefaultBinder.Conversions.cs" />
+ <Compile Include="Actions\DefaultBinder.cs" />
+ <Compile Include="Actions\DefaultBinder.DeleteMember.cs" />
+ <Compile Include="Actions\DefaultBinder.GetMember.cs" />
+ <Compile Include="Actions\DefaultBinder.Invoke.cs" />
+ <Compile Include="Actions\DefaultBinder.MethodCalls.cs" />
+ <Compile Include="Actions\DefaultBinder.Operations.cs" />
+ <Compile Include="Actions\DefaultBinder.SetMember.cs" />
+ <Compile Include="Actions\DynamicSiteHelper.cs" />
+ <Compile Include="Actions\ErrorInfo.cs" />
+ <Compile Include="Actions\EventTracker.cs" />
+ <Compile Include="Actions\ExtensionBinaryOperationBinder.cs" />
+ <Compile Include="Actions\ExtensionMethodTracker.cs" />
+ <Compile Include="Actions\ExtensionPropertyTracker.cs" />
+ <Compile Include="Actions\ExtensionUnaryOperationBinder.cs" />
+ <Compile Include="Actions\FieldTracker.cs" />
+ <Compile Include="Actions\Interceptor.cs" />
+ <Compile Include="Actions\MemberGroup.cs" />
+ <Compile Include="Actions\MemberRequestKind.cs" />
+ <Compile Include="Actions\MemberTracker.cs" />
+ <Compile Include="Actions\MethodGroup.cs" />
+ <Compile Include="Actions\MethodTracker.cs" />
+ <Compile Include="Actions\NamespaceTracker.cs" />
+ <Compile Include="Actions\NestedTypeTracker.cs" />
+ <Compile Include="Actions\NoSideEffectsAttribute.cs" />
+ <Compile Include="Actions\OperationBinder.cs" />
+ <Compile Include="Actions\OperationMetaObject.cs" />
+ <Compile Include="Actions\OperatorInfo.cs" />
+ <Compile Include="Actions\PropertyTracker.cs" />
+ <Compile Include="Actions\ReflectedPropertyTracker.cs" />
+ <Compile Include="Actions\TopNamespaceTracker.cs" />
+ <Compile Include="Actions\TrackerTypes.cs" />
+ <Compile Include="Actions\TypeGroup.cs" />
+ <Compile Include="Actions\TypeTracker.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <!-- -->
+ <!-- Actions.Calls -->
+ <!-- -->
+ <Compile Include="Actions\Calls\ActualArguments.cs" />
+ <Compile Include="Actions\Calls\ApplicableCandidate.cs" />
+ <Compile Include="Actions\Calls\ArgBuilder.cs" />
+ <Compile Include="Actions\Calls\ArgumentBinding.cs" />
+ <Compile Include="Actions\Calls\BindingResult.cs" />
+ <Compile Include="Actions\Calls\BindingTarget.cs" />
+ <Compile Include="Actions\Calls\ByRefReturnBuilder.cs" />
+ <Compile Include="Actions\Calls\CallFailure.cs" />
+ <Compile Include="Actions\Calls\CallFailureReason.cs" />
+ <Compile Include="Actions\Calls\Candidate.cs" />
+ <Compile Include="Actions\Calls\CandidateSet.cs" />
+ <Compile Include="Actions\Calls\ConversionResult.cs" />
+ <Compile Include="Actions\Calls\DefaultArgBuilder.cs" />
+ <Compile Include="Actions\Calls\DefaultOverloadResolver.cs" />
+ <Compile Include="Actions\Calls\InstanceBuilder.cs" />
+ <Compile Include="Actions\Calls\KeywordArgBuilder.cs" />
+ <Compile Include="Actions\Calls\KeywordConstructorReturnBuilder.cs" />
+ <Compile Include="Actions\Calls\MethodCandidate.cs" />
+ <Compile Include="Actions\Calls\NarrowingLevel.cs" />
+ <Compile Include="Actions\Calls\OutArgBuilder.cs" />
+ <Compile Include="Actions\Calls\OverloadResolver.cs" />
+ <Compile Include="Actions\Calls\OverloadResolverFactory.cs" />
+ <Compile Include="Actions\Calls\ParameterMapping.cs" />
+ <Compile Include="Actions\Calls\ParameterWrapper.cs" />
+ <Compile Include="Actions\Calls\ParamsArgBuilder.cs" />
+ <Compile Include="Actions\Calls\ParamsDictArgBuilder.cs" />
+ <Compile Include="Actions\Calls\ReferenceArgBuilder.cs" />
+ <Compile Include="Actions\Calls\RestrictedArguments.cs" />
+ <Compile Include="Actions\Calls\ReturnBuilder.cs" />
+ <Compile Include="Actions\Calls\ReturnReferenceArgBuilder.cs" />
+ <Compile Include="Actions\Calls\SimpleArgBuilder.cs" />
+ <Compile Include="Actions\Calls\TypeInferer.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <!-- -->
+ <!-- Ast -->
+ <!-- -->
+ <Compile Include="Ast\BinaryExpression.cs" />
+ <Compile Include="Ast\Block.cs" />
+ <Compile Include="Ast\ConstantExpression.cs" />
+ <Compile Include="Ast\DebugStatement.cs" />
+ <Compile Include="Ast\EmptyStatements.cs" />
+ <Compile Include="Ast\FinallyFlowControlExpression.cs" />
+ <Compile Include="Ast\FlowControlRewriter.cs" />
+ <Compile Include="Ast\GeneratorExpression.cs" />
+ <Compile Include="Ast\GeneratorRewriter.cs" />
+ <Compile Include="Ast\IfStatementBuilder.cs" />
+ <Compile Include="Ast\IfStatementTest.cs" />
+ <Compile Include="Ast\LambdaBuilder.cs" />
+ <Compile Include="Ast\LambdaParameterRewriter.cs" />
+ <Compile Include="Ast\LoopStatement.cs" />
+ <Compile Include="Ast\MethodCallExpression.cs" />
+ <Compile Include="Ast\NewArrayExpression.cs" />
+ <Compile Include="Ast\NewExpression.cs" />
+ <Compile Include="Ast\SkipInterpretExpression.cs" />
+ <Compile Include="Ast\SourceFileInformation.cs" />
+ <Compile Include="Ast\SymbolConstantExpression.cs" />
+ <Compile Include="Ast\TryStatementBuilder.cs" />
+ <Compile Include="Ast\UnaryExpression.cs" />
+ <Compile Include="Ast\VariableDictionaryExpression.cs" />
+ <Compile Include="Ast\YieldExpression.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <!-- -->
+ <!-- ComInterop -->
+ <!-- -->
+ <Compile Include="ComInterop\ArgBuilder.cs" />
+ <Compile Include="ComInterop\BoolArgBuilder.cs" />
+ <Compile Include="ComInterop\BoundDispEvent.cs" />
+ <Compile Include="ComInterop\CollectionExtensions.cs" />
+ <Compile Include="ComInterop\ComBinder.cs" />
+ <Compile Include="ComInterop\ComBinderHelpers.cs" />
+ <Compile Include="ComInterop\ComClassMetaObject.cs" />
+ <Compile Include="ComInterop\ComDispIds.cs" />
+ <Compile Include="ComInterop\ComEventDesc.cs" />
+ <Compile Include="ComInterop\ComEventSink.cs" />
+ <Compile Include="ComInterop\ComEventSinkProxy.cs" />
+ <Compile Include="ComInterop\ComEventSinksContainer.cs" />
+ <Compile Include="ComInterop\ComFallbackMetaObject.cs" />
+ <Compile Include="ComInterop\ComHresults.cs" />
+ <Compile Include="ComInterop\ComInterop.cs" />
+ <Compile Include="ComInterop\ComInvokeAction.cs" />
+ <Compile Include="ComInterop\ComInvokeBinder.cs" />
+ <Compile Include="ComInterop\ComMetaObject.cs" />
+ <Compile Include="ComInterop\ComMethodDesc.cs" />
+ <Compile Include="ComInterop\ComObject.cs" />
+ <Compile Include="ComInterop\ComParamDesc.cs" />
+ <Compile Include="ComInterop\ComRuntimeHelpers.cs" />
+ <Compile Include="ComInterop\ComType.cs" />
+ <Compile Include="ComInterop\ComTypeClassDesc.cs" />
+ <Compile Include="ComInterop\ComTypeDesc.cs" />
+ <Compile Include="ComInterop\ComTypeEnumDesc.cs" />
+ <Compile Include="ComInterop\ComTypeLibDesc.cs" />
+ <Compile Include="ComInterop\ComTypeLibInfo.cs" />
+ <Compile Include="ComInterop\ComTypeLibMemberDesc.cs" />
+ <Compile Include="ComInterop\ConversionArgBuilder.cs" />
+ <Compile Include="ComInterop\ConvertArgBuilder.cs" />
+ <Compile Include="ComInterop\ConvertibleArgBuilder.cs" />
+ <Compile Include="ComInterop\CurrencyArgBuilder.cs" />
+ <Compile Include="ComInterop\DateTimeArgBuilder.cs" />
+ <Compile Include="ComInterop\DispatchArgBuilder.cs" />
+ <Compile Include="ComInterop\DispCallable.cs" />
+ <Compile Include="ComInterop\DispCallableMetaObject.cs" />
+ <Compile Include="ComInterop\ErrorArgBuilder.cs" />
+ <Compile Include="ComInterop\Errors.cs" />
+ <Compile Include="ComInterop\ExcepInfo.cs" />
+ <Compile Include="ComInterop\Helpers.cs" />
+ <Compile Include="ComInterop\IDispatchComObject.cs" />
+ <Compile Include="ComInterop\IDispatchMetaObject.cs" />
+ <Compile Include="ComInterop\IPseudoComObject.cs" />
+ <Compile Include="ComInterop\NullArgBuilder.cs" />
+ <Compile Include="ComInterop\SimpleArgBuilder.cs" />
+ <Compile Include="ComInterop\SplatCallSite.cs" />
+ <Compile Include="ComInterop\StringArgBuilder.cs" />
+ <Compile Include="ComInterop\TypeEnumMetaObject.cs" />
+ <Compile Include="ComInterop\TypeLibInfoMetaObject.cs" />
+ <Compile Include="ComInterop\TypeLibMetaObject.cs" />
+ <Compile Include="ComInterop\TypeUtils.cs" />
+ <Compile Include="ComInterop\UnknownArgBuilder.cs" />
+ <Compile Include="ComInterop\VarEnumSelector.cs" />
+ <Compile Include="ComInterop\Variant.cs" />
+ <Compile Include="ComInterop\VariantArgBuilder.cs" />
+ <Compile Include="ComInterop\VariantArray.cs" />
+ <Compile Include="ComInterop\VariantBuilder.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <!-- -->
+ <!-- Generation -->
+ <!-- -->
+ <Compile Include="Generation\AssemblyGen.cs" />
+ <Compile Include="Generation\CompilerHelpers.cs" />
+ <Compile Include="Generation\ConstantCheck.cs" />
+ <Compile Include="Generation\DelegateHelpers.cs" />
+ <Compile Include="Generation\DelegateHelpers.Generated.cs" />
+ <Compile Include="Generation\DynamicILGen.cs" />
+ <Compile Include="Generation\FieldBuilderExpression.cs" />
+ <Compile Include="Generation\IExpressionSerializable.cs" />
+ <Compile Include="Generation\ILGen.cs" />
+ <Compile Include="Generation\KeyedQueue.cs" />
+ <Compile Include="Generation\MethodSignatureInfo.cs" />
+ <Compile Include="Generation\ParameterInfoWrapper.cs" />
+ <Compile Include="Generation\Snippets.cs" />
+ <Compile Include="Generation\ToDiskRewriter.cs" />
+ <Compile Include="Generation\TypeGen.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <!-- -->
+ <!-- Hosting.Shell -->
+ <!-- -->
+ <Compile Include="Hosting\Shell\BasicConsole.cs" />
+ <Compile Include="Hosting\Shell\CommandLine.cs" />
+ <Compile Include="Hosting\Shell\ConsoleHost.cs" />
+ <Compile Include="Hosting\Shell\ConsoleHostOptions.cs" />
+ <Compile Include="Hosting\Shell\ConsoleHostOptionsParser.cs" />
+ <Compile Include="Hosting\Shell\ConsoleOptions.cs" />
+ <Compile Include="Hosting\Shell\ICommandDispatcher.cs" />
+ <Compile Include="Hosting\Shell\IConsole.cs" />
+ <Compile Include="Hosting\Shell\OptionsParser.cs" />
+ <Compile Include="Hosting\Shell\Style.cs" />
+ <Compile Include="Hosting\Shell\SuperConsole.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <!-- -->
+ <!-- Hosting.Shell.Remote -->
+ <!-- -->
+ <Compile Include="Hosting\Shell\Remote\ConsoleRestartManager.cs" />
+ <Compile Include="Hosting\Shell\Remote\RemoteCommandDispatcher.cs" />
+ <Compile Include="Hosting\Shell\Remote\RemoteConsoleCommandLine.cs" />
+ <Compile Include="Hosting\Shell\Remote\RemoteConsoleHost.cs" />
+ <Compile Include="Hosting\Shell\Remote\RemoteRuntimeServer.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <!-- -->
+ <!-- Interpreter -->
+ <!-- -->
+ <Compile Include="Interpreter\DynamicInstructions.cs" />
+ <Compile Include="Interpreter\DynamicInstructions.Generated.cs" />
+ <Compile Include="Interpreter\Instruction.cs" />
+ <Compile Include="Interpreter\InterpretedFrame.cs" />
+ <Compile Include="Interpreter\Interpreter.cs" />
+ <Compile Include="Interpreter\LastFaultingLineExpression.cs" />
+ <Compile Include="Interpreter\LightCompiler.cs" />
+ <Compile Include="Interpreter\LightDelegateCreator.cs" />
+ <Compile Include="Interpreter\LightLambda.cs" />
+ <Compile Include="Interpreter\LightLambda.Generated.cs" />
+ <Compile Include="Interpreter\LightLambdaClosureVisitor.cs" />
+ <Compile Include="Interpreter\RuntimeVariables.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <!-- -->
+ <!-- Math -->
+ <!-- -->
+ <Compile Include="Math\BigIntegerV2.cs" />
+ <Compile Include="Math\BigIntegerV4.cs" />
+ <Compile Include="Math\Complex64.cs" />
</ItemGroup>
<ItemGroup>
<!-- -->
<!-- Properties -->
<!-- -->
<Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="Properties\GlobalSuppressions.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <!-- -->
+ <!-- Runtime -->
+ <!-- -->
+ <Compile Include="Runtime\AmbiguousFileNameException.cs" />
+ <Compile Include="Runtime\AssemblyTypeNames.cs" />
+ <Compile Include="Runtime\BaseSymbolDictionary.cs" />
+ <Compile Include="Runtime\BinderOps.cs" />
+ <Compile Include="Runtime\BinderType.cs" />
+ <Compile Include="Runtime\BindingRestrictionsHelpers.cs" />
+ <Compile Include="Runtime\CallTargets.cs" />
+ <Compile Include="Runtime\CallTypes.cs" />
+ <Compile Include="Runtime\Cast.cs" />
+ <Compile Include="Runtime\Cast.Generated.cs" />
+ <Compile Include="Runtime\CodeDomCodeGen.cs" />
+ <Compile Include="Runtime\CompilerContext.cs" />
+ <Compile Include="Runtime\CustomSymbolDictionary.cs" />
+ <Compile Include="Runtime\DefaultLanguageContext.cs" />
+ <Compile Include="Runtime\DelegateInfo.cs" />
+ <Compile Include="Runtime\DelegateSignatureInfo.cs" />
+ <Compile Include="Runtime\DlrCachedCodeAttribute.cs" />
+ <Compile Include="Runtime\DocumentationAttribute.cs" />
+ <Compile Include="Runtime\DynamicDelegateCreator.cs" />
+ <Compile Include="Runtime\DynamicLanguageProviderAttribute.cs" />
+ <Compile Include="Runtime\DynamicNull.cs" />
+ <Compile Include="Runtime\DynamicRuntimeHostingProvider.cs" />
+ <Compile Include="Runtime\DynamicStackFrame.cs" />
+ <Compile Include="Runtime\ExceptionHelpers.cs" />
+ <Compile Include="Runtime\ExplicitConversionMethodAttribute.cs" />
+ <Compile Include="Runtime\Extensible.cs" />
+ <Compile Include="Runtime\ExtensionTypeAttribute.cs" />
+ <Compile Include="Runtime\ExtraKeyEnumerator.cs" />
+ <Compile Include="Runtime\Generator.cs" />
+ <Compile Include="Runtime\IConvertibleMetaObject.cs" />
+ <Compile Include="Runtime\ICustomScriptCodeData.cs" />
+ <Compile Include="Runtime\IdDispenser.cs" />
+ <Compile Include="Runtime\IMembersList.cs" />
+ <Compile Include="Runtime\ImplicitConversionMethodAttribute.cs" />
+ <Compile Include="Runtime\IRestrictedMetaObject.cs" />
+ <Compile Include="Runtime\ISlice.cs" />
+ <Compile Include="Runtime\LanguageBoundTextContentProvider.cs" />
+ <Compile Include="Runtime\LegacyScriptCode.cs" />
+ <Compile Include="Runtime\LocalsDictionary.cs" />
+ <Compile Include="Runtime\MetaObjectExtensions.cs" />
+ <Compile Include="Runtime\ModuleChangeEventArgs.cs" />
+ <Compile Include="Runtime\ModuleChangeEventType.cs" />
+ <Compile Include="Runtime\NullTextContentProvider.cs" />
+ <Compile Include="Runtime\OperationFailed.cs" />
+ <Compile Include="Runtime\OperatorSlotAttribute.cs" />
+ <Compile Include="Runtime\PositionTrackingWriter.cs" />
+ <Compile Include="Runtime\PropertyMethodAttribute.cs" />
+ <Compile Include="Runtime\ReflectionCache.cs" />
+ <Compile Include="Runtime\RestrictedMetaObject.cs" />
+ <Compile Include="Runtime\ReturnFixer.cs" />
+ <Compile Include="Runtime\SavableScriptCode.cs" />
+ <Compile Include="Runtime\ScriptingRuntimeHelpers.cs" />
+ <Compile Include="Runtime\SourceStringContentProvider.cs" />
+ <Compile Include="Runtime\StaticExtensionMethodAttribute.cs" />
+ <Compile Include="Runtime\SymbolDictionary.cs" />
+ <Compile Include="Runtime\TokenizerBuffer.cs" />
+ <Compile Include="Runtime\TransformDictEnumerator.cs" />
+ <Compile Include="Runtime\Uninitialized.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <!-- -->
+ <!-- Utils -->
+ <!-- -->
+ <Compile Include="Utils\ArrayUtils.cs" />
+ <Compile Include="Utils\AssemblyQualifiedTypeName.cs" />
+ <Compile Include="Utils\Assert.cs" />
+ <Compile Include="Utils\CacheDict.cs" />
+ <Compile Include="Utils\CheckedDictionaryEnumerator.cs" />
+ <Compile Include="Utils\CollectionExtensions.cs" />
+ <Compile Include="Utils\CollectionUtils.cs" />
+ <Compile Include="Utils\ContractUtils.cs" />
+ <Compile Include="Utils\CopyOnWriteList.cs" />
+ <Compile Include="Utils\DictionaryUnionEnumerator.cs" />
+ <Compile Include="Utils\DynamicUtils.cs" />
+ <Compile Include="Utils\EnumUtils.cs" />
+ <Compile Include="Utils\ExceptionFactory.Generated.cs" />
+ <Compile Include="Utils\ExceptionUtils.cs" />
+ <Compile Include="Utils\HashSet.cs" />
+ <Compile Include="Utils\IOUtils.cs" />
+ <Compile Include="Utils\ListEqualityComparer.cs" />
+ <Compile Include="Utils\MathUtils.cs" />
+ <Compile Include="Utils\MonitorUtils.cs" />
+ <Compile Include="Utils\Publisher.cs" />
+ <Compile Include="Utils\ReadOnlyDictionary.cs" />
+ <Compile Include="Utils\ReferenceEqualityComparer.cs" />
+ <Compile Include="Utils\ReflectedCaller.cs" />
+ <Compile Include="Utils\ReflectedCaller.Generated.cs" />
+ <Compile Include="Utils\ReflectionUtils.cs" />
+ <Compile Include="Utils\StringUtils.cs" />
+ <Compile Include="Utils\SynchronizedDictionary.cs" />
+ <Compile Include="Utils\TextStream.cs" />
+ <Compile Include="Utils\ThreadLocal.cs" />
+ <Compile Include="Utils\TypeExtensions.cs" />
+ <Compile Include="Utils\TypeUtils.cs" />
+ <Compile Include="Utils\ValueArray.cs" />
+ <Compile Include="Utils\WeakCollection.cs" />
+ <Compile Include="Utils\WeakDictionary.cs" />
+ <Compile Include="Utils\WeakHandle.cs" />
</ItemGroup>
<!-- End Generated Project Items By GenerateSystemCoreCsproj.py -->
- <ItemGroup>
- <Compile Include="Parameterized.System.Dynamic.cs" />
- </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<DefineConstants>$(DefineConstants);PRODUCTION_BUILD</DefineConstants>
@@ -149,4 +465,5 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
+
</Project>
diff --git a/mcs/class/dlr/Runtime/Microsoft.Dynamic/Microsoft.Dynamic.csproj b/mcs/class/dlr/Runtime/Microsoft.Dynamic/Microsoft.Dynamic.csproj
index 9d724e56ef2..32daf44a52c 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Dynamic/Microsoft.Dynamic.csproj
+++ b/mcs/class/dlr/Runtime/Microsoft.Dynamic/Microsoft.Dynamic.csproj
@@ -1,37 +1,41 @@
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>10.0.20624</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{D4AE44AD-07B9-41DC-BB3B-1FDCDE3C987D}</ProjectGuid>
+ <ProjectGuid>{EB66B766-6354-4208-A3D4-AACBDCB5C3B3}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <RootNamespace>System.Dynamic</RootNamespace>
+ <RootNamespace>Microsoft.Scripting</RootNamespace>
<AssemblyName>Microsoft.Dynamic</AssemblyName>
-<DocumentationFile>$(OutputPath)\Microsoft.Dynamic.XML</DocumentationFile>
+ <WarningsNotAsErrors>1685,618,649</WarningsNotAsErrors>
<NoWarn>1591</NoWarn>
<AssemblyOriginatorKeyFile>$(SolutionDir)\Runtime\MSSharedLibKey.snk</AssemblyOriginatorKeyFile>
<SignAssembly Condition="'$(SignAssembly)' == '' And Exists('$(AssemblyOriginatorKeyFile)')">true</SignAssembly>
<SignedSym Condition="'$(SignAssembly)' == 'true'">SIGNED</SignedSym>
<DelaySign>true</DelaySign>
+ <BaseAddress>859832320</BaseAddress>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <Silverlight3Path>$(ProgramFiles)\Microsoft Silverlight\3.0.40818.0</Silverlight3Path>
+ <Silverlight4Path>..\..\Utilities\Silverlight\v4-x86fre</Silverlight4Path>
+
+ <!-- The following two lines prevent csc.rsp and Microsoft.NETFramework.props from adding additional assembly references -->
+ <NoConfig>true</NoConfig>
+ <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'FxCop|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>$(SolutionDir)\..\Bin\fxcop\</OutputPath>
- <DefineConstants>DEBUG;TRACE;$(SignedSym);MICROSOFT_DYNAMIC;CLR2</DefineConstants>
+ <DefineConstants>TRACE;CLR2;$(SignedSym)</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<RunCodeAnalysis>true</RunCodeAnalysis>
- <CodeAnalysisRules>-Microsoft.Usage#CA2209;+!Microsoft.Design#CA1012;-!Microsoft.Design#CA2210;+!Microsoft.Design#CA1040;+!Microsoft.Design#CA1005;+!Microsoft.Design#CA1020;-!Microsoft.Design#CA1021;+!Microsoft.Design#CA1010;+!Microsoft.Design#CA1011;+!Microsoft.Design#CA1009;+!Microsoft.Design#CA1050;+!Microsoft.Design#CA1026;+!Microsoft.Design#CA1019;+!Microsoft.Design#CA1031;+!Microsoft.Design#CA1047;+!Microsoft.Design#CA1000;+!Microsoft.Design#CA1048;+!Microsoft.Design#CA1051;+!Microsoft.Design#CA1002;+!Microsoft.Design#CA1061;+!Microsoft.Design#CA1006;+!Microsoft.Design#CA1046;+!Microsoft.Design#CA1045;+!Microsoft.Design#CA1065;+!Microsoft.Design#CA1038;+!Microsoft.Design#CA1008;+!Microsoft.Design#CA1028;+!Microsoft.Design#CA1064;-!Microsoft.Design#CA1004;+!Microsoft.Design#CA1035;+!Microsoft.Design#CA1063;+!Microsoft.Design#CA1032;+!Microsoft.Design#CA1023;+!Microsoft.Design#CA1033;+!Microsoft.Design#CA1039;+!Microsoft.Design#CA1016;+!Microsoft.Design#CA1014;+!Microsoft.Design#CA1017;+!Microsoft.Design#CA1018;+!Microsoft.Design#CA1027;+!Microsoft.Design#CA1059;+!Microsoft.Design#CA1060;+!Microsoft.Design#CA1034;+!Microsoft.Design#CA1013;+!Microsoft.Design#CA1036;+!Microsoft.Design#CA1044;+!Microsoft.Design#CA1041;+!Microsoft.Design#CA1025;+!Microsoft.Design#CA1052;+!Microsoft.Design#CA1053;+!Microsoft.Design#CA1057;+!Microsoft.Design#CA1058;+!Microsoft.Design#CA1001;+!Microsoft.Design#CA1049;+!Microsoft.Design#CA1054;+!Microsoft.Design#CA1056;+!Microsoft.Design#CA1055;+!Microsoft.Design#CA1030;+!Microsoft.Design#CA1003;+!Microsoft.Design#CA1007;+!Microsoft.Design#CA1043;+!Microsoft.Design#CA1024;+!Microsoft.Globalization#CA1301;+!Microsoft.Globalization#CA1302;+!Microsoft.Globalization#CA1308;+!Microsoft.Globalization#CA1306;+!Microsoft.Globalization#CA1304;+!Microsoft.Globalization#CA1305;+!Microsoft.Globalization#CA2101;+!Microsoft.Globalization#CA1300;+!Microsoft.Globalization#CA1307;+!Microsoft.Globalization#CA1309;+!Microsoft.Interoperability#CA1403;+!Microsoft.Interoperability#CA1406;+!Microsoft.Interoperability#CA1413;+!Microsoft.Interoperability#CA1402;+!Microsoft.Interoperability#CA1407;+!Microsoft.Interoperability#CA1404;+!Microsoft.Interoperability#CA1410;+!Microsoft.Interoperability#CA1411;+!Microsoft.Interoperability#CA1405;+!Microsoft.Interoperability#CA1409;+!Microsoft.Interoperability#CA1415;+!Microsoft.Interoperability#CA1408;+!Microsoft.Interoperability#CA1414;+!Microsoft.Interoperability#CA1412;+!Microsoft.Interoperability#CA1400;+!Microsoft.Interoperability#CA1401;+!Microsoft.Maintainability#CA1506;+!Microsoft.Maintainability#CA1502;+!Microsoft.Maintainability#CA1501;+!Microsoft.Maintainability#CA1505;+!Microsoft.Maintainability#CA1504;+!Microsoft.Maintainability#CA1500;+!Microsoft.Mobility#CA1600;+!Microsoft.Mobility#CA1601;-!Microsoft.Naming#CA1702;+!Microsoft.Naming#CA1700;+!Microsoft.Naming#CA1712;+!Microsoft.Naming#CA1713;+!Microsoft.Naming#CA1714;+!Microsoft.Naming#CA1709;-!Microsoft.Naming#CA1704;+!Microsoft.Naming#CA1708;+!Microsoft.Naming#CA1715;-!Microsoft.Naming#CA1710;+!Microsoft.Naming#CA1720;+!Microsoft.Naming#CA1707;+!Microsoft.Naming#CA1722;-!Microsoft.Naming#CA1711;+!Microsoft.Naming#CA1716;+!Microsoft.Naming#CA1717;+!Microsoft.Naming#CA1725;+!Microsoft.Naming#CA1719;+!Microsoft.Naming#CA1721;+!Microsoft.Naming#CA1701;+!Microsoft.Naming#CA1703;+!Microsoft.Naming#CA1724;-!Microsoft.Naming#CA1726;+!Microsoft.Performance#CA1809;+!Microsoft.Performance#CA1811;+!Microsoft.Performance#CA1812;+!Microsoft.Performance#CA1813;+!Microsoft.Performance#CA1823;+!Microsoft.Performance#CA1800;+!Microsoft.Performance#CA1805;+!Microsoft.Performance#CA1810;+!Microsoft.Performance#CA1824;+!Microsoft.Performance#CA1822;+!Microsoft.Performance#CA1815;+!Microsoft.Performance#CA1814;+!Microsoft.Performance#CA1819;+!Microsoft.Performance#CA1821;+!Microsoft.Performance#CA1804;+!Microsoft.Performance#CA1820;+!Microsoft.Performance#CA1802;+!Microsoft.Portability#CA1901;+!Microsoft.Portability#CA1900;+!Microsoft.Reliability#CA2001;+!Microsoft.Reliability#CA2002;+!Microsoft.Reliability#CA2003;+!Microsoft.Reliability#CA2004;+!Microsoft.Reliability#CA2006;+!Microsoft.Security#CA2116;+!Microsoft.Security#CA2117;+!Microsoft.Security#CA2105;+!Microsoft.Security#CA2115;+!Microsoft.Security#CA2102;+!Microsoft.Security#CA2104;+!Microsoft.Security#CA2122;+!Microsoft.Security#CA2114;+!Microsoft.Security#CA2123;+!Microsoft.Security#CA2111;+!Microsoft.Security#CA2108;+!Microsoft.Security#CA2107;+!Microsoft.Security#CA2103;+!Microsoft.Security#CA2118;+!Microsoft.Security#CA2109;+!Microsoft.Security#CA2119;+!Microsoft.Security#CA2106;+!Microsoft.Security#CA2112;+!Microsoft.Security#CA2120;+!Microsoft.Security#CA2121;+!Microsoft.Security#CA2126;+!Microsoft.Security#CA2124;+!Microsoft.Security#CA2127;+!Microsoft.Security#CA2128;+!Microsoft.Security#CA2129;+!Microsoft.Usage#CA2243;+!Microsoft.Usage#CA2236;+!Microsoft.Usage#CA1816;+!Microsoft.Usage#CA2227;+!Microsoft.Usage#CA2213;+!Microsoft.Usage#CA2216;+!Microsoft.Usage#CA2214;+!Microsoft.Usage#CA2222;+!Microsoft.Usage#CA1806;+!Microsoft.Usage#CA2217;+!Microsoft.Usage#CA2212;+!Microsoft.Usage#CA2219;+!Microsoft.Usage#CA2201;+!Microsoft.Usage#CA2228;+!Microsoft.Usage#CA2221;+!Microsoft.Usage#CA2220;+!Microsoft.Usage#CA2240;+!Microsoft.Usage#CA2229;+!Microsoft.Usage#CA2238;+!Microsoft.Usage#CA2207;+!Microsoft.Usage#CA2208;+!Microsoft.Usage#CA2235;+!Microsoft.Usage#CA2237;+!Microsoft.Usage#CA2232;+!Microsoft.Usage#CA2223;+!Microsoft.Usage#CA2211;+!Microsoft.Usage#CA2233;+!Microsoft.Usage#CA2225;+!Microsoft.Usage#CA2226;+!Microsoft.Usage#CA2231;+!Microsoft.Usage#CA2224;+!Microsoft.Usage#CA2218;+!Microsoft.Usage#CA2234;+!Microsoft.Usage#CA2239;+!Microsoft.Usage#CA2200;+!Microsoft.Usage#CA1801;+!Microsoft.Usage#CA2242;+!Microsoft.Usage#CA2205;+!Microsoft.Usage#CA2230</CodeAnalysisRules>
- <NoWarn>
- </NoWarn>
+ <CodeAnalysisRules>-Microsoft.Usage#CA2209;+!Microsoft.Design#CA1012;-!Microsoft.Design#CA2210;+!Microsoft.Design#CA1040;+!Microsoft.Design#CA1005;+!Microsoft.Design#CA1020;-!Microsoft.Design#CA1021;+!Microsoft.Design#CA1010;-!Microsoft.Design#CA1011;+!Microsoft.Design#CA1009;+!Microsoft.Design#CA1050;+!Microsoft.Design#CA1026;+!Microsoft.Design#CA1019;+!Microsoft.Design#CA1031;+!Microsoft.Design#CA1047;-!Microsoft.Design#CA1000;+!Microsoft.Design#CA1048;-!Microsoft.Design#CA1051;-!Microsoft.Design#CA1002;+!Microsoft.Design#CA1061;-!Microsoft.Design#CA1006;+!Microsoft.Design#CA1046;+!Microsoft.Design#CA1045;+!Microsoft.Design#CA1065;+!Microsoft.Design#CA1038;+!Microsoft.Design#CA1008;+!Microsoft.Design#CA1028;+!Microsoft.Design#CA1064;-!Microsoft.Design#CA1004;+!Microsoft.Design#CA1035;-!Microsoft.Design#CA1063;+!Microsoft.Design#CA1032;+!Microsoft.Design#CA1023;-!Microsoft.Design#CA1033;+!Microsoft.Design#CA1039;+!Microsoft.Design#CA1016;+!Microsoft.Design#CA1014;+!Microsoft.Design#CA1017;+!Microsoft.Design#CA1018;+!Microsoft.Design#CA1027;+!Microsoft.Design#CA1059;+!Microsoft.Design#CA1060;+!Microsoft.Design#CA1034;+!Microsoft.Design#CA1013;+!Microsoft.Design#CA1036;+!Microsoft.Design#CA1044;+!Microsoft.Design#CA1041;+!Microsoft.Design#CA1025;+!Microsoft.Design#CA1052;+!Microsoft.Design#CA1053;+!Microsoft.Design#CA1057;+!Microsoft.Design#CA1058;+!Microsoft.Design#CA1001;+!Microsoft.Design#CA1049;+!Microsoft.Design#CA1054;+!Microsoft.Design#CA1056;+!Microsoft.Design#CA1055;+!Microsoft.Design#CA1030;+!Microsoft.Design#CA1003;-!Microsoft.Design#CA1007;+!Microsoft.Design#CA1043;-!Microsoft.Design#CA1024;+!Microsoft.Globalization#CA1301;+!Microsoft.Globalization#CA1302;-!Microsoft.Globalization#CA1308;+!Microsoft.Globalization#CA1306;+!Microsoft.Globalization#CA1304;-!Microsoft.Globalization#CA1305;+!Microsoft.Globalization#CA2101;+!Microsoft.Globalization#CA1300;-!Microsoft.Globalization#CA1307;+!Microsoft.Globalization#CA1309;+!Microsoft.Interoperability#CA1403;+!Microsoft.Interoperability#CA1406;+!Microsoft.Interoperability#CA1413;+!Microsoft.Interoperability#CA1402;+!Microsoft.Interoperability#CA1407;+!Microsoft.Interoperability#CA1404;+!Microsoft.Interoperability#CA1410;+!Microsoft.Interoperability#CA1411;+!Microsoft.Interoperability#CA1405;+!Microsoft.Interoperability#CA1409;+!Microsoft.Interoperability#CA1415;+!Microsoft.Interoperability#CA1408;+!Microsoft.Interoperability#CA1414;+!Microsoft.Interoperability#CA1412;+!Microsoft.Interoperability#CA1400;+!Microsoft.Interoperability#CA1401;+!Microsoft.Maintainability#CA1506;+!Microsoft.Maintainability#CA1502;+!Microsoft.Maintainability#CA1501;+!Microsoft.Maintainability#CA1505;+!Microsoft.Maintainability#CA1504;+!Microsoft.Maintainability#CA1500;+!Microsoft.Mobility#CA1600;+!Microsoft.Mobility#CA1601;-!Microsoft.Naming#CA1702;+!Microsoft.Naming#CA1700;+!Microsoft.Naming#CA1712;+!Microsoft.Naming#CA1713;+!Microsoft.Naming#CA1714;+!Microsoft.Naming#CA1709;-!Microsoft.Naming#CA1704;+!Microsoft.Naming#CA1708;+!Microsoft.Naming#CA1715;-!Microsoft.Naming#CA1710;-!Microsoft.Naming#CA1720;+!Microsoft.Naming#CA1707;+!Microsoft.Naming#CA1722;-!Microsoft.Naming#CA1711;+!Microsoft.Naming#CA1716;+!Microsoft.Naming#CA1717;+!Microsoft.Naming#CA1725;+!Microsoft.Naming#CA1719;-!Microsoft.Naming#CA1721;-!Microsoft.Naming#CA1701;-!Microsoft.Naming#CA1703;+!Microsoft.Naming#CA1724;-!Microsoft.Naming#CA1726;+!Microsoft.Performance#CA1809;-!Microsoft.Performance#CA1811;+!Microsoft.Performance#CA1812;+!Microsoft.Performance#CA1813;+!Microsoft.Performance#CA1823;+!Microsoft.Performance#CA1800;-!Microsoft.Performance#CA1805;+!Microsoft.Performance#CA1810;+!Microsoft.Performance#CA1824;-!Microsoft.Performance#CA1822;+!Microsoft.Performance#CA1815;+!Microsoft.Performance#CA1814;+!Microsoft.Performance#CA1819;+!Microsoft.Performance#CA1821;+!Microsoft.Performance#CA1804;+!Microsoft.Performance#CA1820;+!Microsoft.Performance#CA1802;+!Microsoft.Portability#CA1901;+!Microsoft.Portability#CA1900;+!Microsoft.Reliability#CA2001;+!Microsoft.Reliability#CA2002;+!Microsoft.Reliability#CA2003;+!Microsoft.Reliability#CA2004;+!Microsoft.Reliability#CA2006;+!Microsoft.Security#CA2116;+!Microsoft.Security#CA2117;+!Microsoft.Security#CA2105;+!Microsoft.Security#CA2115;+!Microsoft.Security#CA2102;+!Microsoft.Security#CA2104;+!Microsoft.Security#CA2122;+!Microsoft.Security#CA2114;+!Microsoft.Security#CA2123;+!Microsoft.Security#CA2111;+!Microsoft.Security#CA2108;+!Microsoft.Security#CA2107;+!Microsoft.Security#CA2103;+!Microsoft.Security#CA2118;+!Microsoft.Security#CA2109;+!Microsoft.Security#CA2119;+!Microsoft.Security#CA2106;+!Microsoft.Security#CA2112;+!Microsoft.Security#CA2120;+!Microsoft.Security#CA2121;+!Microsoft.Security#CA2126;+!Microsoft.Security#CA2124;+!Microsoft.Security#CA2127;+!Microsoft.Security#CA2128;+!Microsoft.Security#CA2129;+!Microsoft.Usage#CA2243;+!Microsoft.Usage#CA2236;+!Microsoft.Usage#CA1816;+!Microsoft.Usage#CA2227;+!Microsoft.Usage#CA2213;+!Microsoft.Usage#CA2216;+!Microsoft.Usage#CA2214;+!Microsoft.Usage#CA2222;+!Microsoft.Usage#CA1806;+!Microsoft.Usage#CA2217;+!Microsoft.Usage#CA2212;+!Microsoft.Usage#CA2219;+!Microsoft.Usage#CA2201;+!Microsoft.Usage#CA2228;+!Microsoft.Usage#CA2221;+!Microsoft.Usage#CA2220;+!Microsoft.Usage#CA2240;+!Microsoft.Usage#CA2229;+!Microsoft.Usage#CA2238;+!Microsoft.Usage#CA2207;+!Microsoft.Usage#CA2208;+!Microsoft.Usage#CA2235;+!Microsoft.Usage#CA2237;+!Microsoft.Usage#CA2232;+!Microsoft.Usage#CA2223;+!Microsoft.Usage#CA2211;+!Microsoft.Usage#CA2233;+!Microsoft.Usage#CA2225;+!Microsoft.Usage#CA2226;+!Microsoft.Usage#CA2231;+!Microsoft.Usage#CA2224;+!Microsoft.Usage#CA2218;+!Microsoft.Usage#CA2234;+!Microsoft.Usage#CA2239;+!Microsoft.Usage#CA2200;+!Microsoft.Usage#CA1801;+!Microsoft.Usage#CA2242;+!Microsoft.Usage#CA2205;+!Microsoft.Usage#CA2230</CodeAnalysisRules>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -39,97 +43,470 @@
<Optimize>false</Optimize>
<OutputPath>$(SolutionDir)\..\Bin\Debug\</OutputPath>
<DocumentationFile>$(OutputPath)\Microsoft.Dynamic.xml</DocumentationFile>
- <DefineConstants>DEBUG;TRACE;$(SignedSym);MICROSOFT_DYNAMIC;CLR2</DefineConstants>
+ <DefineConstants>DEBUG;TRACE;CLR2;$(SignedSym)</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<RunCodeAnalysis>false</RunCodeAnalysis>
- <NoWarn>
- </NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>$(SolutionDir)\..\Bin\Release\</OutputPath>
-<DocumentationFile>$(OutputPath)\Microsoft.Dynamic.XML</DocumentationFile>
- <DefineConstants>TRACE;$(SignedSym);MICROSOFT_DYNAMIC;CLR2</DefineConstants>
+<DocumentationFile>$(OutputPath)\Microsoft.Dynamic.xml</DocumentationFile>
+ <DefineConstants>TRACE;CLR2;$(SignedSym)</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <RunCodeAnalysis>false</RunCodeAnalysis>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Silverlight Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+<OutputPath>$(SolutionDir)\..\Bin\Silverlight Debug\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;SILVERLIGHT;CLR2;$(SignedSym)</DefineConstants>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>full</DebugType>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <RunCodeAnalysis>false</RunCodeAnalysis>
+ <ErrorReport>prompt</ErrorReport>
+ <NoStdLib>true</NoStdLib>
+<DocumentationFile>$(OutputPath)\Microsoft.Dynamic.xml</DocumentationFile>
+ <NoWarn>1591,618</NoWarn>
+ <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+ <SilverlightBuild>true</SilverlightBuild>
+ <SilverlightPath Condition="'$(SilverlightPath)' == ''">$(Silverlight3Path)</SilverlightPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Silverlight Release|AnyCPU' ">
+<OutputPath>$(SolutionDir)\..\Bin\Silverlight Release\</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT;CLR2;$(SignedSym)</DefineConstants>
+<DocumentationFile>$(OutputPath)\Microsoft.Dynamic.xml</DocumentationFile>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <NoWarn>1591,618</NoWarn>
+ <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+ <NoStdLib>true</NoStdLib>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <SilverlightBuild>true</SilverlightBuild>
+ <SilverlightPath Condition="'$(SilverlightPath)' == ''">$(Silverlight3Path)</SilverlightPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'V4 Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+<OutputPath>$(SolutionDir)\..\Bin\Debug\</OutputPath>
+<DocumentationFile>$(OutputPath)\Microsoft.Dynamic.xml</DocumentationFile>
+ <DefineConstants>DEBUG;TRACE;CLR4;$(SignedSym)</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<RunCodeAnalysis>false</RunCodeAnalysis>
- <BaseAddress>1929379840</BaseAddress>
- <NoWarn>
- </NoWarn>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'V4 Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+<OutputPath>$(SolutionDir)\..\Bin\Release\</OutputPath>
+<DocumentationFile>$(OutputPath)\Microsoft.Dynamic.xml</DocumentationFile>
+ <DefineConstants>TRACE;CLR4;$(SignedSym)</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <RunCodeAnalysis>false</RunCodeAnalysis>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Silverlight 4 Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+<OutputPath>$(SolutionDir)\..\Bin\Debug\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;SILVERLIGHT;CLR4;$(SignedSym)</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <NoWarn>1591,618</NoWarn>
+ <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <NoStdLib>true</NoStdLib>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <SilverlightBuild>true</SilverlightBuild>
+ <SilverlightPath Condition="'$(SilverlightPath)' == ''">$(Silverlight4Path)</SilverlightPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Silverlight 4 Release|AnyCPU' ">
+ <NoStdLib>true</NoStdLib>
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+<OutputPath>$(SolutionDir)\..\Bin\Release\</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT;CLR4;$(SignedSym)</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <NoWarn>1591,618</NoWarn>
+ <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <SilverlightBuild>true</SilverlightBuild>
+ <SilverlightPath Condition="'$(SilverlightPath)' == ''">$(Silverlight4Path)</SilverlightPath>
</PropertyGroup>
<ItemGroup>
- <Reference Include="mscorlib" />
+ <Compile Include="..\..\Hosts\Silverlight\SilverlightVersion.cs" Condition=" '$(SilverlightBuild)' == 'true' ">
+ <Link>Properties\SilverlightVersion.cs</Link>
+ </Compile>
+ <Compile Include="Actions\Calls\ActualArguments.cs" />
+ <Compile Include="Actions\Calls\ApplicableCandidate.cs" />
+ <Compile Include="Actions\Calls\ArgBuilder.cs" />
+ <Compile Include="Actions\Calls\ArgumentBinding.cs" />
+ <Compile Include="Actions\Calls\BindingResult.cs" />
+ <Compile Include="Actions\Calls\BindingTarget.cs" />
+ <Compile Include="Actions\Calls\ByRefReturnBuilder.cs" />
+ <Compile Include="Actions\Calls\CallFailure.cs" />
+ <Compile Include="Actions\Calls\CallFailureReason.cs" />
+ <Compile Include="Actions\Calls\CandidateSet.cs" />
+ <Compile Include="Actions\Calls\ConversionResult.cs" />
+ <Compile Include="Actions\Calls\DefaultArgBuilder.cs" />
+ <Compile Include="Actions\Calls\DefaultOverloadResolver.cs" />
+ <Compile Include="Actions\Calls\InstanceBuilder.cs" />
+ <Compile Include="Actions\Calls\KeywordArgBuilder.cs" />
+ <Compile Include="Actions\Calls\KeywordConstructorReturnBuilder.cs" />
+ <Compile Include="Actions\Calls\MethodCandidate.cs" />
+ <Compile Include="Actions\Calls\NarrowingLevel.cs" />
+ <Compile Include="Actions\Calls\OutArgBuilder.cs" />
+ <Compile Include="Actions\Calls\OverloadResolver.cs" />
+ <Compile Include="Actions\Calls\OverloadResolverFactory.cs" />
+ <Compile Include="Actions\Calls\ParameterMapping.cs" />
+ <Compile Include="Actions\Calls\ParameterWrapper.cs" />
+ <Compile Include="Actions\Calls\ParamsArgBuilder.cs" />
+ <Compile Include="Actions\Calls\ParamsDictArgBuilder.cs" />
+ <Compile Include="Actions\Calls\ReferenceArgBuilder.cs" />
+ <Compile Include="Actions\Calls\RestrictedArguments.cs" />
+ <Compile Include="Actions\Calls\ReturnBuilder.cs" />
+ <Compile Include="Actions\Calls\ReturnReferenceArgBuilder.cs" />
+ <Compile Include="Actions\Calls\SimpleArgBuilder.cs" />
+ <Compile Include="Actions\Calls\TypeInferer.cs" />
+ <Compile Include="Actions\ConversionResultKind.cs" />
+ <Compile Include="Actions\DefaultBinder.Operations.cs" />
+ <Compile Include="Actions\Interceptor.cs" />
+ <Compile Include="Actions\DynamicSiteHelper.cs" />
+ <Compile Include="Actions\ExtensionBinaryOperationBinder.cs" />
+ <Compile Include="Actions\ExtensionUnaryOperationBinder.cs" />
+ <Compile Include="Actions\MemberRequestKind.cs" />
+ <Compile Include="Actions\OperationBinder.cs" />
+ <Compile Include="Actions\OperationMetaObject.cs" />
+ <Compile Include="Ast\FinallyFlowControlExpression.cs" />
+ <Compile Include="Ast\FlowControlRewriter.cs" />
+ <Compile Include="Ast\SourceFileInformation.cs" />
+ <Compile Include="Ast\SkipInterpretExpression.cs" />
+ <Compile Include="Ast\VariableDictionaryExpression.cs" />
+ <Compile Include="Ast\NewArrayExpression.cs" />
+ <Compile Include="Ast\NewExpression.cs" />
+ <Compile Include="Ast\UnaryExpression.cs" />
+ <Compile Include="ComInterop\ArgBuilder.cs" />
+ <Compile Include="ComInterop\BoolArgBuilder.cs" />
+ <Compile Include="ComInterop\BoundDispEvent.cs" />
+ <Compile Include="ComInterop\CollectionExtensions.cs" />
+ <Compile Include="ComInterop\ComBinder.cs" />
+ <Compile Include="ComInterop\ComBinderHelpers.cs" />
+ <Compile Include="ComInterop\ComClassMetaObject.cs" />
+ <Compile Include="ComInterop\ComDispIds.cs" />
+ <Compile Include="ComInterop\ComEventDesc.cs" />
+ <Compile Include="ComInterop\ComEventSink.cs" />
+ <Compile Include="ComInterop\ComEventSinkProxy.cs" />
+ <Compile Include="ComInterop\ComEventSinksContainer.cs" />
+ <Compile Include="ComInterop\ComFallbackMetaObject.cs" />
+ <Compile Include="ComInterop\ComHresults.cs" />
+ <Compile Include="ComInterop\ComInterop.cs" />
+ <Compile Include="ComInterop\ComInvokeAction.cs" />
+ <Compile Include="ComInterop\ComInvokeBinder.cs" />
+ <Compile Include="ComInterop\ComMetaObject.cs" />
+ <Compile Include="ComInterop\ComMethodDesc.cs" />
+ <Compile Include="ComInterop\ComObject.cs" />
+ <Compile Include="ComInterop\ComParamDesc.cs" />
+ <Compile Include="ComInterop\ComRuntimeHelpers.cs" />
+ <Compile Include="ComInterop\ComType.cs" />
+ <Compile Include="ComInterop\ComTypeClassDesc.cs" />
+ <Compile Include="ComInterop\ComTypeDesc.cs" />
+ <Compile Include="ComInterop\ComTypeEnumDesc.cs" />
+ <Compile Include="ComInterop\ComTypeLibDesc.cs" />
+ <Compile Include="ComInterop\ComTypeLibInfo.cs" />
+ <Compile Include="ComInterop\ComTypeLibMemberDesc.cs" />
+ <Compile Include="ComInterop\ConversionArgBuilder.cs" />
+ <Compile Include="ComInterop\ConvertArgBuilder.cs" />
+ <Compile Include="ComInterop\ConvertibleArgBuilder.cs" />
+ <Compile Include="ComInterop\CurrencyArgBuilder.cs" />
+ <Compile Include="ComInterop\DateTimeArgBuilder.cs" />
+ <Compile Include="ComInterop\DispatchArgBuilder.cs" />
+ <Compile Include="ComInterop\DispCallable.cs" />
+ <Compile Include="ComInterop\DispCallableMetaObject.cs" />
+ <Compile Include="ComInterop\ErrorArgBuilder.cs" />
+ <Compile Include="ComInterop\Errors.cs" />
+ <Compile Include="ComInterop\ExcepInfo.cs" />
+ <Compile Include="ComInterop\Helpers.cs" />
+ <Compile Include="ComInterop\IDispatchComObject.cs" />
+ <Compile Include="ComInterop\IDispatchMetaObject.cs" />
+ <Compile Include="ComInterop\IPseudoComObject.cs" />
+ <Compile Include="ComInterop\NullArgBuilder.cs" />
+ <Compile Include="ComInterop\SimpleArgBuilder.cs" />
+ <Compile Include="ComInterop\SplatCallSite.cs" />
+ <Compile Include="ComInterop\StringArgBuilder.cs" />
+ <Compile Include="ComInterop\TypeEnumMetaObject.cs" />
+ <Compile Include="ComInterop\TypeLibInfoMetaObject.cs" />
+ <Compile Include="ComInterop\TypeLibMetaObject.cs" />
+ <Compile Include="ComInterop\TypeUtils.cs" />
+ <Compile Include="ComInterop\UnknownArgBuilder.cs" />
+ <Compile Include="ComInterop\VarEnumSelector.cs" />
+ <Compile Include="ComInterop\Variant.cs" />
+ <Compile Include="ComInterop\VariantArgBuilder.cs" />
+ <Compile Include="ComInterop\VariantArray.cs" />
+ <Compile Include="ComInterop\VariantBuilder.cs" />
+ <Compile Include="Generation\FieldBuilderExpression.cs" />
+ <Compile Include="Hosting\Shell\ICommandDispatcher.cs" />
+ <Compile Include="Hosting\Shell\Remote\ConsoleRestartManager.cs" />
+ <Compile Include="Hosting\Shell\Remote\RemoteCommandDispatcher.cs" />
+ <Compile Include="Hosting\Shell\Remote\RemoteConsoleCommandLine.cs" />
+ <Compile Include="Hosting\Shell\Remote\RemoteConsoleHost.cs" />
+ <Compile Include="Hosting\Shell\Remote\RemoteRuntimeServer.cs" />
+ <Compile Include="Interpreter\LightDelegateCreator.cs" />
+ <Compile Include="Interpreter\LightLambda.Generated.cs" />
+ <Compile Include="Interpreter\Interpreter.cs" />
+ <Compile Include="Interpreter\DynamicInstructions.Generated.cs" />
+ <Compile Include="Interpreter\DynamicInstructions.cs" />
+ <Compile Include="Interpreter\LightLambdaClosureVisitor.cs" />
+ <Compile Include="Interpreter\LightLambda.cs" />
+ <Compile Include="Interpreter\Instruction.cs" />
+ <Compile Include="Interpreter\LightCompiler.cs" />
+ <Compile Include="Interpreter\RuntimeVariables.cs" />
+ <Compile Include="Interpreter\InterpretedFrame.cs" />
+ <Compile Include="Interpreter\LastFaultingLineExpression.cs" />
+ <Compile Include="Math\BigIntegerV2.cs" />
+ <Compile Include="Math\BigIntegerV4.cs" />
+ <Compile Include="Runtime\BindingRestrictionsHelpers.cs" />
+ <Compile Include="Runtime\DynamicDelegateCreator.cs" />
+ <Compile Include="Runtime\DynamicNull.cs" />
+ <Compile Include="Runtime\Generator.cs" />
+ <Compile Include="Ast\GeneratorExpression.cs" />
+ <Compile Include="Ast\GeneratorRewriter.cs" />
+ <Compile Include="Ast\SymbolConstantExpression.cs" />
+ <Compile Include="Actions\Calls\Candidate.cs" />
+ <Compile Include="Ast\YieldExpression.cs" />
+ <Compile Include="Generation\DelegateHelpers.cs" />
+ <Compile Include="Generation\DelegateHelpers.Generated.cs" />
+ <Compile Include="Generation\AssemblyGen.cs" />
+ <Compile Include="Generation\ConstantCheck.cs" />
+ <Compile Include="Generation\DynamicILGen.cs" />
+ <Compile Include="Generation\ILGen.cs" />
+ <Compile Include="Generation\KeyedQueue.cs" />
+ <Compile Include="Generation\Snippets.cs" />
+ <Compile Include="Generation\TypeGen.cs" />
+ <Compile Include="Actions\BinderHelpers.cs" />
+ <Compile Include="Actions\ComboActionRewriter.cs" />
+ <Compile Include="Actions\ComboBinder.cs" />
+ <Compile Include="Actions\ConditionalBuilder.cs" />
+ <Compile Include="Actions\DefaultBinder.Conversions.cs" />
+ <Compile Include="Actions\DefaultBinder.DeleteMember.cs" />
+ <Compile Include="Actions\DefaultBinder.GetMember.cs" />
+ <Compile Include="Actions\DefaultBinder.Invoke.cs" />
+ <Compile Include="Actions\DefaultBinder.MethodCalls.cs" />
+ <Compile Include="Actions\DefaultBinder.SetMember.cs" />
+ <Compile Include="Actions\DefaultBinder.cs" />
+ <Compile Include="Actions\NoSideEffectsAttribute.cs" />
+ <Compile Include="Actions\OperatorInfo.cs" />
+ <Compile Include="Ast\BinaryExpression.cs" />
+ <Compile Include="Ast\Block.cs" />
+ <Compile Include="Ast\ConstantExpression.cs" />
+ <Compile Include="Ast\EmptyStatements.cs" />
+ <Compile Include="Ast\LambdaBuilder.cs" />
+ <Compile Include="Ast\LambdaParameterRewriter.cs" />
+ <Compile Include="Ast\LoopStatement.cs" />
+ <Compile Include="Ast\MethodCallExpression.cs" />
+ <Compile Include="Ast\TryStatementBuilder.cs" />
+ <Compile Include="MultiRuntimeAwareAttribute.cs" />
+ <Compile Include="PerfTrack.cs" />
+ <Compile Include="Runtime\CompilerContext.cs" />
+ <Compile Include="Runtime\DynamicLanguageProviderAttribute.cs" />
+ <Compile Include="Runtime\IConvertibleMetaObject.cs" />
+ <Compile Include="Runtime\ICustomScriptCodeData.cs" />
+ <Compile Include="Runtime\IRestrictedMetaObject.cs" />
+ <Compile Include="Runtime\LegacyScriptCode.cs" />
+ <Compile Include="Runtime\MetaObjectExtensions.cs" />
+ <Compile Include="Runtime\RestrictedMetaObject.cs" />
+ <Compile Include="Runtime\SavableScriptCode.cs" />
+ <Compile Include="Runtime\TokenizerBuffer.cs" />
+ <Compile Include="Generation\MethodSignatureInfo.cs" />
+ <Compile Include="Hosting\Shell\BasicConsole.cs" />
+ <Compile Include="Hosting\Shell\CommandLine.cs" />
+ <Compile Include="Hosting\Shell\ConsoleHost.cs" />
+ <Compile Include="Hosting\Shell\ConsoleHostOptions.cs" />
+ <Compile Include="Hosting\Shell\ConsoleHostOptionsParser.cs" />
+ <Compile Include="Hosting\Shell\ConsoleOptions.cs" />
+ <Compile Include="Hosting\Shell\IConsole.cs" />
+ <Compile Include="Hosting\Shell\OptionsParser.cs" />
+ <Compile Include="Hosting\Shell\Style.cs" />
+ <Compile Include="Hosting\Shell\SuperConsole.cs" />
+ <Compile Include="GlobalSuppressions.cs" />
+ <Compile Include="Math\Complex64.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Runtime\AmbiguousFileNameException.cs" />
+ <Compile Include="Runtime\BinderOps.cs" />
+ <Compile Include="Runtime\CallTypes.cs" />
+ <Compile Include="Runtime\Cast.Generated.cs" />
+ <Compile Include="Runtime\Cast.cs" />
+ <Compile Include="Runtime\CodeDomCodeGen.cs" />
+ <Compile Include="Runtime\DefaultLanguageContext.cs" />
+ <Compile Include="Runtime\DelegateInfo.cs" />
+ <Compile Include="Runtime\DelegateSignatureInfo.cs" />
+ <Compile Include="Runtime\ISlice.cs" />
+ <Compile Include="Runtime\IdDispenser.cs" />
+ <Compile Include="Runtime\LanguageBoundTextContentProvider.cs" />
+ <Compile Include="Runtime\LocalsDictionary.cs" />
+ <Compile Include="Runtime\PositionTrackingWriter.cs" />
+ <Compile Include="Runtime\ReturnFixer.cs" />
+ <Compile Include="Runtime\SourceStringContentProvider.cs" />
+ <Compile Include="Utils\CacheDict.cs" />
+ <Compile Include="Utils\CollectionExtensions.cs" />
+ <Compile Include="Utils\CopyOnWriteList.cs" />
+ <Compile Include="Utils\DynamicUtils.cs" />
+ <Compile Include="Utils\EnumUtils.cs" />
+ <Compile Include="Utils\ListEqualityComparer.cs" />
+ <Compile Include="Utils\MathUtils.cs" />
+ <Compile Include="Utils\MonitorUtils.cs" />
+ <Compile Include="Utils\Publisher.cs" />
+ <Compile Include="Utils\ReadOnlyDictionary.cs" />
+ <Compile Include="Utils\ReferenceEqualityComparer.cs" />
+ <Compile Include="Utils\ReflectedCaller.Generated.cs" />
+ <Compile Include="Utils\ReflectedCaller.cs" />
+ <Compile Include="Utils\HashSet.cs" />
+ <Compile Include="Utils\SynchronizedDictionary.cs" />
+ <Compile Include="Utils\ThreadLocal.cs" />
+ <Compile Include="Utils\TypeExtensions.cs" />
+ <Compile Include="Utils\TypeUtils.cs" />
+ <Compile Include="Utils\ValueArray.cs" />
+ <Compile Include="Utils\WeakCollection.cs" />
+ <Compile Include="Utils\WeakDictionary.cs" />
+ <Compile Include="Utils\WeakHandle.cs" />
+ <Compile Include="DebugOptions.cs" />
+ <Compile Include="SpecSharp.cs" />
+ <Compile Include="MutableTuple.cs" />
+ <Compile Include="Actions\ActionBinder.cs" />
+ <Compile Include="Actions\Argument.cs" />
+ <Compile Include="Actions\ArgumentType.cs" />
+ <Compile Include="Actions\BoundMemberTracker.cs" />
+ <Compile Include="Actions\CallSignature.cs" />
+ <Compile Include="Actions\ConstructorTracker.cs" />
+ <Compile Include="Actions\CustomTracker.cs" />
+ <Compile Include="Actions\ErrorInfo.cs" />
+ <Compile Include="Actions\EventTracker.cs" />
+ <Compile Include="Actions\ExtensionMethodTracker.cs" />
+ <Compile Include="Actions\ExtensionPropertyTracker.cs" />
+ <Compile Include="Actions\FieldTracker.cs" />
+ <Compile Include="Actions\MemberGroup.cs" />
+ <Compile Include="Actions\MemberTracker.cs" />
+ <Compile Include="Actions\MethodGroup.cs" />
+ <Compile Include="Actions\MethodTracker.cs" />
+ <Compile Include="Actions\NamespaceTracker.cs" />
+ <Compile Include="Actions\NestedTypeTracker.cs" />
+ <Compile Include="Actions\PropertyTracker.cs" />
+ <Compile Include="Actions\ReflectedPropertyTracker.cs" />
+ <Compile Include="Actions\TopNamespaceTracker.cs" />
+ <Compile Include="Actions\TrackerTypes.cs" />
+ <Compile Include="Actions\TypeGroup.cs" />
+ <Compile Include="Actions\TypeTracker.cs" />
+ <Compile Include="Ast\DebugStatement.cs" />
+ <Compile Include="Ast\IfStatementBuilder.cs" />
+ <Compile Include="Ast\IfStatementTest.cs" />
+ <Compile Include="Generation\CompilerHelpers.cs" />
+ <Compile Include="Generation\IExpressionSerializable.cs" />
+ <Compile Include="Generation\ParameterInfoWrapper.cs" />
+ <Compile Include="Generation\ToDiskRewriter.cs" />
+ <Compile Include="Runtime\AssemblyTypeNames.cs" />
+ <Compile Include="Runtime\BaseSymbolDictionary.cs" />
+ <Compile Include="Runtime\BinderType.cs" />
+ <Compile Include="Runtime\CallTargets.cs" />
+ <Compile Include="Runtime\CustomSymbolDictionary.cs" />
+ <Compile Include="Runtime\DlrCachedCodeAttribute.cs" />
+ <Compile Include="Runtime\DocumentationAttribute.cs" />
+ <Compile Include="Runtime\DynamicRuntimeHostingProvider.cs" />
+ <Compile Include="Runtime\DynamicStackFrame.cs" />
+ <Compile Include="Runtime\ExceptionHelpers.cs" />
+ <Compile Include="Runtime\ExplicitConversionMethodAttribute.cs" />
+ <Compile Include="Runtime\Extensible.cs" />
+ <Compile Include="Runtime\ExtensionTypeAttribute.cs" />
+ <Compile Include="Runtime\ExtraKeyEnumerator.cs" />
+ <Compile Include="Runtime\IMembersList.cs" />
+ <Compile Include="Runtime\ImplicitConversionMethodAttribute.cs" />
+ <Compile Include="Runtime\ModuleChangeEventArgs.cs" />
+ <Compile Include="Runtime\ModuleChangeEventType.cs" />
+ <Compile Include="Runtime\NullTextContentProvider.cs" />
+ <Compile Include="Runtime\OperationFailed.cs" />
+ <Compile Include="Runtime\OperatorSlotAttribute.cs" />
+ <Compile Include="Runtime\PropertyMethodAttribute.cs" />
+ <Compile Include="Runtime\ReflectionCache.cs" />
+ <Compile Include="Runtime\ScriptingRuntimeHelpers.cs" />
+ <Compile Include="Runtime\StaticExtensionMethodAttribute.cs" />
+ <Compile Include="Runtime\SymbolDictionary.cs" />
+ <Compile Include="Runtime\TransformDictEnumerator.cs" />
+ <Compile Include="Runtime\Uninitialized.cs" />
+ <Compile Include="Utils\ArrayUtils.cs" />
+ <Compile Include="Utils\AssemblyQualifiedTypeName.cs" />
+ <Compile Include="Utils\Assert.cs" />
+ <Compile Include="Utils\CheckedDictionaryEnumerator.cs" />
+ <Compile Include="Utils\CollectionUtils.cs" />
+ <Compile Include="Utils\ContractUtils.cs" />
+ <Compile Include="Utils\DictionaryUnionEnumerator.cs" />
+ <Compile Include="Utils\ExceptionFactory.Generated.cs" />
+ <Compile Include="Utils\ExceptionUtils.cs" />
+ <Compile Include="Utils\IOUtils.cs" />
+ <Compile Include="Utils\ReflectionUtils.cs" />
+ <Compile Include="Utils\StringUtils.cs" />
+ <Compile Include="Utils\TextStream.cs" />
+ <Compile Include="IValueEquality.cs" />
+ <Compile Include="KeyboardInterruptException.cs" />
+ <Compile Include="SourceFileContentProvider.cs" />
+ </ItemGroup>
+ <ItemGroup Condition=" '$(SilverlightBuild)' != 'true' ">
<Reference Include="System" />
+ <Reference Include="System.Configuration" />
+ <Reference Include="System.Numerics" Condition=" '$(TargetFrameworkVersion)' == 'v4.0' " />
+ <Reference Include="System.Core" Condition=" '$(TargetFrameworkVersion)' == 'v4.0' " />
+ </ItemGroup>
+ <ItemGroup Condition=" '$(SilverlightBuild)' == 'true' ">
+ <Reference Include="mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" >
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>$(SilverlightPath)\mscorlib.dll</HintPath>
+ </Reference>
+ <Reference Include="System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" >
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>$(SilverlightPath)\System.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" Condition=" '$(TargetFrameworkVersion)' == 'v4.0' ">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>$(SilverlightPath)\System.Core.dll</HintPath>
+ </Reference>
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\Microsoft.Scripting.Core\Microsoft.Scripting.Core.csproj">
+ <ProjectReference Include="..\Microsoft.Scripting.Core\Microsoft.Scripting.Core.csproj" Condition="'$(TargetFrameworkVersion)' != 'v4.0'">
<Project>{2AE75F5A-CD1F-4925-9647-AF4D1C282FB4}</Project>
<Name>Microsoft.Scripting.Core</Name>
<Private>False</Private>
</ProjectReference>
- <ProjectReference Include="..\Microsoft.Scripting.Core\Microsoft.Scripting.ExtensionAttribute.csproj">
+ <ProjectReference Include="..\Microsoft.Scripting.Core\Microsoft.Scripting.ExtensionAttribute.csproj" Condition="'$(TargetFrameworkVersion)' != 'v4.0'">
<Project>{8B0F1074-750E-4D64-BF23-A1E0F54261E5}</Project>
<Name>Microsoft.Scripting.ExtensionAttribute</Name>
</ProjectReference>
+ <ProjectReference Include="..\Microsoft.Scripting\Microsoft.Scripting.csproj">
+ <Project>{02FF0909-F5AD-48CF-A86A-345E721B7E40}</Project>
+ <Name>Microsoft.Scripting</Name>
+ </ProjectReference>
+ <Reference Include="System.Data" />
+ <Reference Include="System.Runtime.Remoting" Condition=" '$(SilverlightBuild)' != 'true' " />
+ <Reference Include="System.Xml" Condition=" '$(SilverlightBuild)' != 'true' " />
+ <Reference Include="System.Numerics" Condition="'$(TargetFrameworkVersion)' == 'v4.0'" />
</ItemGroup>
<ItemGroup>
- <Compile Include="ConvertArgBuilder.cs" />
- <Compile Include="Properties\GlobalSuppressions.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="ArgBuilder.cs" />
- <Compile Include="Assert.cs" />
- <Compile Include="BoolArgBuilder.cs" />
- <Compile Include="BoundDispEvent.cs" />
- <Compile Include="CollectionExtensions.cs" />
- <Compile Include="ComBinder.cs" />
- <Compile Include="ComBinderHelpers.cs" />
- <Compile Include="ComDispIds.cs" />
- <Compile Include="ComEventDesc.cs" />
- <Compile Include="ComEventSink.cs" />
- <Compile Include="ComEventSinkProxy.cs" />
- <Compile Include="ComEventSinksContainer.cs" />
- <Compile Include="ComFallbackMetaObject.cs" />
- <Compile Include="ComHresults.cs" />
- <Compile Include="ComInterop.cs" />
- <Compile Include="ComInvokeAction.cs" />
- <Compile Include="ComInvokeBinder.cs" />
- <Compile Include="ComMetaObject.cs" />
- <Compile Include="ComMethodDesc.cs" />
- <Compile Include="ComObject.cs" />
- <Compile Include="ComRuntimeHelpers.cs" />
- <Compile Include="ComTypeClassDesc.cs" />
- <Compile Include="ComTypeDesc.cs" />
- <Compile Include="ComTypeEnumDesc.cs" />
- <Compile Include="ComTypeLibDesc.cs" />
- <Compile Include="ContractUtils.cs" />
- <Compile Include="ConversionArgBuilder.cs" />
- <Compile Include="ConvertibleArgBuilder.cs" />
- <Compile Include="CurrencyArgBuilder.cs" />
- <Compile Include="DateTimeArgBuilder.cs" />
- <Compile Include="DispatchArgBuilder.cs" />
- <Compile Include="DispCallable.cs" />
- <Compile Include="DispCallableMetaObject.cs" />
- <Compile Include="Errors.cs" />
- <Compile Include="ErrorArgBuilder.cs" />
- <Compile Include="ExcepInfo.cs" />
- <Compile Include="Helpers.cs" />
- <Compile Include="IDispatchComObject.cs" />
- <Compile Include="IDispatchMetaObject.cs" />
- <Compile Include="NullArgBuilder.cs" />
- <Compile Include="SimpleArgBuilder.cs" />
- <Compile Include="SplatCallSite.cs" />
- <Compile Include="StringArgBuilder.cs" />
- <Compile Include="TypeUtils.cs" />
- <Compile Include="UnknownArgBuilder.cs" />
- <Compile Include="VarEnumSelector.cs" />
- <Compile Include="Variant.cs" />
- <Compile Include="VariantArgBuilder.cs" />
- <Compile Include="VariantArray.cs" />
- <Compile Include="VariantBuilder.cs" />
+ <Content Include="Microsoft.Scripting.txt" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Hosting\Providers\" />
</ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" Condition=" '$(SilverlightTreeBuild)' != 'true' " />
</Project>
diff --git a/mcs/class/dlr/Runtime/Microsoft.Dynamic/Properties/AssemblyInfo.cs b/mcs/class/dlr/Runtime/Microsoft.Dynamic/Properties/AssemblyInfo.cs
index 3e4cd76c101..c6d59800fde 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Dynamic/Properties/AssemblyInfo.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Dynamic/Properties/AssemblyInfo.cs
@@ -13,30 +13,21 @@
*
* ***************************************************************************/
-#if CODEPLEX_40
using System;
-#else
-using System; using Microsoft;
-#endif
using System.Reflection;
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
using System.Runtime.InteropServices;
using System.Security;
-
-#if MICROSOFT_DYNAMIC
+using System.Security.Permissions;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
-[assembly: AssemblyTitle("Microsoft.Dynamic")]
+[assembly: AssemblyTitle("Microsoft.Scripting")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
-[assembly: AssemblyProduct("Microsoft.Dynamic")]
+[assembly: AssemblyProduct("Microsoft.Scripting")]
[assembly: AssemblyCopyright("� Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -48,6 +39,9 @@ using System.Security;
[assembly: CLSCompliant(true)]
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("1bbee69c-30c5-41df-8912-b81da6d658c2")]
+
// Version information for an assembly consists of the following four values:
//
// Major Version
@@ -57,8 +51,18 @@ using System.Security;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
+[assembly: SecurityTransparent]
+#if !CLR2 && !SILVERLIGHT
+[assembly: SecurityRules(SecurityRuleSet.Level1)]
+#endif
+
[assembly: System.Resources.NeutralResourcesLanguage("en-US")]
+#if SIGNED
+#else
+#endif
+
+#if !SILVERLIGHT
[assembly: AssemblyVersion("0.9.6.20")]
[assembly: AssemblyFileVersion("1.0.0.00")]
[assembly: AssemblyInformationalVersion("1.0")]
@@ -66,14 +70,4 @@ using System.Security;
#if CODEPLEX_40
[assembly: SecurityRules(SecurityRuleSet.Level1)]
#endif
-
-#else
-
-[assembly: InternalsVisibleTo("Microsoft.CSharp, PublicKey =" +
- "002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9" +
- "f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad2361321" +
- "02900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93" +
- "c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc09334" +
- "4d5ad293")]
-
#endif
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/BinaryOperationBinder.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/BinaryOperationBinder.cs
index b9b7df7e7aa..079e768a9ff 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/BinaryOperationBinder.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/BinaryOperationBinder.cs
@@ -12,22 +12,16 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-#if CODEPLEX_40
-using System.Dynamic.Utils;
-using System.Linq.Expressions;
+#if CLR2
+using Microsoft.Scripting.Ast;
#else
-using Microsoft.Scripting.Utils;
-using Microsoft.Linq.Expressions;
+using System.Linq.Expressions;
#endif
-#if CODEPLEX_40
+using System.Dynamic.Utils;
+
namespace System.Dynamic {
-#else
-namespace Microsoft.Scripting {
-#endif
/// <summary>
/// Represents the binary dynamic operation at the call site, providing the binding semantic and the details about the operation.
/// </summary>
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/BindingRestrictions.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/BindingRestrictions.cs
index 7d4ae41edde..6a523218230 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/BindingRestrictions.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/BindingRestrictions.cs
@@ -12,29 +12,20 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
+#if CLR2
+using Microsoft.Scripting.Ast;
+#else
+using System.Linq.Expressions;
+#endif
+using System;
using System.Collections.Generic;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-using System.Linq.Expressions;
-#else
-using Microsoft.Scripting.Utils;
-using Microsoft.Linq.Expressions;
-#endif
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
-#if CODEPLEX_40
namespace System.Dynamic {
-#else
-namespace Microsoft.Scripting {
-#endif
/// <summary>
/// Represents a set of binding restrictions on the <see cref="DynamicMetaObject"/>under which the dynamic binding is valid.
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/CallInfo.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/CallInfo.cs
index 790d70520c7..d3fc9c95b1e 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/CallInfo.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/CallInfo.cs
@@ -12,28 +12,21 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-#if CODEPLEX_40
-using System.Dynamic.Utils;
-using System.Linq.Expressions;
+#if CLR2
+using Microsoft.Scripting.Ast;
#else
-using Microsoft.Scripting.Utils;
-using Microsoft.Linq.Expressions;
+using System.Linq.Expressions;
#endif
-
#if SILVERLIGHT
using System.Core;
-#endif //SILVERLIGHT
+#endif
+
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Dynamic.Utils;
-#if CODEPLEX_40
namespace System.Dynamic {
-#else
-namespace Microsoft.Scripting {
-#endif
/// <summary>
/// Describes arguments in the dynamic binding process.
@@ -77,7 +70,7 @@ namespace Microsoft.Scripting {
var argNameCol = argNames.ToReadOnly();
- ContractUtils.Requires(argCount >= argNameCol.Count, "argCount", Strings.ArgCntMustBeGreaterThanNameCnt);
+ if (argCount < argNameCol.Count) throw Error.ArgCntMustBeGreaterThanNameCnt();
ContractUtils.RequiresNotNullItems(argNameCol, "argNames");
_argCount = argCount;
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/CallSite.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/CallSite.cs
index eb218e88089..c02928faaf3 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/CallSite.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/CallSite.cs
@@ -12,34 +12,28 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
+#if CLR2
+using Microsoft.Scripting.Ast;
+using Microsoft.Scripting.Ast.Compiler;
+using Microsoft.Scripting.Utils;
+#else
+using System.Linq.Expressions;
+using System.Linq.Expressions.Compiler;
+#endif
+
+#if SILVERLIGHT
+using System.Core;
+#endif
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic;
using System.Dynamic.Utils;
-using System.Linq.Expressions;
-using System.Linq.Expressions.Compiler;
-#else
-using Microsoft.Scripting;
-using Microsoft.Scripting.Utils;
-using Microsoft.Linq.Expressions;
-using Microsoft.Linq.Expressions.Compiler;
-#endif
using System.Reflection;
-#if SILVERLIGHT
-using System.Core;
-#endif //SILVERLIGHT
-
-#if CODEPLEX_40
namespace System.Runtime.CompilerServices {
-#else
-namespace Microsoft.Runtime.CompilerServices {
-#endif
//
// A CallSite provides a fast mechanism for call-site caching of dynamic dispatch
@@ -105,7 +99,7 @@ namespace Microsoft.Runtime.CompilerServices {
public static CallSite Create(Type delegateType, CallSiteBinder binder) {
ContractUtils.RequiresNotNull(delegateType, "delegateType");
ContractUtils.RequiresNotNull(binder, "binder");
- ContractUtils.Requires(delegateType.IsSubclassOf(typeof(Delegate)), "delegateType", Strings.TypeMustBeDerivedFromSystemDelegate);
+ if (!delegateType.IsSubclassOf(typeof(Delegate))) throw Error.TypeMustBeDerivedFromSystemDelegate();
if (_SiteCtors == null) {
// It's okay to just set this, worst case we're just throwing away some data
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/CallSiteBinder.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/CallSiteBinder.cs
index 1e02b8e3ef3..f275a2b7966 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/CallSiteBinder.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/CallSiteBinder.cs
@@ -12,33 +12,25 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
+#if CLR2
+using Microsoft.Scripting.Ast;
+#else
+using System.Linq.Expressions;
+#endif
+#if SILVERLIGHT
+using System.Core;
+#endif
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic;
using System.Dynamic.Utils;
-using System.Linq.Expressions;
-#else
-using Microsoft.Scripting;
-using Microsoft.Scripting.Utils;
-using Microsoft.Linq.Expressions;
-#endif
using System.Threading;
using System.Reflection;
-#if SILVERLIGHT
-using System.Core;
-#endif //SILVERLIGHT
-
-#if CODEPLEX_40
namespace System.Runtime.CompilerServices {
-#else
-namespace Microsoft.Runtime.CompilerServices {
-#endif
/// <summary>
/// Class responsible for runtime binding of the dynamic operations on the dynamic call site.
/// </summary>
@@ -147,7 +139,7 @@ namespace Microsoft.Runtime.CompilerServices {
//
// finally produce the new rule if we need to
//
-#if !MICROSOFT_SCRIPTING_CORE && !SILVERLIGHT
+#if !CLR2 && !SILVERLIGHT
// We cannot compile rules in the heterogeneous app domains since they
// may come from less trusted sources
// Silverlight always uses a homogenous appdomain, so we don’t need this check
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/CallSiteHelpers.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/CallSiteHelpers.cs
index 0768092cb58..48f52e8a30c 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/CallSiteHelpers.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/CallSiteHelpers.cs
@@ -12,15 +12,9 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
using System.Reflection;
-#if CODEPLEX_40
namespace System.Runtime.CompilerServices {
-#else
-namespace Microsoft.Runtime.CompilerServices {
-#endif
/// <summary>
/// Class that contains helper methods for DLR CallSites.
/// </summary>
@@ -48,11 +42,7 @@ namespace Microsoft.Runtime.CompilerServices {
}
//Filter out the helper methods.
-#if CODEPLEX_40
if (mb.DeclaringType == typeof(System.Dynamic.UpdateDelegates)) {
-#else
- if (mb.DeclaringType == typeof(Microsoft.Scripting.UpdateDelegates)) {
-#endif
return true;
}
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/CallSiteOps.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/CallSiteOps.cs
index 1585a2e1517..6b72589d65e 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/CallSiteOps.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/CallSiteOps.cs
@@ -12,25 +12,13 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
using System.ComponentModel;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic;
-using System.Linq.Expressions;
-#else
-using Microsoft.Scripting;
-using Microsoft.Linq.Expressions;
-#endif
using System.Collections.Generic;
-#if CODEPLEX_40
namespace System.Runtime.CompilerServices {
-#else
-namespace Microsoft.Runtime.CompilerServices {
-#endif
// Conceptually these are instance methods on CallSite<T> but
// we don't want users to see them
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/ConvertBinder.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/ConvertBinder.cs
index 82f40c35833..e8ca9b866ff 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/ConvertBinder.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/ConvertBinder.cs
@@ -12,20 +12,10 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
-#if CODEPLEX_40
namespace System.Dynamic {
-#else
-namespace Microsoft.Scripting {
-#endif
/// <summary>
/// Represents the convert dynamic operation at the call site, providing the binding semantic and the details about the operation.
/// </summary>
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/CreateInstanceBinder.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/CreateInstanceBinder.cs
index 15934960b66..bb18e4ca731 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/CreateInstanceBinder.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/CreateInstanceBinder.cs
@@ -12,20 +12,10 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
-#if CODEPLEX_40
namespace System.Dynamic {
-#else
-namespace Microsoft.Scripting {
-#endif
/// <summary>
/// Represents the create dynamic operation at the call site, providing the binding semantic and the details about the operation.
/// </summary>
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/DeleteIndexBinder.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/DeleteIndexBinder.cs
index 8437a5244b2..6c38caa1e4c 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/DeleteIndexBinder.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/DeleteIndexBinder.cs
@@ -12,20 +12,10 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
-#if CODEPLEX_40
namespace System.Dynamic {
-#else
-namespace Microsoft.Scripting {
-#endif
/// <summary>
/// Represents the dynamic delete index operation at the call site, providing the binding semantic and the details about the operation.
/// </summary>
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/DeleteMemberBinder.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/DeleteMemberBinder.cs
index 20433264a79..02881df6949 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/DeleteMemberBinder.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/DeleteMemberBinder.cs
@@ -12,20 +12,10 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
-#if CODEPLEX_40
namespace System.Dynamic {
-#else
-namespace Microsoft.Scripting {
-#endif
/// <summary>
/// Represents the dynamic delete member operation at the call site, providing the binding semantic and the details about the operation.
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/DynamicMetaObject.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/DynamicMetaObject.cs
index 55bcc8f32ee..8d28b9dd04d 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/DynamicMetaObject.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/DynamicMetaObject.cs
@@ -12,18 +12,12 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-using System.Collections.Generic;
-#if CODEPLEX_40
-using System.Dynamic.Utils;
-using System.Linq.Expressions;
+#if CLR2
+using Microsoft.Scripting.Ast;
#else
-using Microsoft.Scripting.Utils;
-using Microsoft.Linq.Expressions;
+using System.Linq.Expressions;
#endif
-using System.Reflection;
#if SILVERLIGHT
using System.Core;
@@ -31,11 +25,11 @@ using System.Core;
using System.Runtime.Remoting;
#endif
-#if CODEPLEX_40
+using System.Collections.Generic;
+using System.Dynamic.Utils;
+using System.Reflection;
+
namespace System.Dynamic {
-#else
-namespace Microsoft.Scripting {
-#endif
/// <summary>
/// Represents the dynamic binding and a binding logic of an object participating in the dynamic binding.
/// </summary>
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/DynamicMetaObjectBinder.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/DynamicMetaObjectBinder.cs
index 013ef1c7097..0289de8c4ce 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/DynamicMetaObjectBinder.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/DynamicMetaObjectBinder.cs
@@ -12,37 +12,27 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-using System.Collections.ObjectModel;
-using System.Diagnostics;
-#if CODEPLEX_40
-using System.Dynamic.Utils;
+#if CLR2
+using Microsoft.Scripting.Ast;
+using Microsoft.Scripting.Ast.Compiler;
+#else
using System.Linq.Expressions;
using System.Linq.Expressions.Compiler;
-#else
-using Microsoft.Scripting.Utils;
-using Microsoft.Linq.Expressions;
-using Microsoft.Linq.Expressions.Compiler;
-#endif
-using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
#endif
-
#if SILVERLIGHT
using System.Core;
#else
using System.Runtime.Remoting;
#endif
-#if CODEPLEX_40
+using System.Collections.ObjectModel;
+using System.Diagnostics;
+using System.Dynamic.Utils;
+using System.Runtime.CompilerServices;
+
namespace System.Dynamic {
-#else
-namespace Microsoft.Scripting {
-#endif
/// <summary>
/// The dynamic call site binder that participates in the <see cref="DynamicMetaObject"/> binding protocol.
/// </summary>
@@ -76,7 +66,7 @@ namespace Microsoft.Scripting {
/// <param name="returnLabel">A LabelTarget used to return the result of the dynamic binding.</param>
/// <returns>
/// An Expression that performs tests on the dynamic operation arguments, and
- /// performs the dynamic operation if hte tests are valid. If the tests fail on
+ /// performs the dynamic operation if the tests are valid. If the tests fail on
/// subsequent occurrences of the dynamic operation, Bind will be called again
/// to produce a new <see cref="Expression"/> for the new argument types.
/// </returns>
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/DynamicObject.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/DynamicObject.cs
index 30931a0429b..497331e8523 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/DynamicObject.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/DynamicObject.cs
@@ -12,24 +12,18 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
+#if CLR2
+using Microsoft.Scripting.Ast;
+#else
+using System.Linq.Expressions;
+#endif
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-using System.Linq.Expressions;
-#else
-using Microsoft.Scripting.Utils;
-using Microsoft.Linq.Expressions;
-#endif
using System.Reflection;
-#if CODEPLEX_40
namespace System.Dynamic {
-#else
-namespace Microsoft.Scripting {
-#endif
/// <summary>
/// Provides a simple class that can be inherited from to create an object with dynamic behavior
/// at runtime. Subclasses can override the various binder methods (GetMember, SetMember, Call, etc...)
@@ -586,13 +580,15 @@ namespace Microsoft.Scripting {
}
/// <summary>
- /// Returns our Expression converted to our known LimitType
+ /// Returns our Expression converted to DynamicObject
/// </summary>
private Expression GetLimitedSelf() {
- if (TypeUtils.AreEquivalent(Expression.Type, LimitType)) {
+ // Convert to DynamicObject rather than LimitType, because
+ // the limit type might be non-public.
+ if (TypeUtils.AreEquivalent(Expression.Type, typeof(DynamicObject))) {
return Expression;
}
- return Expression.Convert(Expression, LimitType);
+ return Expression.Convert(Expression, typeof(DynamicObject));
}
private new DynamicObject Value {
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/ExpandoClass.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/ExpandoClass.cs
index db41d72827b..6122329640d 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/ExpandoClass.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/ExpandoClass.cs
@@ -13,27 +13,13 @@
*
* ***************************************************************************/
-#if CODEPLEX_40
using System;
-#else
-using System; using Microsoft;
-#endif
using System.Collections.Generic;
using System.Diagnostics;
-#if CODEPLEX_40
-using System.Linq.Expressions;
using System.Dynamic.Utils;
-#else
-using Microsoft.Linq.Expressions;
-using Microsoft.Scripting.Utils;
-#endif
using System.Text;
-#if CODEPLEX_40
namespace System.Dynamic {
-#else
-namespace Microsoft.Scripting {
-#endif
/// <summary>
/// Represents a dynamically assigned class. Expando objects which share the same
/// members will share the same class. Classes are dynamically assigned as the
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/ExpandoObject.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/ExpandoObject.cs
index 58258970f9f..c2d73e91853 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/ExpandoObject.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/ExpandoObject.cs
@@ -12,36 +12,25 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
+#if CLR2
+using Microsoft.Scripting.Ast;
+using Microsoft.Scripting.Utils;
+#else
+using System.Linq.Expressions;
+#endif
+#if SILVERLIGHT
+using System.Core;
+#endif
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic;
using System.Dynamic.Utils;
-using System.Linq.Expressions;
-#else
-using Microsoft.Scripting;
-using Microsoft.Scripting.Utils;
-using Microsoft.Linq.Expressions;
-#endif
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
-
-#if SILVERLIGHT
-using System.Core;
-#endif
-#if CODEPLEX_40
namespace System.Dynamic {
-#else
-namespace Microsoft.Scripting {
-#endif
/// <summary>
/// Represents an object with members that can be dynamically added and removed at runtime.
/// </summary>
@@ -1030,11 +1019,7 @@ namespace Microsoft.Scripting {
}
}
-#if CODEPLEX_40
namespace System.Runtime.CompilerServices {
-#else
-namespace Microsoft.Runtime.CompilerServices {
-#endif
//
// Note: these helpers are kept as simple wrappers so they have a better
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/GetIndexBinder.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/GetIndexBinder.cs
index 6676913d2fd..8102cad88a6 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/GetIndexBinder.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/GetIndexBinder.cs
@@ -12,20 +12,10 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
-#if CODEPLEX_40
namespace System.Dynamic {
-#else
-namespace Microsoft.Scripting {
-#endif
/// <summary>
/// Represents the dynamic get index operation at the call site, providing the binding semantic and the details about the operation.
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/GetMemberBinder.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/GetMemberBinder.cs
index 6fb6520c4dc..0bf1049c4af 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/GetMemberBinder.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/GetMemberBinder.cs
@@ -12,20 +12,10 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
-#if CODEPLEX_40
namespace System.Dynamic {
-#else
-namespace Microsoft.Scripting {
-#endif
/// <summary>
/// Represents the dynamic get member operation at the call site, providing the binding semantic and the details about the operation.
/// </summary>
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/IDynamicMetaObjectProvider.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/IDynamicMetaObjectProvider.cs
index 276a2aedb61..86140947433 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/IDynamicMetaObjectProvider.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/IDynamicMetaObjectProvider.cs
@@ -12,20 +12,14 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-#if CODEPLEX_40
-using System.Linq.Expressions;
+#if CLR2
+using Microsoft.Scripting.Ast;
#else
-using Microsoft.Linq.Expressions;
+using System.Linq.Expressions;
#endif
-#if CODEPLEX_40
namespace System.Dynamic {
-#else
-namespace Microsoft.Scripting {
-#endif
/// <summary>
/// Represents a dynamic object, that can have its operations bound at runtime.
/// </summary>
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/InvokeBinder.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/InvokeBinder.cs
index c446ba0e1cf..6530cc06ef0 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/InvokeBinder.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/InvokeBinder.cs
@@ -12,20 +12,10 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
-#if CODEPLEX_40
namespace System.Dynamic {
-#else
-namespace Microsoft.Scripting {
-#endif
/// <summary>
/// Represents the invoke dynamic operation at the call site, providing the binding semantic and the details about the operation.
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/InvokeMemberBinder.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/InvokeMemberBinder.cs
index 240b77a860a..d3cf6c0ef54 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/InvokeMemberBinder.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/InvokeMemberBinder.cs
@@ -12,20 +12,10 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
-#if CODEPLEX_40
namespace System.Dynamic {
-#else
-namespace Microsoft.Scripting {
-#endif
/// <summary>
/// Represents the invoke member dynamic operation at the call site,
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/RuleCache.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/RuleCache.cs
index 3e2323a85b1..c9db53b1629 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/RuleCache.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/RuleCache.cs
@@ -12,22 +12,12 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
using System.ComponentModel;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
-#if CODEPLEX_40
namespace System.Runtime.CompilerServices {
-#else
-namespace Microsoft.Runtime.CompilerServices {
-#endif
/// <summary>
/// This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.
/// Represents a cache of runtime binding rules.
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/SetIndexBinder.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/SetIndexBinder.cs
index 38f15ca7b24..f4a3635b111 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/SetIndexBinder.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/SetIndexBinder.cs
@@ -12,20 +12,10 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
-#if CODEPLEX_40
namespace System.Dynamic {
-#else
-namespace Microsoft.Scripting {
-#endif
/// <summary>
/// Represents the dynamic set index operation at the call site, providing the binding semantic and the details about the operation.
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/SetMemberBinder.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/SetMemberBinder.cs
index 8e6386ff552..77c2a0e6e70 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/SetMemberBinder.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/SetMemberBinder.cs
@@ -12,20 +12,10 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
-#if CODEPLEX_40
namespace System.Dynamic {
-#else
-namespace Microsoft.Scripting {
-#endif
/// <summary>
/// Represents the dynamic set member operation at the call site, providing the binding semantic and the details about the operation.
/// </summary>
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/UnaryOperationBinder.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/UnaryOperationBinder.cs
index f5a33f6f616..eb5b1dab1b1 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/UnaryOperationBinder.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/UnaryOperationBinder.cs
@@ -12,22 +12,16 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-#if CODEPLEX_40
-using System.Dynamic.Utils;
-using System.Linq.Expressions;
+#if CLR2
+using Microsoft.Scripting.Ast;
#else
-using Microsoft.Scripting.Utils;
-using Microsoft.Linq.Expressions;
+using System.Linq.Expressions;
#endif
-#if CODEPLEX_40
+using System.Dynamic.Utils;
+
namespace System.Dynamic {
-#else
-namespace Microsoft.Scripting {
-#endif
/// <summary>
/// Represents the unary dynamic operation at the call site, providing the binding semantic and the details about the operation.
/// </summary>
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/UpdateDelegates.Generated.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/UpdateDelegates.Generated.cs
index 28ec2d4f351..eb3c288359e 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/UpdateDelegates.Generated.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/UpdateDelegates.Generated.cs
@@ -12,21 +12,14 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-
-using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
+#if CLR2
+using Microsoft.Scripting.Utils;
#endif
+using System.Runtime.CompilerServices;
using System.Threading;
-#if CODEPLEX_40
namespace System.Dynamic {
-#else
-namespace Microsoft.Scripting {
-#endif
internal static partial class UpdateDelegates {
//
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/BinaryExpression.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/BinaryExpression.cs
index 299e2766cd0..0ccacc28038 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/BinaryExpression.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/BinaryExpression.cs
@@ -13,26 +13,21 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.Generic;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Reflection;
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/BlockExpression.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/BlockExpression.cs
index 8dab6ca8b70..80f013325f5 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/BlockExpression.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/BlockExpression.cs
@@ -12,27 +12,22 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Threading;
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
/// Represents a block that contains a sequence of expressions where variables can be defined.
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/CatchBlock.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/CatchBlock.cs
index c5c470844b9..e6ea7ed49d3 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/CatchBlock.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/CatchBlock.cs
@@ -12,24 +12,19 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
@@ -174,7 +169,7 @@ namespace Microsoft.Linq.Expressions {
RequiresCanRead(body, "body");
if (filter != null) {
RequiresCanRead(filter, "filter");
- ContractUtils.Requires(filter.Type == typeof(bool), Strings.ArgumentMustBeBoolean);
+ if (filter.Type != typeof(bool)) throw Error.ArgumentMustBeBoolean();
}
return new CatchBlock(type, variable, body, filter);
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ConditionalExpression.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ConditionalExpression.cs
index bb34d14fe7a..f49a6b8e265 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ConditionalExpression.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ConditionalExpression.cs
@@ -12,24 +12,19 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-#if CODEPLEX_40
+using System;
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Diagnostics;
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ConstantExpression.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ConstantExpression.cs
index 8ccc0828a25..73c5b8a6722 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ConstantExpression.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ConstantExpression.cs
@@ -12,24 +12,19 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/DebugInfoExpression.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/DebugInfoExpression.cs
index a9922c02805..d12dfa09f9d 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/DebugInfoExpression.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/DebugInfoExpression.cs
@@ -12,24 +12,19 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
/// Emits or clears a sequence point for debug information.
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/DebugViewWriter.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/DebugViewWriter.cs
index db51b68f785..c512ad40246 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/DebugViewWriter.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/DebugViewWriter.cs
@@ -12,32 +12,22 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.Generic;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic;
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting;
-using Microsoft.Scripting.Utils;
-#endif
using System.Globalization;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
using System.Collections.ObjectModel;
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling")]
internal sealed class DebugViewWriter : ExpressionVisitor {
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/DefaultExpression.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/DefaultExpression.cs
index 66a4f7d741c..dad191f76af 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/DefaultExpression.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/DefaultExpression.cs
@@ -12,15 +12,14 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Diagnostics;
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
/// Represents the default value of a type or an empty expression.
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/DynamicExpression.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/DynamicExpression.cs
index 3b86acc3b34..25848119465 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/DynamicExpression.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/DynamicExpression.cs
@@ -12,35 +12,26 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-using System.Linq.Expressions.Compiler;
-#else
-using Microsoft.Scripting.Utils;
-using Microsoft.Linq.Expressions.Compiler;
-#endif
using System.Reflection;
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
+ using Compiler;
+
/// <summary>
/// Represents a dynamic operation.
/// </summary>
@@ -463,7 +454,7 @@ namespace Microsoft.Linq.Expressions {
public static DynamicExpression MakeDynamic(Type delegateType, CallSiteBinder binder, IEnumerable<Expression> arguments) {
ContractUtils.RequiresNotNull(delegateType, "delegateType");
ContractUtils.RequiresNotNull(binder, "binder");
- ContractUtils.Requires(delegateType.IsSubclassOf(typeof(Delegate)), "delegateType", Strings.TypeMustBeDerivedFromSystemDelegate);
+ if (!delegateType.IsSubclassOf(typeof(Delegate))) throw Error.TypeMustBeDerivedFromSystemDelegate();
var method = GetValidMethodForDynamic(delegateType);
@@ -489,7 +480,7 @@ namespace Microsoft.Linq.Expressions {
public static DynamicExpression MakeDynamic(Type delegateType, CallSiteBinder binder, Expression arg0) {
ContractUtils.RequiresNotNull(delegateType, "delegatType");
ContractUtils.RequiresNotNull(binder, "binder");
- ContractUtils.Requires(delegateType.IsSubclassOf(typeof(Delegate)), "delegateType", Strings.TypeMustBeDerivedFromSystemDelegate);
+ if (!delegateType.IsSubclassOf(typeof(Delegate))) throw Error.TypeMustBeDerivedFromSystemDelegate();
var method = GetValidMethodForDynamic(delegateType);
var parameters = method.GetParametersCached();
@@ -518,7 +509,7 @@ namespace Microsoft.Linq.Expressions {
public static DynamicExpression MakeDynamic(Type delegateType, CallSiteBinder binder, Expression arg0, Expression arg1) {
ContractUtils.RequiresNotNull(delegateType, "delegatType");
ContractUtils.RequiresNotNull(binder, "binder");
- ContractUtils.Requires(delegateType.IsSubclassOf(typeof(Delegate)), "delegateType", Strings.TypeMustBeDerivedFromSystemDelegate);
+ if (!delegateType.IsSubclassOf(typeof(Delegate))) throw Error.TypeMustBeDerivedFromSystemDelegate();
var method = GetValidMethodForDynamic(delegateType);
var parameters = method.GetParametersCached();
@@ -550,7 +541,7 @@ namespace Microsoft.Linq.Expressions {
public static DynamicExpression MakeDynamic(Type delegateType, CallSiteBinder binder, Expression arg0, Expression arg1, Expression arg2) {
ContractUtils.RequiresNotNull(delegateType, "delegatType");
ContractUtils.RequiresNotNull(binder, "binder");
- ContractUtils.Requires(delegateType.IsSubclassOf(typeof(Delegate)), "delegateType", Strings.TypeMustBeDerivedFromSystemDelegate);
+ if (!delegateType.IsSubclassOf(typeof(Delegate))) throw Error.TypeMustBeDerivedFromSystemDelegate();
var method = GetValidMethodForDynamic(delegateType);
var parameters = method.GetParametersCached();
@@ -585,7 +576,7 @@ namespace Microsoft.Linq.Expressions {
public static DynamicExpression MakeDynamic(Type delegateType, CallSiteBinder binder, Expression arg0, Expression arg1, Expression arg2, Expression arg3) {
ContractUtils.RequiresNotNull(delegateType, "delegatType");
ContractUtils.RequiresNotNull(binder, "binder");
- ContractUtils.Requires(delegateType.IsSubclassOf(typeof(Delegate)), "delegateType", Strings.TypeMustBeDerivedFromSystemDelegate);
+ if (!delegateType.IsSubclassOf(typeof(Delegate))) throw Error.TypeMustBeDerivedFromSystemDelegate();
var method = GetValidMethodForDynamic(delegateType);
var parameters = method.GetParametersCached();
@@ -606,7 +597,7 @@ namespace Microsoft.Linq.Expressions {
private static MethodInfo GetValidMethodForDynamic(Type delegateType) {
var method = delegateType.GetMethod("Invoke");
var pi = method.GetParametersCached();
- ContractUtils.Requires(pi.Length > 0 && pi[0].ParameterType == typeof(CallSite), "delegateType", Strings.FirstArgumentMustBeCallSite);
+ if (pi.Length == 0 || pi[0].ParameterType != typeof(CallSite)) throw Error.FirstArgumentMustBeCallSite();
return method;
}
@@ -857,7 +848,7 @@ namespace Microsoft.Linq.Expressions {
var type = arg.Type;
ContractUtils.RequiresNotNull(type, "type");
TypeUtils.ValidateType(type);
- ContractUtils.Requires(type != typeof(void), Strings.ArgumentTypeCannotBeVoid);
+ if (type == typeof(void)) throw Error.ArgumentTypeCannotBeVoid();
}
}
}
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ElementInit.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ElementInit.cs
index de1bdacb3df..858fdf6cba1 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ElementInit.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ElementInit.cs
@@ -13,29 +13,21 @@
*
* ***************************************************************************/
-#if CODEPLEX_40
using System;
-#else
-using System; using Microsoft;
-#endif
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Reflection;
using System.Text;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
/// Represents the initialization of a list.
@@ -98,21 +90,21 @@ namespace Microsoft.Linq.Expressions {
public partial class Expression {
/// <summary>
- /// Creates an <see cref="Microsoft.Linq.Expressions.ElementInit">ElementInit</see> expression that represents the initialization of a list.
+ /// Creates an <see cref="T:ElementInit">ElementInit</see> expression that represents the initialization of a list.
/// </summary>
/// <param name="addMethod">The <see cref="MethodInfo"/> for the list's Add method.</param>
/// <param name="arguments">An array containing the Expressions to be used to initialize the list.</param>
- /// <returns>The created <see cref="Microsoft.Linq.Expressions.ElementInit">ElementInit</see> expression.</returns>
+ /// <returns>The created <see cref="T:ElementInit">ElementInit</see> expression.</returns>
public static ElementInit ElementInit(MethodInfo addMethod, params Expression[] arguments) {
return ElementInit(addMethod, arguments as IEnumerable<Expression>);
}
/// <summary>
- /// Creates an <see cref="Microsoft.Linq.Expressions.ElementInit">ElementInit</see> expression that represents the initialization of a list.
+ /// Creates an <see cref="T:ElementInit">ElementInit</see> expression that represents the initialization of a list.
/// </summary>
/// <param name="addMethod">The <see cref="MethodInfo"/> for the list's Add method.</param>
/// <param name="arguments">An <see cref="IEnumerable{T}"/> containing <see cref="Expression"/> elements to initialize the list.</param>
- /// <returns>The created <see cref="Microsoft.Linq.Expressions.ElementInit">ElementInit</see> expression.</returns>
+ /// <returns>The created <see cref="T:ElementInit">ElementInit</see> expression.</returns>
public static ElementInit ElementInit(MethodInfo addMethod, IEnumerable<Expression> arguments) {
ContractUtils.RequiresNotNull(addMethod, "addMethod");
ContractUtils.RequiresNotNull(arguments, "arguments");
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/Expression.DebuggerProxy.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/Expression.DebuggerProxy.cs
index 335eaf728c1..4295fb78065 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/Expression.DebuggerProxy.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/Expression.DebuggerProxy.cs
@@ -12,21 +12,16 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.ObjectModel;
using System.Reflection;
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
#if !SILVERLIGHT
public partial class Expression {
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/Expression.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/Expression.cs
index 979a8765849..b4319beda9c 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/Expression.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/Expression.cs
@@ -12,34 +12,26 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Globalization;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
using System.Threading;
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
+ using Microsoft.Scripting.Utils;
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
/// The base type for all nodes in Expression Trees.
@@ -53,7 +45,7 @@ namespace Microsoft.Linq.Expressions {
// LINQ protected ctor from 3.5
-#if !MICROSOFT_SCRIPTING_CORE // needs ConditionWeakTable in 4.0
+#if !CLR2 // needs ConditionWeakTable in 4.0
// For 4.0, many frequently used Expression nodes have had their memory
// footprint reduced by removing the Type and NodeType fields. This has
@@ -105,7 +97,7 @@ namespace Microsoft.Linq.Expressions {
/// </summary>
public virtual ExpressionType NodeType {
get {
-#if !MICROSOFT_SCRIPTING_CORE
+#if !CLR2
ExtensionInfo extInfo;
if (_legacyCtorSupportTable != null && _legacyCtorSupportTable.TryGetValue(this, out extInfo)) {
return extInfo.NodeType;
@@ -123,7 +115,7 @@ namespace Microsoft.Linq.Expressions {
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods")]
public virtual Type Type {
get {
-#if !MICROSOFT_SCRIPTING_CORE
+#if !CLR2
ExtensionInfo extInfo;
if (_legacyCtorSupportTable != null && _legacyCtorSupportTable.TryGetValue(this, out extInfo)) {
return extInfo.Type;
@@ -149,7 +141,7 @@ namespace Microsoft.Linq.Expressions {
/// </summary>
/// <returns>The reduced expression.</returns>
public virtual Expression Reduce() {
- ContractUtils.Requires(!CanReduce, "this", Strings.ReducibleMustOverrideReduce);
+ if (CanReduce) throw Error.ReducibleMustOverrideReduce();
return this;
}
@@ -166,7 +158,7 @@ namespace Microsoft.Linq.Expressions {
/// itself with the modified children.
/// </remarks>
protected internal virtual Expression VisitChildren(ExpressionVisitor visitor) {
- ContractUtils.Requires(CanReduce, "this", Strings.MustBeReducible);
+ if (!CanReduce) throw Error.MustBeReducible();
return visitor.Visit(ReduceExtensions());
}
@@ -199,14 +191,14 @@ namespace Microsoft.Linq.Expressions {
/// certain invariants.
/// </remarks>
public Expression ReduceAndCheck() {
- ContractUtils.Requires(CanReduce, "this", Strings.MustBeReducible);
+ if (!CanReduce) throw Error.MustBeReducible();
var newNode = Reduce();
// 1. Reduction must return a new, non-null node
// 2. Reduction must return a new node whose result type can be assigned to the type of the original node
- ContractUtils.Requires(newNode != null && newNode != this, "this", Strings.MustReduceToDifferent);
- ContractUtils.Requires(TypeUtils.AreReferenceAssignable(Type, newNode.Type), "this", Strings.ReducedNotCompatible);
+ if (newNode == null || newNode == this) throw Error.MustReduceToDifferent();
+ if (!TypeUtils.AreReferenceAssignable(Type, newNode.Type)) throw Error.ReducedNotCompatible();
return newNode;
}
@@ -232,7 +224,7 @@ namespace Microsoft.Linq.Expressions {
return ExpressionStringBuilder.ExpressionToString(this);
}
-#if MICROSOFT_SCRIPTING_CORE
+#if CLR2
/// <summary>
/// Writes a <see cref="String"/> representation of the <see cref="Expression"/> to a <see cref="TextWriter"/>.
/// </summary>
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ExpressionStringBuilder.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ExpressionStringBuilder.cs
index 7e8ee3c7512..0b96c2b9c97 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ExpressionStringBuilder.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ExpressionStringBuilder.cs
@@ -12,31 +12,21 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.Generic;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic;
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting;
-using Microsoft.Scripting.Utils;
-#endif
using System.Globalization;
using System.Reflection;
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
using System.Text;
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling")]
internal sealed class ExpressionStringBuilder : ExpressionVisitor {
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ExpressionType.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ExpressionType.cs
index feba35e0a49..297d4d8d893 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ExpressionType.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ExpressionType.cs
@@ -12,13 +12,11 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ExpressionVisitor.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ExpressionVisitor.cs
index 2334ac20adb..04c0bf9576c 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ExpressionVisitor.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ExpressionVisitor.cs
@@ -12,30 +12,22 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.ObjectModel;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
+ using Microsoft.Scripting.Utils;
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/GotoExpression.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/GotoExpression.cs
index 8113a33d942..a3434bbc9b9 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/GotoExpression.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/GotoExpression.cs
@@ -12,24 +12,19 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
/// Specifies what kind of jump this <see cref="GotoExpression"/> represents.
@@ -359,7 +354,7 @@ namespace Microsoft.Linq.Expressions {
private static void ValidateGoto(LabelTarget target, ref Expression value, string targetParameter, string valueParameter) {
ContractUtils.RequiresNotNull(target, targetParameter);
if (value == null) {
- ContractUtils.Requires(target.Type == typeof(void), Strings.LabelMustBeVoidOrHaveExpression);
+ if (target.Type != typeof(void)) throw Error.LabelMustBeVoidOrHaveExpression();
} else {
ValidateGotoType(target.Type, ref value, valueParameter);
}
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/IArgumentProvider.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/IArgumentProvider.cs
index 87da3a6f43c..cce7fa7aaee 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/IArgumentProvider.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/IArgumentProvider.cs
@@ -13,18 +13,15 @@
*
* ***************************************************************************/
-#if CODEPLEX_40
using System;
-#else
-using System; using Microsoft;
-#endif
using System.Collections.Generic;
using System.Text;
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
+ using Microsoft.Scripting.Utils;
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
/// Provides an internal interface for accessing the arguments that multiple tree
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/IndexExpression.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/IndexExpression.cs
index 4e39a2a1c3d..61296c002de 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/IndexExpression.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/IndexExpression.cs
@@ -12,33 +12,24 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Reflection;
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
using System.Text;
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
/// Represents indexing a property or array.
@@ -368,8 +359,8 @@ namespace Microsoft.Linq.Expressions {
// Accessor parameters cannot be ByRef.
ContractUtils.RequiresNotNull(property, "property");
- ContractUtils.Requires(!property.PropertyType.IsByRef, "property", Strings.PropertyCannotHaveRefType);
- ContractUtils.Requires(property.PropertyType != typeof(void), "property", Strings.PropertyTypeCannotBeVoid);
+ if (property.PropertyType.IsByRef) throw Error.PropertyCannotHaveRefType();
+ if (property.PropertyType == typeof(void)) throw Error.PropertyTypeCannotBeVoid();
ParameterInfo[] getParameters = null;
MethodInfo getter = property.GetGetMethod(true);
@@ -381,20 +372,20 @@ namespace Microsoft.Linq.Expressions {
MethodInfo setter = property.GetSetMethod(true);
if (setter != null) {
ParameterInfo[] setParameters = setter.GetParametersCached();
- ContractUtils.Requires(setParameters.Length > 0, "property", Strings.SetterHasNoParams);
+ if (setParameters.Length == 0) throw Error.SetterHasNoParams();
// valueType is the type of the value passed to the setter (last parameter)
Type valueType = setParameters[setParameters.Length - 1].ParameterType;
- ContractUtils.Requires(!valueType.IsByRef, "property", Strings.PropertyCannotHaveRefType);
- ContractUtils.Requires(setter.ReturnType == typeof(void), "property", Strings.SetterMustBeVoid);
- ContractUtils.Requires(property.PropertyType == valueType, "property", Strings.PropertyTyepMustMatchSetter);
+ if (valueType.IsByRef) throw Error.PropertyCannotHaveRefType();
+ if (setter.ReturnType != typeof(void)) throw Error.SetterMustBeVoid();
+ if (property.PropertyType != valueType) throw Error.PropertyTyepMustMatchSetter();
if (getter != null) {
- ContractUtils.Requires(!(getter.IsStatic ^ setter.IsStatic), "property", Strings.BothAccessorsMustBeStatic);
- ContractUtils.Requires(getParameters.Length == setParameters.Length - 1, "property", Strings.IndexesOfSetGetMustMatch);
+ if (getter.IsStatic ^ setter.IsStatic) throw Error.BothAccessorsMustBeStatic();
+ if (getParameters.Length != setParameters.Length - 1) throw Error.IndexesOfSetGetMustMatch();
for (int i = 0; i < getParameters.Length; i++) {
- ContractUtils.Requires(getParameters[i].ParameterType == setParameters[i].ParameterType, "property", Strings.IndexesOfSetGetMustMatch);
+ if (getParameters[i].ParameterType != setParameters[i].ParameterType) throw Error.IndexesOfSetGetMustMatch();
}
} else {
ValidateAccessor(instance, setter, setParameters.RemoveLast(), ref argList);
@@ -410,11 +401,11 @@ namespace Microsoft.Linq.Expressions {
ContractUtils.RequiresNotNull(arguments, "arguments");
ValidateMethodInfo(method);
- ContractUtils.Requires((method.CallingConvention & CallingConventions.VarArgs) == 0, "method", Strings.AccessorsCannotHaveVarArgs);
+ if ((method.CallingConvention & CallingConventions.VarArgs) != 0) throw Error.AccessorsCannotHaveVarArgs();
if (method.IsStatic) {
- ContractUtils.Requires(instance == null, "instance", Strings.OnlyStaticMethodsHaveNullInstance);
+ if (instance != null) throw Error.OnlyStaticMethodsHaveNullInstance();
} else {
- ContractUtils.Requires(instance != null, "method", Strings.OnlyStaticMethodsHaveNullInstance);
+ if (instance == null) throw Error.OnlyStaticMethodsHaveNullInstance();
RequiresCanRead(instance, "instance");
ValidateCallInstanceType(instance.Type, method);
}
@@ -434,7 +425,7 @@ namespace Microsoft.Linq.Expressions {
RequiresCanRead(arg, "arguments");
Type pType = pi.ParameterType;
- ContractUtils.Requires(!pType.IsByRef, "indexes", Strings.AccessorsCannotHaveByRefArgs);
+ if (pType.IsByRef) throw Error.AccessorsCannotHaveByRefArgs();
TypeUtils.ValidateType(pType);
if (!TypeUtils.AreReferenceAssignable(pType, arg.Type)) {
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/InvocationExpression.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/InvocationExpression.cs
index d1c3640772f..5f68eaeec51 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/InvocationExpression.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/InvocationExpression.cs
@@ -12,27 +12,22 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Reflection;
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
/// Represents an expression that applies a delegate or lambda expression to a list of argument expressions.
@@ -134,25 +129,25 @@ namespace Microsoft.Linq.Expressions {
public partial class Expression {
///<summary>
- ///Creates an <see cref="T:Microsoft.Linq.Expressions.InvocationExpression" /> that
+ ///Creates an <see cref="T:System.Linq.Expressions.InvocationExpression" /> that
///applies a delegate or lambda expression to a list of argument expressions.
///</summary>
///<returns>
- ///An <see cref="T:Microsoft.Linq.Expressions.InvocationExpression" /> that
+ ///An <see cref="T:System.Linq.Expressions.InvocationExpression" /> that
///applies the specified delegate or lambda expression to the provided arguments.
///</returns>
///<param name="expression">
- ///An <see cref="T:Microsoft.Linq.Expressions.Expression" /> that represents the delegate
+ ///An <see cref="T:System.Linq.Expressions.Expression" /> that represents the delegate
///or lambda expression to be applied.
///</param>
///<param name="arguments">
- ///An array of <see cref="T:Microsoft.Linq.Expressions.Expression" /> objects
+ ///An array of <see cref="T:System.Linq.Expressions.Expression" /> objects
///that represent the arguments that the delegate or lambda expression is applied to.
///</param>
///<exception cref="T:System.ArgumentNullException">
///<paramref name="expression" /> is null.</exception>
///<exception cref="T:System.ArgumentException">
- ///<paramref name="expression" />.Type does not represent a delegate type or an <see cref="T:Microsoft.Linq.Expressions.Expression`1" />.-or-The <see cref="P:Microsoft.Linq.Expressions.Expression.Type" /> property of an element of <paramref name="arguments" /> is not assignable to the type of the corresponding parameter of the delegate represented by <paramref name="expression" />.</exception>
+ ///<paramref name="expression" />.Type does not represent a delegate type or an <see cref="T:System.Linq.Expressions.Expression`1" />.-or-The <see cref="P:System.Linq.Expressions.Expression.Type" /> property of an element of <paramref name="arguments" /> is not assignable to the type of the corresponding parameter of the delegate represented by <paramref name="expression" />.</exception>
///<exception cref="T:System.InvalidOperationException">
///<paramref name="arguments" /> does not contain the same number of elements as the list of parameters for the delegate represented by <paramref name="expression" />.</exception>
public static InvocationExpression Invoke(Expression expression, params Expression[] arguments) {
@@ -160,25 +155,25 @@ namespace Microsoft.Linq.Expressions {
}
///<summary>
- ///Creates an <see cref="T:Microsoft.Linq.Expressions.InvocationExpression" /> that
+ ///Creates an <see cref="T:System.Linq.Expressions.InvocationExpression" /> that
///applies a delegate or lambda expression to a list of argument expressions.
///</summary>
///<returns>
- ///An <see cref="T:Microsoft.Linq.Expressions.InvocationExpression" /> that
+ ///An <see cref="T:System.Linq.Expressions.InvocationExpression" /> that
///applies the specified delegate or lambda expression to the provided arguments.
///</returns>
///<param name="expression">
- ///An <see cref="T:Microsoft.Linq.Expressions.Expression" /> that represents the delegate
+ ///An <see cref="T:System.Linq.Expressions.Expression" /> that represents the delegate
///or lambda expression to be applied.
///</param>
///<param name="arguments">
- ///An <see cref="T:System.Collections.Generic.IEnumerable`1" /> of <see cref="T:Microsoft.Linq.Expressions.Expression" /> objects
+ ///An <see cref="T:System.Collections.Generic.IEnumerable`1" /> of <see cref="T:System.Linq.Expressions.Expression" /> objects
///that represent the arguments that the delegate or lambda expression is applied to.
///</param>
///<exception cref="T:System.ArgumentNullException">
///<paramref name="expression" /> is null.</exception>
///<exception cref="T:System.ArgumentException">
- ///<paramref name="expression" />.Type does not represent a delegate type or an <see cref="T:Microsoft.Linq.Expressions.Expression`1" />.-or-The <see cref="P:Microsoft.Linq.Expressions.Expression.Type" /> property of an element of <paramref name="arguments" /> is not assignable to the type of the corresponding parameter of the delegate represented by <paramref name="expression" />.</exception>
+ ///<paramref name="expression" />.Type does not represent a delegate type or an <see cref="T:System.Linq.Expressions.Expression`1" />.-or-The <see cref="P:System.Linq.Expressions.Expression.Type" /> property of an element of <paramref name="arguments" /> is not assignable to the type of the corresponding parameter of the delegate represented by <paramref name="expression" />.</exception>
///<exception cref="T:System.InvalidOperationException">
///<paramref name="arguments" /> does not contain the same number of elements as the list of parameters for the delegate represented by <paramref name="expression" />.</exception>
public static InvocationExpression Invoke(Expression expression, IEnumerable<Expression> arguments) {
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/LabelExpression.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/LabelExpression.cs
index ed90933399a..5d684cf9796 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/LabelExpression.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/LabelExpression.cs
@@ -12,15 +12,14 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Diagnostics;
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
/// Represents a label, which can be placed in any <see cref="Expression"/> context. If
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/LabelTarget.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/LabelTarget.cs
index b5e07e4e84b..acc3d01b88a 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/LabelTarget.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/LabelTarget.cs
@@ -12,19 +12,14 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-#if CODEPLEX_40
+using System;
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/LambdaExpression.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/LambdaExpression.cs
index 74a0675a43c..0ea69566d76 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/LambdaExpression.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/LambdaExpression.cs
@@ -12,37 +12,28 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-using System.Linq.Expressions.Compiler;
-#else
-using Microsoft.Scripting.Utils;
-using Microsoft.Linq.Expressions.Compiler;
-#endif
using System.Reflection;
using System.Reflection.Emit;
using System.Threading;
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
+ using Compiler;
+
/// <summary>
/// Creates a <see cref="LambdaExpression"/> node.
/// This captures a block of code that is similar to a .NET method body.
@@ -170,7 +161,7 @@ namespace Microsoft.Linq.Expressions {
ContractUtils.RequiresNotNull(method, "method");
ContractUtils.Requires(method.IsStatic, "method");
var type = method.DeclaringType as TypeBuilder;
- ContractUtils.Requires(type != null, "method", Strings.MethodBuilderDoesNotHaveTypeBuilder);
+ if (type == null) throw Error.MethodBuilderDoesNotHaveTypeBuilder();
LambdaCompiler.Compile(this, method, debugInfoGenerator);
}
@@ -593,7 +584,7 @@ namespace Microsoft.Linq.Expressions {
/// <param name="typeArgs">An array of Type objects that specify the type arguments for the System.Func delegate type.</param>
/// <returns>The type of a System.Func delegate that has the specified type arguments.</returns>
public static Type GetFuncType(params Type[] typeArgs) {
- ContractUtils.Requires(ValidateTryGetFuncActionArgs(typeArgs), "typeArgs", Strings.TypeMustNotBeByRef);
+ if (!ValidateTryGetFuncActionArgs(typeArgs)) throw Error.TypeMustNotBeByRef();
Type result = DelegateHelpers.GetFuncType(typeArgs);
if (result == null) {
@@ -623,7 +614,7 @@ namespace Microsoft.Linq.Expressions {
/// <param name="typeArgs">An array of Type objects that specify the type arguments for the System.Action delegate type.</param>
/// <returns>The type of a System.Action delegate that has the specified type arguments.</returns>
public static Type GetActionType(params Type[] typeArgs) {
- ContractUtils.Requires(ValidateTryGetFuncActionArgs(typeArgs), "typeArgs", Strings.TypeMustNotBeByRef);
+ if (!ValidateTryGetFuncActionArgs(typeArgs)) throw Error.TypeMustNotBeByRef();
Type result = DelegateHelpers.GetActionType(typeArgs);
if (result == null) {
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ListArgumentProvider.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ListArgumentProvider.cs
index fefe4121f38..ddd1a4c4f41 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ListArgumentProvider.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ListArgumentProvider.cs
@@ -13,25 +13,15 @@
*
* ***************************************************************************/
-#if CODEPLEX_40
using System;
-#else
-using System; using Microsoft;
-#endif
using System.Collections.Generic;
using System.Text;
-#if CODEPLEX_40
-using System.Linq.Expressions;
using System.Dynamic.Utils;
-#else
-using Microsoft.Linq.Expressions;
-using Microsoft.Scripting.Utils;
-#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
/// Provides a wrapper around an IArgumentProvider which exposes the argument providers
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ListInitExpression.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ListInitExpression.cs
index 01b206af60b..3f988020e4c 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ListInitExpression.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ListInitExpression.cs
@@ -12,32 +12,23 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Reflection;
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
/// Represents a constructor call that has a collection initializer.
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/LoopExpression.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/LoopExpression.cs
index f96c2c62492..dbf082cade4 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/LoopExpression.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/LoopExpression.cs
@@ -12,24 +12,19 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
/// Represents an infinite loop. It can be exited with "break".
@@ -139,7 +134,7 @@ namespace Microsoft.Linq.Expressions {
/// <returns>The created <see cref="LoopExpression"/>.</returns>
public static LoopExpression Loop(Expression body, LabelTarget @break, LabelTarget @continue) {
RequiresCanRead(body, "body");
- ContractUtils.Requires(@continue == null || @continue.Type == typeof(void), "continue", Strings.LabelTypeMustBeVoid);
+ if (@continue != null && @continue.Type != typeof(void)) throw Error.LabelTypeMustBeVoid();
return new LoopExpression(body, @break, @continue);
}
}
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MemberAssignment.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MemberAssignment.cs
index 13d5d24351a..8baca724a0d 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MemberAssignment.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MemberAssignment.cs
@@ -12,24 +12,19 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-#if CODEPLEX_40
+using System;
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Reflection;
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
/// Represents assignment to a member of an object.
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MemberBinding.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MemberBinding.cs
index 7532f71515d..5ed186aab07 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MemberBinding.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MemberBinding.cs
@@ -12,15 +12,14 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Reflection;
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
/// Describes the binding types that are used in MemberInitExpression objects.
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MemberExpression.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MemberExpression.cs
index c2abcca93af..4042eab4cef 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MemberExpression.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MemberExpression.cs
@@ -12,25 +12,20 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Reflection;
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
@@ -154,9 +149,9 @@ namespace Microsoft.Linq.Expressions {
ContractUtils.RequiresNotNull(field, "field");
if (field.IsStatic) {
- ContractUtils.Requires(expression == null, "expression", Strings.OnlyStaticFieldsHaveNullInstance);
+ if (expression != null) throw new ArgumentException(Strings.OnlyStaticFieldsHaveNullInstance, "expression");
} else {
- ContractUtils.Requires(expression != null, "field", Strings.OnlyStaticFieldsHaveNullInstance);
+ if (expression == null) throw new ArgumentException(Strings.OnlyStaticFieldsHaveNullInstance, "field");
RequiresCanRead(expression, "expression");
if (!TypeUtils.AreReferenceAssignable(field.DeclaringType, expression.Type)) {
throw Error.FieldInfoNotDefinedForType(field.DeclaringType, field.Name, expression.Type);
@@ -270,9 +265,9 @@ namespace Microsoft.Linq.Expressions {
}
if (mi.IsStatic) {
- ContractUtils.Requires(expression == null, "expression", Strings.OnlyStaticPropertiesHaveNullInstance);
+ if (expression != null) throw new ArgumentException(Strings.OnlyStaticPropertiesHaveNullInstance, "expression");
} else {
- ContractUtils.Requires(expression != null, "property", Strings.OnlyStaticPropertiesHaveNullInstance);
+ if (expression == null) throw new ArgumentException(Strings.OnlyStaticPropertiesHaveNullInstance, "property");
RequiresCanRead(expression, "expression");
if (!TypeUtils.IsValidInstanceType(property, expression.Type)) {
throw Error.PropertyNotDefinedForType(property, expression.Type);
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MemberInitExpression.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MemberInitExpression.cs
index 6e5b27c1a4f..878803ee5a9 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MemberInitExpression.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MemberInitExpression.cs
@@ -12,27 +12,18 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
/// Represents calling a constructor and initializing one or more members of the new object.
@@ -76,13 +67,13 @@ namespace Microsoft.Linq.Expressions {
}
///<summary>Gets the expression that represents the constructor call.</summary>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.NewExpression" /> that represents the constructor call.</returns>
+ ///<returns>A <see cref="T:System.Linq.Expressions.NewExpression" /> that represents the constructor call.</returns>
public NewExpression NewExpression {
get { return _newExpression; }
}
///<summary>Gets the bindings that describe how to initialize the members of the newly created object.</summary>
- ///<returns>A <see cref="T:System.Collections.ObjectModel.ReadOnlyCollection`1" /> of <see cref="T:Microsoft.Linq.Expressions.MemberBinding" /> objects which describe how to initialize the members.</returns>
+ ///<returns>A <see cref="T:System.Collections.ObjectModel.ReadOnlyCollection`1" /> of <see cref="T:System.Linq.Expressions.MemberBinding" /> objects which describe how to initialize the members.</returns>
public ReadOnlyCollection<MemberBinding> Bindings {
get { return _bindings; }
}
@@ -160,24 +151,24 @@ namespace Microsoft.Linq.Expressions {
}
public partial class Expression {
- ///<summary>Creates a <see cref="T:Microsoft.Linq.Expressions.MemberInitExpression" />.</summary>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.MemberInitExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.MemberInit" /> and the <see cref="P:Microsoft.Linq.Expressions.MemberInitExpression.NewExpression" /> and <see cref="P:Microsoft.Linq.Expressions.MemberInitExpression.Bindings" /> properties set to the specified values.</returns>
- ///<param name="newExpression">A <see cref="T:Microsoft.Linq.Expressions.NewExpression" /> to set the <see cref="P:Microsoft.Linq.Expressions.MemberInitExpression.NewExpression" /> property equal to.</param>
- ///<param name="bindings">An array of <see cref="T:Microsoft.Linq.Expressions.MemberBinding" /> objects to use to populate the <see cref="P:Microsoft.Linq.Expressions.MemberInitExpression.Bindings" /> collection.</param>
+ ///<summary>Creates a <see cref="T:System.Linq.Expressions.MemberInitExpression" />.</summary>
+ ///<returns>A <see cref="T:System.Linq.Expressions.MemberInitExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.MemberInit" /> and the <see cref="P:System.Linq.Expressions.MemberInitExpression.NewExpression" /> and <see cref="P:System.Linq.Expressions.MemberInitExpression.Bindings" /> properties set to the specified values.</returns>
+ ///<param name="newExpression">A <see cref="T:System.Linq.Expressions.NewExpression" /> to set the <see cref="P:System.Linq.Expressions.MemberInitExpression.NewExpression" /> property equal to.</param>
+ ///<param name="bindings">An array of <see cref="T:System.Linq.Expressions.MemberBinding" /> objects to use to populate the <see cref="P:System.Linq.Expressions.MemberInitExpression.Bindings" /> collection.</param>
///<exception cref="T:System.ArgumentNullException">
///<paramref name="newExpression" /> or <paramref name="bindings" /> is null.</exception>
- ///<exception cref="T:System.ArgumentException">The <see cref="P:Microsoft.Linq.Expressions.MemberBinding.Member" /> property of an element of <paramref name="bindings" /> does not represent a member of the type that <paramref name="newExpression" />.Type represents.</exception>
+ ///<exception cref="T:System.ArgumentException">The <see cref="P:System.Linq.Expressions.MemberBinding.Member" /> property of an element of <paramref name="bindings" /> does not represent a member of the type that <paramref name="newExpression" />.Type represents.</exception>
public static MemberInitExpression MemberInit(NewExpression newExpression, params MemberBinding[] bindings) {
return MemberInit(newExpression, (IEnumerable<MemberBinding>)bindings);
}
- ///<summary>Creates a <see cref="T:Microsoft.Linq.Expressions.MemberInitExpression" />.</summary>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.MemberInitExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.MemberInit" /> and the <see cref="P:Microsoft.Linq.Expressions.MemberInitExpression.NewExpression" /> and <see cref="P:Microsoft.Linq.Expressions.MemberInitExpression.Bindings" /> properties set to the specified values.</returns>
- ///<param name="newExpression">A <see cref="T:Microsoft.Linq.Expressions.NewExpression" /> to set the <see cref="P:Microsoft.Linq.Expressions.MemberInitExpression.NewExpression" /> property equal to.</param>
- ///<param name="bindings">An <see cref="T:System.Collections.Generic.IEnumerable`1" /> that contains <see cref="T:Microsoft.Linq.Expressions.MemberBinding" /> objects to use to populate the <see cref="P:Microsoft.Linq.Expressions.MemberInitExpression.Bindings" /> collection.</param>
+ ///<summary>Creates a <see cref="T:System.Linq.Expressions.MemberInitExpression" />.</summary>
+ ///<returns>A <see cref="T:System.Linq.Expressions.MemberInitExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.MemberInit" /> and the <see cref="P:System.Linq.Expressions.MemberInitExpression.NewExpression" /> and <see cref="P:System.Linq.Expressions.MemberInitExpression.Bindings" /> properties set to the specified values.</returns>
+ ///<param name="newExpression">A <see cref="T:System.Linq.Expressions.NewExpression" /> to set the <see cref="P:System.Linq.Expressions.MemberInitExpression.NewExpression" /> property equal to.</param>
+ ///<param name="bindings">An <see cref="T:System.Collections.Generic.IEnumerable`1" /> that contains <see cref="T:System.Linq.Expressions.MemberBinding" /> objects to use to populate the <see cref="P:System.Linq.Expressions.MemberInitExpression.Bindings" /> collection.</param>
///<exception cref="T:System.ArgumentNullException">
///<paramref name="newExpression" /> or <paramref name="bindings" /> is null.</exception>
- ///<exception cref="T:System.ArgumentException">The <see cref="P:Microsoft.Linq.Expressions.MemberBinding.Member" /> property of an element of <paramref name="bindings" /> does not represent a member of the type that <paramref name="newExpression" />.Type represents.</exception>
+ ///<exception cref="T:System.ArgumentException">The <see cref="P:System.Linq.Expressions.MemberBinding.Member" /> property of an element of <paramref name="bindings" /> does not represent a member of the type that <paramref name="newExpression" />.Type represents.</exception>
public static MemberInitExpression MemberInit(NewExpression newExpression, IEnumerable<MemberBinding> bindings) {
ContractUtils.RequiresNotNull(newExpression, "newExpression");
ContractUtils.RequiresNotNull(bindings, "bindings");
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MemberListBinding.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MemberListBinding.cs
index be6c60f7833..741cf243f3d 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MemberListBinding.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MemberListBinding.cs
@@ -12,27 +12,22 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Reflection;
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
@@ -72,10 +67,10 @@ namespace Microsoft.Linq.Expressions {
public partial class Expression {
- ///<summary>Creates a <see cref="T:Microsoft.Linq.Expressions.MemberListBinding" /> where the member is a field or property.</summary>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.MemberListBinding" /> that has the <see cref="P:Microsoft.Linq.Expressions.MemberBinding.BindingType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.MemberBindingType.ListBinding" /> and the <see cref="P:Microsoft.Linq.Expressions.MemberBinding.Member" /> and <see cref="P:Microsoft.Linq.Expressions.MemberListBinding.Initializers" /> properties set to the specified values.</returns>
- ///<param name="member">A <see cref="T:System.Reflection.MemberInfo" /> that represents a field or property to set the <see cref="P:Microsoft.Linq.Expressions.MemberBinding.Member" /> property equal to.</param>
- ///<param name="initializers">An array of <see cref="T:Microsoft.Linq.Expressions.ElementInit" /> objects to use to populate the <see cref="P:Microsoft.Linq.Expressions.MemberListBinding.Initializers" /> collection.</param>
+ ///<summary>Creates a <see cref="T:System.Linq.Expressions.MemberListBinding" /> where the member is a field or property.</summary>
+ ///<returns>A <see cref="T:System.Linq.Expressions.MemberListBinding" /> that has the <see cref="P:System.Linq.Expressions.MemberBinding.BindingType" /> property equal to <see cref="F:System.Linq.Expressions.MemberBindingType.ListBinding" /> and the <see cref="P:System.Linq.Expressions.MemberBinding.Member" /> and <see cref="P:System.Linq.Expressions.MemberListBinding.Initializers" /> properties set to the specified values.</returns>
+ ///<param name="member">A <see cref="T:System.Reflection.MemberInfo" /> that represents a field or property to set the <see cref="P:System.Linq.Expressions.MemberBinding.Member" /> property equal to.</param>
+ ///<param name="initializers">An array of <see cref="T:System.Linq.Expressions.ElementInit" /> objects to use to populate the <see cref="P:System.Linq.Expressions.MemberListBinding.Initializers" /> collection.</param>
///<exception cref="T:System.ArgumentNullException">
///<paramref name="member" /> is null. -or-One or more elements of <paramref name="initializers" /> is null.</exception>
///<exception cref="T:System.ArgumentException">
@@ -86,10 +81,10 @@ namespace Microsoft.Linq.Expressions {
return ListBind(member, (IEnumerable<ElementInit>)initializers);
}
- ///<summary>Creates a <see cref="T:Microsoft.Linq.Expressions.MemberListBinding" /> where the member is a field or property.</summary>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.MemberListBinding" /> that has the <see cref="P:Microsoft.Linq.Expressions.MemberBinding.BindingType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.MemberBindingType.ListBinding" /> and the <see cref="P:Microsoft.Linq.Expressions.MemberBinding.Member" /> and <see cref="P:Microsoft.Linq.Expressions.MemberListBinding.Initializers" /> properties set to the specified values.</returns>
- ///<param name="member">A <see cref="T:System.Reflection.MemberInfo" /> that represents a field or property to set the <see cref="P:Microsoft.Linq.Expressions.MemberBinding.Member" /> property equal to.</param>
- ///<param name="initializers">An <see cref="T:System.Collections.Generic.IEnumerable`1" /> that contains <see cref="T:Microsoft.Linq.Expressions.ElementInit" /> objects to use to populate the <see cref="P:Microsoft.Linq.Expressions.MemberListBinding.Initializers" /> collection.</param>
+ ///<summary>Creates a <see cref="T:System.Linq.Expressions.MemberListBinding" /> where the member is a field or property.</summary>
+ ///<returns>A <see cref="T:System.Linq.Expressions.MemberListBinding" /> that has the <see cref="P:System.Linq.Expressions.MemberBinding.BindingType" /> property equal to <see cref="F:System.Linq.Expressions.MemberBindingType.ListBinding" /> and the <see cref="P:System.Linq.Expressions.MemberBinding.Member" /> and <see cref="P:System.Linq.Expressions.MemberListBinding.Initializers" /> properties set to the specified values.</returns>
+ ///<param name="member">A <see cref="T:System.Reflection.MemberInfo" /> that represents a field or property to set the <see cref="P:System.Linq.Expressions.MemberBinding.Member" /> property equal to.</param>
+ ///<param name="initializers">An <see cref="T:System.Collections.Generic.IEnumerable`1" /> that contains <see cref="T:System.Linq.Expressions.ElementInit" /> objects to use to populate the <see cref="P:System.Linq.Expressions.MemberListBinding.Initializers" /> collection.</param>
///<exception cref="T:System.ArgumentNullException">
///<paramref name="member" /> is null. -or-One or more elements of <paramref name="initializers" /> is null.</exception>
///<exception cref="T:System.ArgumentException">
@@ -104,10 +99,10 @@ namespace Microsoft.Linq.Expressions {
return new MemberListBinding(member, initList);
}
- ///<summary>Creates a <see cref="T:Microsoft.Linq.Expressions.MemberListBinding" /> object based on a specified property accessor method.</summary>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.MemberListBinding" /> that has the <see cref="P:Microsoft.Linq.Expressions.MemberBinding.BindingType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.MemberBindingType.ListBinding" />, the <see cref="P:Microsoft.Linq.Expressions.MemberBinding.Member" /> property set to the <see cref="T:System.Reflection.MemberInfo" /> that represents the property accessed in <paramref name="propertyAccessor" />, and <see cref="P:Microsoft.Linq.Expressions.MemberListBinding.Initializers" /> populated with the elements of <paramref name="initializers" />.</returns>
+ ///<summary>Creates a <see cref="T:System.Linq.Expressions.MemberListBinding" /> object based on a specified property accessor method.</summary>
+ ///<returns>A <see cref="T:System.Linq.Expressions.MemberListBinding" /> that has the <see cref="P:System.Linq.Expressions.MemberBinding.BindingType" /> property equal to <see cref="F:System.Linq.Expressions.MemberBindingType.ListBinding" />, the <see cref="P:System.Linq.Expressions.MemberBinding.Member" /> property set to the <see cref="T:System.Reflection.MemberInfo" /> that represents the property accessed in <paramref name="propertyAccessor" />, and <see cref="P:System.Linq.Expressions.MemberListBinding.Initializers" /> populated with the elements of <paramref name="initializers" />.</returns>
///<param name="propertyAccessor">A <see cref="T:System.Reflection.MethodInfo" /> that represents a property accessor method.</param>
- ///<param name="initializers">An array of <see cref="T:Microsoft.Linq.Expressions.ElementInit" /> objects to use to populate the <see cref="P:Microsoft.Linq.Expressions.MemberListBinding.Initializers" /> collection.</param>
+ ///<param name="initializers">An array of <see cref="T:System.Linq.Expressions.ElementInit" /> objects to use to populate the <see cref="P:System.Linq.Expressions.MemberListBinding.Initializers" /> collection.</param>
///<exception cref="T:System.ArgumentNullException">
///<paramref name="propertyAccessor" /> is null. -or-One or more elements of <paramref name="initializers" /> is null.</exception>
///<exception cref="T:System.ArgumentException">
@@ -118,10 +113,10 @@ namespace Microsoft.Linq.Expressions {
return ListBind(propertyAccessor, (IEnumerable<ElementInit>)initializers);
}
- ///<summary>Creates a <see cref="T:Microsoft.Linq.Expressions.MemberListBinding" /> based on a specified property accessor method.</summary>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.MemberListBinding" /> that has the <see cref="P:Microsoft.Linq.Expressions.MemberBinding.BindingType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.MemberBindingType.ListBinding" />, the <see cref="P:Microsoft.Linq.Expressions.MemberBinding.Member" /> property set to the <see cref="T:System.Reflection.MemberInfo" /> that represents the property accessed in <paramref name="propertyAccessor" />, and <see cref="P:Microsoft.Linq.Expressions.MemberListBinding.Initializers" /> populated with the elements of <paramref name="initializers" />.</returns>
+ ///<summary>Creates a <see cref="T:System.Linq.Expressions.MemberListBinding" /> based on a specified property accessor method.</summary>
+ ///<returns>A <see cref="T:System.Linq.Expressions.MemberListBinding" /> that has the <see cref="P:System.Linq.Expressions.MemberBinding.BindingType" /> property equal to <see cref="F:System.Linq.Expressions.MemberBindingType.ListBinding" />, the <see cref="P:System.Linq.Expressions.MemberBinding.Member" /> property set to the <see cref="T:System.Reflection.MemberInfo" /> that represents the property accessed in <paramref name="propertyAccessor" />, and <see cref="P:System.Linq.Expressions.MemberListBinding.Initializers" /> populated with the elements of <paramref name="initializers" />.</returns>
///<param name="propertyAccessor">A <see cref="T:System.Reflection.MethodInfo" /> that represents a property accessor method.</param>
- ///<param name="initializers">An <see cref="T:System.Collections.Generic.IEnumerable`1" /> that contains <see cref="T:Microsoft.Linq.Expressions.ElementInit" /> objects to use to populate the <see cref="P:Microsoft.Linq.Expressions.MemberListBinding.Initializers" /> collection.</param>
+ ///<param name="initializers">An <see cref="T:System.Collections.Generic.IEnumerable`1" /> that contains <see cref="T:System.Linq.Expressions.ElementInit" /> objects to use to populate the <see cref="P:System.Linq.Expressions.MemberListBinding.Initializers" /> collection.</param>
///<exception cref="T:System.ArgumentNullException">
///<paramref name="propertyAccessor" /> is null. -or-One or more elements of <paramref name="initializers" /> are null.</exception>
///<exception cref="T:System.ArgumentException">
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MemberMemberBinding.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MemberMemberBinding.cs
index d3e1d726e75..1ea2ca8019c 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MemberMemberBinding.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MemberMemberBinding.cs
@@ -12,26 +12,21 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Reflection;
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
/// Represents initializing members of a member of a newly created object.
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MethodCallExpression.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MethodCallExpression.cs
index 65444fd5936..4f8972a492c 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MethodCallExpression.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/MethodCallExpression.cs
@@ -12,32 +12,23 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Reflection;
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
/// Represents a call to either static or an instance method.
@@ -522,9 +513,9 @@ namespace Microsoft.Linq.Expressions {
#region Call
- ///<summary>Creates a <see cref="T:Microsoft.Linq.Expressions.MethodCallExpression" /> that represents a call to a static method that takes one argument.</summary>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.Call" /> and the <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Object" /> and <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Method" /> properties set to the specified values.</returns>
- ///<param name="method">A <see cref="T:System.Reflection.MethodInfo" /> to set the <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Method" /> property equal to.</param>
+ ///<summary>Creates a <see cref="T:System.Linq.Expressions.MethodCallExpression" /> that represents a call to a static method that takes one argument.</summary>
+ ///<returns>A <see cref="T:System.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.Call" /> and the <see cref="P:System.Linq.Expressions.MethodCallExpression.Object" /> and <see cref="P:System.Linq.Expressions.MethodCallExpression.Method" /> properties set to the specified values.</returns>
+ ///<param name="method">A <see cref="T:System.Reflection.MethodInfo" /> to set the <see cref="P:System.Linq.Expressions.MethodCallExpression.Method" /> property equal to.</param>
///<param name="arg0">The <see cref="Expression" /> that represents the first argument.</param>
///<exception cref="T:System.ArgumentNullException">
///<paramref name="method" /> is null.</exception>
@@ -541,9 +532,9 @@ namespace Microsoft.Linq.Expressions {
return new MethodCallExpression1(method, arg0);
}
- ///<summary>Creates a <see cref="T:Microsoft.Linq.Expressions.MethodCallExpression" /> that represents a call to a static method that takes two arguments.</summary>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.Call" /> and the <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Object" /> and <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Method" /> properties set to the specified values.</returns>
- ///<param name="method">A <see cref="T:System.Reflection.MethodInfo" /> to set the <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Method" /> property equal to.</param>
+ ///<summary>Creates a <see cref="T:System.Linq.Expressions.MethodCallExpression" /> that represents a call to a static method that takes two arguments.</summary>
+ ///<returns>A <see cref="T:System.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.Call" /> and the <see cref="P:System.Linq.Expressions.MethodCallExpression.Object" /> and <see cref="P:System.Linq.Expressions.MethodCallExpression.Method" /> properties set to the specified values.</returns>
+ ///<param name="method">A <see cref="T:System.Reflection.MethodInfo" /> to set the <see cref="P:System.Linq.Expressions.MethodCallExpression.Method" /> property equal to.</param>
///<param name="arg0">The <see cref="Expression" /> that represents the first argument.</param>
///<param name="arg1">The <see cref="Expression" /> that represents the second argument.</param>
///<exception cref="T:System.ArgumentNullException">
@@ -563,9 +554,9 @@ namespace Microsoft.Linq.Expressions {
return new MethodCallExpression2(method, arg0, arg1);
}
- ///<summary>Creates a <see cref="T:Microsoft.Linq.Expressions.MethodCallExpression" /> that represents a call to a static method that takes three arguments.</summary>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.Call" /> and the <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Object" /> and <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Method" /> properties set to the specified values.</returns>
- ///<param name="method">A <see cref="T:System.Reflection.MethodInfo" /> to set the <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Method" /> property equal to.</param>
+ ///<summary>Creates a <see cref="T:System.Linq.Expressions.MethodCallExpression" /> that represents a call to a static method that takes three arguments.</summary>
+ ///<returns>A <see cref="T:System.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.Call" /> and the <see cref="P:System.Linq.Expressions.MethodCallExpression.Object" /> and <see cref="P:System.Linq.Expressions.MethodCallExpression.Method" /> properties set to the specified values.</returns>
+ ///<param name="method">A <see cref="T:System.Reflection.MethodInfo" /> to set the <see cref="P:System.Linq.Expressions.MethodCallExpression.Method" /> property equal to.</param>
///<param name="arg0">The <see cref="Expression" /> that represents the first argument.</param>
///<param name="arg1">The <see cref="Expression" /> that represents the second argument.</param>
///<param name="arg2">The <see cref="Expression" /> that represents the third argument.</param>
@@ -588,9 +579,9 @@ namespace Microsoft.Linq.Expressions {
return new MethodCallExpression3(method, arg0, arg1, arg2);
}
- ///<summary>Creates a <see cref="T:Microsoft.Linq.Expressions.MethodCallExpression" /> that represents a call to a static method that takes four arguments.</summary>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.Call" /> and the <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Object" /> and <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Method" /> properties set to the specified values.</returns>
- ///<param name="method">A <see cref="T:System.Reflection.MethodInfo" /> to set the <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Method" /> property equal to.</param>
+ ///<summary>Creates a <see cref="T:System.Linq.Expressions.MethodCallExpression" /> that represents a call to a static method that takes four arguments.</summary>
+ ///<returns>A <see cref="T:System.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.Call" /> and the <see cref="P:System.Linq.Expressions.MethodCallExpression.Object" /> and <see cref="P:System.Linq.Expressions.MethodCallExpression.Method" /> properties set to the specified values.</returns>
+ ///<param name="method">A <see cref="T:System.Reflection.MethodInfo" /> to set the <see cref="P:System.Linq.Expressions.MethodCallExpression.Method" /> property equal to.</param>
///<param name="arg0">The <see cref="Expression" /> that represents the first argument.</param>
///<param name="arg1">The <see cref="Expression" /> that represents the second argument.</param>
///<param name="arg2">The <see cref="Expression" /> that represents the third argument.</param>
@@ -616,9 +607,9 @@ namespace Microsoft.Linq.Expressions {
return new MethodCallExpression4(method, arg0, arg1, arg2, arg3);
}
- ///<summary>Creates a <see cref="T:Microsoft.Linq.Expressions.MethodCallExpression" /> that represents a call to a static method that takes five arguments.</summary>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.Call" /> and the <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Object" /> and <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Method" /> properties set to the specified values.</returns>
- ///<param name="method">A <see cref="T:System.Reflection.MethodInfo" /> to set the <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Method" /> property equal to.</param>
+ ///<summary>Creates a <see cref="T:System.Linq.Expressions.MethodCallExpression" /> that represents a call to a static method that takes five arguments.</summary>
+ ///<returns>A <see cref="T:System.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.Call" /> and the <see cref="P:System.Linq.Expressions.MethodCallExpression.Object" /> and <see cref="P:System.Linq.Expressions.MethodCallExpression.Method" /> properties set to the specified values.</returns>
+ ///<param name="method">A <see cref="T:System.Reflection.MethodInfo" /> to set the <see cref="P:System.Linq.Expressions.MethodCallExpression.Method" /> property equal to.</param>
///<param name="arg0">The <see cref="Expression" /> that represents the first argument.</param>
///<param name="arg1">The <see cref="Expression" /> that represents the second argument.</param>
///<param name="arg2">The <see cref="Expression" /> that represents the third argument.</param>
@@ -626,7 +617,7 @@ namespace Microsoft.Linq.Expressions {
///<param name="arg4">The <see cref="Expression" /> that represents the fifth argument.</param>
///<exception cref="T:System.ArgumentNullException">
///<paramref name="method" /> is null.</exception>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.Call" /> and the <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Object" /> and <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Method" /> properties set to the specified values.</returns>
+ ///<returns>A <see cref="T:System.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.Call" /> and the <see cref="P:System.Linq.Expressions.MethodCallExpression.Object" /> and <see cref="P:System.Linq.Expressions.MethodCallExpression.Method" /> properties set to the specified values.</returns>
public static MethodCallExpression Call(MethodInfo method, Expression arg0, Expression arg1, Expression arg2, Expression arg3, Expression arg4) {
ContractUtils.RequiresNotNull(method, "method");
ContractUtils.RequiresNotNull(arg0, "arg0");
@@ -653,7 +644,7 @@ namespace Microsoft.Linq.Expressions {
/// </summary>
/// <param name="method">The <see cref="MethodInfo" /> that represents the target method.</param>
/// <param name="arguments">The array of one or more of <see cref="Expression" /> that represents the call arguments.</param>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.Call" /> and the <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Object" /> and <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Method" /> properties set to the specified values.</returns>
+ ///<returns>A <see cref="T:System.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.Call" /> and the <see cref="P:System.Linq.Expressions.MethodCallExpression.Object" /> and <see cref="P:System.Linq.Expressions.MethodCallExpression.Method" /> properties set to the specified values.</returns>
public static MethodCallExpression Call(MethodInfo method, params Expression[] arguments) {
return Call(null, method, arguments);
}
@@ -663,7 +654,7 @@ namespace Microsoft.Linq.Expressions {
/// </summary>
/// <param name="method">The <see cref="MethodInfo" /> that represents the target method.</param>
/// <param name="arguments">A collection of <see cref="Expression" /> that represents the call arguments.</param>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.Call" /> and the <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Object" /> and <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Method" /> properties set to the specified values.</returns>
+ ///<returns>A <see cref="T:System.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.Call" /> and the <see cref="P:System.Linq.Expressions.MethodCallExpression.Object" /> and <see cref="P:System.Linq.Expressions.MethodCallExpression.Method" /> properties set to the specified values.</returns>
public static MethodCallExpression Call(MethodInfo method, IEnumerable<Expression> arguments) {
return Call(null, method, arguments);
}
@@ -673,7 +664,7 @@ namespace Microsoft.Linq.Expressions {
/// </summary>
/// <param name="instance">An <see cref="Expression" /> that specifies the instance for an instance call. (pass null for a static (Shared in Visual Basic) method).</param>
/// <param name="method">The <see cref="MethodInfo" /> that represents the target method.</param>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.Call" /> and the <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Object" /> and <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Method" /> properties set to the specified values.</returns>
+ ///<returns>A <see cref="T:System.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.Call" /> and the <see cref="P:System.Linq.Expressions.MethodCallExpression.Object" /> and <see cref="P:System.Linq.Expressions.MethodCallExpression.Method" /> properties set to the specified values.</returns>
public static MethodCallExpression Call(Expression instance, MethodInfo method) {
return Call(instance, method, EmptyReadOnlyCollection<Expression>.Instance);
}
@@ -684,7 +675,7 @@ namespace Microsoft.Linq.Expressions {
/// <param name="instance">An <see cref="Expression" /> that specifies the instance for an instance call. (pass null for a static (Shared in Visual Basic) method).</param>
/// <param name="method">The <see cref="MethodInfo" /> that represents the target method.</param>
/// <param name="arguments">An array of one or more of <see cref="Expression" /> that represents the call arguments.</param>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.Call" /> and the <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Object" /> and <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Method" /> properties set to the specified values.</returns>
+ ///<returns>A <see cref="T:System.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.Call" /> and the <see cref="P:System.Linq.Expressions.MethodCallExpression.Object" /> and <see cref="P:System.Linq.Expressions.MethodCallExpression.Method" /> properties set to the specified values.</returns>
public static MethodCallExpression Call(Expression instance, MethodInfo method, params Expression[] arguments) {
return Call(instance, method, (IEnumerable<Expression>)arguments);
}
@@ -696,7 +687,7 @@ namespace Microsoft.Linq.Expressions {
/// <param name="method">The <see cref="MethodInfo" /> that represents the target method.</param>
/// <param name="arg0">The <see cref="Expression" /> that represents the first argument.</param>
/// <param name="arg1">The <see cref="Expression" /> that represents the second argument.</param>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.Call" /> and the <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Object" /> and <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Method" /> properties set to the specified values.</returns>
+ ///<returns>A <see cref="T:System.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.Call" /> and the <see cref="P:System.Linq.Expressions.MethodCallExpression.Object" /> and <see cref="P:System.Linq.Expressions.MethodCallExpression.Method" /> properties set to the specified values.</returns>
public static MethodCallExpression Call(Expression instance, MethodInfo method, Expression arg0, Expression arg1) {
ContractUtils.RequiresNotNull(method, "method");
ContractUtils.RequiresNotNull(arg0, "arg0");
@@ -724,7 +715,7 @@ namespace Microsoft.Linq.Expressions {
/// <param name="arg0">The <see cref="Expression" /> that represents the first argument.</param>
/// <param name="arg1">The <see cref="Expression" /> that represents the second argument.</param>
/// <param name="arg2">The <see cref="Expression" /> that represents the third argument.</param>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.Call" /> and the <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Object" /> and <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Method" /> properties set to the specified values.</returns>
+ ///<returns>A <see cref="T:System.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.Call" /> and the <see cref="P:System.Linq.Expressions.MethodCallExpression.Object" /> and <see cref="P:System.Linq.Expressions.MethodCallExpression.Method" /> properties set to the specified values.</returns>
public static MethodCallExpression Call(Expression instance, MethodInfo method, Expression arg0, Expression arg1, Expression arg2) {
ContractUtils.RequiresNotNull(method, "method");
ContractUtils.RequiresNotNull(arg0, "arg0");
@@ -745,15 +736,15 @@ namespace Microsoft.Linq.Expressions {
return new MethodCallExpression3(method, arg0, arg1, arg2);
}
- ///<summary>Creates a <see cref="T:Microsoft.Linq.Expressions.MethodCallExpression" /> that represents a call to an instance method by calling the appropriate factory method.</summary>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.Call" />, the <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Object" /> property equal to <paramref name="instance" />, <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Method" /> set to the <see cref="T:System.Reflection.MethodInfo" /> that represents the specified instance method, and <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Arguments" /> set to the specified arguments.</returns>
- ///<param name="instance">An <see cref="T:Microsoft.Linq.Expressions.Expression" /> whose <see cref="P:Microsoft.Linq.Expressions.Expression.Type" /> property value will be searched for a specific method.</param>
+ ///<summary>Creates a <see cref="T:System.Linq.Expressions.MethodCallExpression" /> that represents a call to an instance method by calling the appropriate factory method.</summary>
+ ///<returns>A <see cref="T:System.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.Call" />, the <see cref="P:System.Linq.Expressions.MethodCallExpression.Object" /> property equal to <paramref name="instance" />, <see cref="P:System.Linq.Expressions.MethodCallExpression.Method" /> set to the <see cref="T:System.Reflection.MethodInfo" /> that represents the specified instance method, and <see cref="P:System.Linq.Expressions.MethodCallExpression.Arguments" /> set to the specified arguments.</returns>
+ ///<param name="instance">An <see cref="T:System.Linq.Expressions.Expression" /> whose <see cref="P:System.Linq.Expressions.Expression.Type" /> property value will be searched for a specific method.</param>
///<param name="methodName">The name of the method.</param>
///<param name="typeArguments">
///An array of <see cref="T:System.Type" /> objects that specify the type parameters of the generic method.
///This argument should be null when <paramref name="methodName" /> specifies a non-generic method.
///</param>
- ///<param name="arguments">An array of <see cref="T:Microsoft.Linq.Expressions.Expression" /> objects that represents the arguments to the method.</param>
+ ///<param name="arguments">An array of <see cref="T:System.Linq.Expressions.Expression" /> objects that represents the arguments to the method.</param>
///<exception cref="T:System.ArgumentNullException">
///<paramref name="instance" /> or <paramref name="methodName" /> is null.</exception>
///<exception cref="T:System.InvalidOperationException">No method whose name is <paramref name="methodName" />, whose type parameters match <paramref name="typeArguments" />, and whose parameter types match <paramref name="arguments" /> is found in <paramref name="instance" />.Type or its base types.-or-More than one method whose name is <paramref name="methodName" />, whose type parameters match <paramref name="typeArguments" />, and whose parameter types match <paramref name="arguments" /> is found in <paramref name="instance" />.Type or its base types.</exception>
@@ -768,15 +759,15 @@ namespace Microsoft.Linq.Expressions {
return Expression.Call(instance, FindMethod(instance.Type, methodName, typeArguments, arguments, flags), arguments);
}
- ///<summary>Creates a <see cref="T:Microsoft.Linq.Expressions.MethodCallExpression" /> that represents a call to a static (Shared in Visual Basic) method by calling the appropriate factory method.</summary>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.Call" />, the <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Method" /> property set to the <see cref="T:System.Reflection.MethodInfo" /> that represents the specified static (Shared in Visual Basic) method, and the <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Arguments" /> property set to the specified arguments.</returns>
+ ///<summary>Creates a <see cref="T:System.Linq.Expressions.MethodCallExpression" /> that represents a call to a static (Shared in Visual Basic) method by calling the appropriate factory method.</summary>
+ ///<returns>A <see cref="T:System.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.Call" />, the <see cref="P:System.Linq.Expressions.MethodCallExpression.Method" /> property set to the <see cref="T:System.Reflection.MethodInfo" /> that represents the specified static (Shared in Visual Basic) method, and the <see cref="P:System.Linq.Expressions.MethodCallExpression.Arguments" /> property set to the specified arguments.</returns>
///<param name="type">The <see cref="T:System.Type" /> that specifies the type that contains the specified static (Shared in Visual Basic) method.</param>
///<param name="methodName">The name of the method.</param>
///<param name="typeArguments">
///An array of <see cref="T:System.Type" /> objects that specify the type parameters of the generic method.
///This argument should be null when <paramref name="methodName" /> specifies a non-generic method.
///</param>
- ///<param name="arguments">An array of <see cref="T:Microsoft.Linq.Expressions.Expression" /> objects that represent the arguments to the method.</param>
+ ///<param name="arguments">An array of <see cref="T:System.Linq.Expressions.Expression" /> objects that represent the arguments to the method.</param>
///<exception cref="T:System.ArgumentNullException">
///<paramref name="type" /> or <paramref name="methodName" /> is null.</exception>
///<exception cref="T:System.InvalidOperationException">No method whose name is <paramref name="methodName" />, whose type parameters match <paramref name="typeArguments" />, and whose parameter types match <paramref name="arguments" /> is found in <paramref name="type" /> or its base types.-or-More than one method whose name is <paramref name="methodName" />, whose type parameters match <paramref name="typeArguments" />, and whose parameter types match <paramref name="arguments" /> is found in <paramref name="type" /> or its base types.</exception>
@@ -789,11 +780,11 @@ namespace Microsoft.Linq.Expressions {
return Expression.Call(null, FindMethod(type, methodName, typeArguments, arguments, flags), arguments);
}
- ///<summary>Creates a <see cref="T:Microsoft.Linq.Expressions.MethodCallExpression" /> that represents a method call.</summary>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.Call" /> and the <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Object" />, <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Method" />, and <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Arguments" /> properties set to the specified values.</returns>
- ///<param name="instance">An <see cref="T:Microsoft.Linq.Expressions.Expression" /> to set the <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Object" /> property equal to (pass null for a static (Shared in Visual Basic) method).</param>
- ///<param name="method">A <see cref="T:System.Reflection.MethodInfo" /> to set the <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Method" /> property equal to.</param>
- ///<param name="arguments">An <see cref="T:System.Collections.Generic.IEnumerable`1" /> that contains <see cref="T:Microsoft.Linq.Expressions.Expression" /> objects to use to populate the <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Arguments" /> collection.</param>
+ ///<summary>Creates a <see cref="T:System.Linq.Expressions.MethodCallExpression" /> that represents a method call.</summary>
+ ///<returns>A <see cref="T:System.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.Call" /> and the <see cref="P:System.Linq.Expressions.MethodCallExpression.Object" />, <see cref="P:System.Linq.Expressions.MethodCallExpression.Method" />, and <see cref="P:System.Linq.Expressions.MethodCallExpression.Arguments" /> properties set to the specified values.</returns>
+ ///<param name="instance">An <see cref="T:System.Linq.Expressions.Expression" /> to set the <see cref="P:System.Linq.Expressions.MethodCallExpression.Object" /> property equal to (pass null for a static (Shared in Visual Basic) method).</param>
+ ///<param name="method">A <see cref="T:System.Reflection.MethodInfo" /> to set the <see cref="P:System.Linq.Expressions.MethodCallExpression.Method" /> property equal to.</param>
+ ///<param name="arguments">An <see cref="T:System.Collections.Generic.IEnumerable`1" /> that contains <see cref="T:System.Linq.Expressions.Expression" /> objects to use to populate the <see cref="P:System.Linq.Expressions.MethodCallExpression.Arguments" /> collection.</param>
///<exception cref="T:System.ArgumentNullException">
///<paramref name="method" /> is null.-or-<paramref name="instance" /> is null and <paramref name="method" /> represents an instance method.</exception>
///<exception cref="T:System.ArgumentException">
@@ -823,9 +814,9 @@ namespace Microsoft.Linq.Expressions {
private static void ValidateStaticOrInstanceMethod(Expression instance, MethodInfo method) {
if (method.IsStatic) {
- ContractUtils.Requires(instance == null, "instance", Strings.OnlyStaticMethodsHaveNullInstance);
+ if (instance != null) throw new ArgumentException(Strings.OnlyStaticMethodsHaveNullInstance, "instance");
} else {
- ContractUtils.Requires(instance != null, "method", Strings.OnlyStaticMethodsHaveNullInstance);
+ if (instance == null) throw new ArgumentException(Strings.OnlyStaticMethodsHaveNullInstance, "method");
RequiresCanRead(instance, "instance");
ValidateCallInstanceType(instance.Type, method);
}
@@ -997,22 +988,22 @@ namespace Microsoft.Linq.Expressions {
#region ArrayIndex
- ///<summary>Creates a <see cref="T:Microsoft.Linq.Expressions.MethodCallExpression" /> that represents applying an array index operator to a multi-dimensional array.</summary>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.BinaryExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.ArrayIndex" /> and the <see cref="P:Microsoft.Linq.Expressions.BinaryExpression.Left" /> and <see cref="P:Microsoft.Linq.Expressions.BinaryExpression.Right" /> properties set to the specified values.</returns>
- ///<param name="array">An array of <see cref="T:Microsoft.Linq.Expressions.Expression" /> instances - indexes for the array index operation.</param>
- ///<param name="indexes">An array that contains <see cref="T:Microsoft.Linq.Expressions.Expression" /> objects to use to populate the <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Arguments" /> collection.</param>
+ ///<summary>Creates a <see cref="T:System.Linq.Expressions.MethodCallExpression" /> that represents applying an array index operator to a multi-dimensional array.</summary>
+ ///<returns>A <see cref="T:System.Linq.Expressions.BinaryExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.ArrayIndex" /> and the <see cref="P:System.Linq.Expressions.BinaryExpression.Left" /> and <see cref="P:System.Linq.Expressions.BinaryExpression.Right" /> properties set to the specified values.</returns>
+ ///<param name="array">An array of <see cref="T:System.Linq.Expressions.Expression" /> instances - indexes for the array index operation.</param>
+ ///<param name="indexes">An array that contains <see cref="T:System.Linq.Expressions.Expression" /> objects to use to populate the <see cref="P:System.Linq.Expressions.MethodCallExpression.Arguments" /> collection.</param>
public static MethodCallExpression ArrayIndex(Expression array, params Expression[] indexes) {
return ArrayIndex(array, (IEnumerable<Expression>)indexes);
}
- ///<summary>Creates a <see cref="T:Microsoft.Linq.Expressions.MethodCallExpression" /> that represents applying an array index operator to an array of rank more than one.</summary>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.Call" /> and the <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Object" /> and <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Arguments" /> properties set to the specified values.</returns>
- ///<param name="array">An <see cref="T:Microsoft.Linq.Expressions.Expression" /> to set the <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Object" /> property equal to.</param>
- ///<param name="indexes">An <see cref="T:System.Collections.Generic.IEnumerable`1" /> that contains <see cref="T:Microsoft.Linq.Expressions.Expression" /> objects to use to populate the <see cref="P:Microsoft.Linq.Expressions.MethodCallExpression.Arguments" /> collection.</param>
+ ///<summary>Creates a <see cref="T:System.Linq.Expressions.MethodCallExpression" /> that represents applying an array index operator to an array of rank more than one.</summary>
+ ///<returns>A <see cref="T:System.Linq.Expressions.MethodCallExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.Call" /> and the <see cref="P:System.Linq.Expressions.MethodCallExpression.Object" /> and <see cref="P:System.Linq.Expressions.MethodCallExpression.Arguments" /> properties set to the specified values.</returns>
+ ///<param name="array">An <see cref="T:System.Linq.Expressions.Expression" /> to set the <see cref="P:System.Linq.Expressions.MethodCallExpression.Object" /> property equal to.</param>
+ ///<param name="indexes">An <see cref="T:System.Collections.Generic.IEnumerable`1" /> that contains <see cref="T:System.Linq.Expressions.Expression" /> objects to use to populate the <see cref="P:System.Linq.Expressions.MethodCallExpression.Arguments" /> collection.</param>
///<exception cref="T:System.ArgumentNullException">
///<paramref name="array" /> or <paramref name="indexes" /> is null.</exception>
///<exception cref="T:System.ArgumentException">
- ///<paramref name="array" />.Type does not represent an array type.-or-The rank of <paramref name="array" />.Type does not match the number of elements in <paramref name="indexes" />.-or-The <see cref="P:Microsoft.Linq.Expressions.Expression.Type" /> property of one or more elements of <paramref name="indexes" /> does not represent the <see cref="T:System.Int32" /> type.</exception>
+ ///<paramref name="array" />.Type does not represent an array type.-or-The rank of <paramref name="array" />.Type does not match the number of elements in <paramref name="indexes" />.-or-The <see cref="P:System.Linq.Expressions.Expression.Type" /> property of one or more elements of <paramref name="indexes" /> does not represent the <see cref="T:System.Int32" /> type.</exception>
public static MethodCallExpression ArrayIndex(Expression array, IEnumerable<Expression> indexes) {
RequiresCanRead(array, "array");
ContractUtils.RequiresNotNull(indexes, "indexes");
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/NewArrayExpression.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/NewArrayExpression.cs
index b58d450edd4..9f18554533f 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/NewArrayExpression.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/NewArrayExpression.cs
@@ -12,31 +12,22 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
@@ -223,7 +214,7 @@ namespace Microsoft.Linq.Expressions {
ReadOnlyCollection<Expression> boundsList = bounds.ToReadOnly();
int dimensions = boundsList.Count;
- ContractUtils.Requires(dimensions > 0, "bounds", Strings.BoundsCannotBeLessThanOne);
+ if (dimensions <= 0) throw Error.BoundsCannotBeLessThanOne();
for (int i = 0; i < dimensions; i++) {
Expression expr = boundsList[i];
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/NewExpression.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/NewExpression.cs
index 7185da31659..edfc486c536 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/NewExpression.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/NewExpression.cs
@@ -12,32 +12,23 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Reflection;
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ParameterExpression.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ParameterExpression.cs
index b6caef52f1f..aa55846cf57 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ParameterExpression.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/ParameterExpression.cs
@@ -12,24 +12,19 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
@@ -225,8 +220,8 @@ namespace Microsoft.Linq.Expressions {
/// <returns>A <see cref="ParameterExpression" /> node with the specified name and type.</returns>
public static ParameterExpression Variable(Type type, string name) {
ContractUtils.RequiresNotNull(type, "type");
- ContractUtils.Requires(type != typeof(void), "type", Strings.ArgumentCannotBeOfTypeVoid);
- ContractUtils.Requires(!type.IsByRef, "type", Strings.TypeMustNotBeByRef);
+ if (type == typeof(void)) throw Error.ArgumentCannotBeOfTypeVoid();
+ if (type.IsByRef) throw Error.TypeMustNotBeByRef();
return ParameterExpression.Make(type, name, false);
}
}
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/RuntimeVariablesExpression.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/RuntimeVariablesExpression.cs
index 1d16968c8e2..6f3e87d06fd 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/RuntimeVariablesExpression.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/RuntimeVariablesExpression.cs
@@ -12,27 +12,18 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
/// An expression that provides runtime read/write access to variables.
@@ -98,19 +89,19 @@ namespace Microsoft.Linq.Expressions {
public partial class Expression {
/// <summary>
- /// Creates an instance of <see cref="T:Microsoft.Linq.Expressions.RuntimeVariablesExpression" />.
+ /// Creates an instance of <see cref="T:System.Linq.Expressions.RuntimeVariablesExpression" />.
/// </summary>
- /// <param name="variables">An array of <see cref="T:Microsoft.Linq.Expressions.ParameterExpression" /> objects to use to populate the <see cref="P:Microsoft.Linq.Expressions.RuntimeVariablesExpression.Variables" /> collection.</param>
- /// <returns>An instance of <see cref="T:Microsoft.Linq.Expressions.RuntimeVariablesExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.RuntimeVariables" /> and the <see cref="P:Microsoft.Linq.Expressions.RuntimeVariablesExpression.Variables" /> property set to the specified value.</returns>
+ /// <param name="variables">An array of <see cref="T:System.Linq.Expressions.ParameterExpression" /> objects to use to populate the <see cref="P:System.Linq.Expressions.RuntimeVariablesExpression.Variables" /> collection.</param>
+ /// <returns>An instance of <see cref="T:System.Linq.Expressions.RuntimeVariablesExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.RuntimeVariables" /> and the <see cref="P:System.Linq.Expressions.RuntimeVariablesExpression.Variables" /> property set to the specified value.</returns>
public static RuntimeVariablesExpression RuntimeVariables(params ParameterExpression[] variables) {
return RuntimeVariables((IEnumerable<ParameterExpression>)variables);
}
/// <summary>
- /// Creates an instance of <see cref="T:Microsoft.Linq.Expressions.RuntimeVariablesExpression" />.
+ /// Creates an instance of <see cref="T:System.Linq.Expressions.RuntimeVariablesExpression" />.
/// </summary>
- /// <param name="variables">A collection of <see cref="T:Microsoft.Linq.Expressions.ParameterExpression" /> objects to use to populate the <see cref="P:Microsoft.Linq.Expressions.RuntimeVariablesExpression.Variables" /> collection.</param>
- /// <returns>An instance of <see cref="T:Microsoft.Linq.Expressions.RuntimeVariablesExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.RuntimeVariables" /> and the <see cref="P:Microsoft.Linq.Expressions.RuntimeVariablesExpression.Variables" /> property set to the specified value.</returns>
+ /// <param name="variables">A collection of <see cref="T:System.Linq.Expressions.ParameterExpression" /> objects to use to populate the <see cref="P:System.Linq.Expressions.RuntimeVariablesExpression.Variables" /> collection.</param>
+ /// <returns>An instance of <see cref="T:System.Linq.Expressions.RuntimeVariablesExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.RuntimeVariables" /> and the <see cref="P:System.Linq.Expressions.RuntimeVariablesExpression.Variables" /> property set to the specified value.</returns>
public static RuntimeVariablesExpression RuntimeVariables(IEnumerable<ParameterExpression> variables) {
ContractUtils.RequiresNotNull(variables, "variables");
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/SwitchCase.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/SwitchCase.cs
index bf860465951..78a5949e85b 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/SwitchCase.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/SwitchCase.cs
@@ -12,22 +12,17 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
/// Represents one case of a <see cref="SwitchExpression"/>.
@@ -84,21 +79,21 @@ namespace Microsoft.Linq.Expressions {
public partial class Expression {
/// <summary>
- /// Creates a <see cref="Microsoft.Linq.Expressions.SwitchCase">SwitchCase</see> for use in a <see cref="SwitchExpression"/>.
+ /// Creates a <see cref="T:SwitchCase">SwitchCase</see> for use in a <see cref="SwitchExpression"/>.
/// </summary>
/// <param name="body">The body of the case.</param>
/// <param name="testValues">The test values of the case.</param>
- /// <returns>The created <see cref="Microsoft.Linq.Expressions.SwitchCase">SwitchCase</see>.</returns>
+ /// <returns>The created <see cref="T:SwitchCase">SwitchCase</see>.</returns>
public static SwitchCase SwitchCase(Expression body, params Expression[] testValues) {
return SwitchCase(body, (IEnumerable<Expression>)testValues);
}
/// <summary>
- /// Creates a <see cref="Microsoft.Linq.Expressions.SwitchCase">SwitchCase</see> for use in a <see cref="SwitchExpression"/>.
+ /// Creates a <see cref="T:SwitchCase">SwitchCase</see> for use in a <see cref="SwitchExpression"/>.
/// </summary>
/// <param name="body">The body of the case.</param>
/// <param name="testValues">The test values of the case.</param>
- /// <returns>The created <see cref="Microsoft.Linq.Expressions.SwitchCase">SwitchCase</see>.</returns>
+ /// <returns>The created <see cref="T:SwitchCase">SwitchCase</see>.</returns>
public static SwitchCase SwitchCase(Expression body, IEnumerable<Expression> testValues) {
RequiresCanRead(body, "body");
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/SwitchExpression.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/SwitchExpression.cs
index 0358ef49989..5fcb902d2a2 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/SwitchExpression.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/SwitchExpression.cs
@@ -12,27 +12,22 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Reflection;
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
/// Represents a control expression that handles multiple selections by passing control to a <see cref="SwitchCase"/>.
@@ -204,7 +199,7 @@ namespace Microsoft.Linq.Expressions {
/// <returns>The created <see cref="SwitchExpression"/>.</returns>
public static SwitchExpression Switch(Type type, Expression switchValue, Expression defaultBody, MethodInfo comparison, IEnumerable<SwitchCase> cases) {
RequiresCanRead(switchValue, "switchValue");
- ContractUtils.Requires(switchValue.Type != typeof(void), "switchValue", Strings.ArgumentCannotBeOfTypeVoid);
+ if (switchValue.Type == typeof(void)) throw Error.ArgumentCannotBeOfTypeVoid();
var caseList = cases.ToReadOnly();
ContractUtils.RequiresNotEmpty(caseList, "cases");
@@ -274,7 +269,7 @@ namespace Microsoft.Linq.Expressions {
}
if (defaultBody == null) {
- ContractUtils.Requires(resultType == typeof(void), "defaultBody", Strings.DefaultBodyMustBeSupplied);
+ if (resultType != typeof(void)) throw Error.DefaultBodyMustBeSupplied();
} else {
ValidateSwitchCaseType(defaultBody, customType, resultType, "defaultBody");
}
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/SymbolDocumentInfo.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/SymbolDocumentInfo.cs
index 71c23c2043d..bfe265048c9 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/SymbolDocumentInfo.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/SymbolDocumentInfo.cs
@@ -12,19 +12,14 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-#if CODEPLEX_40
+using System;
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
/// Stores information needed to emit debugging symbol information for a
@@ -108,49 +103,49 @@ namespace Microsoft.Linq.Expressions {
public partial class Expression {
/// <summary>
- /// Creates an instance of <see cref="T:Microsoft.Linq.Expressions.SymbolDocumentInfo" />.
+ /// Creates an instance of <see cref="T:System.Linq.Expressions.SymbolDocumentInfo" />.
/// </summary>
- /// <param name="fileName">A <see cref="T:System.String" /> to set the <see cref="P:Microsoft.Linq.Expressions.SymbolDocumentInfo.FileName" /> equal to.</param>
- /// <returns>A <see cref="T:Microsoft.Linq.Expressions.SymbolDocumentInfo" /> that has the <see cref="P:Microsoft.Linq.Expressions.SymbolDocumentInfo.FileName" /> property set to the specified value.</returns>
+ /// <param name="fileName">A <see cref="T:System.String" /> to set the <see cref="P:System.Linq.Expressions.SymbolDocumentInfo.FileName" /> equal to.</param>
+ /// <returns>A <see cref="T:System.Linq.Expressions.SymbolDocumentInfo" /> that has the <see cref="P:System.Linq.Expressions.SymbolDocumentInfo.FileName" /> property set to the specified value.</returns>
public static SymbolDocumentInfo SymbolDocument(string fileName) {
return new SymbolDocumentInfo(fileName);
}
/// <summary>
- /// Creates an instance of <see cref="T:Microsoft.Linq.Expressions.SymbolDocumentInfo" />.
+ /// Creates an instance of <see cref="T:System.Linq.Expressions.SymbolDocumentInfo" />.
/// </summary>
- /// <param name="fileName">A <see cref="T:System.String" /> to set the <see cref="P:Microsoft.Linq.Expressions.SymbolDocumentInfo.FileName" /> equal to.</param>
- /// <param name="language">A <see cref="T:System.Guid" /> to set the <see cref="P:Microsoft.Linq.Expressions.SymbolDocumentInfo.Language" /> equal to.</param>
- /// <returns>A <see cref="T:Microsoft.Linq.Expressions.SymbolDocumentInfo" /> that has the <see cref="P:Microsoft.Linq.Expressions.SymbolDocumentInfo.FileName" />
- /// and <see cref="P:Microsoft.Linq.Expressions.SymbolDocumentInfo.Language" /> properties set to the specified value.</returns>
+ /// <param name="fileName">A <see cref="T:System.String" /> to set the <see cref="P:System.Linq.Expressions.SymbolDocumentInfo.FileName" /> equal to.</param>
+ /// <param name="language">A <see cref="T:System.Guid" /> to set the <see cref="P:System.Linq.Expressions.SymbolDocumentInfo.Language" /> equal to.</param>
+ /// <returns>A <see cref="T:System.Linq.Expressions.SymbolDocumentInfo" /> that has the <see cref="P:System.Linq.Expressions.SymbolDocumentInfo.FileName" />
+ /// and <see cref="P:System.Linq.Expressions.SymbolDocumentInfo.Language" /> properties set to the specified value.</returns>
public static SymbolDocumentInfo SymbolDocument(string fileName, Guid language) {
return new SymbolDocumentWithGuids(fileName, ref language);
}
/// <summary>
- /// Creates an instance of <see cref="T:Microsoft.Linq.Expressions.SymbolDocumentInfo" />.
+ /// Creates an instance of <see cref="T:System.Linq.Expressions.SymbolDocumentInfo" />.
/// </summary>
- /// <param name="fileName">A <see cref="T:System.String" /> to set the <see cref="P:Microsoft.Linq.Expressions.SymbolDocumentInfo.FileName" /> equal to.</param>
- /// <param name="language">A <see cref="T:System.Guid" /> to set the <see cref="P:Microsoft.Linq.Expressions.SymbolDocumentInfo.Language" /> equal to.</param>
- /// <param name="languageVendor">A <see cref="T:System.Guid" /> to set the <see cref="P:Microsoft.Linq.Expressions.SymbolDocumentInfo.LanguageVendor" /> equal to.</param>
- /// <returns>A <see cref="T:Microsoft.Linq.Expressions.SymbolDocumentInfo" /> that has the <see cref="P:Microsoft.Linq.Expressions.SymbolDocumentInfo.FileName" />
- /// and <see cref="P:Microsoft.Linq.Expressions.SymbolDocumentInfo.Language" />
- /// and <see cref="P:Microsoft.Linq.Expressions.SymbolDocumentInfo.LanguageVendor" /> properties set to the specified value.</returns>
+ /// <param name="fileName">A <see cref="T:System.String" /> to set the <see cref="P:System.Linq.Expressions.SymbolDocumentInfo.FileName" /> equal to.</param>
+ /// <param name="language">A <see cref="T:System.Guid" /> to set the <see cref="P:System.Linq.Expressions.SymbolDocumentInfo.Language" /> equal to.</param>
+ /// <param name="languageVendor">A <see cref="T:System.Guid" /> to set the <see cref="P:System.Linq.Expressions.SymbolDocumentInfo.LanguageVendor" /> equal to.</param>
+ /// <returns>A <see cref="T:System.Linq.Expressions.SymbolDocumentInfo" /> that has the <see cref="P:System.Linq.Expressions.SymbolDocumentInfo.FileName" />
+ /// and <see cref="P:System.Linq.Expressions.SymbolDocumentInfo.Language" />
+ /// and <see cref="P:System.Linq.Expressions.SymbolDocumentInfo.LanguageVendor" /> properties set to the specified value.</returns>
public static SymbolDocumentInfo SymbolDocument(string fileName, Guid language, Guid languageVendor) {
return new SymbolDocumentWithGuids(fileName, ref language, ref languageVendor);
}
/// <summary>
- /// Creates an instance of <see cref="T:Microsoft.Linq.Expressions.SymbolDocumentInfo" />.
+ /// Creates an instance of <see cref="T:System.Linq.Expressions.SymbolDocumentInfo" />.
/// </summary>
- /// <param name="fileName">A <see cref="T:System.String" /> to set the <see cref="P:Microsoft.Linq.Expressions.SymbolDocumentInfo.FileName" /> equal to.</param>
- /// <param name="language">A <see cref="T:System.Guid" /> to set the <see cref="P:Microsoft.Linq.Expressions.SymbolDocumentInfo.Language" /> equal to.</param>
- /// <param name="languageVendor">A <see cref="T:System.Guid" /> to set the <see cref="P:Microsoft.Linq.Expressions.SymbolDocumentInfo.LanguageVendor" /> equal to.</param>
- /// <param name="documentType">A <see cref="T:System.Guid" /> to set the <see cref="P:Microsoft.Linq.Expressions.SymbolDocumentInfo.DocumentType" /> equal to.</param>
- /// <returns>A <see cref="T:Microsoft.Linq.Expressions.SymbolDocumentInfo" /> that has the <see cref="P:Microsoft.Linq.Expressions.SymbolDocumentInfo.FileName" />
- /// and <see cref="P:Microsoft.Linq.Expressions.SymbolDocumentInfo.Language" />
- /// and <see cref="P:Microsoft.Linq.Expressions.SymbolDocumentInfo.LanguageVendor" />
- /// and <see cref="P:Microsoft.Linq.Expressions.SymbolDocumentInfo.DocumentType" /> properties set to the specified value.</returns>
+ /// <param name="fileName">A <see cref="T:System.String" /> to set the <see cref="P:System.Linq.Expressions.SymbolDocumentInfo.FileName" /> equal to.</param>
+ /// <param name="language">A <see cref="T:System.Guid" /> to set the <see cref="P:System.Linq.Expressions.SymbolDocumentInfo.Language" /> equal to.</param>
+ /// <param name="languageVendor">A <see cref="T:System.Guid" /> to set the <see cref="P:System.Linq.Expressions.SymbolDocumentInfo.LanguageVendor" /> equal to.</param>
+ /// <param name="documentType">A <see cref="T:System.Guid" /> to set the <see cref="P:System.Linq.Expressions.SymbolDocumentInfo.DocumentType" /> equal to.</param>
+ /// <returns>A <see cref="T:System.Linq.Expressions.SymbolDocumentInfo" /> that has the <see cref="P:System.Linq.Expressions.SymbolDocumentInfo.FileName" />
+ /// and <see cref="P:System.Linq.Expressions.SymbolDocumentInfo.Language" />
+ /// and <see cref="P:System.Linq.Expressions.SymbolDocumentInfo.LanguageVendor" />
+ /// and <see cref="P:System.Linq.Expressions.SymbolDocumentInfo.DocumentType" /> properties set to the specified value.</returns>
public static SymbolDocumentInfo SymbolDocument(string fileName, Guid language, Guid languageVendor, Guid documentType) {
return new SymbolDocumentWithGuids(fileName, ref language, ref languageVendor, ref documentType);
}
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/TryExpression.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/TryExpression.cs
index 9a455fe2218..39a0f65e535 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/TryExpression.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/TryExpression.cs
@@ -12,26 +12,21 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
/// Represents a try/catch/finally/fault block.
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/TypeBinaryExpression.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/TypeBinaryExpression.cs
index 306bc150c5e..28be5aa7439 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/TypeBinaryExpression.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/TypeBinaryExpression.cs
@@ -12,24 +12,19 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
/// Represents an operation between an expression and a type.
@@ -200,7 +195,7 @@ namespace Microsoft.Linq.Expressions {
public static TypeBinaryExpression TypeIs(Expression expression, Type type) {
RequiresCanRead(expression, "expression");
ContractUtils.RequiresNotNull(type, "type");
- ContractUtils.Requires(!type.IsByRef, "type", Strings.TypeMustNotBeByRef);
+ if (type.IsByRef) throw Error.TypeMustNotBeByRef();
return new TypeBinaryExpression(expression, type, ExpressionType.TypeIs);
}
@@ -214,7 +209,7 @@ namespace Microsoft.Linq.Expressions {
public static TypeBinaryExpression TypeEqual(Expression expression, Type type) {
RequiresCanRead(expression, "expression");
ContractUtils.RequiresNotNull(type, "type");
- ContractUtils.Requires(!type.IsByRef, "type", Strings.TypeMustNotBeByRef);
+ if (type.IsByRef) throw Error.TypeMustNotBeByRef();
return new TypeBinaryExpression(expression, type, ExpressionType.TypeEqual);
}
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/TypeUtils.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/TypeUtils.cs
index dec832167b6..7ebb43f2462 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/TypeUtils.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/TypeUtils.cs
@@ -12,27 +12,21 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-using System.Collections.Generic;
-using System.Diagnostics;
-#if CODEPLEX_40
-using System.Linq.Expressions;
+#if CLR2
+using Microsoft.Scripting.Ast;
#else
-using Microsoft.Linq.Expressions;
+using System.Linq.Expressions;
#endif
-using System.Reflection;
-
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Reflection;
+
namespace System.Dynamic.Utils {
-#else
-namespace Microsoft.Scripting.Utils {
-#endif
internal static class TypeUtils {
private const BindingFlags AnyStatic = BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic;
@@ -155,7 +149,7 @@ namespace Microsoft.Scripting.Utils {
internal static bool AreEquivalent(Type t1, Type t2)
{
-#if MICROSOFT_SCRIPTING_CORE || SILVERLIGHT
+#if CLR2 || SILVERLIGHT
return t1 == t2;
#else
return t1 == t2 || t1.IsEquivalentTo(t2);
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/UnaryExpression.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/UnaryExpression.cs
index 15a90e10b87..87fdd414dd5 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/UnaryExpression.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/UnaryExpression.cs
@@ -12,30 +12,21 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Reflection;
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
/// <summary>
@@ -517,9 +508,9 @@ namespace Microsoft.Linq.Expressions {
return GetMethodBasedUnaryOperator(ExpressionType.UnaryPlus, expression, method);
}
- /// <summary>Creates a <see cref="T:Microsoft.Linq.Expressions.UnaryExpression" /> that represents an arithmetic negation operation that has overflow checking.</summary>
- /// <returns>A <see cref="T:Microsoft.Linq.Expressions.UnaryExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.NegateChecked" /> and the <see cref="P:Microsoft.Linq.Expressions.UnaryExpression.Operand" /> property set to the specified value.</returns>
- /// <param name="expression">An <see cref="T:Microsoft.Linq.Expressions.Expression" /> to set the <see cref="P:Microsoft.Linq.Expressions.UnaryExpression.Operand" /> property equal to.</param>
+ /// <summary>Creates a <see cref="T:System.Linq.Expressions.UnaryExpression" /> that represents an arithmetic negation operation that has overflow checking.</summary>
+ /// <returns>A <see cref="T:System.Linq.Expressions.UnaryExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.NegateChecked" /> and the <see cref="P:System.Linq.Expressions.UnaryExpression.Operand" /> property set to the specified value.</returns>
+ /// <param name="expression">An <see cref="T:System.Linq.Expressions.Expression" /> to set the <see cref="P:System.Linq.Expressions.UnaryExpression.Operand" /> property equal to.</param>
/// <exception cref="T:System.ArgumentNullException">
/// Thrown when <paramref name="expression" /> is null.</exception>
/// <exception cref="T:System.InvalidOperationException">Thrown when the unary minus operator is not defined for <paramref name="expression" />.Type.</exception>
@@ -527,10 +518,10 @@ namespace Microsoft.Linq.Expressions {
return NegateChecked(expression, null);
}
- ///<summary>Creates a <see cref="T:Microsoft.Linq.Expressions.UnaryExpression" /> that represents an arithmetic negation operation that has overflow checking. The implementing method can be specified.</summary>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.UnaryExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.NegateChecked" /> and the <see cref="P:Microsoft.Linq.Expressions.UnaryExpression.Operand" /> and <see cref="P:Microsoft.Linq.Expressions.UnaryExpression.Method" /> properties set to the specified values.</returns>
- ///<param name="expression">An <see cref="T:Microsoft.Linq.Expressions.Expression" /> to set the <see cref="P:Microsoft.Linq.Expressions.UnaryExpression.Operand" /> property equal to.</param>
- ///<param name="method">A <see cref="T:System.Reflection.MethodInfo" /> to set the <see cref="P:Microsoft.Linq.Expressions.UnaryExpression.Method" /> property equal to.</param>
+ ///<summary>Creates a <see cref="T:System.Linq.Expressions.UnaryExpression" /> that represents an arithmetic negation operation that has overflow checking. The implementing method can be specified.</summary>
+ ///<returns>A <see cref="T:System.Linq.Expressions.UnaryExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.NegateChecked" /> and the <see cref="P:System.Linq.Expressions.UnaryExpression.Operand" /> and <see cref="P:System.Linq.Expressions.UnaryExpression.Method" /> properties set to the specified values.</returns>
+ ///<param name="expression">An <see cref="T:System.Linq.Expressions.Expression" /> to set the <see cref="P:System.Linq.Expressions.UnaryExpression.Operand" /> property equal to.</param>
+ ///<param name="method">A <see cref="T:System.Reflection.MethodInfo" /> to set the <see cref="P:System.Linq.Expressions.UnaryExpression.Method" /> property equal to.</param>
///<exception cref="T:System.ArgumentNullException">
///<paramref name="expression" /> is null.</exception>
///<exception cref="T:System.ArgumentException">
@@ -548,9 +539,9 @@ namespace Microsoft.Linq.Expressions {
return GetMethodBasedUnaryOperator(ExpressionType.NegateChecked, expression, method);
}
- ///<summary>Creates a <see cref="T:Microsoft.Linq.Expressions.UnaryExpression" /> that represents a bitwise complement operation.</summary>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.UnaryExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.Not" /> and the <see cref="P:Microsoft.Linq.Expressions.UnaryExpression.Operand" /> property set to the specified value.</returns>
- ///<param name="expression">An <see cref="T:Microsoft.Linq.Expressions.Expression" /> to set the <see cref="P:Microsoft.Linq.Expressions.UnaryExpression.Operand" /> property equal to.</param>
+ ///<summary>Creates a <see cref="T:System.Linq.Expressions.UnaryExpression" /> that represents a bitwise complement operation.</summary>
+ ///<returns>A <see cref="T:System.Linq.Expressions.UnaryExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.Not" /> and the <see cref="P:System.Linq.Expressions.UnaryExpression.Operand" /> property set to the specified value.</returns>
+ ///<param name="expression">An <see cref="T:System.Linq.Expressions.Expression" /> to set the <see cref="P:System.Linq.Expressions.UnaryExpression.Operand" /> property equal to.</param>
///<exception cref="T:System.ArgumentNullException">
///<paramref name="expression" /> is null.</exception>
///<exception cref="T:System.InvalidOperationException">The unary not operator is not defined for <paramref name="expression" />.Type.</exception>
@@ -558,10 +549,10 @@ namespace Microsoft.Linq.Expressions {
return Not(expression, null);
}
- ///<summary>Creates a <see cref="T:Microsoft.Linq.Expressions.UnaryExpression" /> that represents a bitwise complement operation. The implementing method can be specified.</summary>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.UnaryExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.Not" /> and the <see cref="P:Microsoft.Linq.Expressions.UnaryExpression.Operand" /> and <see cref="P:Microsoft.Linq.Expressions.UnaryExpression.Method" /> properties set to the specified values.</returns>
- ///<param name="expression">An <see cref="T:Microsoft.Linq.Expressions.Expression" /> to set the <see cref="P:Microsoft.Linq.Expressions.UnaryExpression.Operand" /> property equal to.</param>
- ///<param name="method">A <see cref="T:System.Reflection.MethodInfo" /> to set the <see cref="P:Microsoft.Linq.Expressions.UnaryExpression.Method" /> property equal to.</param>
+ ///<summary>Creates a <see cref="T:System.Linq.Expressions.UnaryExpression" /> that represents a bitwise complement operation. The implementing method can be specified.</summary>
+ ///<returns>A <see cref="T:System.Linq.Expressions.UnaryExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.Not" /> and the <see cref="P:System.Linq.Expressions.UnaryExpression.Operand" /> and <see cref="P:System.Linq.Expressions.UnaryExpression.Method" /> properties set to the specified values.</returns>
+ ///<param name="expression">An <see cref="T:System.Linq.Expressions.Expression" /> to set the <see cref="P:System.Linq.Expressions.UnaryExpression.Operand" /> property equal to.</param>
+ ///<param name="method">A <see cref="T:System.Reflection.MethodInfo" /> to set the <see cref="P:System.Linq.Expressions.UnaryExpression.Method" /> property equal to.</param>
///<exception cref="T:System.ArgumentNullException">
///<paramref name="expression" /> is null.</exception>
///<exception cref="T:System.ArgumentException">
@@ -586,7 +577,7 @@ namespace Microsoft.Linq.Expressions {
/// <summary>
/// Returns whether the expression evaluates to false.
/// </summary>
- /// <param name="expression">An <see cref="T:Microsoft.Linq.Expressions.Expression" /> to evaluate.</param>
+ /// <param name="expression">An <see cref="T:System.Linq.Expressions.Expression" /> to evaluate.</param>
/// <returns>An instance of <see cref="UnaryExpression"/>.</returns>
public static UnaryExpression IsFalse(Expression expression) {
return IsFalse(expression, null);
@@ -595,7 +586,7 @@ namespace Microsoft.Linq.Expressions {
/// <summary>
/// Returns whether the expression evaluates to false.
/// </summary>
- ///<param name="expression">An <see cref="T:Microsoft.Linq.Expressions.Expression" /> to evaluate.</param>
+ ///<param name="expression">An <see cref="T:System.Linq.Expressions.Expression" /> to evaluate.</param>
///<param name="method">A <see cref="T:System.Reflection.MethodInfo" /> that represents the implementing method.</param>
/// <returns>An instance of <see cref="UnaryExpression"/>.</returns>
public static UnaryExpression IsFalse(Expression expression, MethodInfo method) {
@@ -612,7 +603,7 @@ namespace Microsoft.Linq.Expressions {
/// <summary>
/// Returns whether the expression evaluates to true.
/// </summary>
- /// <param name="expression">An <see cref="T:Microsoft.Linq.Expressions.Expression" /> to evaluate.</param>
+ /// <param name="expression">An <see cref="T:System.Linq.Expressions.Expression" /> to evaluate.</param>
/// <returns>An instance of <see cref="UnaryExpression"/>.</returns>
public static UnaryExpression IsTrue(Expression expression) {
return IsTrue(expression, null);
@@ -621,7 +612,7 @@ namespace Microsoft.Linq.Expressions {
/// <summary>
/// Returns whether the expression evaluates to true.
/// </summary>
- ///<param name="expression">An <see cref="T:Microsoft.Linq.Expressions.Expression" /> to evaluate.</param>
+ ///<param name="expression">An <see cref="T:System.Linq.Expressions.Expression" /> to evaluate.</param>
///<param name="method">A <see cref="T:System.Reflection.MethodInfo" /> that represents the implementing method.</param>
/// <returns>An instance of <see cref="UnaryExpression"/>.</returns>
public static UnaryExpression IsTrue(Expression expression, MethodInfo method) {
@@ -638,7 +629,7 @@ namespace Microsoft.Linq.Expressions {
/// <summary>
/// Returns the expression representing the ones complement.
/// </summary>
- ///<param name="expression">An <see cref="T:Microsoft.Linq.Expressions.Expression" />.</param>
+ ///<param name="expression">An <see cref="T:System.Linq.Expressions.Expression" />.</param>
/// <returns>An instance of <see cref="UnaryExpression"/>.</returns>
public static UnaryExpression OnesComplement(Expression expression) {
return OnesComplement(expression, null);
@@ -647,7 +638,7 @@ namespace Microsoft.Linq.Expressions {
/// <summary>
/// Returns the expression representing the ones complement.
/// </summary>
- /// <param name="expression">An <see cref="T:Microsoft.Linq.Expressions.Expression" />.</param>
+ /// <param name="expression">An <see cref="T:System.Linq.Expressions.Expression" />.</param>
/// <param name="method">A <see cref="T:System.Reflection.MethodInfo" /> that represents the implementing method.</param>
/// <returns>An instance of <see cref="UnaryExpression"/>.</returns>
public static UnaryExpression OnesComplement(Expression expression, MethodInfo method) {
@@ -661,10 +652,10 @@ namespace Microsoft.Linq.Expressions {
return GetMethodBasedUnaryOperator(ExpressionType.OnesComplement, expression, method);
}
- ///<summary>Creates a <see cref="T:Microsoft.Linq.Expressions.UnaryExpression" /> that represents an explicit reference or boxing conversion where null is supplied if the conversion fails.</summary>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.UnaryExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.TypeAs" /> and the <see cref="P:Microsoft.Linq.Expressions.UnaryExpression.Operand" /> and <see cref="P:Microsoft.Linq.Expressions.Expression.Type" /> properties set to the specified values.</returns>
- ///<param name="expression">An <see cref="T:Microsoft.Linq.Expressions.Expression" /> to set the <see cref="P:Microsoft.Linq.Expressions.UnaryExpression.Operand" /> property equal to.</param>
- ///<param name="type">A <see cref="T:System.Type" /> to set the <see cref="P:Microsoft.Linq.Expressions.Expression.Type" /> property equal to.</param>
+ ///<summary>Creates a <see cref="T:System.Linq.Expressions.UnaryExpression" /> that represents an explicit reference or boxing conversion where null is supplied if the conversion fails.</summary>
+ ///<returns>A <see cref="T:System.Linq.Expressions.UnaryExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.TypeAs" /> and the <see cref="P:System.Linq.Expressions.UnaryExpression.Operand" /> and <see cref="P:System.Linq.Expressions.Expression.Type" /> properties set to the specified values.</returns>
+ ///<param name="expression">An <see cref="T:System.Linq.Expressions.Expression" /> to set the <see cref="P:System.Linq.Expressions.UnaryExpression.Operand" /> property equal to.</param>
+ ///<param name="type">A <see cref="T:System.Type" /> to set the <see cref="P:System.Linq.Expressions.Expression.Type" /> property equal to.</param>
///<exception cref="T:System.ArgumentNullException">
///<paramref name="expression" /> or <paramref name="type" /> is null.</exception>
public static UnaryExpression TypeAs(Expression expression, Type type) {
@@ -679,27 +670,26 @@ namespace Microsoft.Linq.Expressions {
}
/// <summary>
- /// <summary>Creates a <see cref="T:Microsoft.Linq.Expressions.UnaryExpression" /> that represents an explicit unboxing.</summary>
+ /// <summary>Creates a <see cref="T:System.Linq.Expressions.UnaryExpression" /> that represents an explicit unboxing.</summary>
/// </summary>
- /// <param name="expression">An <see cref="T:Microsoft.Linq.Expressions.Expression" /> to unbox.</param>
+ /// <param name="expression">An <see cref="T:System.Linq.Expressions.Expression" /> to unbox.</param>
/// <param name="type">The new <see cref="T:System.Type" /> of the expression.</param>
/// <returns>An instance of <see cref="UnaryExpression"/>.</returns>
public static UnaryExpression Unbox(Expression expression, Type type) {
RequiresCanRead(expression, "expression");
ContractUtils.RequiresNotNull(type, "type");
- ContractUtils.Requires(
- expression.Type.IsInterface || expression.Type == typeof(object),
- "expression", Strings.InvalidUnboxType
- );
- ContractUtils.Requires(type.IsValueType, "type", Strings.InvalidUnboxType);
+ if (!expression.Type.IsInterface && expression.Type != typeof(object)) {
+ throw Error.InvalidUnboxType();
+ }
+ if (!type.IsValueType) throw Error.InvalidUnboxType();
TypeUtils.ValidateType(type);
return new UnaryExpression(ExpressionType.Unbox, expression, type, null);
}
- ///<summary>Creates a <see cref="T:Microsoft.Linq.Expressions.UnaryExpression" /> that represents a conversion operation.</summary>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.UnaryExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.Convert" /> and the <see cref="P:Microsoft.Linq.Expressions.UnaryExpression.Operand" /> and <see cref="P:Microsoft.Linq.Expressions.Expression.Type" /> properties set to the specified values.</returns>
- ///<param name="expression">An <see cref="T:Microsoft.Linq.Expressions.Expression" /> to set the <see cref="P:Microsoft.Linq.Expressions.UnaryExpression.Operand" /> property equal to.</param>
- ///<param name="type">A <see cref="T:System.Type" /> to set the <see cref="P:Microsoft.Linq.Expressions.Expression.Type" /> property equal to.</param>
+ ///<summary>Creates a <see cref="T:System.Linq.Expressions.UnaryExpression" /> that represents a conversion operation.</summary>
+ ///<returns>A <see cref="T:System.Linq.Expressions.UnaryExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.Convert" /> and the <see cref="P:System.Linq.Expressions.UnaryExpression.Operand" /> and <see cref="P:System.Linq.Expressions.Expression.Type" /> properties set to the specified values.</returns>
+ ///<param name="expression">An <see cref="T:System.Linq.Expressions.Expression" /> to set the <see cref="P:System.Linq.Expressions.UnaryExpression.Operand" /> property equal to.</param>
+ ///<param name="type">A <see cref="T:System.Type" /> to set the <see cref="P:System.Linq.Expressions.Expression.Type" /> property equal to.</param>
///<exception cref="T:System.ArgumentNullException">
///<paramref name="expression" /> or <paramref name="type" /> is null.</exception>
///<exception cref="T:System.InvalidOperationException">No conversion operator is defined between <paramref name="expression" />.Type and <paramref name="type" />.</exception>
@@ -707,11 +697,11 @@ namespace Microsoft.Linq.Expressions {
return Convert(expression, type, null);
}
- ///<summary>Creates a <see cref="T:Microsoft.Linq.Expressions.UnaryExpression" /> that represents a conversion operation for which the implementing method is specified.</summary>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.UnaryExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.Convert" /> and the <see cref="P:Microsoft.Linq.Expressions.UnaryExpression.Operand" />, <see cref="P:Microsoft.Linq.Expressions.Expression.Type" />, and <see cref="P:Microsoft.Linq.Expressions.UnaryExpression.Method" /> properties set to the specified values.</returns>
- ///<param name="expression">An <see cref="T:Microsoft.Linq.Expressions.Expression" /> to set the <see cref="P:Microsoft.Linq.Expressions.UnaryExpression.Operand" /> property equal to.</param>
- ///<param name="type">A <see cref="T:System.Type" /> to set the <see cref="P:Microsoft.Linq.Expressions.Expression.Type" /> property equal to.</param>
- ///<param name="method">A <see cref="T:System.Reflection.MethodInfo" /> to set the <see cref="P:Microsoft.Linq.Expressions.UnaryExpression.Method" /> property equal to.</param>
+ ///<summary>Creates a <see cref="T:System.Linq.Expressions.UnaryExpression" /> that represents a conversion operation for which the implementing method is specified.</summary>
+ ///<returns>A <see cref="T:System.Linq.Expressions.UnaryExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.Convert" /> and the <see cref="P:System.Linq.Expressions.UnaryExpression.Operand" />, <see cref="P:System.Linq.Expressions.Expression.Type" />, and <see cref="P:System.Linq.Expressions.UnaryExpression.Method" /> properties set to the specified values.</returns>
+ ///<param name="expression">An <see cref="T:System.Linq.Expressions.Expression" /> to set the <see cref="P:System.Linq.Expressions.UnaryExpression.Operand" /> property equal to.</param>
+ ///<param name="type">A <see cref="T:System.Type" /> to set the <see cref="P:System.Linq.Expressions.Expression.Type" /> property equal to.</param>
+ ///<param name="method">A <see cref="T:System.Reflection.MethodInfo" /> to set the <see cref="P:System.Linq.Expressions.UnaryExpression.Method" /> property equal to.</param>
///<exception cref="T:System.ArgumentNullException">
///<paramref name="expression" /> or <paramref name="type" /> is null.</exception>
///<exception cref="T:System.ArgumentException">
@@ -733,10 +723,10 @@ namespace Microsoft.Linq.Expressions {
return GetMethodBasedCoercionOperator(ExpressionType.Convert, expression, type, method);
}
- ///<summary>Creates a <see cref="T:Microsoft.Linq.Expressions.UnaryExpression" /> that represents a conversion operation that throws an exception if the target type is overflowed.</summary>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.UnaryExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.ConvertChecked" /> and the <see cref="P:Microsoft.Linq.Expressions.UnaryExpression.Operand" /> and <see cref="P:Microsoft.Linq.Expressions.Expression.Type" /> properties set to the specified values.</returns>
- ///<param name="expression">An <see cref="T:Microsoft.Linq.Expressions.Expression" /> to set the <see cref="P:Microsoft.Linq.Expressions.UnaryExpression.Operand" /> property equal to.</param>
- ///<param name="type">A <see cref="T:System.Type" /> to set the <see cref="P:Microsoft.Linq.Expressions.Expression.Type" /> property equal to.</param>
+ ///<summary>Creates a <see cref="T:System.Linq.Expressions.UnaryExpression" /> that represents a conversion operation that throws an exception if the target type is overflowed.</summary>
+ ///<returns>A <see cref="T:System.Linq.Expressions.UnaryExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.ConvertChecked" /> and the <see cref="P:System.Linq.Expressions.UnaryExpression.Operand" /> and <see cref="P:System.Linq.Expressions.Expression.Type" /> properties set to the specified values.</returns>
+ ///<param name="expression">An <see cref="T:System.Linq.Expressions.Expression" /> to set the <see cref="P:System.Linq.Expressions.UnaryExpression.Operand" /> property equal to.</param>
+ ///<param name="type">A <see cref="T:System.Type" /> to set the <see cref="P:System.Linq.Expressions.Expression.Type" /> property equal to.</param>
///<exception cref="T:System.ArgumentNullException">
///<paramref name="expression" /> or <paramref name="type" /> is null.</exception>
///<exception cref="T:System.InvalidOperationException">No conversion operator is defined between <paramref name="expression" />.Type and <paramref name="type" />.</exception>
@@ -744,11 +734,11 @@ namespace Microsoft.Linq.Expressions {
return ConvertChecked(expression, type, null);
}
- ///<summary>Creates a <see cref="T:Microsoft.Linq.Expressions.UnaryExpression" /> that represents a conversion operation that throws an exception if the target type is overflowed and for which the implementing method is specified.</summary>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.UnaryExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.ConvertChecked" /> and the <see cref="P:Microsoft.Linq.Expressions.UnaryExpression.Operand" />, <see cref="P:Microsoft.Linq.Expressions.Expression.Type" />, and <see cref="P:Microsoft.Linq.Expressions.UnaryExpression.Method" /> properties set to the specified values.</returns>
- ///<param name="expression">An <see cref="T:Microsoft.Linq.Expressions.Expression" /> to set the <see cref="P:Microsoft.Linq.Expressions.UnaryExpression.Operand" /> property equal to.</param>
- ///<param name="type">A <see cref="T:System.Type" /> to set the <see cref="P:Microsoft.Linq.Expressions.Expression.Type" /> property equal to.</param>
- ///<param name="method">A <see cref="T:System.Reflection.MethodInfo" /> to set the <see cref="P:Microsoft.Linq.Expressions.UnaryExpression.Method" /> property equal to.</param>
+ ///<summary>Creates a <see cref="T:System.Linq.Expressions.UnaryExpression" /> that represents a conversion operation that throws an exception if the target type is overflowed and for which the implementing method is specified.</summary>
+ ///<returns>A <see cref="T:System.Linq.Expressions.UnaryExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.ConvertChecked" /> and the <see cref="P:System.Linq.Expressions.UnaryExpression.Operand" />, <see cref="P:System.Linq.Expressions.Expression.Type" />, and <see cref="P:System.Linq.Expressions.UnaryExpression.Method" /> properties set to the specified values.</returns>
+ ///<param name="expression">An <see cref="T:System.Linq.Expressions.Expression" /> to set the <see cref="P:System.Linq.Expressions.UnaryExpression.Operand" /> property equal to.</param>
+ ///<param name="type">A <see cref="T:System.Type" /> to set the <see cref="P:System.Linq.Expressions.Expression.Type" /> property equal to.</param>
+ ///<param name="method">A <see cref="T:System.Reflection.MethodInfo" /> to set the <see cref="P:System.Linq.Expressions.UnaryExpression.Method" /> property equal to.</param>
///<exception cref="T:System.ArgumentNullException">
///<paramref name="expression" /> or <paramref name="type" /> is null.</exception>
///<exception cref="T:System.ArgumentException">
@@ -772,9 +762,9 @@ namespace Microsoft.Linq.Expressions {
return GetMethodBasedCoercionOperator(ExpressionType.ConvertChecked, expression, type, method);
}
- ///<summary>Creates a <see cref="T:Microsoft.Linq.Expressions.UnaryExpression" /> that represents getting the length of a one-dimensional array.</summary>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.UnaryExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.ArrayLength" /> and the <see cref="P:Microsoft.Linq.Expressions.UnaryExpression.Operand" /> property equal to <paramref name="array" />.</returns>
- ///<param name="array">An <see cref="T:Microsoft.Linq.Expressions.Expression" /> to set the <see cref="P:Microsoft.Linq.Expressions.UnaryExpression.Operand" /> property equal to.</param>
+ ///<summary>Creates a <see cref="T:System.Linq.Expressions.UnaryExpression" /> that represents getting the length of a one-dimensional array.</summary>
+ ///<returns>A <see cref="T:System.Linq.Expressions.UnaryExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.ArrayLength" /> and the <see cref="P:System.Linq.Expressions.UnaryExpression.Operand" /> property equal to <paramref name="array" />.</returns>
+ ///<param name="array">An <see cref="T:System.Linq.Expressions.Expression" /> to set the <see cref="P:System.Linq.Expressions.UnaryExpression.Operand" /> property equal to.</param>
///<exception cref="T:System.ArgumentNullException">
///<paramref name="array" /> is null.</exception>
///<exception cref="T:System.ArgumentException">
@@ -790,75 +780,75 @@ namespace Microsoft.Linq.Expressions {
return new UnaryExpression(ExpressionType.ArrayLength, array, typeof(int), null);
}
- ///<summary>Creates a <see cref="T:Microsoft.Linq.Expressions.UnaryExpression" /> that represents an expression that has a constant value of type <see cref="T:Microsoft.Linq.Expressions.Expression" />.</summary>
- ///<returns>A <see cref="T:Microsoft.Linq.Expressions.UnaryExpression" /> that has the <see cref="P:Microsoft.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:Microsoft.Linq.Expressions.ExpressionType.Quote" /> and the <see cref="P:Microsoft.Linq.Expressions.UnaryExpression.Operand" /> property set to the specified value.</returns>
- ///<param name="expression">An <see cref="T:Microsoft.Linq.Expressions.Expression" /> to set the <see cref="P:Microsoft.Linq.Expressions.UnaryExpression.Operand" /> property equal to.</param>
+ ///<summary>Creates a <see cref="T:System.Linq.Expressions.UnaryExpression" /> that represents an expression that has a constant value of type <see cref="T:System.Linq.Expressions.Expression" />.</summary>
+ ///<returns>A <see cref="T:System.Linq.Expressions.UnaryExpression" /> that has the <see cref="P:System.Linq.Expressions.Expression.NodeType" /> property equal to <see cref="F:System.Linq.Expressions.ExpressionType.Quote" /> and the <see cref="P:System.Linq.Expressions.UnaryExpression.Operand" /> property set to the specified value.</returns>
+ ///<param name="expression">An <see cref="T:System.Linq.Expressions.Expression" /> to set the <see cref="P:System.Linq.Expressions.UnaryExpression.Operand" /> property equal to.</param>
///<exception cref="T:System.ArgumentNullException">
///<paramref name="expression" /> is null.</exception>
public static UnaryExpression Quote(Expression expression) {
RequiresCanRead(expression, "expression");
- ContractUtils.Requires(expression is LambdaExpression, Strings.QuotedExpressionMustBeLambda);
+ if (!(expression is LambdaExpression)) throw Error.QuotedExpressionMustBeLambda();
return new UnaryExpression(ExpressionType.Quote, expression, expression.GetType(), null);
}
/// <summary>
- /// Creates a <see cref="T:Microsoft.Linq.Expressions.UnaryExpression" /> that represents a rethrowing of an exception.
+ /// Creates a <see cref="T:System.Linq.Expressions.UnaryExpression" /> that represents a rethrowing of an exception.
/// </summary>
- /// <returns>A <see cref="T:Microsoft.Linq.Expressions.UnaryExpression"/> that represents a rethrowing of an exception.</returns>
+ /// <returns>A <see cref="T:System.Linq.Expressions.UnaryExpression"/> that represents a rethrowing of an exception.</returns>
public static UnaryExpression Rethrow() {
return Throw(null);
}
/// <summary>
- /// Creates a <see cref="T:Microsoft.Linq.Expressions.UnaryExpression" /> that represents a rethrowing of an exception with a given type.
+ /// Creates a <see cref="T:System.Linq.Expressions.UnaryExpression" /> that represents a rethrowing of an exception with a given type.
/// </summary>
///<param name="type">The new <see cref="T:System.Type" /> of the expression.</param>
- /// <returns>A <see cref="T:Microsoft.Linq.Expressions.UnaryExpression"/> that represents a rethrowing of an exception.</returns>
+ /// <returns>A <see cref="T:System.Linq.Expressions.UnaryExpression"/> that represents a rethrowing of an exception.</returns>
public static UnaryExpression Rethrow(Type type) {
return Throw(null, type);
}
/// <summary>
- /// Creates a <see cref="T:Microsoft.Linq.Expressions.UnaryExpression" /> that represents a throwing of an exception.
+ /// Creates a <see cref="T:System.Linq.Expressions.UnaryExpression" /> that represents a throwing of an exception.
/// </summary>
- /// <param name="value">An <see cref="T:Microsoft.Linq.Expressions.Expression" />.</param>
- /// <returns>A <see cref="T:Microsoft.Linq.Expressions.UnaryExpression"/> that represents the exception.</returns>
+ /// <param name="value">An <see cref="T:System.Linq.Expressions.Expression" />.</param>
+ /// <returns>A <see cref="T:System.Linq.Expressions.UnaryExpression"/> that represents the exception.</returns>
public static UnaryExpression Throw(Expression value) {
return Throw(value, typeof(void));
}
/// <summary>
- /// Creates a <see cref="T:Microsoft.Linq.Expressions.UnaryExpression" /> that represents a throwing of a value with a given type.
+ /// Creates a <see cref="T:System.Linq.Expressions.UnaryExpression" /> that represents a throwing of a value with a given type.
/// </summary>
- /// <param name="value">An <see cref="T:Microsoft.Linq.Expressions.Expression" />.</param>
+ /// <param name="value">An <see cref="T:System.Linq.Expressions.Expression" />.</param>
/// <param name="type">The new <see cref="T:System.Type" /> of the expression.</param>
- /// <returns>A <see cref="T:Microsoft.Linq.Expressions.UnaryExpression"/> that represents the exception.</returns>
+ /// <returns>A <see cref="T:System.Linq.Expressions.UnaryExpression"/> that represents the exception.</returns>
public static UnaryExpression Throw(Expression value, Type type) {
ContractUtils.RequiresNotNull(type, "type");
TypeUtils.ValidateType(type);
if (value != null) {
RequiresCanRead(value, "value");
- ContractUtils.Requires(!value.Type.IsValueType, "value", Strings.ArgumentMustNotHaveValueType);
+ if (value.Type.IsValueType) throw Error.ArgumentMustNotHaveValueType();
}
return new UnaryExpression(ExpressionType.Throw, value, type, null);
}
/// <summary>
- /// Creates a <see cref="T:Microsoft.Linq.Expressions.UnaryExpression" /> that represents the incrementing of the expression by 1.
+ /// Creates a <see cref="T:System.Linq.Expressions.UnaryExpression" /> that represents the incrementing of the expression by 1.
/// </summary>
- /// <param name="expression">An <see cref="T:Microsoft.Linq.Expressions.Expression"></see> to increment.</param>
- /// <returns>A <see cref="T:Microsoft.Linq.Expressions.UnaryExpression"/> that represents the incremented expression.</returns>
+ /// <param name="expression">An <see cref="T:System.Linq.Expressions.Expression"></see> to increment.</param>
+ /// <returns>A <see cref="T:System.Linq.Expressions.UnaryExpression"/> that represents the incremented expression.</returns>
public static UnaryExpression Increment(Expression expression) {
return Increment(expression, null);
}
/// <summary>
- /// Creates a <see cref="T:Microsoft.Linq.Expressions.UnaryExpression" /> that represents the incrementing of the expression by 1.
+ /// Creates a <see cref="T:System.Linq.Expressions.UnaryExpression" /> that represents the incrementing of the expression by 1.
/// </summary>
- /// <param name="expression">An <see cref="T:Microsoft.Linq.Expressions.Expression"></see> to increment.</param>
+ /// <param name="expression">An <see cref="T:System.Linq.Expressions.Expression"></see> to increment.</param>
///<param name="method">A <see cref="T:System.Reflection.MethodInfo" /> that represents the implementing method.</param>
- /// <returns>A <see cref="T:Microsoft.Linq.Expressions.UnaryExpression"/> that represents the incremented expression.</returns>
+ /// <returns>A <see cref="T:System.Linq.Expressions.UnaryExpression"/> that represents the incremented expression.</returns>
public static UnaryExpression Increment(Expression expression, MethodInfo method) {
RequiresCanRead(expression, "expression");
if (method == null) {
@@ -871,20 +861,20 @@ namespace Microsoft.Linq.Expressions {
}
/// <summary>
- /// Creates a <see cref="T:Microsoft.Linq.Expressions.UnaryExpression" /> that represents the decrementing of the expression by 1.
+ /// Creates a <see cref="T:System.Linq.Expressions.UnaryExpression" /> that represents the decrementing of the expression by 1.
/// </summary>
- /// <param name="expression">An <see cref="T:Microsoft.Linq.Expressions.Expression"></see> to decrement.</param>
- /// <returns>A <see cref="T:Microsoft.Linq.Expressions.UnaryExpression"/> that represents the decremented expression.</returns>
+ /// <param name="expression">An <see cref="T:System.Linq.Expressions.Expression"></see> to decrement.</param>
+ /// <returns>A <see cref="T:System.Linq.Expressions.UnaryExpression"/> that represents the decremented expression.</returns>
public static UnaryExpression Decrement(Expression expression) {
return Decrement(expression, null);
}
/// <summary>
- /// Creates a <see cref="T:Microsoft.Linq.Expressions.UnaryExpression" /> that represents the decrementing of the expression by 1.
+ /// Creates a <see cref="T:System.Linq.Expressions.UnaryExpression" /> that represents the decrementing of the expression by 1.
/// </summary>
- /// <param name="expression">An <see cref="T:Microsoft.Linq.Expressions.Expression"></see> to decrement.</param>
+ /// <param name="expression">An <see cref="T:System.Linq.Expressions.Expression"></see> to decrement.</param>
///<param name="method">A <see cref="T:System.Reflection.MethodInfo" /> that represents the implementing method.</param>
- /// <returns>A <see cref="T:Microsoft.Linq.Expressions.UnaryExpression"/> that represents the decremented expression.</returns>
+ /// <returns>A <see cref="T:System.Linq.Expressions.UnaryExpression"/> that represents the decremented expression.</returns>
public static UnaryExpression Decrement(Expression expression, MethodInfo method) {
RequiresCanRead(expression, "expression");
if (method == null) {
@@ -900,8 +890,8 @@ namespace Microsoft.Linq.Expressions {
/// Creates a <see cref="UnaryExpression"/> that increments the expression by 1
/// and assigns the result back to the expression.
/// </summary>
- /// <param name="expression">An <see cref="T:Microsoft.Linq.Expressions.Expression"></see> to apply the operations on.</param>
- /// <returns>A <see cref="T:Microsoft.Linq.Expressions.UnaryExpression"/> that represents the resultant expression.</returns>
+ /// <param name="expression">An <see cref="T:System.Linq.Expressions.Expression"></see> to apply the operations on.</param>
+ /// <returns>A <see cref="T:System.Linq.Expressions.UnaryExpression"/> that represents the resultant expression.</returns>
public static UnaryExpression PreIncrementAssign(Expression expression) {
return MakeOpAssignUnary(ExpressionType.PreIncrementAssign, expression, null);
@@ -911,9 +901,9 @@ namespace Microsoft.Linq.Expressions {
/// Creates a <see cref="UnaryExpression"/> that increments the expression by 1
/// and assigns the result back to the expression.
/// </summary>
- /// <param name="expression">An <see cref="T:Microsoft.Linq.Expressions.Expression"></see> to apply the operations on.</param>
+ /// <param name="expression">An <see cref="T:System.Linq.Expressions.Expression"></see> to apply the operations on.</param>
/// <param name="method">A <see cref="T:System.Reflection.MethodInfo" /> that represents the implementing method.</param>
- /// <returns>A <see cref="T:Microsoft.Linq.Expressions.UnaryExpression"/> that represents the resultant expression.</returns>
+ /// <returns>A <see cref="T:System.Linq.Expressions.UnaryExpression"/> that represents the resultant expression.</returns>
public static UnaryExpression PreIncrementAssign(Expression expression, MethodInfo method) {
return MakeOpAssignUnary(ExpressionType.PreIncrementAssign, expression, method);
}
@@ -922,8 +912,8 @@ namespace Microsoft.Linq.Expressions {
/// Creates a <see cref="UnaryExpression"/> that decrements the expression by 1
/// and assigns the result back to the expression.
/// </summary>
- /// <param name="expression">An <see cref="T:Microsoft.Linq.Expressions.Expression"></see> to apply the operations on.</param>
- /// <returns>A <see cref="T:Microsoft.Linq.Expressions.UnaryExpression"/> that represents the resultant expression.</returns>
+ /// <param name="expression">An <see cref="T:System.Linq.Expressions.Expression"></see> to apply the operations on.</param>
+ /// <returns>A <see cref="T:System.Linq.Expressions.UnaryExpression"/> that represents the resultant expression.</returns>
public static UnaryExpression PreDecrementAssign(Expression expression) {
return MakeOpAssignUnary(ExpressionType.PreDecrementAssign, expression, null);
}
@@ -932,9 +922,9 @@ namespace Microsoft.Linq.Expressions {
/// Creates a <see cref="UnaryExpression"/> that decrements the expression by 1
/// and assigns the result back to the expression.
/// </summary>
- /// <param name="expression">An <see cref="T:Microsoft.Linq.Expressions.Expression"></see> to apply the operations on.</param>
+ /// <param name="expression">An <see cref="T:System.Linq.Expressions.Expression"></see> to apply the operations on.</param>
/// <param name="method">A <see cref="T:System.Reflection.MethodInfo" /> that represents the implementing method.</param>
- /// <returns>A <see cref="T:Microsoft.Linq.Expressions.UnaryExpression"/> that represents the resultant expression.</returns>
+ /// <returns>A <see cref="T:System.Linq.Expressions.UnaryExpression"/> that represents the resultant expression.</returns>
public static UnaryExpression PreDecrementAssign(Expression expression, MethodInfo method) {
return MakeOpAssignUnary(ExpressionType.PreDecrementAssign, expression, method);
}
@@ -943,8 +933,8 @@ namespace Microsoft.Linq.Expressions {
/// Creates a <see cref="UnaryExpression"/> that represents the assignment of the expression
/// followed by a subsequent increment by 1 of the original expression.
/// </summary>
- /// <param name="expression">An <see cref="T:Microsoft.Linq.Expressions.Expression"></see> to apply the operations on.</param>
- /// <returns>A <see cref="T:Microsoft.Linq.Expressions.UnaryExpression"/> that represents the resultant expression.</returns>
+ /// <param name="expression">An <see cref="T:System.Linq.Expressions.Expression"></see> to apply the operations on.</param>
+ /// <returns>A <see cref="T:System.Linq.Expressions.UnaryExpression"/> that represents the resultant expression.</returns>
public static UnaryExpression PostIncrementAssign(Expression expression) {
return MakeOpAssignUnary(ExpressionType.PostIncrementAssign, expression, null);
}
@@ -953,9 +943,9 @@ namespace Microsoft.Linq.Expressions {
/// Creates a <see cref="UnaryExpression"/> that represents the assignment of the expression
/// followed by a subsequent increment by 1 of the original expression.
/// </summary>
- /// <param name="expression">An <see cref="T:Microsoft.Linq.Expressions.Expression"></see> to apply the operations on.</param>
+ /// <param name="expression">An <see cref="T:System.Linq.Expressions.Expression"></see> to apply the operations on.</param>
/// <param name="method">A <see cref="T:System.Reflection.MethodInfo" /> that represents the implementing method.</param>
- /// <returns>A <see cref="T:Microsoft.Linq.Expressions.UnaryExpression"/> that represents the resultant expression.</returns>
+ /// <returns>A <see cref="T:System.Linq.Expressions.UnaryExpression"/> that represents the resultant expression.</returns>
public static UnaryExpression PostIncrementAssign(Expression expression, MethodInfo method) {
return MakeOpAssignUnary(ExpressionType.PostIncrementAssign, expression, method);
}
@@ -964,8 +954,8 @@ namespace Microsoft.Linq.Expressions {
/// Creates a <see cref="UnaryExpression"/> that represents the assignment of the expression
/// followed by a subsequent decrement by 1 of the original expression.
/// </summary>
- /// <param name="expression">An <see cref="T:Microsoft.Linq.Expressions.Expression"></see> to apply the operations on.</param>
- /// <returns>A <see cref="T:Microsoft.Linq.Expressions.UnaryExpression"/> that represents the resultant expression.</returns>
+ /// <param name="expression">An <see cref="T:System.Linq.Expressions.Expression"></see> to apply the operations on.</param>
+ /// <returns>A <see cref="T:System.Linq.Expressions.UnaryExpression"/> that represents the resultant expression.</returns>
public static UnaryExpression PostDecrementAssign(Expression expression) {
return MakeOpAssignUnary(ExpressionType.PostDecrementAssign, expression, null);
}
@@ -974,9 +964,9 @@ namespace Microsoft.Linq.Expressions {
/// Creates a <see cref="UnaryExpression"/> that represents the assignment of the expression
/// followed by a subsequent decrement by 1 of the original expression.
/// </summary>
- /// <param name="expression">An <see cref="T:Microsoft.Linq.Expressions.Expression"></see> to apply the operations on.</param>
+ /// <param name="expression">An <see cref="T:System.Linq.Expressions.Expression"></see> to apply the operations on.</param>
/// <param name="method">A <see cref="T:System.Reflection.MethodInfo" /> that represents the implementing method.</param>
- /// <returns>A <see cref="T:Microsoft.Linq.Expressions.UnaryExpression"/> that represents the resultant expression.</returns>
+ /// <returns>A <see cref="T:System.Linq.Expressions.UnaryExpression"/> that represents the resultant expression.</returns>
public static UnaryExpression PostDecrementAssign(Expression expression, MethodInfo method) {
return MakeOpAssignUnary(ExpressionType.PostDecrementAssign, expression, method);
}
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/AnalyzedTree.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/AnalyzedTree.cs
index 13a09fddbb7..99ac850ad06 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/AnalyzedTree.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/AnalyzedTree.cs
@@ -12,27 +12,17 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics.SymbolStore;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
-#if CODEPLEX_40
-namespace System.Linq.Expressions.Compiler {
+#if CLR2
+namespace Microsoft.Scripting.Ast.Compiler {
#else
-namespace Microsoft.Linq.Expressions.Compiler {
+namespace System.Linq.Expressions.Compiler {
#endif
internal sealed class AnalyzedTree {
internal readonly Dictionary<object, CompilerScope> Scopes = new Dictionary<object, CompilerScope>();
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/AssemblyGen.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/AssemblyGen.cs
index 750425c21a9..5a05cb81ef9 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/AssemblyGen.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/AssemblyGen.cs
@@ -12,15 +12,10 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.Generic;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.IO;
using System.Reflection;
using System.Reflection.Emit;
@@ -28,17 +23,17 @@ using System.Security;
using System.Text;
using System.Threading;
-#if CODEPLEX_40
-namespace System.Linq.Expressions.Compiler {
+#if CLR2
+namespace Microsoft.Scripting.Ast.Compiler {
#else
-namespace Microsoft.Linq.Expressions.Compiler {
+namespace System.Linq.Expressions.Compiler {
#endif
internal sealed class AssemblyGen {
private static AssemblyGen _assembly;
- // Testing options. Only ever set in MICROSOFT_SCRIPTING_CORE build
+ // Testing options. Only ever set in CLR2 build
// configurations, see SetSaveAssemblies
-#if MICROSOFT_SCRIPTING_CORE
+#if CLR2
private static string _saveAssembliesPath;
private static bool _saveAssemblies;
#endif
@@ -46,7 +41,7 @@ namespace Microsoft.Linq.Expressions.Compiler {
private readonly AssemblyBuilder _myAssembly;
private readonly ModuleBuilder _myModule;
-#if MICROSOFT_SCRIPTING_CORE && !SILVERLIGHT
+#if CLR2 && !SILVERLIGHT
private readonly string _outFileName; // can be null iff !SaveAndReloadAssemblies
private readonly string _outDir; // null means the current directory
#endif
@@ -74,7 +69,7 @@ namespace Microsoft.Linq.Expressions.Compiler {
new CustomAttributeBuilder(typeof(SecurityTransparentAttribute).GetConstructor(Type.EmptyTypes), new object[0])
};
-#if MICROSOFT_SCRIPTING_CORE
+#if CLR2
if (_saveAssemblies) {
string outDir = _saveAssembliesPath ?? Directory.GetCurrentDirectory();
try {
@@ -133,7 +128,7 @@ namespace Microsoft.Linq.Expressions.Compiler {
);
}
-#if MICROSOFT_SCRIPTING_CORE
+#if CLR2
//Return the location of the saved assembly file.
//The file location is used by PE verification in Microsoft.Scripting.
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/BoundConstants.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/BoundConstants.cs
index 0c0c701b920..68ca16249bb 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/BoundConstants.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/BoundConstants.cs
@@ -12,31 +12,22 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions.Compiler {
+#if CLR2
+namespace Microsoft.Scripting.Ast.Compiler {
#else
-namespace Microsoft.Linq.Expressions.Compiler {
+namespace System.Linq.Expressions.Compiler {
#endif
/// <summary>
/// This type tracks "runtime" constants--live objects that appear in
@@ -150,6 +141,11 @@ namespace Microsoft.Linq.Expressions.Compiler {
return;
}
EmitConstantsArray(lc);
+
+ // The same lambda can be in multiple places in the tree, so we
+ // need to clear any locals from last time.
+ _cache.Clear();
+
foreach (var reference in _references) {
if (ShouldCache(reference.Value)) {
if (--count > 0) {
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/Closure.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/Closure.cs
index 58c8b375a55..e18aefd4155 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/Closure.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/Closure.cs
@@ -12,17 +12,11 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
using System.ComponentModel;
using System.Diagnostics;
-#if CODEPLEX_40
namespace System.Runtime.CompilerServices {
-#else
-namespace Microsoft.Runtime.CompilerServices {
-#endif
/// <summary>
/// This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/CompilerScope.Storage.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/CompilerScope.Storage.cs
index 0e348c26967..5e1cf188d92 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/CompilerScope.Storage.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/CompilerScope.Storage.cs
@@ -12,21 +12,16 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
-#if CODEPLEX_40
-namespace System.Linq.Expressions.Compiler {
+#if CLR2
+namespace Microsoft.Scripting.Ast.Compiler {
#else
-namespace Microsoft.Linq.Expressions.Compiler {
+namespace System.Linq.Expressions.Compiler {
#endif
internal sealed partial class CompilerScope {
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/CompilerScope.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/CompilerScope.cs
index 7230dcef21c..ac85f649dae 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/CompilerScope.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/CompilerScope.cs
@@ -12,34 +12,24 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
-#if CODEPLEX_40
using System.Dynamic;
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting;
-using Microsoft.Scripting.Utils;
-#endif
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions.Compiler {
+#if CLR2
+namespace Microsoft.Scripting.Ast.Compiler {
#else
-namespace Microsoft.Linq.Expressions.Compiler {
+namespace System.Linq.Expressions.Compiler {
#endif
internal enum VariableStorageKind {
Local,
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/ConstantCheck.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/ConstantCheck.cs
index 33ae973fb9a..5e3b9e93685 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/ConstantCheck.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/ConstantCheck.cs
@@ -12,21 +12,17 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
+
internal enum AnalyzeTypeIsResult {
KnownFalse,
KnownTrue,
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/DebugInfoGenerator.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/DebugInfoGenerator.cs
index 4d2f39e7e0d..9516f3a0b8c 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/DebugInfoGenerator.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/DebugInfoGenerator.cs
@@ -13,36 +13,27 @@
*
* ***************************************************************************/
-#if MICROSOFT_SCRIPTING_CORE || SILVERLIGHT
-#if CODEPLEX_40
-using ILGenerator = System.Linq.Expressions.Compiler.OffsetTrackingILGenerator;
+#if CLR2
+using Microsoft.Scripting.Ast;
+using Microsoft.Scripting.Ast.Compiler;
#else
-using ILGenerator = Microsoft.Linq.Expressions.Compiler.OffsetTrackingILGenerator;
-#endif
+using System.Linq.Expressions;
+using System.Linq.Expressions.Compiler;
#endif
-#if CODEPLEX_40
using System;
-#else
-using System; using Microsoft;
-#endif
using System.Collections.Generic;
using System.Text;
using System.Reflection.Emit;
using System.Diagnostics;
using System.Diagnostics.SymbolStore;
using System.Reflection;
-#if CODEPLEX_40
-using System.Linq.Expressions;
-#else
-using Microsoft.Linq.Expressions;
-#endif
-#if CODEPLEX_40
namespace System.Runtime.CompilerServices {
-#else
-namespace Microsoft.Runtime.CompilerServices {
+#if CLR2 || SILVERLIGHT
+ using ILGenerator = OffsetTrackingILGenerator;
#endif
+
/// <summary>
/// Generates debug information for lambdas in an expression tree.
/// </summary>
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/DelegateHelpers.Generated.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/DelegateHelpers.Generated.cs
index 58c3ea74d0e..b937e2f8049 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/DelegateHelpers.Generated.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/DelegateHelpers.Generated.cs
@@ -12,29 +12,20 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic;
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting;
-using Microsoft.Scripting.Utils;
-#endif
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
-#if CODEPLEX_40
-namespace System.Linq.Expressions.Compiler {
+#if CLR2
+namespace Microsoft.Scripting.Ast.Compiler {
+ using Microsoft.Scripting.Utils;
#else
-namespace Microsoft.Linq.Expressions.Compiler {
+namespace System.Linq.Expressions.Compiler {
#endif
internal static partial class DelegateHelpers {
private static TypeInfo _DelegateCache = new TypeInfo();
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/DelegateHelpers.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/DelegateHelpers.cs
index ac8b05bec6e..b4f84a44ad0 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/DelegateHelpers.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/DelegateHelpers.cs
@@ -12,21 +12,16 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-#if CODEPLEX_40
+using System;
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Reflection;
using System.Reflection.Emit;
-#if CODEPLEX_40
-namespace System.Linq.Expressions.Compiler {
+#if CLR2
+namespace Microsoft.Scripting.Ast.Compiler {
#else
-namespace Microsoft.Linq.Expressions.Compiler {
+namespace System.Linq.Expressions.Compiler {
#endif
internal static partial class DelegateHelpers {
private const MethodAttributes CtorAttributes = MethodAttributes.RTSpecialName | MethodAttributes.HideBySig | MethodAttributes.Public;
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/ExpressionQuoter.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/ExpressionQuoter.cs
index 5313bda264f..f7e8b7bc5cc 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/ExpressionQuoter.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/ExpressionQuoter.cs
@@ -12,27 +12,21 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
+#if CLR2
+using Microsoft.Scripting.Ast;
+using Microsoft.Scripting.Ast.Compiler;
+#else
+using System.Linq.Expressions;
+using System.Linq.Expressions.Compiler;
+#endif
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-using System.Linq.Expressions;
-using System.Linq.Expressions.Compiler;
-#else
-using Microsoft.Scripting.Utils;
-using Microsoft.Linq.Expressions;
-using Microsoft.Linq.Expressions.Compiler;
-#endif
-#if CODEPLEX_40
namespace System.Runtime.CompilerServices {
-#else
-namespace Microsoft.Runtime.CompilerServices {
-#endif
public partial class RuntimeOps {
/// <summary>
/// Quotes the provided expression tree.
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/HoistedLocals.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/HoistedLocals.cs
index 3179709362a..37d8d1eeacb 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/HoistedLocals.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/HoistedLocals.cs
@@ -12,26 +12,16 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions.Compiler {
+#if CLR2
+namespace Microsoft.Scripting.Ast.Compiler {
#else
-namespace Microsoft.Linq.Expressions.Compiler {
+namespace System.Linq.Expressions.Compiler {
#endif
// Suppose we have something like:
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/ILGen.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/ILGen.cs
index 4a2737c6d69..6da45482a7c 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/ILGen.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/ILGen.cs
@@ -12,40 +12,26 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-
-#if MICROSOFT_SCRIPTING_CORE || SILVERLIGHT
-#if CODEPLEX_40
-using ILGenerator = System.Linq.Expressions.Compiler.OffsetTrackingILGenerator;
-#else
-using ILGenerator = Microsoft.Linq.Expressions.Compiler.OffsetTrackingILGenerator;
-#endif
-#endif
+using System;
using System.Collections.Generic;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions.Compiler {
+#if CLR2
+namespace Microsoft.Scripting.Ast.Compiler {
#else
-namespace Microsoft.Linq.Expressions.Compiler {
+namespace System.Linq.Expressions.Compiler {
+#endif
+#if CLR2 || SILVERLIGHT
+ using ILGenerator = OffsetTrackingILGenerator;
#endif
internal static class ILGen {
@@ -322,7 +308,7 @@ namespace Microsoft.Linq.Expressions.Compiler {
ContractUtils.RequiresNotNull(paramTypes, "paramTypes");
ConstructorInfo ci = type.GetConstructor(paramTypes);
- ContractUtils.Requires(ci != null, "type", Strings.TypeDoesNotHaveConstructorForTheSignature);
+ if (ci == null) throw Error.TypeDoesNotHaveConstructorForTheSignature();
il.EmitNew(ci);
}
@@ -929,7 +915,7 @@ namespace Microsoft.Linq.Expressions.Compiler {
internal static void EmitArray(this ILGenerator il, Type elementType, int count, Action<int> emit) {
ContractUtils.RequiresNotNull(elementType, "elementType");
ContractUtils.RequiresNotNull(emit, "emit");
- ContractUtils.Requires(count >= 0, "count", Strings.CountCannotBeNegative);
+ if (count < 0) throw Error.CountCannotBeNegative();
il.EmitInt(count);
il.Emit(OpCodes.Newarr, elementType);
@@ -950,7 +936,7 @@ namespace Microsoft.Linq.Expressions.Compiler {
/// </summary>
internal static void EmitArray(this ILGenerator il, Type arrayType) {
ContractUtils.RequiresNotNull(arrayType, "arrayType");
- ContractUtils.Requires(arrayType.IsArray, "arrayType", Strings.ArrayTypeMustBeArray);
+ if (!arrayType.IsArray) throw Error.ArrayTypeMustBeArray();
int rank = arrayType.GetArrayRank();
if (rank == 1) {
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/KeyedQueue.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/KeyedQueue.cs
index 54c6e2649b7..86191f2dd46 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/KeyedQueue.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/KeyedQueue.cs
@@ -12,24 +12,17 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
using System.Collections.Generic;
-#if CODEPLEX_40
-using System.Linq.Expressions;
-#else
-using Microsoft.Linq.Expressions;
-#endif
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions.Compiler {
+#if CLR2
+namespace Microsoft.Scripting.Ast.Compiler {
#else
-namespace Microsoft.Linq.Expressions.Compiler {
+namespace System.Linq.Expressions.Compiler {
#endif
/// <summary>
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LabelInfo.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LabelInfo.cs
index f2edf80d425..261b1c976db 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LabelInfo.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LabelInfo.cs
@@ -12,34 +12,24 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-
-#if MICROSOFT_SCRIPTING_CORE || SILVERLIGHT
-#if CODEPLEX_40
-using ILGenerator = System.Linq.Expressions.Compiler.OffsetTrackingILGenerator;
-#else
-using ILGenerator = Microsoft.Linq.Expressions.Compiler.OffsetTrackingILGenerator;
-#endif
-#endif
+using System;
using System.Collections.Generic;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Reflection.Emit;
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions.Compiler {
+#if CLR2
+namespace Microsoft.Scripting.Ast.Compiler {
#else
-namespace Microsoft.Linq.Expressions.Compiler {
+namespace System.Linq.Expressions.Compiler {
+#endif
+#if CLR2 || SILVERLIGHT
+ using ILGenerator = OffsetTrackingILGenerator;
#endif
/// <summary>
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Address.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Address.cs
index acdbcd33016..9eea1b9c859 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Address.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Address.cs
@@ -12,23 +12,18 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.Generic;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Reflection;
using System.Reflection.Emit;
-#if CODEPLEX_40
-namespace System.Linq.Expressions.Compiler {
+#if CLR2
+namespace Microsoft.Scripting.Ast.Compiler {
#else
-namespace Microsoft.Linq.Expressions.Compiler {
+namespace System.Linq.Expressions.Compiler {
#endif
partial class LambdaCompiler {
private void EmitAddress(Expression node, Type type) {
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Binary.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Binary.cs
index d74806a16a2..2d5d51fce75 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Binary.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Binary.cs
@@ -12,16 +12,11 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.Generic;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Reflection;
using System.Reflection.Emit;
@@ -29,10 +24,10 @@ using System.Reflection.Emit;
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions.Compiler {
+#if CLR2
+namespace Microsoft.Scripting.Ast.Compiler {
#else
-namespace Microsoft.Linq.Expressions.Compiler {
+namespace System.Linq.Expressions.Compiler {
#endif
partial class LambdaCompiler {
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.ControlFlow.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.ControlFlow.cs
index 2b9de7c56ac..1fc97c83b94 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.ControlFlow.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.ControlFlow.cs
@@ -12,20 +12,14 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions.Compiler {
+#if CLR2
+namespace Microsoft.Scripting.Ast.Compiler {
#else
-namespace Microsoft.Linq.Expressions.Compiler {
+namespace System.Linq.Expressions.Compiler {
#endif
// The part of the LambdaCompiler dealing with low level control flow
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Expressions.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Expressions.cs
index 01a34ebdd59..0321807ab85 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Expressions.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Expressions.cs
@@ -12,33 +12,24 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions.Compiler {
+#if CLR2
+namespace Microsoft.Scripting.Ast.Compiler {
#else
-namespace Microsoft.Linq.Expressions.Compiler {
+namespace System.Linq.Expressions.Compiler {
#endif
partial class LambdaCompiler {
[Flags]
@@ -503,7 +494,7 @@ namespace Microsoft.Linq.Expressions.Compiler {
// Emit the temp as type CallSite so we get more reuse
_ilg.Emit(OpCodes.Dup);
-#if MICROSOFT_SCRIPTING_CORE
+#if CLR2
// For 3.5, emit the temp as CallSite<T> to work around a Jit32
// verifier issue (fixed in 3.5 sp1)
var siteTemp = GetLocal(siteType);
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Generated.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Generated.cs
index 5599650b650..62f5877c1ed 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Generated.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Generated.cs
@@ -12,20 +12,14 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions.Compiler {
+#if CLR2
+namespace Microsoft.Scripting.Ast.Compiler {
#else
-namespace Microsoft.Linq.Expressions.Compiler {
+namespace System.Linq.Expressions.Compiler {
#endif
partial class LambdaCompiler {
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Lambda.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Lambda.cs
index f789af9dabd..2804201ac19 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Lambda.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Lambda.cs
@@ -12,28 +12,19 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
using System.Threading;
-#if CODEPLEX_40
-namespace System.Linq.Expressions.Compiler {
+#if CLR2
+namespace Microsoft.Scripting.Ast.Compiler {
#else
-namespace Microsoft.Linq.Expressions.Compiler {
+namespace System.Linq.Expressions.Compiler {
#endif
/// <summary>
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Logical.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Logical.cs
index 26a5fb6cc7c..0943646df93 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Logical.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Logical.cs
@@ -12,15 +12,10 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Reflection;
using System.Reflection.Emit;
@@ -28,10 +23,10 @@ using System.Reflection.Emit;
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions.Compiler {
+#if CLR2
+namespace Microsoft.Scripting.Ast.Compiler {
#else
-namespace Microsoft.Linq.Expressions.Compiler {
+namespace System.Linq.Expressions.Compiler {
#endif
partial class LambdaCompiler {
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Statements.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Statements.cs
index a5ffac1c147..2a4c6994ffb 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Statements.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Statements.cs
@@ -12,16 +12,11 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.Generic;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Reflection;
using System.Reflection.Emit;
using System.Globalization;
@@ -30,10 +25,10 @@ using System.Globalization;
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions.Compiler {
+#if CLR2
+namespace Microsoft.Scripting.Ast.Compiler {
#else
-namespace Microsoft.Linq.Expressions.Compiler {
+namespace System.Linq.Expressions.Compiler {
#endif
partial class LambdaCompiler {
private void EmitBlockExpression(Expression expr, CompilationFlags flags) {
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Unary.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Unary.cs
index 7a542085402..d9f63af9bc8 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Unary.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.Unary.cs
@@ -12,31 +12,22 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions.Compiler {
+#if CLR2
+namespace Microsoft.Scripting.Ast.Compiler {
#else
-namespace Microsoft.Linq.Expressions.Compiler {
+namespace System.Linq.Expressions.Compiler {
#endif
partial class LambdaCompiler {
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.cs
index d91af000a4d..6c9fb1dea83 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/LambdaCompiler.cs
@@ -12,38 +12,24 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-
-#if MICROSOFT_SCRIPTING_CORE || SILVERLIGHT
-#if CODEPLEX_40
-using ILGenerator = System.Linq.Expressions.Compiler.OffsetTrackingILGenerator;
-#else
-using ILGenerator = Microsoft.Linq.Expressions.Compiler.OffsetTrackingILGenerator;
-#endif
-#endif
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
using System.Threading;
-#if CODEPLEX_40
-namespace System.Linq.Expressions.Compiler {
+#if CLR2
+namespace Microsoft.Scripting.Ast.Compiler {
#else
-namespace Microsoft.Linq.Expressions.Compiler {
+namespace System.Linq.Expressions.Compiler {
+#endif
+#if CLR2 || SILVERLIGHT
+ using ILGenerator = OffsetTrackingILGenerator;
#endif
/// <summary>
@@ -101,7 +87,7 @@ namespace Microsoft.Linq.Expressions.Compiler {
private LambdaCompiler(AnalyzedTree tree, LambdaExpression lambda) {
Type[] parameterTypes = GetParameterTypes(lambda).AddFirst(typeof(Closure));
-#if SILVERLIGHT && MICROSOFT_SCRIPTING_CORE
+#if SILVERLIGHT && CLR2
var method = new DynamicMethod(lambda.Name ?? "lambda_method", lambda.ReturnType, parameterTypes);
#else
var method = new DynamicMethod(lambda.Name ?? "lambda_method", lambda.ReturnType, parameterTypes, true);
@@ -111,7 +97,7 @@ namespace Microsoft.Linq.Expressions.Compiler {
_lambda = lambda;
_method = method;
-#if MICROSOFT_SCRIPTING_CORE || SILVERLIGHT
+#if CLR2 || SILVERLIGHT
_ilg = new OffsetTrackingILGenerator(method.GetILGenerator());
#else
_ilg = method.GetILGenerator();
@@ -150,7 +136,7 @@ namespace Microsoft.Linq.Expressions.Compiler {
_typeBuilder = (TypeBuilder)method.DeclaringType;
_method = method;
-#if MICROSOFT_SCRIPTING_CORE || SILVERLIGHT
+#if CLR2 || SILVERLIGHT
_ilg = new OffsetTrackingILGenerator(method.GetILGenerator());
#else
_ilg = method.GetILGenerator();
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/OffsetTrackingILGenerator.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/OffsetTrackingILGenerator.cs
index e3755fe4fe8..3a9c21df1f1 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/OffsetTrackingILGenerator.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/OffsetTrackingILGenerator.cs
@@ -12,9 +12,8 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
@@ -24,12 +23,12 @@ using System.Diagnostics.SymbolStore;
// Not needed in CLR 4 builds because we have the
// ILGenerator.ILOffset property.
-#if MICROSOFT_SCRIPTING_CORE || SILVERLIGHT
+#if CLR2 || SILVERLIGHT
-#if CODEPLEX_40
-namespace System.Linq.Expressions.Compiler {
+#if CLR2
+namespace Microsoft.Scripting.Ast.Compiler {
#else
-namespace Microsoft.Linq.Expressions.Compiler {
+namespace System.Linq.Expressions.Compiler {
#endif
/// <summary>
/// Wraps ILGenerator with code that tracks the current IL offset as instructions are emitted into the IL stream.
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/RuntimeVariableList.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/RuntimeVariableList.cs
index bb28100a6b6..e1b1209ff2f 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/RuntimeVariableList.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/RuntimeVariableList.cs
@@ -12,22 +12,17 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
+#if CLR2
+using Microsoft.Scripting.Ast.Compiler;
+#else
+using System.Linq.Expressions.Compiler;
+#endif
using System.ComponentModel;
using System.Diagnostics;
-#if CODEPLEX_40
-using System.Linq.Expressions.Compiler;
-#else
-using Microsoft.Linq.Expressions.Compiler;
-#endif
-#if CODEPLEX_40
namespace System.Runtime.CompilerServices {
-#else
-namespace Microsoft.Runtime.CompilerServices {
-#endif
/// <summary>
/// This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/Set.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/Set.cs
index 6af4d573c64..585557365ba 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/Set.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/Set.cs
@@ -12,20 +12,17 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
using System.Collections;
using System.Collections.Generic;
-#if CODEPLEX_40
// Note: can't move to Utils because name conflicts with System.Linq.Set
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-// Note: can't move to Utils because name conflicts with Microsoft.Linq.Set
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
-
+
/// <summary>
/// A simple hashset, built on Dictionary{K, V}
/// </summary>
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/StackSpiller.Bindings.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/StackSpiller.Bindings.cs
index fdd8ef6d19c..1a484069b39 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/StackSpiller.Bindings.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/StackSpiller.Bindings.cs
@@ -12,29 +12,19 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
using System.Collections.ObjectModel;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions.Compiler {
+#if CLR2
+namespace Microsoft.Scripting.Ast.Compiler {
#else
-namespace Microsoft.Linq.Expressions.Compiler {
+namespace System.Linq.Expressions.Compiler {
#endif
internal partial class StackSpiller {
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/StackSpiller.Generated.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/StackSpiller.Generated.cs
index 4de2f4073e3..13be379e11c 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/StackSpiller.Generated.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/StackSpiller.Generated.cs
@@ -12,20 +12,14 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions.Compiler {
+#if CLR2
+namespace Microsoft.Scripting.Ast.Compiler {
#else
-namespace Microsoft.Linq.Expressions.Compiler {
+namespace System.Linq.Expressions.Compiler {
#endif
internal partial class StackSpiller {
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/StackSpiller.Temps.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/StackSpiller.Temps.cs
index 42a147ac047..541f3225a3c 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/StackSpiller.Temps.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/StackSpiller.Temps.cs
@@ -12,22 +12,17 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions.Compiler {
+#if CLR2
+namespace Microsoft.Scripting.Ast.Compiler {
#else
-namespace Microsoft.Linq.Expressions.Compiler {
+namespace System.Linq.Expressions.Compiler {
#endif
internal partial class StackSpiller {
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/StackSpiller.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/StackSpiller.cs
index 8d1cc5abf73..387e3929194 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/StackSpiller.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/StackSpiller.cs
@@ -12,32 +12,23 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
using System.Reflection;
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions.Compiler {
+#if CLR2
+namespace Microsoft.Scripting.Ast.Compiler {
#else
-namespace Microsoft.Linq.Expressions.Compiler {
+namespace System.Linq.Expressions.Compiler {
#endif
/// <summary>
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/SymbolDocumentGenerator.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/SymbolDocumentGenerator.cs
index 818f7fba0b1..b597201685f 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/SymbolDocumentGenerator.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/SymbolDocumentGenerator.cs
@@ -12,39 +12,30 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-#if MICROSOFT_SCRIPTING_CORE || SILVERLIGHT
-#if CODEPLEX_40
-using ILGenerator = System.Linq.Expressions.Compiler.OffsetTrackingILGenerator;
+#if CLR2
+using Microsoft.Scripting.Ast;
+using Microsoft.Scripting.Ast.Compiler;
#else
-using ILGenerator = Microsoft.Linq.Expressions.Compiler.OffsetTrackingILGenerator;
+using System.Linq.Expressions;
+using System.Linq.Expressions.Compiler;
#endif
+
+#if SILVERLIGHT
+using System.Core;
#endif
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.SymbolStore;
-#if CODEPLEX_40
-using System.Linq.Expressions;
-using System.Linq.Expressions.Compiler;
-#else
-using Microsoft.Linq.Expressions;
-using Microsoft.Linq.Expressions.Compiler;
-#endif
using System.Reflection;
using System.Reflection.Emit;
-#if SILVERLIGHT
-using System.Core;
-#endif
-
-#if CODEPLEX_40
namespace System.Runtime.CompilerServices {
-#else
-namespace Microsoft.Runtime.CompilerServices {
+#if CLR2 || SILVERLIGHT
+ using ILGenerator = OffsetTrackingILGenerator;
#endif
+
/// <summary>
/// Generator of PDB debugging information for expression trees.
/// </summary>
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/VariableBinder.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/VariableBinder.cs
index 6883c0ab3c1..74482b5c97f 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/VariableBinder.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Compiler/VariableBinder.cs
@@ -12,26 +12,20 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
-namespace System.Linq.Expressions.Compiler {
+#if CLR2
+namespace Microsoft.Scripting.Ast.Compiler {
#else
-namespace Microsoft.Linq.Expressions.Compiler {
+namespace System.Linq.Expressions.Compiler {
#endif
/// <summary>
/// Determines if variables are closed over in nested lambdas and need to
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/GlobalSuppressions.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/GlobalSuppressions.cs
index 72fe59d28d6..cbf8fe85816 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/GlobalSuppressions.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/GlobalSuppressions.cs
@@ -8,21 +8,13 @@
// "In Project Suppression File".
// You do not need to add suppressions to this file manually.
-#if CODEPLEX_40
//UnhandledExpressionType is used by System.Linq.Expressions.OldExpressionVisitor
-[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "System.Linq.Expressions.Error.#UnhandledExpressionType(System.Object)")]
-[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "System.Linq.Expressions.Strings.#UnhandledExpressionType(System.Object)")]
-[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "System.Linq.Expressions.Error.#InvalidNullValue(System.Object)")]
-[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "System.Linq.Expressions.Error.#InvalidObjectType(System.Object,System.Object)")]
-[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "System.Linq.Expressions.Error.#HomogenousAppDomainRequired()")]
-[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "System.Linq.Expressions.Strings.#HomogenousAppDomainRequired")]
-#else
-//UnhandledExpressionType is used by Microsoft.Linq.Expressions.OldExpressionVisitor
-[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "Microsoft.Linq.Expressions.Error.#UnhandledExpressionType(System.Object)")]
-[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "Microsoft.Linq.Expressions.Strings.#UnhandledExpressionType(System.Object)")]
-[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "Microsoft.Linq.Expressions.Error.#InvalidNullValue(System.Object)")]
-[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "Microsoft.Linq.Expressions.Error.#InvalidObjectType(System.Object,System.Object)")]
-[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "Microsoft.Linq.Expressions.Error.#HomogenousAppDomainRequired()")]
-[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "Microsoft.Linq.Expressions.Strings.#HomogenousAppDomainRequired")]
+#if CLR2
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "Microsoft.Scripting.Ast.Error.#UnhandledExpressionType(System.Object)")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "Microsoft.Scripting.Ast.Strings.#UnhandledExpressionType(System.Object)")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "Microsoft.Scripting.Ast.Error.#InvalidNullValue(System.Object)")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "Microsoft.Scripting.Ast.Error.#InvalidObjectType(System.Object,System.Object)")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "Microsoft.Scripting.Ast.Error.#HomogenousAppDomainRequired()")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "Microsoft.Scripting.Ast.Strings.#HomogenousAppDomainRequired")]
#endif
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes", Scope = "member", Target = "System.Runtime.CompilerServices.StrongBox`1.#System.Runtime.CompilerServices.IStrongBox.Value")]
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Microsoft.Scripting.Core.csproj b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Microsoft.Scripting.Core.csproj
index ffd6c58aa1b..4769057e5d5 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Microsoft.Scripting.Core.csproj
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Microsoft.Scripting.Core.csproj
@@ -10,7 +10,6 @@
<ProjectGuid>{2AE75F5A-CD1F-4925-9647-AF4D1C282FB4}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<RootNamespace>System.Scripting</RootNamespace>
<AssemblyName>Microsoft.Scripting.Core</AssemblyName>
<DocumentationFile>$(OutputPath)\Microsoft.Scripting.Core.XML</DocumentationFile>
@@ -19,7 +18,7 @@
<SignAssembly Condition="'$(SignAssembly)' == '' And Exists('$(AssemblyOriginatorKeyFile)')">true</SignAssembly>
<SignedSym Condition="'$(SignAssembly)' == 'true'">SIGNED</SignedSym>
<DelaySign>true</DelaySign>
- <SilverlightPath Condition="'$(SilverlightPath)' == ''">$(ProgramFiles)\Microsoft Silverlight\3.0.40624.0</SilverlightPath>
+ <SilverlightPath Condition="'$(SilverlightPath)' == ''">$(ProgramFiles)\Microsoft Silverlight\3.0.40818.0\</SilverlightPath>
<BaseAddress>855638016</BaseAddress>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
</PropertyGroup>
@@ -27,7 +26,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>$(SolutionDir)\..\Bin\fxcop\</OutputPath>
- <DefineConstants>TRACE;$(SignedSym);MICROSOFT_SCRIPTING_CORE</DefineConstants>
+ <DefineConstants>TRACE;$(SignedSym);CLR2</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
@@ -42,7 +41,7 @@
<Optimize>false</Optimize>
<OutputPath>$(SolutionDir)\..\Bin\Debug\</OutputPath>
<DocumentationFile>$(OutputPath)\Microsoft.Scripting.Core.xml</DocumentationFile>
- <DefineConstants>DEBUG;TRACE;$(SignedSym);MICROSOFT_SCRIPTING_CORE</DefineConstants>
+ <DefineConstants>DEBUG;TRACE;$(SignedSym);CLR2</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
@@ -55,7 +54,7 @@
<Optimize>true</Optimize>
<OutputPath>$(SolutionDir)\..\Bin\Release\</OutputPath>
<DocumentationFile>$(OutputPath)\Microsoft.Scripting.Core.xml</DocumentationFile>
- <DefineConstants>TRACE;$(SignedSym);MICROSOFT_SCRIPTING_CORE</DefineConstants>
+ <DefineConstants>TRACE;$(SignedSym);CLR2</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
@@ -66,7 +65,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Silverlight Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<OutputPath>$(SolutionDir)\..\Bin\Silverlight Debug\</OutputPath>
- <DefineConstants>TRACE;DEBUG;SILVERLIGHT;MICROSOFT_SCRIPTING_CORE</DefineConstants>
+ <DefineConstants>TRACE;DEBUG;SILVERLIGHT;CLR2</DefineConstants>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -79,7 +78,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Silverlight Release|AnyCPU' ">
<OutputPath>$(SolutionDir)\..\Bin\Silverlight Release\</OutputPath>
- <DefineConstants>TRACE;SILVERLIGHT;MICROSOFT_SCRIPTING_CORE</DefineConstants>
+ <DefineConstants>TRACE;SILVERLIGHT;CLR2</DefineConstants>
<DocumentationFile>$(OutputPath)\Microsoft.Scripting.Core.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>618</NoWarn>
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Microsoft.Scripting.ExtensionAttribute.csproj b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Microsoft.Scripting.ExtensionAttribute.csproj
index 7ff289cce50..936dfe027f7 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Microsoft.Scripting.ExtensionAttribute.csproj
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Microsoft.Scripting.ExtensionAttribute.csproj
@@ -16,7 +16,7 @@
<SignedSym Condition="'$(SignAssembly)' == 'true'">SIGNED</SignedSym>
<DelaySign>true</DelaySign>
<BaseAddress>866123776</BaseAddress>
- <SilverlightPath Condition="'$(SilverlightPath)' == ''">$(ProgramFiles)\Microsoft Silverlight\3.0.40624.0</SilverlightPath>
+ <SilverlightPath Condition="'$(SilverlightPath)' == ''">$(ProgramFiles)\Microsoft Silverlight\3.0.40818.0\</SilverlightPath>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'FxCop|AnyCPU' ">
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Properties/AssemblyInfo.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Properties/AssemblyInfo.cs
index ca62dd972ae..4b6bf4e90ed 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Properties/AssemblyInfo.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Properties/AssemblyInfo.cs
@@ -13,17 +13,9 @@
*
* ***************************************************************************/
-#if CODEPLEX_40
using System;
-#else
-using System; using Microsoft;
-#endif
using System.Reflection;
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
using System.Runtime.InteropServices;
using System.Security;
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Properties/ExtensionAssemblyInfo.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Properties/ExtensionAssemblyInfo.cs
index b4d07215ed9..071bc56e88d 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Properties/ExtensionAssemblyInfo.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Properties/ExtensionAssemblyInfo.cs
@@ -13,11 +13,7 @@
*
* ***************************************************************************/
-#if CODEPLEX_40
using System;
-#else
-using System; using Microsoft;
-#endif
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Stubs.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Stubs.cs
index c86ce620bfe..ff81f806d87 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Stubs.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Stubs.cs
@@ -13,17 +13,9 @@
*
* ***************************************************************************/
-#if CODEPLEX_40
using System;
-#else
-using System; using Microsoft;
-#endif
using System.Diagnostics;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
#if SILVERLIGHT // Stubs
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/Action.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/Action.cs
index c445a3250db..17d41680a2c 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/Action.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/Action.cs
@@ -12,15 +12,14 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-#if CODEPLEX_40
-namespace System {
+#if CLR2
+namespace Microsoft.Scripting.Utils {
#else
-namespace Microsoft {
+namespace System {
#endif
- #if MICROSOFT_SCRIPTING_CORE || SILVERLIGHT
+
+#if CLR2 || SILVERLIGHT
/// <summary>
/// Encapsulates a method that takes no parameters and does not return a value.
@@ -36,7 +35,7 @@ namespace Microsoft {
// *** BEGIN GENERATED CODE ***
// generated by function: gen_action_types from: generate_dynsites.py
-#if MICROSOFT_SCRIPTING_CORE || SILVERLIGHT
+#if CLR2 || SILVERLIGHT
/// <summary>
/// Encapsulates a method that takes two parameters and does not return a value.
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/CacheDict.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/CacheDict.cs
index 3297e6e975e..defacc1ff4d 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/CacheDict.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/CacheDict.cs
@@ -13,20 +13,12 @@
*
* ***************************************************************************/
-#if CODEPLEX_40
using System;
-#else
-using System; using Microsoft;
-#endif
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
-#if CODEPLEX_40
namespace System.Dynamic.Utils {
-#else
-namespace Microsoft.Scripting.Utils {
-#endif
/// <summary>
/// Provides a dictionary-like object used for caches which holds onto a maximum
/// number of elements specified at construction time.
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/CollectionExtensions.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/CollectionExtensions.cs
index 7b285b86d7c..0eebded5f38 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/CollectionExtensions.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/CollectionExtensions.cs
@@ -12,26 +12,19 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
+#if CLR2
+using Microsoft.Scripting.Utils;
+#else
+using System.Diagnostics.Contracts;
+#endif
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
-#if !MICROSOFT_SCRIPTING_CORE
-using System.Diagnostics.Contracts;
-#endif
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
-#if CODEPLEX_40
namespace System.Dynamic.Utils {
-#else
-namespace Microsoft.Scripting.Utils {
-#endif
internal static class CollectionExtensions {
/// <summary>
/// Wraps the provided enumerable into a ReadOnlyCollection{T}
@@ -40,7 +33,7 @@ namespace Microsoft.Scripting.Utils {
/// changed after creation. The exception is if the enumerable is
/// already a ReadOnlyCollection{T}, in which case we just return it.
/// </summary>
-#if !MICROSOFT_SCRIPTING_CORE
+#if !CLR2
[Pure]
#endif
internal static ReadOnlyCollection<T> ToReadOnly<T>(this IEnumerable<T> enumerable) {
@@ -84,7 +77,7 @@ namespace Microsoft.Scripting.Utils {
return h;
}
-#if !MICROSOFT_SCRIPTING_CORE
+#if !CLR2
[Pure]
#endif
internal static bool ListEquals<T>(this ICollection<T> first, ICollection<T> second) {
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/ContractUtils.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/ContractUtils.cs
index a83426ac172..652ef4a671c 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/ContractUtils.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/ContractUtils.cs
@@ -12,26 +12,20 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-using System.Collections.Generic;
-using System.Diagnostics;
-#if CODEPLEX_40
-using System.Linq.Expressions;
+#if CLR2
+using Microsoft.Scripting.Ast;
#else
-using Microsoft.Linq.Expressions;
+using System.Linq.Expressions;
#endif
-
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
+using System.Collections.Generic;
+using System.Diagnostics;
+
namespace System.Dynamic.Utils {
-#else
-namespace Microsoft.Scripting.Utils {
-#endif
// Will be replaced with CLRv4 managed contracts
internal static class ContractUtils {
@@ -57,14 +51,6 @@ namespace Microsoft.Scripting.Utils {
}
}
- internal static void Requires(bool precondition, string paramName, string message) {
- Debug.Assert(!string.IsNullOrEmpty(paramName));
-
- if (!precondition) {
- throw new ArgumentException(message, paramName);
- }
- }
-
internal static void RequiresNotNull(object value, string paramName) {
Debug.Assert(!string.IsNullOrEmpty(paramName));
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/ExceptionFactory.Generated.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/ExceptionFactory.Generated.cs
index c58f0e1fa87..1a1054bf987 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/ExceptionFactory.Generated.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/ExceptionFactory.Generated.cs
@@ -12,13 +12,13 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
+using System;
-#if CODEPLEX_40
-namespace System.Linq.Expressions {
+#if CLR2
+namespace Microsoft.Scripting.Ast {
#else
-namespace Microsoft.Linq.Expressions {
+namespace System.Linq.Expressions {
#endif
internal static partial class Strings {
@@ -1510,6 +1510,209 @@ namespace Microsoft.Linq.Expressions {
internal static partial class Error {
/// <summary>
+ /// ArgumentException with message like "Argument count must be greater than number of named arguments."
+ /// </summary>
+ internal static Exception ArgCntMustBeGreaterThanNameCnt() {
+ return new ArgumentException(Strings.ArgCntMustBeGreaterThanNameCnt);
+ }
+
+ /// <summary>
+ /// ArgumentException with message like "reducible nodes must override Expression.Reduce()"
+ /// </summary>
+ internal static Exception ReducibleMustOverrideReduce() {
+ return new ArgumentException(Strings.ReducibleMustOverrideReduce);
+ }
+
+ /// <summary>
+ /// ArgumentException with message like "node cannot reduce to itself or null"
+ /// </summary>
+ internal static Exception MustReduceToDifferent() {
+ return new ArgumentException(Strings.MustReduceToDifferent);
+ }
+
+ /// <summary>
+ /// ArgumentException with message like "cannot assign from the reduced node type to the original node type"
+ /// </summary>
+ internal static Exception ReducedNotCompatible() {
+ return new ArgumentException(Strings.ReducedNotCompatible);
+ }
+
+ /// <summary>
+ /// ArgumentException with message like "Setter must have parameters."
+ /// </summary>
+ internal static Exception SetterHasNoParams() {
+ return new ArgumentException(Strings.SetterHasNoParams);
+ }
+
+ /// <summary>
+ /// ArgumentException with message like "Property cannot have a managed pointer type."
+ /// </summary>
+ internal static Exception PropertyCannotHaveRefType() {
+ return new ArgumentException(Strings.PropertyCannotHaveRefType);
+ }
+
+ /// <summary>
+ /// ArgumentException with message like "Indexing parameters of getter and setter must match."
+ /// </summary>
+ internal static Exception IndexesOfSetGetMustMatch() {
+ return new ArgumentException(Strings.IndexesOfSetGetMustMatch);
+ }
+
+ /// <summary>
+ /// ArgumentException with message like "Accessor method should not have VarArgs."
+ /// </summary>
+ internal static Exception AccessorsCannotHaveVarArgs() {
+ return new ArgumentException(Strings.AccessorsCannotHaveVarArgs);
+ }
+
+ /// <summary>
+ /// ArgumentException with message like "Accessor indexes cannot be passed ByRef."
+ /// </summary>
+ internal static Exception AccessorsCannotHaveByRefArgs() {
+ return new ArgumentException(Strings.AccessorsCannotHaveByRefArgs);
+ }
+
+ /// <summary>
+ /// ArgumentException with message like "Bounds count cannot be less than 1"
+ /// </summary>
+ internal static Exception BoundsCannotBeLessThanOne() {
+ return new ArgumentException(Strings.BoundsCannotBeLessThanOne);
+ }
+
+ /// <summary>
+ /// ArgumentException with message like "type must not be ByRef"
+ /// </summary>
+ internal static Exception TypeMustNotBeByRef() {
+ return new ArgumentException(Strings.TypeMustNotBeByRef);
+ }
+
+ /// <summary>
+ /// ArgumentException with message like "Type doesn't have constructor with a given signature"
+ /// </summary>
+ internal static Exception TypeDoesNotHaveConstructorForTheSignature() {
+ return new ArgumentException(Strings.TypeDoesNotHaveConstructorForTheSignature);
+ }
+
+ /// <summary>
+ /// ArgumentException with message like "Count must be non-negative."
+ /// </summary>
+ internal static Exception CountCannotBeNegative() {
+ return new ArgumentException(Strings.CountCannotBeNegative);
+ }
+
+ /// <summary>
+ /// ArgumentException with message like "arrayType must be an array type"
+ /// </summary>
+ internal static Exception ArrayTypeMustBeArray() {
+ return new ArgumentException(Strings.ArrayTypeMustBeArray);
+ }
+
+ /// <summary>
+ /// ArgumentException with message like "Setter should have void type."
+ /// </summary>
+ internal static Exception SetterMustBeVoid() {
+ return new ArgumentException(Strings.SetterMustBeVoid);
+ }
+
+ /// <summary>
+ /// ArgumentException with message like "Property type must match the value type of setter"
+ /// </summary>
+ internal static Exception PropertyTyepMustMatchSetter() {
+ return new ArgumentException(Strings.PropertyTyepMustMatchSetter);
+ }
+
+ /// <summary>
+ /// ArgumentException with message like "Both accessors must be static."
+ /// </summary>
+ internal static Exception BothAccessorsMustBeStatic() {
+ return new ArgumentException(Strings.BothAccessorsMustBeStatic);
+ }
+
+ /// <summary>
+ /// ArgumentException with message like "Static method requires null instance, non-static method requires non-null instance."
+ /// </summary>
+ internal static Exception OnlyStaticMethodsHaveNullInstance() {
+ return new ArgumentException(Strings.OnlyStaticMethodsHaveNullInstance);
+ }
+
+ /// <summary>
+ /// ArgumentException with message like "Property cannot have a void type."
+ /// </summary>
+ internal static Exception PropertyTypeCannotBeVoid() {
+ return new ArgumentException(Strings.PropertyTypeCannotBeVoid);
+ }
+
+ /// <summary>
+ /// ArgumentException with message like "Can only unbox from an object or interface type to a value type."
+ /// </summary>
+ internal static Exception InvalidUnboxType() {
+ return new ArgumentException(Strings.InvalidUnboxType);
+ }
+
+ /// <summary>
+ /// ArgumentException with message like "Argument must not have a value type."
+ /// </summary>
+ internal static Exception ArgumentMustNotHaveValueType() {
+ return new ArgumentException(Strings.ArgumentMustNotHaveValueType);
+ }
+
+ /// <summary>
+ /// ArgumentException with message like "must be reducible node"
+ /// </summary>
+ internal static Exception MustBeReducible() {
+ return new ArgumentException(Strings.MustBeReducible);
+ }
+
+ /// <summary>
+ /// ArgumentException with message like "Default body must be supplied if case bodies are not System.Void."
+ /// </summary>
+ internal static Exception DefaultBodyMustBeSupplied() {
+ return new ArgumentException(Strings.DefaultBodyMustBeSupplied);
+ }
+
+ /// <summary>
+ /// ArgumentException with message like "MethodBuilder does not have a valid TypeBuilder"
+ /// </summary>
+ internal static Exception MethodBuilderDoesNotHaveTypeBuilder() {
+ return new ArgumentException(Strings.MethodBuilderDoesNotHaveTypeBuilder);
+ }
+
+ /// <summary>
+ /// ArgumentException with message like "Type must be derived from System.Delegate"
+ /// </summary>
+ internal static Exception TypeMustBeDerivedFromSystemDelegate() {
+ return new ArgumentException(Strings.TypeMustBeDerivedFromSystemDelegate);
+ }
+
+ /// <summary>
+ /// ArgumentException with message like "Argument type cannot be void"
+ /// </summary>
+ internal static Exception ArgumentTypeCannotBeVoid() {
+ return new ArgumentException(Strings.ArgumentTypeCannotBeVoid);
+ }
+
+ /// <summary>
+ /// ArgumentException with message like "Label type must be System.Void if an expression is not supplied"
+ /// </summary>
+ internal static Exception LabelMustBeVoidOrHaveExpression() {
+ return new ArgumentException(Strings.LabelMustBeVoidOrHaveExpression);
+ }
+
+ /// <summary>
+ /// ArgumentException with message like "Type must be System.Void for this label argument"
+ /// </summary>
+ internal static Exception LabelTypeMustBeVoid() {
+ return new ArgumentException(Strings.LabelTypeMustBeVoid);
+ }
+
+ /// <summary>
+ /// ArgumentException with message like "Quoted expression must be a lambda"
+ /// </summary>
+ internal static Exception QuotedExpressionMustBeLambda() {
+ return new ArgumentException(Strings.QuotedExpressionMustBeLambda);
+ }
+
+ /// <summary>
/// ArgumentException with message like "Variable '{0}' uses unsupported type '{1}'. Reference types are not supported for variables."
/// </summary>
internal static Exception VariableMustNotBeByRef(object p0, object p1) {
@@ -2455,20 +2658,6 @@ namespace Microsoft.Linq.Expressions {
}
/// <summary>
- /// ArgumentNullException with message like "The value null is not of type '{0}' and cannot be used in this collection."
- /// </summary>
- internal static Exception InvalidNullValue(object p0) {
- return new ArgumentNullException(Strings.InvalidNullValue(p0));
- }
-
- /// <summary>
- /// ArgumentException with message like "The value '{0}' is not of type '{1}' and cannot be used in this collection."
- /// </summary>
- internal static Exception InvalidObjectType(object p0, object p1) {
- return new ArgumentException(Strings.InvalidObjectType(p0, p1));
- }
-
- /// <summary>
/// NotSupportedException with message like "TryExpression is not supported as an argument to method '{0}' because it has an argument with by-ref type. Construct the tree so the TryExpression is not nested inside of this expression."
/// </summary>
internal static Exception TryNotSupportedForMethodsWithRefArgs(object p0) {
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/Extension.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/Extension.cs
index f42f7a8516a..81a0312c6bb 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/Extension.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/Extension.cs
@@ -1,8 +1,4 @@
-#if CODEPLEX_40
using System;
-#else
-using System; using Microsoft;
-#endif
namespace System.Runtime.CompilerServices
{
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/Function.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/Function.cs
index 331afc8df45..62b6fbba950 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/Function.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/Function.cs
@@ -12,16 +12,14 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-#if CODEPLEX_40
-namespace System {
+#if CLR2
+namespace Microsoft.Scripting.Utils {
#else
-namespace Microsoft {
+namespace System {
#endif
- #if MICROSOFT_SCRIPTING_CORE || SILVERLIGHT
+#if CLR2 || SILVERLIGHT
/// <summary>
/// Encapsulates a method that has no parameters and returns a value of the type specified by the TResult parameter.
@@ -46,7 +44,7 @@ namespace Microsoft {
// *** BEGIN GENERATED CODE ***
// generated by function: gen_func_types from: generate_dynsites.py
-#if MICROSOFT_SCRIPTING_CORE || SILVERLIGHT
+#if CLR2 || SILVERLIGHT
/// <summary>
/// Encapsulates a method that has two parameters and returns a value of the type specified by the TResult parameter.
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/Helpers.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/Helpers.cs
index ec62bed8ba4..0444b69d82a 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/Helpers.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/Helpers.cs
@@ -13,21 +13,17 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-using System.Collections.Generic;
-#if CODEPLEX_40
-using System.Linq.Expressions;
+#if CLR2
+using Microsoft.Scripting.Ast;
+using Microsoft.Scripting.Utils;
#else
-using Microsoft.Linq.Expressions;
+using System.Linq.Expressions;
#endif
-#if CODEPLEX_40
+using System.Collections.Generic;
+
namespace System.Dynamic.Utils {
-#else
-namespace Microsoft.Scripting.Utils {
-#endif
// Miscellaneous helpers that don't belong anywhere else
internal static class Helpers {
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/IRuntimeVariables.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/IRuntimeVariables.cs
index 72abfe2a0c9..38d90d366da 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/IRuntimeVariables.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/IRuntimeVariables.cs
@@ -12,14 +12,8 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-#if CODEPLEX_40
namespace System.Runtime.CompilerServices {
-#else
-namespace Microsoft.Runtime.CompilerServices {
-#endif
/// <summary>
/// An interface to represent values of runtime variables.
/// </summary>
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/ReadOnlyCollectionBuilder.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/ReadOnlyCollectionBuilder.cs
index 501f4df304f..3626ea28bb5 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/ReadOnlyCollectionBuilder.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/ReadOnlyCollectionBuilder.cs
@@ -12,28 +12,21 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-#if CODEPLEX_40
-using System.Dynamic.Utils;
-using System.Linq.Expressions;
+#if CLR2
+using Microsoft.Scripting.Ast;
#else
-using Microsoft.Scripting.Utils;
-using Microsoft.Linq.Expressions;
+using System.Linq.Expressions;
#endif
-
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Dynamic.Utils;
+
namespace System.Runtime.CompilerServices {
-#else
-namespace Microsoft.Runtime.CompilerServices {
-#endif
/// <summary>
/// The builder for read only collection.
/// </summary>
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/ReadOnlyDictionary.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/ReadOnlyDictionary.cs
index 94fb35a7076..d8d3c39d872 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/ReadOnlyDictionary.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/ReadOnlyDictionary.cs
@@ -12,25 +12,19 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-using System.Collections.Generic;
-#if CODEPLEX_40
-using System.Linq.Expressions;
+#if CLR2
+using Microsoft.Scripting.Ast;
#else
-using Microsoft.Linq.Expressions;
+using System.Linq.Expressions;
#endif
-
#if SILVERLIGHT
using System.Core;
#endif
-#if CODEPLEX_40
+using System.Collections.Generic;
+
namespace System.Dynamic.Utils {
-#else
-namespace Microsoft.Scripting.Utils {
-#endif
// Like ReadOnlyCollection<T>: wraps an IDictionary<K, V> in a read-only wrapper
internal sealed class ReadOnlyDictionary<K, V> : IDictionary<K, V> {
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/ReferenceEqualityComparer.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/ReferenceEqualityComparer.cs
index 236217c5012..e44676c9abd 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/ReferenceEqualityComparer.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/ReferenceEqualityComparer.cs
@@ -12,21 +12,11 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
using System.Collections.Generic;
using System.Runtime.CompilerServices;
-#if !CODEPLEX_40
-using Microsoft.Runtime.CompilerServices;
-#endif
-
-#if CODEPLEX_40
namespace System.Dynamic.Utils {
-#else
-namespace Microsoft.Scripting.Utils {
-#endif
internal sealed class ReferenceEqualityComparer<T> : IEqualityComparer<T> {
internal static readonly ReferenceEqualityComparer<T> Instance = new ReferenceEqualityComparer<T>();
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/StrongBox.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/StrongBox.cs
index e302b2bdb60..bc6f7278763 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/StrongBox.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/StrongBox.cs
@@ -12,14 +12,8 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
-#if CODEPLEX_40
namespace System.Runtime.CompilerServices {
-#else
-namespace Microsoft.Runtime.CompilerServices {
-#endif
/// <summary>
/// Holds a reference to a value.
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/TrueReadOnlyCollection.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/TrueReadOnlyCollection.cs
index 68a7d53ee05..fd0157e577b 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/TrueReadOnlyCollection.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/TrueReadOnlyCollection.cs
@@ -12,22 +12,12 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
using System.Collections.Generic;
using System.Collections.ObjectModel;
-#if CODEPLEX_40
using System.Dynamic.Utils;
-#else
-using Microsoft.Scripting.Utils;
-#endif
-#if CODEPLEX_40
namespace System.Runtime.CompilerServices {
-#else
-namespace Microsoft.Runtime.CompilerServices {
-#endif
sealed class TrueReadOnlyCollection<T> : ReadOnlyCollection<T> {
/// <summary>
/// Creates instnace of TrueReadOnlyCollection, wrapping passed in array.
diff --git a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/TypeExtensions.cs b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/TypeExtensions.cs
index 8654baff36e..16995b9f1f5 100644
--- a/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/TypeExtensions.cs
+++ b/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Utils/TypeExtensions.cs
@@ -12,19 +12,13 @@
*
*
* ***************************************************************************/
-using System; using Microsoft;
-
using System.Diagnostics;
using System.Reflection;
using System.Reflection.Emit;
using System.Text;
-#if CODEPLEX_40
namespace System.Dynamic.Utils {
-#else
-namespace Microsoft.Scripting.Utils {
-#endif
// Extensions on System.Type and friends
internal static class TypeExtensions {