Browse files

Merge branch 'master' into array_specs

  • Loading branch information...
2 parents e83501a + 38c8a30 commit adfd117142fa977332ee282b026dd1a4057f6972 Orion Edwards [GGL] committed Feb 1, 2012
Showing with 21,238 additions and 331 deletions.
  1. +1 −1 Languages/IronPython/IronPython.Modules/_ctypes/_ctypes.cs
  2. +12 −12 Languages/IronPython/IronPython.Modules/_winreg.cs
  3. +5 −5 Languages/IronPython/IronPython.Modules/msvcrt.cs
  4. +3 −4 Languages/IronPython/IronPython.Modules/nt.cs
  5. +23 −6 Languages/IronPython/IronPython.Wpf/IronPython.Wpf.csproj
  6. +3 −3 Languages/IronPython/IronPython/Compiler/Ast/BinaryExpression.Generated.cs
  7. +1 −1 Languages/IronPython/IronPython/Compiler/Ast/PythonAst.cs
  8. +3 −3 Languages/IronPython/IronPython/Compiler/Parser.cs
  9. +4 −0 Languages/IronPython/IronPython/Compiler/PythonSavableScriptCode.cs
  10. +4 −0 Languages/IronPython/IronPython/Compiler/ToDiskCompilationMode.cs
  11. +3 −3 Languages/IronPython/IronPython/Compiler/Tokenizer.cs
  12. +0 −1 Languages/IronPython/IronPython/IronPython.csproj
  13. +8 −7 Languages/IronPython/IronPython/Modules/Builtin.cs
  14. +3 −3 Languages/IronPython/IronPython/Modules/_ast.cs
  15. +13 −15 Languages/IronPython/IronPython/Modules/sys.cs
  16. +1 −1 Languages/IronPython/IronPython/Modules/unicodedata.cs
  17. +1 −1 Languages/IronPython/IronPython/Properties/AssemblyInfo.cs
  18. +2 −4 Languages/IronPython/IronPython/Properties/Visibility.cs
  19. +4 −0 Languages/IronPython/IronPython/Runtime/Binding/BindingHelpers.cs
  20. +4 −1 Languages/IronPython/IronPython/Runtime/Binding/ConversionBinder.cs
  21. +3 −3 Languages/IronPython/IronPython/Runtime/Binding/MetaOldInstance.cs
  22. +2 −0 Languages/IronPython/IronPython/Runtime/Binding/PythonBinder.cs
  23. +1 −1 Languages/IronPython/IronPython/Runtime/BindingWarnings.cs
  24. +3 −3 Languages/IronPython/IronPython/Runtime/ByteArray.cs
  25. +1 −1 Languages/IronPython/IronPython/Runtime/Bytes.cs
  26. +3 −3 Languages/IronPython/IronPython/Runtime/ClrModule.cs
  27. +3 −3 Languages/IronPython/IronPython/Runtime/Converter.cs
  28. +3 −3 Languages/IronPython/IronPython/Runtime/Enumerate.cs
  29. +1 −1 Languages/IronPython/IronPython/Runtime/Exceptions/ApplicationException.cs
  30. +5 −6 Languages/IronPython/IronPython/Runtime/Exceptions/PythonExceptions.cs
  31. +1 −1 Languages/IronPython/IronPython/Runtime/Exceptions/WarningException.Generated.cs
  32. +0 −51 Languages/IronPython/IronPython/Runtime/Exceptions/WarningException.cs
  33. +11 −5 Languages/IronPython/IronPython/Runtime/Exceptions/Win32Exception.cs
  34. +3 −3 Languages/IronPython/IronPython/Runtime/FutureBuiltins.cs
  35. +3 −4 Languages/IronPython/IronPython/Runtime/IBufferProtocol.cs
  36. +3 −3 Languages/IronPython/IronPython/Runtime/List.cs
  37. +4 −4 Languages/IronPython/IronPython/Runtime/LiteralParser.cs
  38. +3 −3 Languages/IronPython/IronPython/Runtime/MemoryView.cs
  39. +4 −4 Languages/IronPython/IronPython/Runtime/Operations/BoolOps.cs
  40. +3 −3 Languages/IronPython/IronPython/Runtime/Operations/ByteOps.cs
  41. +2 −7 Languages/IronPython/IronPython/Runtime/Operations/ComplexOps.cs
  42. +3 −3 Languages/IronPython/IronPython/Runtime/Operations/DecimalOps.cs
  43. +3 −3 Languages/IronPython/IronPython/Runtime/Operations/FloatOps.cs
  44. +1 −1 Languages/IronPython/IronPython/Runtime/Operations/InstanceOps.cs
  45. +3 −3 Languages/IronPython/IronPython/Runtime/Operations/IntOps.Generated.cs
  46. +3 −3 Languages/IronPython/IronPython/Runtime/Operations/IntOps.cs
  47. +11 −11 Languages/IronPython/IronPython/Runtime/Operations/LongOps.cs
  48. +4 −4 Languages/IronPython/IronPython/Runtime/Operations/ObjectOps.cs
  49. +3 −1 Languages/IronPython/IronPython/Runtime/Operations/PythonOps.cs
  50. +3 −3 Languages/IronPython/IronPython/Runtime/Operations/StringOps.cs
  51. +5 −5 Languages/IronPython/IronPython/Runtime/Profiler.cs
  52. +1 −1 Languages/IronPython/IronPython/Runtime/PythonContext.cs
  53. +3 −3 Languages/IronPython/IronPython/Runtime/PythonFile.cs
  54. +3 −3 Languages/IronPython/IronPython/Runtime/PythonTuple.cs
  55. +3 −3 Languages/IronPython/IronPython/Runtime/StringFormatter.cs
  56. +10 −10 Languages/IronPython/IronPython/Runtime/Types/DocBuilder.cs
  57. +7 −1 Languages/IronPython/IronPython/Runtime/Types/ExtensionPropertyInfo.cs
  58. +3 −3 Languages/IronPython/IronPython/Runtime/Types/TypeCache.Generated.cs
  59. +16 −12 Languages/IronPython/IronPython/Runtime/Types/TypeInfo.cs
  60. +1 −1 Languages/IronPython/IronPython/Runtime/Win32Native.cs
  61. +1 −1 Runtime/Microsoft.Dynamic/IValueEquality.cs
  62. +2 −0 Runtime/Microsoft.Dynamic/Utils/ReflectionUtils.cs
  63. +36 −1 Solutions/Build.IronPython.proj
  64. +14 −10 Solutions/Common.proj
  65. +9 −62 Solutions/IronPython.sln
  66. +710 −0 Util/References/Silverlight/5.0/System.Windows.Browser.Xml
  67. BIN Util/References/Silverlight/5.0/System.Windows.Browser.dll
  68. BIN Util/References/Silverlight/5.0/System.Windows.dll
  69. +20,220 −0 Util/References/Silverlight/5.0/system.windows.xml
  70. BIN util/references/windowsphone/7.1/Microsoft.Phone.dll
View
2 Languages/IronPython/IronPython.Modules/_ctypes/_ctypes.cs
@@ -28,6 +28,7 @@
using System.Threading;
using Microsoft.Scripting.Runtime;
+using Microsoft.Scripting.Utils;
using IronPython.Runtime;
using IronPython.Runtime.Operations;
@@ -37,7 +38,6 @@
using Microsoft.Scripting.Math;
#else
using System.Numerics;
-using Microsoft.Scripting.Utils;
#endif
[assembly: PythonModule("_ctypes", typeof(IronPython.Modules.CTypes))]
View
24 Languages/IronPython/IronPython.Modules/_winreg.cs
@@ -12,7 +12,7 @@
*
*
* ***************************************************************************/
-#if !SILVERLIGHT && !CLR2 && !ANDROID //Registry not available in silverlight and we require .NET 4.0 APIs for implementing this.
+#if FEATURE_REGISTRY //Registry not available in silverlight and we require .NET 4.0 APIs for implementing this.
using System;
using System.Collections.Generic;
@@ -32,10 +32,10 @@
using IronPython.Runtime.Operations;
using IronPython.Runtime.Types;
-#if CLR2
-using Microsoft.Scripting.Math;
-#else
+#if FEATURE_NUMERICS
using System.Numerics;
+#else
+using Microsoft.Scripting.Math;
#endif
[assembly: PythonModule("_winreg", typeof(IronPython.Modules.PythonWinReg))]
@@ -45,7 +45,7 @@ public static class PythonWinReg {
public static PythonType error = PythonExceptions.WindowsError;
- #region Constants
+#region Constants
public static BigInteger HKEY_CLASSES_ROOT = 0x80000000L;
public static BigInteger HKEY_CURRENT_USER = 0x80000001L;
@@ -101,9 +101,9 @@ public static class PythonWinReg {
public const int REG_LEGAL_OPTION = 0XF;
public const int REG_WHOLE_HIVE_VOLATILE = 0X1;
- #endregion
+#endregion
- #region Module Methods
+#region Module Methods
public static void CloseKey(HKEYType key) {
key.Close();
@@ -440,9 +440,9 @@ public static string ExpandEnvironmentStrings(string value)
}
return new HKEYType(newKey);
}
- #endregion
+#endregion
- #region Helpers
+#region Helpers
private static HKEYType GetRootKey(object key) {
HKEYType rootKey;
rootKey = key as HKEYType;
@@ -479,7 +479,7 @@ public static string ExpandEnvironmentStrings(string value)
return (int)registryValueKind;
}
- #endregion
+#endregion
[PythonType]
@@ -533,13 +533,13 @@ public class HKEYType : IDisposable {
}
}
- #region IDisposable Members
+#region IDisposable Members
void IDisposable.Dispose() {
Close();
}
- #endregion
+#endregion
}
}
View
10 Languages/IronPython/IronPython.Modules/msvcrt.cs
@@ -13,6 +13,8 @@
*
* ***********************************************************************/
+#if FEATURE_NATIVE
+
using System;
using System.ComponentModel;
using System.IO;
@@ -23,14 +25,12 @@
using IronPython.Runtime;
using IronPython.Runtime.Operations;
-#if CLR2
-using Microsoft.Scripting.Math;
-#else
+#if FEATURE_NUMERICS
using System.Numerics;
+#else
+using Microsoft.Scripting.Math;
#endif
-#if !SILVERLIGHT
-
[assembly: PythonModule("msvcrt", typeof(IronPython.Modules.PythonMsvcrt))]
namespace IronPython.Modules {
[PythonType("msvcrt")]
View
7 Languages/IronPython/IronPython.Modules/nt.cs
@@ -69,7 +69,7 @@ public static class PythonNT {
if (mode == F_OK) {
return context.LanguageContext.DomainManager.Platform.FileExists(path) ||
- context.LanguageContext.DomainManager.Platform.DirectoryExists(path);
+ context.LanguageContext.DomainManager.Platform.DirectoryExists(path);
}
#if FEATURE_FILESYSTEM
// match the behavior of the VC C Runtime
@@ -1503,9 +1503,8 @@ public class stat_result : IList, IList<object> {
// rethrow reasonable exceptions
return ExceptionHelpers.UpdateForRethrow(e);
}
-#if !SILVERLIGHT
+
int error = Marshal.GetLastWin32Error();
-#endif
string message = e.Message;
int errorCode = 0;
@@ -1527,7 +1526,6 @@ public class stat_result : IList, IList<object> {
}
}
-#if !SILVERLIGHT
IOException ioe = e as IOException;
if (ioe != null) {
switch (error) {
@@ -1540,6 +1538,7 @@ public class stat_result : IList, IList<object> {
}
}
+#if !SILVERLIGHT5
errorCode = System.Runtime.InteropServices.Marshal.GetHRForException(e);
if ((errorCode & ~0xfff) == (unchecked((int)0x80070000))) {
// Win32 HR, translate HR to Python error code if possible, otherwise
View
29 Languages/IronPython/IronPython.Wpf/IronPython.Wpf.csproj
@@ -5,15 +5,16 @@
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{65E997B7-E99B-4C83-B29E-9951429BB293}</ProjectGuid>
<OutputType>Library</OutputType>
+ <OutputPath>$(SolutionDir)..\bin\$(Configuration)\DLLs\</OutputPath>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>IronPython.Wpf</RootNamespace>
<AssemblyName>IronPython.Wpf</AssemblyName>
<DocumentationFile>$(SolutionDir)..\bin\$(Configuration)\IronPython.Wpf.xml</DocumentationFile>
<BaseAddress>885063680</BaseAddress>
</PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'FxCop|AnyCPU' "> </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'FxCop|AnyCPU' "></PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "></PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "></PropertyGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\BuildInfo.Generated.cs" />
@@ -23,7 +24,7 @@
</Compile>
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\..\..\Runtime\Microsoft.Scripting.Core\Microsoft.Scripting.Core.csproj" Condition="'$(FeatureCoreDlr)' != 'true'">
+ <ProjectReference Include="..\..\..\Runtime\Microsoft.Scripting.Core\Microsoft.Scripting.Core.csproj" Condition="'$(FeatureCoreDlr)' != 'true'">
<Project>{2AE75F5A-CD1F-4925-9647-AF4D1C282FB4}</Project>
<Name>Microsoft.Scripting.Core</Name>
<Private>false</Private>
@@ -45,8 +46,24 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
- <Reference Include="WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=MSIL"> <SpecificVersion>True</SpecificVersion> <HintPath>$(WpfReferences)\WindowsBase.dll</HintPath> </Reference> <Reference Include="PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=MSIL"> <SpecificVersion>True</SpecificVersion> <HintPath>$(WpfReferences)\PresentationCore.dll</HintPath> </Reference> <Reference Include="PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=MSIL"> <SpecificVersion>True</SpecificVersion> <HintPath>$(WpfReferences)\PresentationFramework.dll</HintPath> </Reference> <Reference Include="System.Xaml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, ProcessorArchitecture=MSIL"> <SpecificVersion>True</SpecificVersion> <HintPath>$(WpfReferences)\System.Xaml.dll</HintPath> </Reference> </ItemGroup>
+ <Reference Include="WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=MSIL">
+ <SpecificVersion>True</SpecificVersion>
+ <HintPath>$(WpfReferences)\WindowsBase.dll</HintPath>
+ </Reference>
+ <Reference Include="PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=MSIL">
+ <SpecificVersion>True</SpecificVersion>
+ <HintPath>$(WpfReferences)\PresentationCore.dll</HintPath>
+ </Reference>
+ <Reference Include="PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=MSIL">
+ <SpecificVersion>True</SpecificVersion>
+ <HintPath>$(WpfReferences)\PresentationFramework.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Xaml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, ProcessorArchitecture=MSIL">
+ <SpecificVersion>True</SpecificVersion>
+ <HintPath>$(WpfReferences)\System.Xaml.dll</HintPath>
+ </Reference>
+ </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)Versioning.targets" />
<Target Name="BeforeBuild" DependsOnTargets="GenerateBuildInfo" />
-</Project>
+</Project>
View
6 Languages/IronPython/IronPython/Compiler/Ast/BinaryExpression.Generated.cs
@@ -21,11 +21,11 @@
using IronPython.Runtime.Operations;
-#if CLR2
+#if FEATURE_NUMERICS
+using System.Numerics;
+#else
using Microsoft.Scripting.Math;
using Complex = Microsoft.Scripting.Math.Complex64;
-#else
-using System.Numerics;
#endif
namespace IronPython.Compiler.Ast {
View
2 Languages/IronPython/IronPython/Compiler/Ast/PythonAst.cs
@@ -514,7 +514,7 @@ internal PythonAst(CompilerContext context)
PythonCompilerOptions pco = _compilerContext.Options as PythonCompilerOptions;
string moduleName = pco.ModuleName;
if (moduleName == null) {
-#if !SILVERLIGHT
+#if FEATURE_GETINVALIDFILENAMECHARS
if (_compilerContext.SourceUnit.HasPath && _compilerContext.SourceUnit.Path.IndexOfAny(Path.GetInvalidFileNameChars()) == -1) {
moduleName = Path.GetFileNameWithoutExtension(_compilerContext.SourceUnit.Path);
#else
View
6 Languages/IronPython/IronPython/Compiler/Parser.cs
@@ -27,10 +27,10 @@
using IronPython.Runtime.Exceptions;
using IronPython.Runtime.Types;
-#if CLR2
-using Microsoft.Scripting.Math;
-#else
+#if FEATURE_NUMERICS
using System.Numerics;
+#else
+using Microsoft.Scripting.Math;
#endif
namespace IronPython.Compiler {
View
4 Languages/IronPython/IronPython/Compiler/PythonSavableScriptCode.cs
@@ -12,6 +12,8 @@
*
*
* ***************************************************************************/
+#if FEATURE_REFEMIT
+
#if FEATURE_CORE_DLR
using System.Linq.Expressions;
#else
@@ -83,3 +85,5 @@ public PythonSavableScriptCode(Expression<LookupCompilationDelegate> code, Sourc
#endregion
}
}
+
+#endif
View
4 Languages/IronPython/IronPython/Compiler/ToDiskCompilationMode.cs
@@ -13,6 +13,8 @@
*
* ***************************************************************************/
+#if FEATURE_REFEMIT
+
#if FEATURE_CORE_DLR
using MSAst = System.Linq.Expressions;
#else
@@ -84,3 +86,5 @@ class ToDiskCompilationMode : CollectableCompilationMode {
}
}
+
+#endif
View
6 Languages/IronPython/IronPython/Compiler/Tokenizer.cs
@@ -27,10 +27,10 @@
using Microsoft.Scripting.Runtime;
using Microsoft.Scripting.Utils;
-#if CLR2
-using Microsoft.Scripting.Math;
-#else
+#if FEATURE_NUMERICS
using System.Numerics;
+#else
+using Microsoft.Scripting.Math;
#endif
namespace IronPython.Compiler {
View
1 Languages/IronPython/IronPython/IronPython.csproj
@@ -94,7 +94,6 @@
<Compile Include="Runtime\Exceptions\SystemException.cs" />
<Compile Include="Runtime\Exceptions\TypeErrorException.cs" />
<Compile Include="Runtime\Exceptions\ValueErrorException.cs" />
- <Compile Include="Runtime\Exceptions\WarningException.cs" />
<Compile Include="Runtime\Exceptions\Win32Exception.cs" />
<Compile Include="Runtime\ExtensionMethodSet.cs" />
<Compile Include="Runtime\FutureBuiltins.cs" />
View
15 Languages/IronPython/IronPython/Modules/Builtin.cs
@@ -35,11 +35,11 @@
using IronPython.Runtime.Operations;
using IronPython.Runtime.Types;
-#if CLR2
+#if FEATURE_NUMERICS
+using System.Numerics;
+#else
using Microsoft.Scripting.Math;
using Complex = Microsoft.Scripting.Math.Complex64;
-#else
-using System.Numerics;
#endif
[assembly: PythonModule("__builtin__", typeof(IronPython.Modules.Builtin))]
@@ -2168,12 +2168,13 @@ [NotNull]IList enumerator
SumObject(ref state, state.BigIntVal, current);
}
}
-#if CLR2
- private static BigInteger MaxDouble = BigInteger.Create(Double.MaxValue);
- private static BigInteger MinDouble = BigInteger.Create(Double.MinValue);
-#else
+
+#if FEATURE_NUMERICS
private static BigInteger MaxDouble = new BigInteger(Double.MaxValue);
private static BigInteger MinDouble = new BigInteger(Double.MinValue);
+#else
+ private static BigInteger MaxDouble = BigInteger.Create(Double.MaxValue);
+ private static BigInteger MinDouble = BigInteger.Create(Double.MinValue);
#endif
private static void SumBigIntAndDouble(ref SumState state, BigInteger bigInt, double dbl) {
View
6 Languages/IronPython/IronPython/Modules/_ast.cs
@@ -31,11 +31,11 @@
using PythonList = IronPython.Runtime.List;
using System.Runtime.InteropServices;
-#if CLR2
+#if FEATURE_NUMERICS
+using System.Numerics;
+#else
using Microsoft.Scripting.Math;
using Complex = Microsoft.Scripting.Math.Complex64;
-#else
-using System.Numerics;
#endif
[assembly: PythonModule("_ast", typeof(IronPython.Modules._ast))]
View
28 Languages/IronPython/IronPython/Modules/sys.cs
@@ -13,10 +13,10 @@
*
* ***************************************************************************/
-#if CLR2
-using Microsoft.Scripting.Math;
-#else
+#if FEATURE_NUMERICS
using System.Numerics;
+#else
+using Microsoft.Scripting.Math;
#endif
using System;
@@ -51,14 +51,14 @@ public static class SysModule {
private static string GetPrefix() {
string prefix;
-#if SILVERLIGHT
- prefix = String.Empty;
-#else
+#if FEATURE_ASSEMBLY_LOCATION
try {
prefix = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
} catch (SecurityException) {
prefix = String.Empty;
}
+#else
+ prefix = String.Empty;
#endif
return prefix;
}
@@ -187,18 +187,18 @@ public static class SysModule {
return ObjectOps.__sizeof__(o);
}
-#if !SILVERLIGHT
public static PythonTuple getwindowsversion() {
var osVer = Environment.OSVersion;
return PythonTuple.MakeTuple(
osVer.Version.Major,
osVer.Version.Minor,
osVer.Version.Build,
- (int)osVer.Platform,
- osVer.ServicePack
- );
+ (int)osVer.Platform
+#if FEATURE_OS_SERVICEPACK
+ , osVer.ServicePack
+#endif
+ );
}
-#endif
// hex_version is set by PythonContext
public const int maxint = Int32.MaxValue;
@@ -209,11 +209,9 @@ public static class SysModule {
// path is set by PythonContext and only on the initial load
-#if SILVERLIGHT
- public const string platform = "silverlight";
-#else
public const string platform = "cli";
-#endif
+
+ // TODO Add a cli_platform attribute
public static readonly string prefix = GetPrefix();
View
2 Languages/IronPython/IronPython/Modules/unicodedata.cs
@@ -13,7 +13,7 @@
*
* ***************************************************************************/
-#if !SILVERLIGHT && !WIN8
+#if FEATURE_COMPRESSION
using System;
using System.Collections;
View
2 Languages/IronPython/IronPython/Properties/AssemblyInfo.cs
@@ -50,6 +50,6 @@
[assembly: SecurityTransparent]
[assembly: CLSCompliant(false)]
-#if !CLR2 && !SILVERLIGHT && !WIN8 && !ANDROID
+#if FEATURE_SECURITY_RULES
[assembly: SecurityRules(SecurityRuleSet.Level1)]
#endif
View
6 Languages/IronPython/IronPython/Properties/Visibility.cs
@@ -18,11 +18,9 @@
using System.Security;
using System;
-#if SILVERLIGHT
-[assembly: InternalsVisibleTo("IronPython.Modules, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c10ce00dd2e0ce5046d68183d3ad035b47e92bf0ce7bcf8a03a217ca5d0b0c7db973fdf97579b52b502a23d4069dbf043389e1ab65a1d6c508a9837f3e2350f15e05cc63c0fc4b0410867a51919090e4c33f80203e9b0035b21c32bae20f98b068f90d99a50133a5336480d94039b176519f5fd8524765f33be43da65c4b68ba")]
-[assembly: InternalsVisibleTo("IronPythonTest, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c10ce00dd2e0ce5046d68183d3ad035b47e92bf0ce7bcf8a03a217ca5d0b0c7db973fdf97579b52b502a23d4069dbf043389e1ab65a1d6c508a9837f3e2350f15e05cc63c0fc4b0410867a51919090e4c33f80203e9b0035b21c32bae20f98b068f90d99a50133a5336480d94039b176519f5fd8524765f33be43da65c4b68ba")]
-#else
[assembly: InternalsVisibleTo("IronPython.Modules, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c10ce00dd2e0ce5046d68183d3ad035b47e92bf0ce7bcf8a03a217ca5d0b0c7db973fdf97579b52b502a23d4069dbf043389e1ab65a1d6c508a9837f3e2350f15e05cc63c0fc4b0410867a51919090e4c33f80203e9b0035b21c32bae20f98b068f90d99a50133a5336480d94039b176519f5fd8524765f33be43da65c4b68ba")]
[assembly: InternalsVisibleTo("IronPythonTest, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c10ce00dd2e0ce5046d68183d3ad035b47e92bf0ce7bcf8a03a217ca5d0b0c7db973fdf97579b52b502a23d4069dbf043389e1ab65a1d6c508a9837f3e2350f15e05cc63c0fc4b0410867a51919090e4c33f80203e9b0035b21c32bae20f98b068f90d99a50133a5336480d94039b176519f5fd8524765f33be43da65c4b68ba")]
+
+#if FEATURE_APTCA
[assembly: AllowPartiallyTrustedCallers]
#endif
View
4 Languages/IronPython/IronPython/Runtime/Binding/BindingHelpers.cs
@@ -303,7 +303,11 @@ static class BindingHelpers {
}
internal static MethodCallExpression/*!*/ CheckTypeVersion(Expression/*!*/ tested, int version) {
+#if FEATURE_REFEMIT
FieldInfo fi = tested.Type.GetField(NewTypeMaker.ClassFieldName);
+#else
+ FieldInfo fi = null;
+#endif
if (fi == null) {
return Ast.Call(
typeof(PythonOps).GetMethod("CheckTypeVersion"),
View
5 Languages/IronPython/IronPython/Runtime/Binding/ConversionBinder.cs
@@ -15,7 +15,6 @@
#if FEATURE_CORE_DLR
using System.Linq.Expressions;
-using System.Numerics;
#else
using Microsoft.Scripting.Ast;
#endif
@@ -36,6 +35,10 @@
using System.Reflection;
using System.Diagnostics;
+#if FEATURE_NUMERICS
+using System.Numerics;
+#endif
+
namespace IronPython.Runtime.Binding {
using Ast = Expression;
using AstUtils = Microsoft.Scripting.Ast.Utils;
View
6 Languages/IronPython/IronPython/Runtime/Binding/MetaOldInstance.cs
@@ -30,11 +30,11 @@
using Microsoft.Scripting.Utils;
using AstUtils = Microsoft.Scripting.Ast.Utils;
-#if CLR2
+#if FEATURE_NUMERICS
+using System.Numerics;
+#else
using Microsoft.Scripting.Math;
using Complex = Microsoft.Scripting.Math.Complex64;
-#else
-using System.Numerics;
#endif
namespace IronPython.Runtime.Binding {
View
2 Languages/IronPython/IronPython/Runtime/Binding/PythonBinder.cs
@@ -872,13 +872,15 @@ private class ExtensionTypeInfo {
NewTypeMaker.LoadNewTypes(asm);
}
+#if FEATURE_REFEMIT
private static void LoadScriptCode(PythonContext/*!*/ pc, Assembly/*!*/ asm) {
ScriptCode[] codes = SavableScriptCode.LoadFromAssembly(pc.DomainManager, asm);
foreach (ScriptCode sc in codes) {
pc.GetCompiledLoader().AddScriptCode(sc);
}
}
+#endif
internal PythonContext/*!*/ Context {
get {
View
2 Languages/IronPython/IronPython/Runtime/BindingWarnings.cs
@@ -64,7 +64,7 @@ internal static class BindingWarnings {
}
}
-#if !SILVERLIGHT
+#if FEATURE_APARTMENTSTATE
// no apartment states on Silverlight
if (method.DeclaringType == typeof(Thread)) {
if (method.Name == "Sleep") {
View
6 Languages/IronPython/IronPython/Runtime/ByteArray.cs
@@ -25,10 +25,10 @@
using IronPython.Runtime.Operations;
using IronPython.Runtime.Types;
-#if CLR2
-using Microsoft.Scripting.Math;
-#else
+#if FEATURE_NUMERICS
using System.Numerics;
+#else
+using Microsoft.Scripting.Math;
#endif
namespace IronPython.Runtime {
View
2 Languages/IronPython/IronPython/Runtime/Bytes.cs
@@ -19,7 +19,7 @@
using Microsoft.Scripting.Ast;
#endif
-#if !CLR2
+#if FEATURE_NUMERICS
using System.Numerics;
#else
using Microsoft.Scripting.Math;
View
6 Languages/IronPython/IronPython/Runtime/ClrModule.cs
@@ -164,7 +164,7 @@ public static class ClrModule {
}
#endif
-#if !SILVERLIGHT
+#if FEATURE_LOADWITHPARTIALNAME
[Documentation(@"Loads an assembly from the specified partial assembly name and returns the
assembly object. Namespaces or types in the assembly can be accessed directly
from the assembly object.")]
@@ -359,7 +359,7 @@ public static class ClrModule {
// note we don't explicit call to get the file version
// here because the assembly resolve event will do it for us.
-#if !SILVERLIGHT
+#if FEATURE_LOADWITHPARTIALNAME
if (asm == null) {
asm = LoadAssemblyByPartialName(name);
}
@@ -386,7 +386,7 @@ public static class ClrModule {
AddReference(context, asm);
}
-#if !SILVERLIGHT
+#if FEATURE_LOADWITHPARTIALNAME
private static void AddReferenceByPartialName(CodeContext/*!*/ context, string name) {
if (name == null) throw new TypeErrorException("Expected string, got NoneType");
ContractUtils.RequiresNotNull(context, "context");
View
6 Languages/IronPython/IronPython/Runtime/Converter.cs
@@ -29,11 +29,11 @@
using Microsoft.Scripting.Runtime;
using Microsoft.Scripting.Utils;
-#if CLR2
+#if FEATURE_NUMERICS
+using System.Numerics;
+#else
using Microsoft.Scripting.Math;
using Complex = Microsoft.Scripting.Math.Complex64;
-#else
-using System.Numerics;
#endif
namespace IronPython.Runtime {
View
6 Languages/IronPython/IronPython/Runtime/Enumerate.cs
@@ -26,10 +26,10 @@
using IronPython.Runtime.Operations;
using IronPython.Runtime.Types;
-#if CLR2
-using Microsoft.Scripting.Math;
-#else
+#if FEATURE_NUMERICS
using System.Numerics;
+#else
+using Microsoft.Scripting.Math;
#endif
namespace IronPython.Runtime {
View
2 Languages/IronPython/IronPython/Runtime/Exceptions/ApplicationException.cs
@@ -13,7 +13,7 @@
*
* ***************************************************************************/
-#if SILVERLIGHT
+#if !FEATURE_APPLICATIONEXCEPTION
using System;
namespace IronPython.Runtime.Exceptions {
View
11 Languages/IronPython/IronPython/Runtime/Exceptions/PythonExceptions.cs
@@ -542,7 +542,7 @@ public partial class _EnvironmentError : BaseException {
if (exception is FileNotFoundException ||
exception is DirectoryNotFoundException ||
exception is PathTooLongException
-#if !SILVERLIGHT
+#if FEATURE_DRIVENOTFOUNDEXCEPTION
|| exception is DriveNotFoundException
#endif
) {
@@ -556,7 +556,7 @@ public partial class _EnvironmentError : BaseException {
return;
}
-#if !SILVERLIGHT
+#if !SILVERLIGHT5
var ioExcep = exception as System.IO.IOException;
if (ioExcep != null) {
try {
@@ -571,11 +571,12 @@ public partial class _EnvironmentError : BaseException {
// not enough permissions to do this...
}
}
-#endif
+#endif
+
base.InitAndGetClrException(exception);
}
-#if !SILVERLIGHT
+#if !SILVERLIGHT5
[MethodImpl(MethodImplOptions.NoInlining)] // don't inline so the link demand is always evaluated here.
private static int GetHRForException(System.Exception exception) {
return System.Runtime.InteropServices.Marshal.GetHRForException(exception);
@@ -1041,7 +1042,6 @@ public partial class _SystemExit : BaseException {
if (clrException is InvalidCastException || clrException is ArgumentNullException) {
// explicit extra conversions outside the generated hierarchy
pyExcep = new BaseException(TypeError);
-#if !SILVERLIGHT
} else if (clrException is Win32Exception) {
Win32Exception win32 = (Win32Exception)clrException;
pyExcep = new _WindowsError();
@@ -1051,7 +1051,6 @@ public partial class _SystemExit : BaseException {
pyExcep.__init__(win32.ErrorCode, win32.Message);
}
return pyExcep;
-#endif
} else {
// conversions from generated code (in the generated hierarchy)...
pyExcep = ToPythonHelper(clrException);
View
2 Languages/IronPython/IronPython/Runtime/Exceptions/WarningException.Generated.cs
@@ -17,7 +17,7 @@
using System.Runtime.Serialization;
namespace IronPython.Runtime.Exceptions {
-#if SILVERLIGHT
+#if !FEATURE_WARNING_EXCEPTION
#region Generated WarningException
// *** BEGIN GENERATED CODE ***
View
51 Languages/IronPython/IronPython/Runtime/Exceptions/WarningException.cs
@@ -1,51 +0,0 @@
-#if WIN8 || ANDROID
-
-using System;
-using System.Runtime.Serialization;
-
-namespace System.ComponentModel {
- [Serializable]
- public class WarningException : SystemException {
- private readonly string helpUrl;
- private readonly string helpTopic;
-
- public string HelpUrl {
- get {
- return this.helpUrl;
- }
- }
-
- public string HelpTopic {
- get {
- return this.helpTopic;
- }
- }
-
- public WarningException()
- : this(null, null, null) {
- }
-
- public WarningException(string message)
- : this(message, null, null) {
- }
-
- public WarningException(string message, string helpUrl)
- : this(message, helpUrl, null) {
- }
-
- public WarningException(string message, Exception innerException)
- : base(message, innerException) {
- }
-
- public WarningException(string message, string helpUrl, string helpTopic)
- : base(message) {
- this.helpUrl = helpUrl;
- this.helpTopic = helpTopic;
- }
-
-#if FEATURE_SERIALIZATION
- protected WarningException(SerializationInfo info, StreamingContext context) : base(info, context) { }
-#endif
- }
-}
-#endif
View
16 Languages/IronPython/IronPython/Runtime/Exceptions/Win32Exception.cs
@@ -12,14 +12,13 @@
*
*
* ***************************************************************************/
+#if !FEATURE_WIN32EXCEPTION
using System;
-using System.Collections.Generic;
-using System.Text;
namespace IronPython.Runtime.Exceptions {
// exits for better compatibility w/ Silverlight where this exception isn't available.
-#if SILVERLIGHT
+
[Serializable]
public class Win32Exception : Exception {
public Win32Exception() : base() { }
@@ -28,11 +27,18 @@ public Win32Exception(string message, Exception innerException)
: base(message, innerException) {
}
+ public int ErrorCode {
+ get {
+ return 0;
+ }
+ }
+
public int NativeErrorCode {
- get{
+ get {
return 0;
}
}
}
-#endif
}
+
+#endif
View
6 Languages/IronPython/IronPython/Runtime/FutureBuiltins.cs
@@ -34,10 +34,10 @@
using IronPython.Runtime.Operations;
using IronPython.Runtime.Types;
-#if CLR2
-using Microsoft.Scripting.Math;
-#else
+#if FEATURE_NUMERICS
using System.Numerics;
+#else
+using Microsoft.Scripting.Math;
#endif
[assembly: PythonModule("future_builtins", typeof(FutureBuiltins))]
View
7 Languages/IronPython/IronPython/Runtime/IBufferProtocol.cs
@@ -18,13 +18,12 @@
using System.Linq;
using System.Text;
-#if CLR2
-using Microsoft.Scripting.Math;
-#else
+#if FEATURE_NUMERICS
using System.Numerics;
+#else
+using Microsoft.Scripting.Math;
#endif
-
namespace IronPython.Runtime {
public interface IBufferProtocol {
Bytes GetItem(int index);
View
6 Languages/IronPython/IronPython/Runtime/List.cs
@@ -30,10 +30,10 @@
using IronPython.Runtime.Operations;
using IronPython.Runtime.Types;
-#if CLR2
-using Microsoft.Scripting.Math;
-#else
+#if FEATURE_NUMERICS
using System.Numerics;
+#else
+using Microsoft.Scripting.Math;
#endif
using SpecialNameAttribute = System.Runtime.CompilerServices.SpecialNameAttribute;
View
8 Languages/IronPython/IronPython/Runtime/LiteralParser.cs
@@ -25,11 +25,11 @@
using Microsoft.Scripting.Runtime;
using Microsoft.Scripting.Utils;
-#if CLR2
+#if FEATURE_NUMERICS
+using System.Numerics;
+#else
using Microsoft.Scripting.Math;
using Complex = Microsoft.Scripting.Math.Complex64;
-#else
-using System.Numerics;
#endif
namespace IronPython.Runtime {
@@ -101,7 +101,7 @@ public static class LiteralParser {
case '\"': buf.Append('\"'); continue;
case '\r': if (i < l && text[i] == '\n') i++; continue;
case '\n': continue;
-#if !SILVERLIGHT
+#if FEATURE_COMPRESSION
case 'N': {
if (i < l && text[i] == '{') {
i++;
View
6 Languages/IronPython/IronPython/Runtime/MemoryView.cs
@@ -13,10 +13,10 @@
*
* ***************************************************************************/
-#if CLR2
-using Microsoft.Scripting.Math;
-#else
+#if FEATURE_NUMERICS
using System.Numerics;
+#else
+using Microsoft.Scripting.Math;
#endif
using System;
View
8 Languages/IronPython/IronPython/Runtime/Operations/BoolOps.cs
@@ -14,14 +14,14 @@
* ***************************************************************************/
using System;
-using Microsoft.Scripting.Math;
using Microsoft.Scripting.Runtime;
using SpecialNameAttribute = System.Runtime.CompilerServices.SpecialNameAttribute;
-#if CLR2
-using Complex = Microsoft.Scripting.Math.Complex64;
-#else
+#if FEATURE_NUMERICS
using System.Numerics;
+#else
+using Microsoft.Scripting.Math;
+using Complex = Microsoft.Scripting.Math.Complex64;
#endif
namespace IronPython.Runtime.Operations {
View
6 Languages/IronPython/IronPython/Runtime/Operations/ByteOps.cs
@@ -22,10 +22,10 @@
using IronPython.Runtime.Types;
-#if CLR2
-using Microsoft.Scripting.Math;
-#else
+#if FEATURE_NUMERICS
using System.Numerics;
+#else
+using Microsoft.Scripting.Math;
#endif
namespace IronPython.Runtime.Operations {
View
9 Languages/IronPython/IronPython/Runtime/Operations/ComplexOps.cs
@@ -21,7 +21,7 @@
using IronPython.Runtime.Exceptions;
using IronPython.Runtime.Types;
-#if CLR2
+#if !FEATURE_NUMERICS
using Microsoft.Scripting.Math;
using Complex = Microsoft.Scripting.Math.Complex64;
#else
@@ -150,7 +150,7 @@ public static partial class ComplexOps {
return y.IsZero() ? Complex.One : Complex.Zero;
}
-#if !CLR2
+#if FEATURE_NUMERICS
// Special case for higher precision with real integer powers
// TODO: A similar check may get added to CLR 4 upon resolution of Dev10 bug 863171,
// in which case this code should go away.
@@ -302,12 +302,7 @@ public static partial class ComplexOps {
// Unary Operations
[SpecialName]
public static double Abs(Complex x) {
-#if CLR2
double res = x.Abs();
-#else
- // TODO: remove after CodePlex 26224 and MS internal 861649 are resolved
- double res = MathUtils.Hypot(x.Real, x.Imaginary);
-#endif
if (double.IsInfinity(res) && !double.IsInfinity(x.Real) && !double.IsInfinity(x.Imaginary())) {
throw PythonOps.OverflowError("absolute value too large");
View
6 Languages/IronPython/IronPython/Runtime/Operations/DecimalOps.cs
@@ -16,10 +16,10 @@
using System.Runtime.CompilerServices;
using Microsoft.Scripting.Runtime;
-#if CLR2
-using Microsoft.Scripting.Math;
-#else
+#if FEATURE_NUMERICS
using System.Numerics;
+#else
+using Microsoft.Scripting.Math;
#endif
namespace IronPython.Runtime.Operations {
View
6 Languages/IronPython/IronPython/Runtime/Operations/FloatOps.cs
@@ -25,11 +25,11 @@
using IronPython.Runtime.Types;
-#if CLR2
+#if FEATURE_NUMERICS
+using System.Numerics;
+#else
using Microsoft.Scripting.Math;
using Complex = Microsoft.Scripting.Math.Complex64;
-#else
-using System.Numerics;
#endif
using SpecialNameAttribute = System.Runtime.CompilerServices.SpecialNameAttribute;
View
2 Languages/IronPython/IronPython/Runtime/Operations/InstanceOps.cs
@@ -882,7 +882,7 @@ public static object ComparableLessEqual<T>(object y, [NotNull]T x)
#endregion
-#if !SILVERLIGHT
+#if FEATURE_SERIALIZATION
/// <summary>
/// Implements __reduce_ex__ for .NET types which are serializable. This uses the .NET
/// serializer to get a string of raw data which can be serialized.
View
6 Languages/IronPython/IronPython/Runtime/Operations/IntOps.Generated.cs
@@ -19,10 +19,10 @@
using Microsoft.Scripting.Runtime;
using Microsoft.Scripting.Utils;
-#if CLR2
-using Microsoft.Scripting.Math;
-#else
+#if FEATURE_NUMERICS
using System.Numerics;
+#else
+using Microsoft.Scripting.Math;
#endif
#pragma warning disable 675
View
6 Languages/IronPython/IronPython/Runtime/Operations/IntOps.cs
@@ -26,11 +26,11 @@
using IronPython.Modules;
using IronPython.Runtime.Types;
-#if CLR2
+#if FEATURE_NUMERICS
+using System.Numerics;
+#else
using Microsoft.Scripting.Math;
using Complex = Microsoft.Scripting.Math.Complex64;
-#else
-using System.Numerics;
#endif
using SpecialNameAttribute = System.Runtime.CompilerServices.SpecialNameAttribute;
View
22 Languages/IronPython/IronPython/Runtime/Operations/LongOps.cs
@@ -27,11 +27,11 @@
using IronPython.Modules;
using IronPython.Runtime.Types;
-#if CLR2
+#if FEATURE_NUMERICS
+using System.Numerics;
+#else
using Microsoft.Scripting.Math;
using Complex = Microsoft.Scripting.Math.Complex64;
-#else
-using System.Numerics;
#endif
namespace IronPython.Runtime.Operations {
@@ -261,7 +261,7 @@ public static partial class BigIntegerOps {
BigInteger rr;
BigInteger qq;
-#if CLR2
+#if !FEATURE_NUMERICS
if (Object.ReferenceEquals(x, null)) throw PythonOps.TypeError("unsupported operands for div/mod: NoneType and long");
if (Object.ReferenceEquals(y, null)) throw PythonOps.TypeError("unsupported operands for div/mod: long and NoneType");
#endif
@@ -297,7 +297,7 @@ public static partial class BigIntegerOps {
}
}
-#if CLR2
+#if !FEATURE_NUMERICS
[SpecialName]
public static BigInteger Add([NotNull]BigInteger x, [NotNull]BigInteger y) {
return x + y;
@@ -363,7 +363,7 @@ public static partial class BigIntegerOps {
throw PythonOps.OverflowError("long/long too large for a float");
}
-#if CLR2
+#if !FEATURE_NUMERICS
[SpecialName]
public static BigInteger Divide([NotNull]BigInteger x, [NotNull]BigInteger y) {
BigInteger r;
@@ -508,7 +508,7 @@ public static partial class BigIntegerOps {
}
public static object __getnewargs__(CodeContext context, BigInteger self) {
-#if CLR2
+#if !FEATURE_NUMERICS
if (!Object.ReferenceEquals(self, null)) {
return PythonTuple.MakeTuple(BigIntegerOps.__new__(context, TypeCache.BigInteger, self));
}
@@ -521,7 +521,7 @@ public static partial class BigIntegerOps {
#endregion
// These functions make the code generation of other types more regular
-#if CLR2
+#if !FEATURE_NUMERICS
internal
#else
[PythonHidden] public
@@ -534,7 +534,7 @@ [PythonHidden] public
return FloorDivide(x, y);
}
-#if CLR2
+#if !FEATURE_NUMERICS
[SpecialName]
public static BigInteger BitwiseAnd([NotNull]BigInteger x, [NotNull]BigInteger y) {
return x & y;
@@ -705,7 +705,7 @@ [PythonHidden] public
return checked((float)self.ToFloat64());
}
-#if !CLR2
+#if FEATURE_NUMERICS
#region Binary Ops
[PythonHidden]
@@ -1000,7 +1000,7 @@ [PythonHidden] public
digits = ToCultureString(val, PythonContext.GetContext(context).NumericCulture);
break;
-#if CLR2
+#if !FEATURE_NUMERICS
case null:
case 'd':
digits = val.ToString();
View
8 Languages/IronPython/IronPython/Runtime/Operations/ObjectOps.cs
@@ -19,16 +19,16 @@
using System.Threading;
using Microsoft.Scripting;
-using Microsoft.Scripting.Math;
using Microsoft.Scripting.Runtime;
using Microsoft.Scripting.Utils;
using IronPython.Runtime.Types;
-#if CLR2
-using Complex = Microsoft.Scripting.Math.Complex64;
-#else
+#if FEATURE_NUMERICS
using System.Numerics;
+#else
+using Microsoft.Scripting.Math;
+using Complex = Microsoft.Scripting.Math.Complex64;
#endif
namespace IronPython.Runtime.Operations {
View
4 Languages/IronPython/IronPython/Runtime/Operations/PythonOps.cs
@@ -3650,6 +3650,7 @@ public static partial class PythonOps {
return PythonContext.GetContext(context).DeleteSlice;
}
+#if FEATURE_REFEMIT
/// <summary>
/// Provides access to AppDomain.DefineDynamicAssembly which cannot be called from a DynamicMethod
/// </summary>
@@ -3729,6 +3730,7 @@ public static partial class PythonOps {
return 0;
}
#endif
+#endif
public static CodeContext GetPythonTypeContext(PythonType pt) {
return pt.PythonContext.SharedContext;
@@ -4084,7 +4086,7 @@ public static partial class PythonOps {
return new System.OverflowException(string.Format(format, args));
}
public static Exception WindowsError(string format, params object[] args) {
-#if !SILVERLIGHT // System.ComponentModel.Win32Exception
+#if FEATURE_WIN32EXCEPTION // System.ComponentModel.Win32Exception
return new System.ComponentModel.Win32Exception(string.Format(format, args));
#else
return new System.SystemException(string.Format(format, args));
View
6 Languages/IronPython/IronPython/Runtime/Operations/StringOps.cs
@@ -27,10 +27,10 @@
using Microsoft.Scripting.Runtime;
using Microsoft.Scripting.Utils;
-#if CLR2
-using Microsoft.Scripting.Math;
-#else
+#if FEATURE_NUMERICS
using System.Numerics;
+#else
+using Microsoft.Scripting.Math;
#endif
using SpecialNameAttribute = System.Runtime.CompilerServices.SpecialNameAttribute;
View
10 Languages/IronPython/IronPython/Runtime/Profiler.cs
@@ -197,7 +197,7 @@ public sealed class Profiler {
}
private static long DateTimeTicksFromTimeData(long elapsedStopwatchTicks) {
-#if !SILVERLIGHT
+#if FEATURE_STOPWATCH
if (Stopwatch.IsHighResolution) {
return (long)(((double)elapsedStopwatchTicks) * 10000000.0 / (double)Stopwatch.Frequency);
}
@@ -209,15 +209,15 @@ public sealed class Profiler {
public long StartCall(int index) {
Interlocked.Increment(ref _profileData[index, NumberOfCalls]);
-#if !SILVERLIGHT
+#if FEATURE_STOPWATCH
return Stopwatch.GetTimestamp();
#else
return DateTime.Now.Ticks;
#endif
}
public long StartNestedCall(int index, long timestamp) {
-#if !SILVERLIGHT
+#if FEATURE_STOPWATCH
long now = Stopwatch.GetTimestamp();
#else
long now = DateTime.Now.Ticks;
@@ -227,7 +227,7 @@ public sealed class Profiler {
}
public long FinishNestedCall(int index, long timestamp) {
-#if !SILVERLIGHT
+#if FEATURE_STOPWATCH
long now = Stopwatch.GetTimestamp();
#else
long now = DateTime.Now.Ticks;
@@ -237,7 +237,7 @@ public sealed class Profiler {
}
public void FinishCall(int index, long timestamp) {
-#if !SILVERLIGHT
+#if FEATURE_STOPWATCH
long now = Stopwatch.GetTimestamp();
#else
long now = DateTime.Now.Ticks;
View
2 Languages/IronPython/IronPython/Runtime/PythonContext.cs
@@ -1999,7 +1999,7 @@ internal VersionInfo(int major, int minor, int build, string releaselevel, int s
}
private static string GetInitialPrefix() {
-#if !SILVERLIGHT
+#if FEATURE_ASSEMBLY_CODEBASE
try {
return typeof(PythonContext).Assembly.CodeBase;
} catch (SecurityException) {
View
6 Languages/IronPython/IronPython/Runtime/PythonFile.cs
@@ -29,10 +29,10 @@
using IronPython.Runtime.Operations;
using IronPython.Runtime.Types;
-#if CLR2
-using Microsoft.Scripting.Math;
-#else
+#if FEATURE_NUMERICS
using System.Numerics;
+#else
+using Microsoft.Scripting.Math;
#endif
namespace IronPython.Runtime {
View
6 Languages/IronPython/IronPython/Runtime/PythonTuple.cs
@@ -19,10 +19,10 @@
using MSAst = Microsoft.Scripting.Ast;
#endif
-#if CLR2
-using Microsoft.Scripting.Math;
-#else
+#if FEATURE_NUMERICS
using System.Numerics;
+#else
+using Microsoft.Scripting.Math;
#endif
using System;
View
6 Languages/IronPython/IronPython/Runtime/StringFormatter.cs
@@ -23,10 +23,10 @@
using Microsoft.Scripting;
using Microsoft.Scripting.Runtime;
-#if CLR2
-using Microsoft.Scripting.Math;
-#else
+#if FEATURE_NUMERICS
using System.Numerics;
+#else
+using Microsoft.Scripting.Math;
#endif
namespace IronPython.Runtime {
View
20 Languages/IronPython/IronPython/Runtime/Types/DocBuilder.cs
@@ -157,22 +157,22 @@ static class DocBuilder {
#endif
if (t.IsEnum) {
-#if SILVERLIGHT // GetNames/GetValues
- FieldInfo[] fields = t.GetFields(BindingFlags.Static | BindingFlags.Public);
- string[] names = new string[fields.Length];
- for (int i = 0; i < fields.Length; i++) {
- object value = Convert.ChangeType(fields[i].GetValue(null), Enum.GetUnderlyingType(t), Thread.CurrentThread.CurrentCulture);
- names[i] = String.Concat(fields[i].Name, " (", value.ToString(), ")");
- }
-#else
- string[] names = Enum.GetNames(t);
+#if FEATURE_ENUM_NAMES_VALUES // GetNames/GetValues
+ string[] names = Enum.GetNames(t);
Array values = Enum.GetValues(t);
for (int i = 0; i < names.Length; i++) {
names[i] = String.Concat(names[i],
" (",
- Convert.ChangeType(values.GetValue(i), Enum.GetUnderlyingType(t)).ToString(),
+ Convert.ChangeType(values.GetValue(i), Enum.GetUnderlyingType(t), null).ToString(),
")");
}
+#else
+ FieldInfo[] fields = t.GetFields(BindingFlags.Static | BindingFlags.Public);
+ string[] names = new string[fields.Length];
+ for (int i = 0; i < fields.Length; i++) {
+ object value = Convert.ChangeType(fields[i].GetValue(null), Enum.GetUnderlyingType(t), Thread.CurrentThread.CurrentCulture);
+ names[i] = String.Concat(fields[i].Name, " (", value.ToString(), ")");
+ }
#endif
Array.Sort<string>(names);
View
8 Languages/IronPython/IronPython/Runtime/Types/ExtensionPropertyInfo.cs
@@ -28,18 +28,24 @@ public class ExtensionPropertyInfo {
string methodName = mi.Name;
string prefix = "";
+
+#if FEATURE_REFEMIT
if (methodName.StartsWith(NewTypeMaker.BaseMethodPrefix)) {
methodName = methodName.Substring(NewTypeMaker.BaseMethodPrefix.Length);
prefix = NewTypeMaker.BaseMethodPrefix;
}
+#endif
if (methodName.StartsWith("Get") || methodName.StartsWith("Set")) {
GetPropertyMethods(mi, methodName, prefix, "Get", "Set", "Delete");
} else if(methodName.StartsWith("get_") || methodName.StartsWith("set_")) {
GetPropertyMethods(mi, methodName, prefix, "get_", "set_", null);
- } else if (methodName.StartsWith(NewTypeMaker.FieldGetterPrefix) || methodName.StartsWith(NewTypeMaker.FieldSetterPrefix)) {
+ }
+#if FEATURE_REFEMIT
+ else if (methodName.StartsWith(NewTypeMaker.FieldGetterPrefix) || methodName.StartsWith(NewTypeMaker.FieldSetterPrefix)) {
GetPropertyMethods(mi, methodName, prefix, NewTypeMaker.FieldGetterPrefix, NewTypeMaker.FieldSetterPrefix, null);
}
+#endif
}
private void GetPropertyMethods(MethodInfo mi, string methodName, string prefix, string get, string set, string delete) {
View
6 Languages/IronPython/IronPython/Runtime/Types/TypeCache.Generated.cs
@@ -20,11 +20,11 @@
using IronPython.Modules;
using IronPython.Runtime.Exceptions;
-#if CLR2
+#if FEATURE_NUMERICS
+using System.Numerics;
+#else
using Microsoft.Scripting.Math;
using Complex = Microsoft.Scripting.Math.Complex64;
-#else
-using System.Numerics;
#endif
namespace IronPython.Runtime.Types {
View
28 Languages/IronPython/IronPython/Runtime/Types/TypeInfo.cs
@@ -32,11 +32,11 @@
using IronPython.Runtime.Exceptions;
using IronPython.Runtime.Operations;
-#if CLR2
+#if FEATURE_NUMERICS
+using System.Numerics;
+#else
using Microsoft.Scripting.Math;
using Complex = Microsoft.Scripting.Math.Complex64;
-#else
-using System.Numerics;
#endif
namespace IronPython.Runtime.Types {
@@ -623,7 +623,7 @@ class ProtectedMemberResolver : MemberResolver {
new OneOffResolver("__repr__", ReprResolver),
new OneOffResolver("__hash__", HashResolver),
new OneOffResolver("__iter__", IterResolver),
-#if !SILVERLIGHT
+#if FEATURE_SERIALIZATION
new OneOffResolver("__reduce_ex__", SerializationResolver),
#endif
// The standard resolver looks for types using .NET reflection by name
@@ -786,7 +786,7 @@ class ProtectedMemberResolver : MemberResolver {
/// </summary>
private static MemberGroup/*!*/ StringResolver(MemberBinder/*!*/ binder, Type/*!*/ type) {
if (type != typeof(double) && type != typeof(float)
-#if !CLR2
+#if FEATURE_NUMERICS
&& type != typeof(Complex)
#endif
) {
@@ -825,7 +825,8 @@ class ProtectedMemberResolver : MemberResolver {
return MemberGroup.EmptyGroup;
}
-#if !SILVERLIGHT
+
+#if FEATURE_SERIALIZATION
private static MemberGroup/*!*/ SerializationResolver(MemberBinder/*!*/ binder, Type/*!*/ type) {
if (type.IsSerializable && !PythonBinder.IsPythonType(type)) {
@@ -838,7 +839,9 @@ class ProtectedMemberResolver : MemberResolver {
return MemberGroup.EmptyGroup;
}
+#endif
+#if !SILVERLIGHT
/// <summary>
/// Helper to see if the type explicitly overrides the method. This ignores members
/// defined on object.
@@ -865,11 +868,11 @@ class ProtectedMemberResolver : MemberResolver {
/// then IValueEquality.GetValueHashCode.
/// </summary>
private static MemberGroup/*!*/ HashResolver(MemberBinder/*!*/ binder, Type/*!*/ type) {
-#if CLR2
+#if FEATURE_VALUE_EQUALITY
+ if (typeof(IStructuralEquatable).IsAssignableFrom(type) && !type.IsInterface) {
+#else
if ((typeof(IStructuralEquatable).IsAssignableFrom(type) ||
typeof(IValueEquality).IsAssignableFrom(type)) && !type.IsInterface) {
-#else
- if (typeof(IStructuralEquatable).IsAssignableFrom(type) && !type.IsInterface) {
#endif
// check and see if __hash__ has been overridden by the base type.
foreach (Type t in binder.GetContributingTypes(type)) {
@@ -883,16 +886,17 @@ class ProtectedMemberResolver : MemberResolver {
return MemberGroup.EmptyGroup;
}
}
-#if CLR2
+
+#if FEATURE_VALUE_EQUALITY
+ return GetInstanceOpsMethod(type, "StructuralHashMethod");
+#else
if (typeof(IStructuralEquatable).IsAssignableFrom(type)) {
return GetInstanceOpsMethod(type, "StructuralHashMethod");
}
if (typeof(IValueEquality).IsAssignableFrom(type)) {
return new MemberGroup(typeof(IValueEquality).GetMethod("GetValueHashCode"));
}
-#else
- return GetInstanceOpsMethod(type, "StructuralHashMethod");
#endif
}
View
2 Languages/IronPython/IronPython/Runtime/Win32Native.cs
@@ -4,7 +4,7 @@
using System.Runtime.InteropServices;
namespace IronPython.Runtime {
-#if !SILVERLIGHT
+#if FEATURE_NATIVE
class NativeMethods {
[Serializable]
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
View
2 Runtime/Microsoft.Dynamic/IValueEquality.cs
@@ -13,7 +13,7 @@
*
* ***************************************************************************/
-#if CLR2
+#if !FEATURE_VALUE_EQUALITY
// IValueEquality is unnecessary in .NET 4.0 and can be replaced by IStructuralEquatable
// given some default IEqualityComparer
View
2 Runtime/Microsoft.Dynamic/Utils/ReflectionUtils.cs
@@ -127,10 +127,12 @@ public DefaultParameterValueAttribute(object value)
}
}
+#if !ANDROID
[AttributeUsage(AttributeTargets.Parameter, Inherited = false), ComVisible(true)]
public sealed class OptionalAttribute : Attribute {
}
#endif
+#endif
public static class ReflectionUtils {
#region Accessibility
View
37 Solutions/Build.IronPython.proj
@@ -5,6 +5,7 @@
<PropertyGroup>
<BaseConfiguration Condition=" '$(BaseConfiguration)' == '' ">Debug</BaseConfiguration>
+ <Mono Condition="'$(OS)' != 'Windows_NT'">true</Mono>
<Solution>IronPython.sln</Solution>
@@ -17,7 +18,10 @@
<BuildDir>$(BinDir)\$(BaseConfiguration)</BuildDir>
<v2BuildDir>$(BinDir)\v2$(BaseConfiguration)</v2BuildDir>
+ <AndroidBuildDir>$(BinDir)\Android$(BaseConfiguration)</AndroidBuildDir>
+ <WP7BuildDir>$(BinDir)\Silverlight3$(BaseConfiguration)</WP7BuildDir>
<Silverlight4BuildDir>$(BinDir)\Silverlight4$(BaseConfiguration)</Silverlight4BuildDir>
+ <Silverlight5BuildDir>$(BinDir)\Silverlight5$(BaseConfiguration)</Silverlight5BuildDir>
</PropertyGroup>
<ItemGroup>
@@ -27,12 +31,21 @@
<BuildProject Include="$(Solution)">
<Properties>Configuration=v2$(BaseConfiguration)</Properties>
</BuildProject>
- <!--<BuildProject Include="$(Solution)">
+ <!--<BuildProject Include="$(Solution)" Condition=" '$(Mono)' != 'true' ">
<Properties>Configuration=Silverlight3$(BaseConfiguration)</Properties>
</BuildProject>-->
<BuildProject Include="$(Solution)" Condition=" '$(Mono)' != 'true' ">
<Properties>Configuration=Silverlight4$(BaseConfiguration)</Properties>
</BuildProject>
+ <BuildProject Include="$(Solution)" Condition=" '$(Mono)' != 'true' ">
+ <Properties>Configuration=Silverlight5$(BaseConfiguration)</Properties>
+ </BuildProject>
+ <BuildProject Include="$(Solution)">
+ <Properties>Configuration=Android$(BaseConfiguration)</Properties>
+ </BuildProject>
+ <!--<BuildProject Include="$(Solution)" Condition=" '$(Mono)' != 'true' ">
+ <Properties>Configuration=Win8$(BaseConfiguration)</Properties>
+ </BuildProject>-->
<InstallerProject Include="$(BaseDir)\Msi\Python\IronPython.Installer.wixproj">
<Properties>Configuration=$(BaseConfiguration);BaseInputPaths=$(StageDir);WixToolPath=$(UtilDir)\Wix35\;OutputPath=$(PackageDir)</Properties>
@@ -149,18 +162,40 @@
<Copy SourceFiles="@(SilverlightScriptFiles)" DestinationFiles="@(SilverlightScriptFiles->'$(StageDir)\Silverlight\script\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(SilverlightScriptTemplates)" DestinationFiles="@(SilverlightScriptTemplates->'$(StageDir)\Silverlight\script\templates\python\%(RecursiveDir)%(Filename)%(Extension)')" />
+ <!-- .NET 4 -->
<Copy SourceFiles="@(DlrLibs->'$(BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\Platforms\Net40" />
<Copy SourceFiles="@(ClrDlrLibs->'$(BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\Platforms\Net40" />
<Copy SourceFiles="@(IronPythonLibs->'$(BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\Platforms\Net40" />
+ <!-- .NET 3.5 -->
<Copy SourceFiles="@(DlrLibs->'$(v2BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\Platforms\Net35" />
<Copy SourceFiles="@(ClrDlrLibs->'$(v2BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\Platforms\Net35" />
<Copy SourceFiles="@(v2DlrLibs->'$(v2BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\Platforms\Net35" />
<Copy SourceFiles="@(IronPythonLibs->'$(v2BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\Platforms\Net35" />
+ <!-- Windows Phone 7.5 -->
+ <!--<Copy SourceFiles="@(DlrLibs->'$(WP7BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\Platforms\WP7" />
+ <Copy SourceFiles="@(v2DlrLibs->'$(WP7BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\Platforms\WP7" />
+ <Copy SourceFiles="@(IronPythonLibs->'$(WP7BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\Platforms\WP7" />-->
+
+ <!-- Mono for Android -->
+ <Copy SourceFiles="@(DlrLibs->'$(AndroidBuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\Platforms\Android" />
+ <Copy SourceFiles="@(v2DlrLibs->'$(AndroidBuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\Platforms\Android" />
+ <Copy SourceFiles="@(IronPythonLibs->'$(AndroidBuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\Platforms\Android" />
+
+ <!-- Silverlight 4 -->
<Copy SourceFiles="@(DlrLibs->'$(Silverlight4BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\Platforms\Sl4" />
<Copy SourceFiles="@(SilverlightDlrLibs->'$(Silverlight4BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\Platforms\Sl4" />
<Copy SourceFiles="@(IronPythonLibs->'$(Silverlight4BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\Platforms\Sl4" />
+
+ <!-- Silverlight 5 -->
+ <Copy SourceFiles="@(DlrLibs->'$(Silverlight5BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\Platforms\Sl5" />
+ <Copy SourceFiles="@(SilverlightDlrLibs->'$(Silverlight5BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\Platforms\Sl5" />
+ <Copy SourceFiles="@(IronPythonLibs->'$(Silverlight5BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\Platforms\Sl5" />
+
+ <!-- Windows 8 "Metro" -->
+ <!--<Copy SourceFiles="@(DlrLibs->'$(BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\Platforms\Metro" />
+ <Copy SourceFiles="@(IronPythonLibs->'$(BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\Platforms\Metro" />-->
</Target>
<Target Name="NuGetPackage" DependsOnTargets="Stage" Condition="'$(OS)' == 'Windows_NT'">
View
24 Solutions/Common.proj
@@ -51,17 +51,17 @@
<!-- References -->
<PropertyGroup Condition="'$(ReferencedPlatform)' == 'V2'">
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <Features>FEATURE_CUSTOM_MODIFIERS;FEATURE_NATIVE;FEATURE_EXCEPTION_STATE;FEATURE_DEFAULT_PARAMETER_VALUE;FEATURE_CRYPTOGRAPHY;FEATURE_SYNC_SOCKETS;FEATURE_ASSEMBLY_RESOLVE;FEATURE_CUSTOM_TYPE_DESCRIPTOR;FEATURE_ENCODING;FEATURE_DBNULL;FEATURE_FILESYSTEM;FEATURE_THREAD;FEATURE_PROCESS;FEATURE_STACK_TRACE;FEATURE_TYPECONVERTER;FEATURE_PDBEMIT;FEATURE_COM;FEATURE_FULL_CONSOLE;FEATURE_BASIC_CONSOLE;FEATURE_SERIALIZATION;FEATURE_REMOTING;FEATURE_CONFIGURATION;FEATURE_REFEMIT;FEATURE_CODEDOM</Features>
+ <Features>FEATURE_CUSTOM_MODIFIERS;FEATURE_NATIVE;FEATURE_EXCEPTION_STATE;FEATURE_DEFAULT_PARAMETER_VALUE;FEATURE_CRYPTOGRAPHY;FEATURE_SYNC_SOCKETS;FEATURE_ASSEMBLY_RESOLVE;FEATURE_CUSTOM_TYPE_DESCRIPTOR;FEATURE_ENCODING;FEATURE_DBNULL;FEATURE_FILESYSTEM;FEATURE_THREAD;FEATURE_PROCESS;FEATURE_STACK_TRACE;FEATURE_TYPECONVERTER;FEATURE_PDBEMIT;FEATURE_COM;FEATURE_FULL_CONSOLE;FEATURE_BASIC_CONSOLE;FEATURE_SERIALIZATION;FEATURE_REMOTING;FEATURE_CONFIGURATION;FEATURE_REFEMIT;FEATURE_CODEDOM;FEATURE_COMPRESSION;FEATURE_WARNING_EXCEPTION;FEATURE_APTCA;FEATURE_WIN32EXCEPTION;FEATURE_ASSEMBLY_LOCATION;FEATURE_ENUM_NAMES_VALUES;FEATURE_OS_SERVICEPACK;FEATURE_APPLICATIONEXCEPTION;FEATURE_STOPWATCH;FEATURE_APARTMENTSTATE;FEATURE_GETINVALIDFILENAMECHARS;FEATURE_LOADWITHPARTIALNAME;FEATURE_DRIVENOTFOUNDEXCEPTION;FEATURE_ASSEMBLY_CODEBASE</Features>
<PlatformSymbols>CLR2</PlatformSymbols>
<IsSilverlight>false</IsSilverlight>
<IsFullFramework>true</IsFullFramework>
<FeatureCoreDlr>false</FeatureCoreDlr>
</PropertyGroup>
<PropertyGroup Condition="'$(ReferencedPlatform)' == 'V4'">
- <WpfReferences Condition="'$(FrameworkReferences)' == ''">$(SolutionDir)..\Util\References\WPF\4.0</WpfReferences>
+ <WpfReferences Condition="'$(WpfReferences)' == ''">$(SolutionDir)..\Util\References\WPF\4.0</WpfReferences>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <Features>FEATURE_CUSTOM_MODIFIERS;FEATURE_NATIVE;FEATURE_XMLDOC;FEATURE_EXCEPTION_STATE;FEATURE_DEFAULT_PARAMETER_VALUE;FEATURE_FUNCS_5_16;FEATURE_VARIANCE;FEATURE_CORE_DLR;FEATURE_TASKS;FEATURE_CRYPTOGRAPHY;FEATURE_SYNC_SOCKETS;FEATURE_ASSEMBLY_RESOLVE;FEATURE_CUSTOM_TYPE_DESCRIPTOR;FEATURE_ENCODING;FEATURE_DBNULL;FEATURE_FILESYSTEM;FEATURE_THREAD;FEATURE_PROCESS;FEATURE_STACK_TRACE;FEATURE_TYPE_EQUIVALENCE;FEATURE_NUMERICS;FEATURE_TYPECONVERTER;FEATURE_PDBEMIT;FEATURE_METADATA_READER;FEATURE_COM;FEATURE_WPF;FEATURE_FULL_CONSOLE;FEATURE_BASIC_CONSOLE;FEATURE_SERIALIZATION;FEATURE_REMOTING;FEATURE_CONFIGURATION;FEATURE_REFEMIT;FEATURE_CODEDOM</Features>
+ <Features>FEATURE_CUSTOM_MODIFIERS;FEATURE_NATIVE;FEATURE_XMLDOC;FEATURE_EXCEPTION_STATE;FEATURE_DEFAULT_PARAMETER_VALUE;FEATURE_FUNCS_5_16;FEATURE_VARIANCE;FEATURE_CORE_DLR;FEATURE_TASKS;FEATURE_CRYPTOGRAPHY;FEATURE_SYNC_SOCKETS;FEATURE_ASSEMBLY_RESOLVE;FEATURE_CUSTOM_TYPE_DESCRIPTOR;FEATURE_ENCODING;FEATURE_DBNULL;FEATURE_FILESYSTEM;FEATURE_THREAD;FEATURE_PROCESS;FEATURE_STACK_TRACE;FEATURE_TYPE_EQUIVALENCE;FEATURE_NUMERICS;FEATURE_TYPECONVERTER;FEATURE_PDBEMIT;FEATURE_METADATA_READER;FEATURE_COM;FEATURE_WPF;FEATURE_FULL_CONSOLE;FEATURE_BASIC_CONSOLE;FEATURE_SERIALIZATION;FEATURE_REMOTING;FEATURE_CONFIGURATION;FEATURE_REFEMIT;FEATURE_CODEDOM;FEATURE_VALUE_EQUALITY;FEATURE_COMPRESSION;FEATURE_WARNING_EXCEPTION;FEATURE_SECURITY_RULES;FEATURE_APTCA;FEATURE_WIN32EXCEPTION;FEATURE_REGISTRY;FEATURE_ASSEMBLY_LOCATION;FEATURE_ENUM_NAMES_VALUES;FEATURE_OS_SERVICEPACK;FEATURE_APPLICATIONEXCEPTION;FEATURE_STOPWATCH;FEATURE_APARTMENTSTATE;FEATURE_GETINVALIDFILENAMECHARS;FEATURE_LOADWITHPARTIALNAME;FEATURE_DRIVENOTFOUNDEXCEPTION;FEATURE_ASSEMBLY_CODEBASE</Features>
<PlatformSymbols>CLR4</PlatformSymbols>
<IsSilverlight>false</IsSilverlight>
<IsFullFramework>true</IsFullFramework>
@@ -73,7 +73,7 @@
<NoStdLib>true</NoStdLib>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkIdentifier>.NETCore</TargetFrameworkIdentifier>
- <Features>FEATURE_DEFAULT_PARAMETER_VALUE;FEATURE_FUNCS_5_16;FEATURE_VARIANCE;FEATURE_CORE_DLR;FEATURE_TASKS;FEATURE_NUMERICS;FEATURE_REFEMIT</Features>
+ <Features>FEATURE_DEFAULT_PARAMETER_VALUE;FEATURE_FUNCS_5_16;FEATURE_VARIANCE;FEATURE_CORE_DLR;FEATURE_TASKS;FEATURE_NUMERICS;FEATURE_REFEMIT;FEATURE_VALUE_EQUALITY;FEATURE_COMPRESSION;FEATURE_WARNING_EXCEPTION;FEATURE_ASSEMBLY_LOCATION;FEATURE_ENUM_NAMES_VALUES;FEATURE_OS_SERVICEPACK;FEATURE_WIN32EXCEPTION;FEATURE_APPLICATIONEXCEPTION;FEATURE_STOPWATCH;FEATURE_APARTMENTSTATE;FEATURE_GETINVALIDFILENAMECHARS;FEATURE_LOADWITHPARTIALNAME;FEATURE_DRIVENOTFOUNDEXCEPTION;FEATURE_ASSEMBLY_CODEBASE</Features>
<PlatformSymbols>WIN8;CLR4;CLR45</PlatformSymbols>
<IsSilverlight>false</IsSilverlight>
<IsFullFramework>false</IsFullFramework>
@@ -86,7 +86,7 @@
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>WindowsPhone71</TargetFrameworkProfile>
<TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
- <Features>FEATURE_DBNULL;FEATURE_THREAD;FEATURE_STACK_TRACE</Features>
+ <Features>FEATURE_DBNULL;FEATURE_THREAD;FEATURE_STACK_TRACE;FEATURE_STOPWATCH</Features>
<PlatformSymbols>WP75</PlatformSymbols>
<IsSilverlight>true</IsSilverlight>
<IsFullFramework>false</IsFullFramework>
@@ -96,9 +96,9 @@
<PropertyGroup Condition="'$(ReferencedPlatform)' == 'Android'">
<FrameworkReferences Condition="'$(FrameworkReferences)' == ''">$(SolutionDir)..\Util\References\MonoAndroid\1.0</FrameworkReferences>
<NoStdLib>true</NoStdLib>
- <!-- TODO: what features are available? -->
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <Features>FEATURE_CUSTOM_MODIFIERS;FEATURE_FUNCS_5_16;FEATURE_SERIALIZATION;FEATURE_ASSEMBLY_RESOLVE;FEATURE_DBNULL;FEATURE_THREAD;FEATURE_STACK_TRACE</Features>
+ <TargetFrameworkIdentifier>MonoAndroid</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
+ <Features>FEATURE_CUSTOM_MODIFIERS;FEATURE_FUNCS_5_16;FEATURE_SERIALIZATION;FEATURE_ASSEMBLY_RESOLVE;FEATURE_DBNULL;FEATURE_THREAD;FEATURE_STACK_TRACE;FEATURE_REFEMIT;FEATURE_NUMERICS;FEATURE_VALUE_EQUALITY;FEATURE_COMPRESSION;FEATURE_APTCA;FEATURE_WIN32EXCEPTION;FEATURE_ASSEMBLY_LOCATION;FEATURE_ENUM_NAMES_VALUES;FEATURE_OS_SERVICEPACK;FEATURE_APPLICATIONEXCEPTION;FEATURE_STOPWATCH;FEATURE_APARTMENTSTATE;FEATURE_GETINVALIDFILENAMECHARS;FEATURE_LOADWITHPARTIALNAME;FEATURE_DRIVENOTFOUNDEXCEPTION;FEATURE_ASSEMBLY_CODEBASE</Features>
<PlatformSymbols>ANDROID</PlatformSymbols>
<IsSilverlight>false</IsSilverlight>
<IsFullFramework>false</IsFullFramework>
@@ -110,7 +110,7 @@
<NoStdLib>true</NoStdLib>
<TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <Features>FEATURE_DEFAULT_PARAMETER_VALUE;FEATURE_FUNCS_5_16;FEATURE_VARIANCE;FEATURE_CORE_DLR;FEATURE_CRYPTOGRAPHY;FEATURE_ASSEMBLY_RESOLVE;FEATURE_DBNULL;FEATURE_THREAD;FEATURE_STACK_TRACE;FEATURE_NUMERICS;FEATURE_PDBEMIT;FEATURE_REFEMIT;FEATURE_BASIC_CONSOLE</Features>
+ <Features>FEATURE_DEFAULT_PARAMETER_VALUE;FEATURE_FUNCS_5_16;FEATURE_VARIANCE;FEATURE_CORE_DLR;FEATURE_CRYPTOGRAPHY;FEATURE_ASSEMBLY_RESOLVE;FEATURE_DBNULL;FEATURE_THREAD;FEATURE_STACK_TRACE;FEATURE_NUMERICS;FEATURE_PDBEMIT;FEATURE_REFEMIT;FEATURE_BASIC_CONSOLE;FEATURE_VALUE_EQUALITY;FEATURE_ASSEMBLY_LOCATION;FEATURE_ASSEMBLY_CODEBASE</Features>
<PlatformSymbols>SILVERLIGHT;SILVERLIGHT4;CLR4</PlatformSymbols>
<IsSilverlight>true</IsSilverlight>
<IsFullFramework>false</IsFullFramework>
@@ -122,7 +122,7 @@
<NoStdLib>true</NoStdLib>
<TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
- <Features>FEATURE_DEFAULT_PARAMETER_VALUE;FEATURE_FUNCS_5_16;FEATURE_VARIANCE;FEATURE_CORE_DLR;FEATURE_TASKS;FEATURE_CRYPTOGRAPHY;FEATURE_ASSEMBLY_RESOLVE;FEATURE_DBNULL;FEATURE_THREAD;FEATURE_STACK_TRACE;FEATURE_NUMERICS;FEATURE_PDBEMIT;FEATURE_REFEMIT;FEATURE_BASIC_CONSOLE</Features>
+ <Features>FEATURE_DEFAULT_PARAMETER_VALUE;FEATURE_FUNCS_5_16;FEATURE_VARIANCE;FEATURE_CORE_DLR;FEATURE_TASKS;FEATURE_CRYPTOGRAPHY;FEATURE_ASSEMBLY_RESOLVE;FEATURE_DBNULL;FEATURE_THREAD;FEATURE_STACK_TRACE;FEATURE_NUMERICS;FEATURE_PDBEMIT;FEATURE_REFEMIT;FEATURE_BASIC_CONSOLE;FEATURE_VALUE_EQUALITY;FEATURE_APTCA;FEATURE_ASSEMBLY_LOCATION;FEATURE_ENUM_NAMES_VALUES;FEATURE_ASSEMBLY_CODEBASE</Features>
<PlatformSymbols>SILVERLIGHT;SILVERLIGHT5;CLR4</PlatformSymbols>