diff --git a/3DRRadio/3DRRadio.csproj b/3DRRadio/3DRRadio.csproj index 36f8749923..3551ef8d62 100644 --- a/3DRRadio/3DRRadio.csproj +++ b/3DRRadio/3DRRadio.csproj @@ -69,11 +69,9 @@ Linked\ArduinoSTK.cs - Component Linked\ArduinoSTKv2.cs - Component Linked\IArduinoComms.cs diff --git a/ArdupilotMega.sln b/ArdupilotMega.sln index e8ef1d9751..f53b46fe19 100644 --- a/ArdupilotMega.sln +++ b/ArdupilotMega.sln @@ -3,10 +3,23 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MissionPlanner", "MissionPlanner.csproj", "{A2E22272-95FE-47B6-B050-9AE7E2055BF5}" ProjectSection(ProjectDependencies) = postProject + {825E7A10-390C-4A2B-B3A8-491D14966912} = {825E7A10-390C-4A2B-B3A8-491D14966912} + {ABB32A29-AF50-47FA-B243-5FD75A5ABA54} = {ABB32A29-AF50-47FA-B243-5FD75A5ABA54} + {20296734-5F3C-4593-A0D5-DD20B440B13A} = {20296734-5F3C-4593-A0D5-DD20B440B13A} {E64A1A41-A5B0-458E-8284-BB63705354DA} = {E64A1A41-A5B0-458E-8284-BB63705354DA} + {53F12A60-E9CC-44BC-8366-1AE3AB2B547D} = {53F12A60-E9CC-44BC-8366-1AE3AB2B547D} + {2541686B-1673-43BF-AF89-3163945DB009} = {2541686B-1673-43BF-AF89-3163945DB009} {B46F6C6C-9184-41AF-8F8B-E0084752CA7C} = {B46F6C6C-9184-41AF-8F8B-E0084752CA7C} + {1378A66C-38E4-46F5-A05F-DC04EF7D4D16} = {1378A66C-38E4-46F5-A05F-DC04EF7D4D16} + {59129078-7B12-4198-B93E-0AA08D0BB7ED} = {59129078-7B12-4198-B93E-0AA08D0BB7ED} {B1538F7F-C82B-4678-9397-880F92848BFB} = {B1538F7F-C82B-4678-9397-880F92848BFB} + {A625BE88-0000-0000-0000-000000000000} = {A625BE88-0000-0000-0000-000000000000} {76374F95-C343-4ACC-B86F-7ECFDD668F46} = {76374F95-C343-4ACC-B86F-7ECFDD668F46} + {C8B88795-6D01-494D-83AD-6944BD4C5023} = {C8B88795-6D01-494D-83AD-6944BD4C5023} + {29976BA4-A04D-4A80-A866-098C879C2FDE} = {29976BA4-A04D-4A80-A866-098C879C2FDE} + {9CA367B8-0B98-49D1-84FB-735E612E3BA9} = {9CA367B8-0B98-49D1-84FB-735E612E3BA9} + {7F7994CE-823F-4A04-BBEA-D0A3808FF56D} = {7F7994CE-823F-4A04-BBEA-D0A3808FF56D} + {2A8E8AF5-74E7-49DB-A42E-9360FA7A6CC4} = {2A8E8AF5-74E7-49DB-A42E-9360FA7A6CC4} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Updater", "Updater\Updater.csproj", "{E64A1A41-A5B0-458E-8284-BB63705354DA}" @@ -40,6 +53,10 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PluginTest", "Plugins\PluginTest.csproj", "{9EB725D8-B6C2-4BB3-9937-8881BC35DAC8}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MissionPlanner.Utilities", "ExtLibs\Utilities\MissionPlanner.Utilities.csproj", "{1378A66C-38E4-46F5-A05F-DC04EF7D4D16}" + ProjectSection(ProjectDependencies) = postProject + {825E7A10-390C-4A2B-B3A8-491D14966912} = {825E7A10-390C-4A2B-B3A8-491D14966912} + {C8B88795-6D01-494D-83AD-6944BD4C5023} = {C8B88795-6D01-494D-83AD-6944BD4C5023} + EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MissionPlanner.Grid", "ExtLibs\Grid\MissionPlanner.Grid.csproj", "{A01404DF-CB52-4CCC-AD17-0F815D533D98}" EndProject diff --git a/ExtLibs/Controls/MissionPlanner.Controls.csproj b/ExtLibs/Controls/MissionPlanner.Controls.csproj index 4968940d8e..ccc8b37942 100644 --- a/ExtLibs/Controls/MissionPlanner.Controls.csproj +++ b/ExtLibs/Controls/MissionPlanner.Controls.csproj @@ -33,11 +33,11 @@ False - ..\..\..\..\..\..\..\Desktop\DIYDrones\greatmaps_09991dd06609\Demo.WindowsForms\bin\Debug\GMap.NET.Core.dll + ..\..\Lib\GMap.NET.Core.dll False - ..\..\..\..\..\..\..\Desktop\DIYDrones\greatmaps_09991dd06609\Demo.WindowsForms\bin\Debug\GMap.NET.WindowsForms.dll + ..\..\Lib\GMap.NET.WindowsForms.dll ..\..\Lib\log4net.dll diff --git a/ExtLibs/Controls/ProgressReporterDialogue.cs b/ExtLibs/Controls/ProgressReporterDialogue.cs index def98b9f28..1fceccaaa7 100644 --- a/ExtLibs/Controls/ProgressReporterDialogue.cs +++ b/ExtLibs/Controls/ProgressReporterDialogue.cs @@ -79,8 +79,11 @@ private void RunBackgroundOperation(object o) this.Invoke((MethodInvoker)delegate { // if this windows isnt the current active windows, popups inherit the wrong parent. - this.Focus(); - Application.DoEvents(); + if (!this.Focused) + { + this.Focus(); + Application.DoEvents(); + } }); } catch { Running = false; return; } diff --git a/ExtLibs/CsAssortedWidgets/CsAssortedWidgets.csproj b/ExtLibs/CsAssortedWidgets/CsAssortedWidgets.csproj index 8fb6010e6d..6c12bbff3a 100644 --- a/ExtLibs/CsAssortedWidgets/CsAssortedWidgets.csproj +++ b/ExtLibs/CsAssortedWidgets/CsAssortedWidgets.csproj @@ -54,7 +54,7 @@ False - ..\..\..\..\Documents\Visual Studio 2010\Projects\ArdupilotMega\ArdupilotMega\bin\Debug\OpenTK.dll + ..\..\Lib\OpenTK.dll diff --git a/ExtLibs/GLControl/OpenTK.GLControl.csproj b/ExtLibs/GLControl/OpenTK.GLControl.csproj index ac894f6415..fa19a11db0 100644 --- a/ExtLibs/GLControl/OpenTK.GLControl.csproj +++ b/ExtLibs/GLControl/OpenTK.GLControl.csproj @@ -108,7 +108,7 @@ False - ..\..\..\..\..\..\Documents\Visual Studio 2010\Projects\ArdupilotMega\ArdupilotMega\bin\Debug\OpenTK.dll + ..\..\Lib\OpenTK.dll System diff --git a/ExtLibs/Grid/MissionPlanner.Grid.csproj b/ExtLibs/Grid/MissionPlanner.Grid.csproj index f268f6f379..2b3181272a 100644 --- a/ExtLibs/Grid/MissionPlanner.Grid.csproj +++ b/ExtLibs/Grid/MissionPlanner.Grid.csproj @@ -38,10 +38,10 @@ False - ..\..\..\..\..\..\..\Desktop\DIYDrones\greatmaps_09991dd06609\Demo.WindowsForms\bin\Debug\GMap.NET.Core.dll + ..\..\Lib\GMap.NET.Core.dll - ..\..\..\..\..\..\..\Desktop\DIYDrones\greatmaps_09991dd06609\Demo.WindowsForms\bin\Debug\GMap.NET.WindowsForms.dll + ..\..\Lib\GMap.NET.WindowsForms.dll False diff --git a/ExtLibs/MissionPlanner.Stats/MissionPlanner.Stats.csproj b/ExtLibs/MissionPlanner.Stats/MissionPlanner.Stats.csproj index 458396649c..07730f2353 100644 --- a/ExtLibs/MissionPlanner.Stats/MissionPlanner.Stats.csproj +++ b/ExtLibs/MissionPlanner.Stats/MissionPlanner.Stats.csproj @@ -34,7 +34,7 @@ False - ..\..\..\..\..\..\..\Desktop\DIYDrones\greatmaps_09991dd06609\Demo.WindowsForms\bin\Debug\GMap.NET.Core.dll + ..\..\Lib\GMap.NET.Core.dll diff --git a/ExtLibs/TrackerHome/TrackerHomeGPS.csproj b/ExtLibs/TrackerHome/TrackerHomeGPS.csproj index 003819819f..448e3a153b 100644 --- a/ExtLibs/TrackerHome/TrackerHomeGPS.csproj +++ b/ExtLibs/TrackerHome/TrackerHomeGPS.csproj @@ -34,7 +34,7 @@ False - ..\..\..\..\..\..\..\Desktop\DIYDrones\greatmaps_09991dd06609\Demo.WindowsForms\bin\Debug\GMap.NET.Core.dll + ..\..\Lib\GMap.NET.Core.dll diff --git a/ExtLibs/Utilities/MissionPlanner.Utilities.csproj b/ExtLibs/Utilities/MissionPlanner.Utilities.csproj index d4dac0c53e..3e2d76d65c 100644 --- a/ExtLibs/Utilities/MissionPlanner.Utilities.csproj +++ b/ExtLibs/Utilities/MissionPlanner.Utilities.csproj @@ -42,11 +42,11 @@ False - ..\..\..\..\..\..\..\Desktop\DIYDrones\greatmaps_09991dd06609\Demo.WindowsForms\bin\Debug\GMap.NET.Core.dll + ..\..\Lib\GMap.NET.Core.dll False - ..\..\..\..\..\..\..\Desktop\DIYDrones\greatmaps_09991dd06609\Demo.WindowsForms\bin\Debug\GMap.NET.WindowsForms.dll + ..\..\Lib\GMap.NET.WindowsForms.dll ..\..\Lib\ICSharpCode.SharpZipLib.dll diff --git a/MissionPlanner.csproj b/MissionPlanner.csproj index 38b45a30c6..0cd4ccf8ae 100644 --- a/MissionPlanner.csproj +++ b/MissionPlanner.csproj @@ -271,12 +271,8 @@ - - Component - - - Component - + + @@ -352,9 +348,7 @@ ConfigCameraStab.cs - - UserControl - + ConfigFrameType.cs @@ -370,9 +364,7 @@ ConfigOptional.cs - - UserControl - + ConfigSimplePids.cs @@ -412,15 +404,11 @@ ConfigHelp.cs - - UserControl - + InitialSetup.cs - - UserControl - + SoftwareConfig.cs @@ -520,98 +508,71 @@ Always + + Always + - - UserControl - + 1Intro.cs - - UserControl - + 2FrameFW.cs - - UserControl - + 3ConnectAP.cs - - UserControl - + 4FrameType.cs - - UserControl - + 5AccelCalib.cs - - UserControl - + 6CompassCalib.cs - - UserControl - + 7BatteryMonitor.cs - - UserControl - + 8OptionalItemsAC.cs - - UserControl - + 8OptionalItemsAP.cs - - UserControl - + 9RadioCalibration.cs - - UserControl - + 10FlightModes.cs - - UserControl - + 11Verify.cs - - UserControl - + 12FailSafe.cs - - UserControl - + 13GeoFence.cs - - UserControl - + 98DontForget.cs @@ -951,9 +912,7 @@ - - UserControl - + Form @@ -1141,15 +1100,11 @@ RAW_Sensor.cs - - UserControl - + Help.cs - - UserControl - + Terminal.cs @@ -1159,18 +1114,10 @@ MainV2.cs - - UserControl - - - UserControl - - - UserControl - - - UserControl - + + + + Simulation.cs diff --git a/Msi/wix.exe b/Msi/wix.exe index 0d7410e6f4..e170b39722 100755 Binary files a/Msi/wix.exe and b/Msi/wix.exe differ diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 246d5647da..b03bf58fbc 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -34,5 +34,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.1.*")] -[assembly: AssemblyFileVersion("1.2.90")] +[assembly: AssemblyFileVersion("1.2.90.1")] [assembly: NeutralResourcesLanguageAttribute("")] diff --git a/Readme.txt b/Readme.txt index 53e3f03db0..42aedf9031 100644 --- a/Readme.txt +++ b/Readme.txt @@ -6,3 +6,5 @@ ensure you have an installed copy, and the source. Please see the compile1.png to compile4.png in the project properties set a "reference path" to the installed mp directory. +For Mono please install +sudo apt-get install mono-runtime libmono-system-windows-forms4.0-cil libmono-system-core4.0-cil libmono-winforms2.0-cil libmono-corlib2.0-cil libmono-system-management4.0-cil diff --git a/Utilities/httpserver.cs b/Utilities/httpserver.cs index 4b2b379819..bf3d2cd312 100644 --- a/Utilities/httpserver.cs +++ b/Utilities/httpserver.cs @@ -370,10 +370,33 @@ public void DoAcceptTcpClientCallback(IAsyncResult ar) System.Threading.Thread.Sleep(200); // 5hz byte[] data = null; - + if (url.ToLower().Contains("hud")) + { GCSViews.FlightData.myhud.streamjpgenable = true; data = GCSViews.FlightData.myhud.streamjpg.ToArray(); - + } + else if (url.ToLower().Contains("map")) + { + data = GetControlJpegRaw(GCSViews.FlightData.mymap); + } + else + { + GCSViews.FlightData.myhud.streamjpgenable = true; + Image img1 = Image.FromStream(GCSViews.FlightData.myhud.streamjpg); + Image img2 = GetControlJpeg(GCSViews.FlightData.mymap); + int bigger = img1.Height > img2.Height ? img1.Height : img2.Height; + Image imgout = new Bitmap(img1.Width + img2.Width, bigger); + + Graphics grap = Graphics.FromImage(imgout); + + grap.DrawImageUnscaled(img1, 0, 0); + grap.DrawImageUnscaled(img2, img1.Width, 0); + + MemoryStream streamjpg = new MemoryStream(); + imgout.Save(streamjpg, System.Drawing.Imaging.ImageFormat.Jpeg); + data = streamjpg.ToArray(); + + } header = "Content-Type: image/jpeg\r\nContent-Length: " + data.Length + "\r\n\r\n"; temp = asciiEncoding.GetBytes(header); @@ -685,6 +708,32 @@ public void DoAcceptTcpClientCallback(IAsyncResult ar) } } + public Image GetControlJpeg(Control ctl) + { + var g = ctl.CreateGraphics(); + + Bitmap bmp = new Bitmap(ctl.Width, ctl.Height); + + MainV2.instance.Invoke((MethodInvoker)delegate(){ + ctl.DrawToBitmap(bmp, new Rectangle(0, 0, ctl.Width, ctl.Height)); + }); + + return bmp; + } + + public byte[] GetControlJpegRaw(Control ctl) + { + Image img = GetControlJpeg(ctl); + + MemoryStream streamjpg = new MemoryStream(); + + img.Save(streamjpg, System.Drawing.Imaging.ImageFormat.Jpeg); + + byte[] data = streamjpg.ToArray(); + + return data; + } + public Image ResizeImage(Image image, Size size, bool preserveAspectRatio = true) { diff --git a/packages/Extended.Wpf.Toolkit.2.0.0/Extended.Wpf.Toolkit.2.0.0.nupkg b/packages/Extended.Wpf.Toolkit.2.0.0/Extended.Wpf.Toolkit.2.0.0.nupkg new file mode 100644 index 0000000000..2dd48d3e83 Binary files /dev/null and b/packages/Extended.Wpf.Toolkit.2.0.0/Extended.Wpf.Toolkit.2.0.0.nupkg differ diff --git a/packages/Extended.Wpf.Toolkit.2.0.0/Extended.Wpf.Toolkit.2.0.0.nuspec b/packages/Extended.Wpf.Toolkit.2.0.0/Extended.Wpf.Toolkit.2.0.0.nuspec new file mode 100644 index 0000000000..4ae6ddc315 --- /dev/null +++ b/packages/Extended.Wpf.Toolkit.2.0.0/Extended.Wpf.Toolkit.2.0.0.nuspec @@ -0,0 +1,27 @@ + + + + Extended.Wpf.Toolkit + 2.0.0 + Extended WPF Toolkit + Xceed + Xceed + http://wpftoolkit.codeplex.com/license + http://wpftoolkit.codeplex.com/ + http://xceed.com/images/SocialNetworks/LogoXCEEDTwitter.png + false + Extended WPF Toolkit is the number one collection of WPF controls, components and utilities for creating next generation Windows applications. Provides 40 controls, all offered under the Microsoft Public License for maximum freedom. In v2.0: another 67 improvements in the Community Edition. Documentation, source, and discussions are hosted on CodePlex at http://wpftoolkit.codeplex.com. Plus Edition at http://wpftoolkit.com + Extended WPF Toolkit is the number one collection of WPF controls for creating next-gen Windows apps. Release 2.0 of the Community Edition provides another 67 improvements. + V2.0 of the Community Edition features 67 improvements. + Copyright © Xceed Software Inc. 2010-2013 + + extended WPF toolkit + + + + + + + + + \ No newline at end of file diff --git a/packages/Extended.Wpf.Toolkit.2.0.0/lib/net35/WPFToolkit.dll b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net35/WPFToolkit.dll new file mode 100644 index 0000000000..89b123ccd2 Binary files /dev/null and b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net35/WPFToolkit.dll differ diff --git a/packages/Extended.Wpf.Toolkit.2.0.0/lib/net35/Xceed.Wpf.Toolkit.dll b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net35/Xceed.Wpf.Toolkit.dll new file mode 100644 index 0000000000..9edc5cce27 Binary files /dev/null and b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net35/Xceed.Wpf.Toolkit.dll differ diff --git a/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/Xceed.Wpf.AvalonDock.Themes.Aero.dll b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/Xceed.Wpf.AvalonDock.Themes.Aero.dll new file mode 100644 index 0000000000..9e3df680fd Binary files /dev/null and b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/Xceed.Wpf.AvalonDock.Themes.Aero.dll differ diff --git a/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/Xceed.Wpf.AvalonDock.Themes.Metro.dll b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/Xceed.Wpf.AvalonDock.Themes.Metro.dll new file mode 100644 index 0000000000..39db795c07 Binary files /dev/null and b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/Xceed.Wpf.AvalonDock.Themes.Metro.dll differ diff --git a/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/Xceed.Wpf.AvalonDock.Themes.VS2010.dll b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/Xceed.Wpf.AvalonDock.Themes.VS2010.dll new file mode 100644 index 0000000000..31ff403929 Binary files /dev/null and b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/Xceed.Wpf.AvalonDock.Themes.VS2010.dll differ diff --git a/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/Xceed.Wpf.AvalonDock.dll b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/Xceed.Wpf.AvalonDock.dll new file mode 100644 index 0000000000..c9ba3b35fa Binary files /dev/null and b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/Xceed.Wpf.AvalonDock.dll differ diff --git a/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/Xceed.Wpf.DataGrid.dll b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/Xceed.Wpf.DataGrid.dll new file mode 100644 index 0000000000..2afa5281a1 Binary files /dev/null and b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/Xceed.Wpf.DataGrid.dll differ diff --git a/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/Xceed.Wpf.Toolkit.dll b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/Xceed.Wpf.Toolkit.dll new file mode 100644 index 0000000000..1e700d58be Binary files /dev/null and b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/Xceed.Wpf.Toolkit.dll differ diff --git a/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/de/Xceed.Wpf.AvalonDock.resources.dll b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/de/Xceed.Wpf.AvalonDock.resources.dll new file mode 100644 index 0000000000..018649c5e8 Binary files /dev/null and b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/de/Xceed.Wpf.AvalonDock.resources.dll differ diff --git a/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/es/Xceed.Wpf.AvalonDock.resources.dll b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/es/Xceed.Wpf.AvalonDock.resources.dll new file mode 100644 index 0000000000..df62db5dfd Binary files /dev/null and b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/es/Xceed.Wpf.AvalonDock.resources.dll differ diff --git a/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/fr/Xceed.Wpf.AvalonDock.resources.dll b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/fr/Xceed.Wpf.AvalonDock.resources.dll new file mode 100644 index 0000000000..09f7d480f8 Binary files /dev/null and b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/fr/Xceed.Wpf.AvalonDock.resources.dll differ diff --git a/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/hu/Xceed.Wpf.AvalonDock.resources.dll b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/hu/Xceed.Wpf.AvalonDock.resources.dll new file mode 100644 index 0000000000..a787fc004b Binary files /dev/null and b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/hu/Xceed.Wpf.AvalonDock.resources.dll differ diff --git a/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/it/Xceed.Wpf.AvalonDock.resources.dll b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/it/Xceed.Wpf.AvalonDock.resources.dll new file mode 100644 index 0000000000..affdcaf69c Binary files /dev/null and b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/it/Xceed.Wpf.AvalonDock.resources.dll differ diff --git a/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/pt-BR/Xceed.Wpf.AvalonDock.resources.dll b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/pt-BR/Xceed.Wpf.AvalonDock.resources.dll new file mode 100644 index 0000000000..534ff998da Binary files /dev/null and b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/pt-BR/Xceed.Wpf.AvalonDock.resources.dll differ diff --git a/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/ro/Xceed.Wpf.AvalonDock.resources.dll b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/ro/Xceed.Wpf.AvalonDock.resources.dll new file mode 100644 index 0000000000..c95ac6aaac Binary files /dev/null and b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/ro/Xceed.Wpf.AvalonDock.resources.dll differ diff --git a/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/ru/Xceed.Wpf.AvalonDock.resources.dll b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/ru/Xceed.Wpf.AvalonDock.resources.dll new file mode 100644 index 0000000000..1dac585898 Binary files /dev/null and b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/ru/Xceed.Wpf.AvalonDock.resources.dll differ diff --git a/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/sv/Xceed.Wpf.AvalonDock.resources.dll b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/sv/Xceed.Wpf.AvalonDock.resources.dll new file mode 100644 index 0000000000..84e97678ae Binary files /dev/null and b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/sv/Xceed.Wpf.AvalonDock.resources.dll differ diff --git a/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/zh-Hans/Xceed.Wpf.AvalonDock.resources.dll b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/zh-Hans/Xceed.Wpf.AvalonDock.resources.dll new file mode 100644 index 0000000000..ccc8ba88cd Binary files /dev/null and b/packages/Extended.Wpf.Toolkit.2.0.0/lib/net40/zh-Hans/Xceed.Wpf.AvalonDock.resources.dll differ diff --git a/packages/Extended.Wpf.Toolkit.2.0.0/tools/install.ps1 b/packages/Extended.Wpf.Toolkit.2.0.0/tools/install.ps1 new file mode 100644 index 0000000000..cf6b23fd4f --- /dev/null +++ b/packages/Extended.Wpf.Toolkit.2.0.0/tools/install.ps1 @@ -0,0 +1,3 @@ +param($installPath, $toolsPath, $package, $project) + +$project.DTE.ItemOperations.Navigate('http://wpftoolkit.codeplex.com/') \ No newline at end of file diff --git a/packages/IronPython.2.7.4/IronPython.2.7.4.nupkg b/packages/IronPython.2.7.4/IronPython.2.7.4.nupkg new file mode 100644 index 0000000000..75aa5c8b29 Binary files /dev/null and b/packages/IronPython.2.7.4/IronPython.2.7.4.nupkg differ diff --git a/packages/IronPython.2.7.4/IronPython.2.7.4.nuspec b/packages/IronPython.2.7.4/IronPython.2.7.4.nuspec new file mode 100644 index 0000000000..e62d13684a --- /dev/null +++ b/packages/IronPython.2.7.4/IronPython.2.7.4.nuspec @@ -0,0 +1,19 @@ + + + + IronPython + 2.7.4 + IronPython + IronPython Contributors, Microsoft + IronPython Contributors, Microsoft + http://ironpython.codeplex.com/license + http://ironpython.net/ + false + IronPython is an open-source implementation of the Python programming language which is tightly integrated with the .NET Framework. IronPython can use the .NET Framework and Python libraries, and other .NET languages can use Python code just as easily. + IronPython is an open-source implementation of the Python programming language which is tightly integrated with the .NET Framework. + + + en-US + ironpython python dynamic dlr + + \ No newline at end of file diff --git a/packages/IronPython.2.7.4/lib/Net35/IronPython.Modules.dll b/packages/IronPython.2.7.4/lib/Net35/IronPython.Modules.dll new file mode 100644 index 0000000000..292a860865 Binary files /dev/null and b/packages/IronPython.2.7.4/lib/Net35/IronPython.Modules.dll differ diff --git a/packages/IronPython.2.7.4/lib/Net35/IronPython.Modules.xml b/packages/IronPython.2.7.4/lib/Net35/IronPython.Modules.xml new file mode 100644 index 0000000000..96ede8cc52 --- /dev/null +++ b/packages/IronPython.2.7.4/lib/Net35/IronPython.Modules.xml @@ -0,0 +1,4504 @@ + + + + IronPython.Modules + + + + + Try to convert IList(Of byte) to byte[] without copying, if possible. + + + + + + + Copy the latest data from the memory buffer. + + This won't always contain data, because comrpessed data is only written after a block is filled. + + + + + + Add data to the input buffer. This manipulates the position of the stream + to make it appear to the BZip2 stream that nothing has actually changed. + + The data to append to the buffer. + + + + Reset the BitWriter. + + + + This is useful when the BitWriter writes into a MemoryStream, and + is used by a BZip2Compressor, which itself is re-used for multiple + distinct data blocks. + + + + + + Write some number of bits from the given value, into the output. + + + + The nbits value should be a max of 25, for safety. For performance + reasons, this method does not check! + + + + + + Write a full 8-bit byte into the output. + + + + + Write four 8-bit bytes into the output. + + + + + Write all available byte-aligned bytes. + + + + This method writes no new output, but flushes any accumulated + bits. At completion, the accumulator may contain up to 7 + bits. + + + This is necessary when re-assembling output from N independent + compressors, one for each of N blocks. The output of any + particular compressor will in general have some fragment of a byte + remaining. This fragment needs to be accumulated into the + parent BZip2OutputStream. + + + + + + Writes all available bytes, and emits padding for the final byte as + necessary. This must be the last method invoked on an instance of + BitWriter. + + + + + Delivers the remaining bits, left-aligned, in a byte. + + + + This is valid only if NumRemainingBits is less than 8; + in other words it is valid only after a call to Flush(). + + + + + Knuth's increments seem to work better than Incerpi-Sedgewick here. + Possibly because the number of elems to sort is usually small, typically + <= 20. + + + + BZip2Compressor writes its compressed data out via a BitWriter. This + is necessary because BZip2 does byte shredding. + + + + + Accept new bytes into the compressor data buffer + + + + This method does the first-level (cheap) run-length encoding, and + stores the encoded data into the rle block. + + + + + + Process one input byte into the block. + + + + + To "process" the byte means to do the run-length encoding. + There are 3 possible return values: + + 0 - the byte was not written, in other words, not + encoded into the block. This happens when the + byte b would require the start of a new run, and + the block has no more room for new runs. + + 1 - the byte was written, and the block is not full. + + 2 - the byte was written, and the block is full. + + + + 0 if the byte was not written, non-zero if written. + + + + Append one run to the output block. + + + + + This compressor does run-length-encoding before BWT and etc. This + method simply appends a run to the output block. The append always + succeeds. The return value indicates whether the block is full: + false (not full) implies that at least one additional run could be + processed. + + + true if the block is now full; otherwise false. + + + + Compress the data that has been placed (Run-length-encoded) into the + block. The compressed data goes into the CompressedBytes array. + + + + Side effects: 1. fills the CompressedBytes array. 2. sets the + AvailableBytesOut property. + + + + + This is the most hammered method of this class. + +

+ This is the version using unrolled loops. +

+
+ + Method "mainQSort3", file "blocksort.c", BZip2 1.0.2 + + + + The number of uncompressed bytes being held in the buffer. + + + + I am thinking this may be useful in a Stream that uses this + compressor class. In the Close() method on the stream it could + check this value to see if anything has been written at all. You + may think the stream could easily track the number of bytes it + wrote, which would eliminate the need for this. But, there is the + case where the stream writes a complete block, and it is full, and + then writes no more. In that case the stream may want to check. + + + + + Array instance identical to sfmap, both are used only + temporarily and independently, so we do not need to allocate + additional memory. + + + + A read-only decorator stream that performs BZip2 decompression on Read. + + + + + Create a BZip2InputStream, wrapping it around the given input Stream. + + + + The input stream will be closed when the BZip2InputStream is closed. + + + The stream from which to read compressed data + + + + Create a BZip2InputStream with the given stream, and + specifying whether to leave the wrapped stream open when + the BZip2InputStream is closed. + + The stream from which to read compressed data + + Whether to leave the input stream open, when the BZip2InputStream closes. + + + + + This example reads a bzip2-compressed file, decompresses it, + and writes the decompressed data into a newly created file. + + + var fname = "logfile.log.bz2"; + using (var fs = File.OpenRead(fname)) + { + using (var decompressor = new Ionic.BZip2.BZip2InputStream(fs)) + { + var outFname = fname + ".decompressed"; + using (var output = File.Create(outFname)) + { + byte[] buffer = new byte[2048]; + int n; + while ((n = decompressor.Read(buffer, 0, buffer.Length)) > 0) + { + output.Write(buffer, 0, n); + } + } + } + } + + + + + + Read data from the stream. + + + + + To decompress a BZip2 data stream, create a BZip2InputStream, + providing a stream that reads compressed data. Then call Read() on + that BZip2InputStream, and the data read will be decompressed + as you read. + + + + A BZip2InputStream can be used only for Read(), not for Write(). + + + + The buffer into which the read data should be placed. + the offset within that data array to put the first byte read. + the number of bytes to read. + the number of bytes actually read + + + + Read a single byte from the stream. + + the byte read from the stream, or -1 if EOF + + + + Flush the stream. + + + + + Calling this method always throws a . + + this is irrelevant, since it will always throw! + this is irrelevant, since it will always throw! + irrelevant! + + + + Calling this method always throws a . + + this is irrelevant, since it will always throw! + + + + Calling this method always throws a . + + this parameter is never used + this parameter is never used + this parameter is never used + + + + Dispose the stream. + + + indicates whether the Dispose method was invoked by user code. + + + + + Close the stream. + + + + + Read n bits from input, right justifying the result. + + + + For example, if you read 1 bit, the result is either 0 + or 1. + + + + The number of bits to read, always between 1 and 32. + + + + Called by createHuffmanDecodingTables() exclusively. + + + Called by recvDecodingTables() exclusively. + + + + Dump the current state of the decompressor, to restore it in case of an error. + This allows the decompressor to be essentially "rewound" and retried when more + data arrives. + + This is only used by IronPython. + + The current state. + + + + Restore the internal compressor state if an error occurred. + + The old state. + + + + Indicates whether the stream can be read. + + + The return value depends on whether the captive stream supports reading. + + + + + Indicates whether the stream supports Seek operations. + + + Always returns false. + + + + + Indicates whether the stream can be written. + + + The return value depends on whether the captive stream supports writing. + + + + + Reading this property always throws a . + + + + + The position of the stream pointer. + + + + Setting this property always throws a . Reading will return the + total number of uncompressed bytes read in. + + + + + Compressor State + + + + Freq table collected to save a pass over the data during + decompression. + + + Initializes the tt array. + + This method is called when the required length of the array is known. + I don't initialize it at construction time to avoid unneccessary + memory allocation when compressing small files. + + + + A write-only decorator stream that compresses data as it is + written using the BZip2 algorithm. + + + + + Constructs a new BZip2OutputStream, that sends its + compressed output to the given output stream. + + + + The destination stream, to which compressed output will be sent. + + + + + This example reads a file, then compresses it with bzip2 file, + and writes the compressed data into a newly created file. + + + var fname = "logfile.log"; + using (var fs = File.OpenRead(fname)) + { + var outFname = fname + ".bz2"; + using (var output = File.Create(outFname)) + { + using (var compressor = new Ionic.BZip2.BZip2OutputStream(output)) + { + byte[] buffer = new byte[2048]; + int n; + while ((n = fs.Read(buffer, 0, buffer.Length)) > 0) + { + compressor.Write(buffer, 0, n); + } + } + } + } + + + + + + Constructs a new BZip2OutputStream with specified blocksize. + + the destination stream. + + The blockSize in units of 100000 bytes. + The valid range is 1..9. + + + + + Constructs a new BZip2OutputStream. + + the destination stream. + + whether to leave the captive stream open upon closing this stream. + + + + + Constructs a new BZip2OutputStream with specified blocksize, + and explicitly specifies whether to leave the wrapped stream open. + + + the destination stream. + + The blockSize in units of 100000 bytes. + The valid range is 1..9. + + + whether to leave the captive stream open upon closing this stream. + + + + + Close the stream. + + + + This may or may not close the underlying stream. Check the + constructors that accept a bool value. + + + + + + Flush the stream. + + + + + Write data to the stream. + + + + + Use the BZip2OutputStream to compress data while writing: + create a BZip2OutputStream with a writable output stream. + Then call Write() on that BZip2OutputStream, providing + uncompressed data as input. The data sent to the output stream will + be the compressed form of the input data. + + + + A BZip2OutputStream can be used only for Write() not for Read(). + + + + + The buffer holding data to write to the stream. + the offset within that data array to find the first byte to write. + the number of bytes to write. + + + + Calling this method always throws a . + + this is irrelevant, since it will always throw! + this is irrelevant, since it will always throw! + irrelevant! + + + + Calling this method always throws a . + + this is irrelevant, since it will always throw! + + + + Calling this method always throws a . + + this parameter is never used + this parameter is never used + this parameter is never used + never returns anything; always throws + + + + The blocksize parameter specified at construction time. + + + + + Indicates whether the stream can be read. + + + The return value is always false. + + + + + Indicates whether the stream supports Seek operations. + + + Always returns false. + + + + + Indicates whether the stream can be written. + + + The return value should always be true, unless and until the + object is disposed and closed. + + + + + Reading this property always throws a . + + + + + The position of the stream pointer. + + + + Setting this property always throws a . Reading will return the + total number of uncompressed bytes written through. + + + + + Computes a CRC-32. The CRC-32 algorithm is parameterized - you + can set the polynomial and enable or disable bit + reversal. This can be used for GZIP, BZip2, or ZIP. + + + This type is used internally by DotNetZip; it is generally not used + directly by applications wishing to create, read, or manipulate zip + archive files. + + + + + Returns the CRC32 for the specified stream. + + The stream over which to calculate the CRC32 + the CRC32 calculation + + + + Returns the CRC32 for the specified stream, and writes the input into the + output stream. + + The stream over which to calculate the CRC32 + The stream into which to deflate the input + the CRC32 calculation + + + + Get the CRC32 for the given (word,byte) combo. This is a + computation defined by PKzip for PKZIP 2.0 (weak) encryption. + + The word to start with. + The byte to combine it with. + The CRC-ized result. + + + + Update the value for the running CRC32 using the given block of bytes. + This is useful when using the CRC32() class in a Stream. + + block of bytes to slurp + starting point in the block + how many bytes within the block to slurp + + + + Process one byte in the CRC. + + the byte to include into the CRC . + + + + Process a run of N identical bytes into the CRC. + + + + This method serves as an optimization for updating the CRC when a + run of identical bytes is found. Rather than passing in a buffer of + length n, containing all identical bytes b, this method accepts the + byte value and the length of the (virtual) buffer - the length of + the run. + + + the byte to include into the CRC. + the number of times that byte should be repeated. + + + + Combines the given CRC32 value with the current running total. + + + This is useful when using a divide-and-conquer approach to + calculating a CRC. Multiple threads can each calculate a + CRC32 on a segment of the data, and then combine the + individual CRC32 values at the end. + + the crc value to be combined with this one + the length of data the CRC value was calculated on + + + + Create an instance of the CRC32 class using the default settings: no + bit reversal, and a polynomial of 0xEDB88320. + + + + + Create an instance of the CRC32 class, specifying whether to reverse + data bits or not. + + + specify true if the instance should reverse data bits. + + + + In the CRC-32 used by BZip2, the bits are reversed. Therefore if you + want a CRC32 with compatibility with BZip2, you should pass true + here. In the CRC-32 used by GZIP and PKZIP, the bits are not + reversed; Therefore if you want a CRC32 with compatibility with + those, you should pass false. + + + + + + Create an instance of the CRC32 class, specifying the polynomial and + whether to reverse data bits or not. + + + The polynomial to use for the CRC, expressed in the reversed (LSB) + format: the highest ordered bit in the polynomial value is the + coefficient of the 0th power; the second-highest order bit is the + coefficient of the 1 power, and so on. Expressed this way, the + polynomial for the CRC-32C used in IEEE 802.3, is 0xEDB88320. + + + specify true if the instance should reverse data bits. + + + + + In the CRC-32 used by BZip2, the bits are reversed. Therefore if you + want a CRC32 with compatibility with BZip2, you should pass true + here for the reverseBits parameter. In the CRC-32 used by + GZIP and PKZIP, the bits are not reversed; Therefore if you want a + CRC32 with compatibility with those, you should pass false for the + reverseBits parameter. + + + + + + Reset the CRC-32 class - clear the CRC "remainder register." + + + + Use this when employing a single instance of this class to compute + multiple, distinct CRCs on multiple, distinct data blocks. + + + + + + Indicates the total number of bytes applied to the CRC. + + + + + Indicates the current CRC for all blocks slurped in. + + + + + A Stream that calculates a CRC32 (a checksum) on all bytes read, + or on all bytes written. + + + + + This class can be used to verify the CRC of a ZipEntry when + reading from a stream, or to calculate a CRC when writing to a + stream. The stream should be used to either read, or write, but + not both. If you intermix reads and writes, the results are not + defined. + + + + This class is intended primarily for use internally by the + DotNetZip library. + + + + + + The default constructor. + + + + Instances returned from this constructor will leave the underlying + stream open upon Close(). The stream uses the default CRC32 + algorithm, which implies a polynomial of 0xEDB88320. + + + The underlying stream + + + + The constructor allows the caller to specify how to handle the + underlying stream at close. + + + + The stream uses the default CRC32 algorithm, which implies a + polynomial of 0xEDB88320. + + + The underlying stream + true to leave the underlying stream + open upon close of the CrcCalculatorStream; false otherwise. + + + + A constructor allowing the specification of the length of the stream + to read. + + + + The stream uses the default CRC32 algorithm, which implies a + polynomial of 0xEDB88320. + + + Instances returned from this constructor will leave the underlying + stream open upon Close(). + + + The underlying stream + The length of the stream to slurp + + + + A constructor allowing the specification of the length of the stream + to read, as well as whether to keep the underlying stream open upon + Close(). + + + + The stream uses the default CRC32 algorithm, which implies a + polynomial of 0xEDB88320. + + + The underlying stream + The length of the stream to slurp + true to leave the underlying stream + open upon close of the CrcCalculatorStream; false otherwise. + + + + A constructor allowing the specification of the length of the stream + to read, as well as whether to keep the underlying stream open upon + Close(), and the CRC32 instance to use. + + + + The stream uses the specified CRC32 instance, which allows the + application to specify how the CRC gets calculated. + + + The underlying stream + The length of the stream to slurp + true to leave the underlying stream + open upon close of the CrcCalculatorStream; false otherwise. + the CRC32 instance to use to calculate the CRC32 + + + + Read from the stream + + the buffer to read + the offset at which to start + the number of bytes to read + the number of bytes actually read + + + + Write to the stream. + + the buffer from which to write + the offset at which to start writing + the number of bytes to write + + + + Flush the stream. + + + + + Seeking is not supported on this stream. This method always throws + + + N/A + N/A + N/A + + + + This method always throws + + + N/A + + + + Closes the stream. + + + + + Gets the total number of bytes run through the CRC32 calculator. + + + + This is either the total number of bytes read, or the total number of + bytes written, depending on the direction of this stream. + + + + + Provides the current CRC for all blocks slurped in. + + + + The running total of the CRC is kept as data is written or read + through the stream. read this property after all reads or writes to + get an accurate CRC for the entire stream. + + + + + + Indicates whether the underlying stream will be left open when the + CrcCalculatorStream is Closed. + + + + Set this at any point before calling . + + + + + + Indicates whether the stream supports reading. + + + + + Indicates whether the stream supports seeking. + + + + Always returns false. + + + + + + Indicates whether the stream supports writing. + + + + + Returns the length of the underlying stream. + + + + + The getter for this property returns the total bytes read. + If you use the setter, it will throw + . + + + + + A write-only decorator stream that compresses data as it is + written using the BZip2 algorithm. This stream compresses by + block using multiple threads. + + + This class performs BZIP2 compression through writing. For + more information on the BZIP2 algorithm, see + . + + + + This class is similar to , + except that this implementation uses an approach that employs multiple + worker threads to perform the compression. On a multi-cpu or multi-core + computer, the performance of this class can be significantly higher than + the single-threaded BZip2OutputStream, particularly for larger streams. + How large? Anything over 10mb is a good candidate for parallel + compression. + + + + The tradeoff is that this class uses more memory and more CPU than the + vanilla BZip2OutputStream. Also, for small files, the + ParallelBZip2OutputStream can be much slower than the vanilla + BZip2OutputStream, because of the overhead associated to using the + thread pool. + + + + + + + Constructs a new ParallelBZip2OutputStream, that sends its + compressed output to the given output stream. + + + + The destination stream, to which compressed output will be sent. + + + + + This example reads a file, then compresses it with bzip2 file, + and writes the compressed data into a newly created file. + + + var fname = "logfile.log"; + using (var fs = File.OpenRead(fname)) + { + var outFname = fname + ".bz2"; + using (var output = File.Create(outFname)) + { + using (var compressor = new Ionic.BZip2.ParallelBZip2OutputStream(output)) + { + byte[] buffer = new byte[2048]; + int n; + while ((n = fs.Read(buffer, 0, buffer.Length)) > 0) + { + compressor.Write(buffer, 0, n); + } + } + } + } + + + + + + Constructs a new ParallelBZip2OutputStream with specified blocksize. + + the destination stream. + + The blockSize in units of 100000 bytes. + The valid range is 1..9. + + + + + Constructs a new ParallelBZip2OutputStream. + + the destination stream. + + whether to leave the captive stream open upon closing this stream. + + + + + Constructs a new ParallelBZip2OutputStream with specified blocksize, + and explicitly specifies whether to leave the wrapped stream open. + + + the destination stream. + + The blockSize in units of 100000 bytes. + The valid range is 1..9. + + + whether to leave the captive stream open upon closing this stream. + + + + + Close the stream. + + + + This may or may not close the underlying stream. Check the + constructors that accept a bool value. + + + + + + Flush the stream. + + + + + Write data to the stream. + + + + + Use the ParallelBZip2OutputStream to compress data while + writing: create a ParallelBZip2OutputStream with a writable + output stream. Then call Write() on that + ParallelBZip2OutputStream, providing uncompressed data as + input. The data sent to the output stream will be the compressed + form of the input data. + + + + A ParallelBZip2OutputStream can be used only for + Write() not for Read(). + + + + + The buffer holding data to write to the stream. + the offset within that data array to find the first byte to write. + the number of bytes to write. + + + + Calling this method always throws a . + + this is irrelevant, since it will always throw! + this is irrelevant, since it will always throw! + irrelevant! + + + + Calling this method always throws a . + + this is irrelevant, since it will always throw! + + + + Calling this method always throws a . + + this parameter is never used + this parameter is never used + this parameter is never used + never returns anything; always throws + + + + The maximum number of concurrent compression worker threads to use. + + + + + This property sets an upper limit on the number of concurrent worker + threads to employ for compression. The implementation of this stream + employs multiple threads from the .NET thread pool, via + ThreadPool.QueueUserWorkItem(), to compress the incoming data by + block. As each block of data is compressed, this stream re-orders the + compressed blocks and writes them to the output stream. + + + + A higher number of workers enables a higher degree of + parallelism, which tends to increase the speed of compression on + multi-cpu computers. On the other hand, a higher number of buffer + pairs also implies a larger memory consumption, more active worker + threads, and a higher cpu utilization for any compression. This + property enables the application to limit its memory consumption and + CPU utilization behavior depending on requirements. + + + + By default, DotNetZip allocates 4 workers per CPU core, subject to the + upper limit specified in this property. For example, suppose the + application sets this property to 16. Then, on a machine with 2 + cores, DotNetZip will use 8 workers; that number does not exceed the + upper limit specified by this property, so the actual number of + workers used will be 4 * 2 = 8. On a machine with 4 cores, DotNetZip + will use 16 workers; again, the limit does not apply. On a machine + with 8 cores, DotNetZip will use 16 workers, because of the limit. + + + + For each compression "worker thread" that occurs in parallel, there is + up to 2mb of memory allocated, for buffering and processing. The + actual number depends on the property. + + + + CPU utilization will also go up with additional workers, because a + larger number of buffer pairs allows a larger number of background + threads to compress in parallel. If you find that parallel + compression is consuming too much memory or CPU, you can adjust this + value downward. + + + + The default value is 16. Different values may deliver better or + worse results, depending on your priorities and the dynamic + performance characteristics of your storage and compute resources. + + + + The application can set this value at any time, but it is effective + only before the first call to Write(), which is when the buffers are + allocated. + + + + + + The blocksize parameter specified at construction time. + + + + + Indicates whether the stream can be read. + + + The return value is always false. + + + + + Indicates whether the stream supports Seek operations. + + + Always returns false. + + + + + Indicates whether the stream can be written. + + + The return value depends on whether the captive stream supports writing. + + + + + Reading this property always throws a . + + + + + The position of the stream pointer. + + + + Setting this property always throws a . Reading will return the + total number of uncompressed bytes written through. + + + + + The total number of bytes written out by the stream. + + + This value is meaningful only after a call to Close(). + + + + + Returns the "random" number at a specific index. + + the index + the random number + + + + Implementes a resource-based meta_path importer as described in PEP 302. + + + + + Instantiates a new meta_path importer using an embedded ZIP resource file. + + + + + + + zip_searchorder defines how we search for a module in the Zip + archive: we first search for a package __init__, then for + non-package .pyc, .pyo and .py entries. The .pyc and .pyo entries + are swapped by initzipimport() if we run in optimized mode. Also, + '/' is replaced by SEP there. + + + + + Given a path to a Zip file and a toc_entry, return the (uncompressed) + data as a new reference. + + + + + + + + Return the code object for the module named by 'fullname' from the + Zip archive as a new reference. + + + + + + + + + + + Given a path to a Zip archive, build a dict, mapping file names + (local to the archive, using SEP as a separator) to toc entries. + + A toc_entry is a tuple: + (__file__, # value to use for __file__, available for all files + compress, # compression kind; 0 for uncompressed + data_size, # size of compressed data on disk + file_size, # size of decompressed data + file_offset, # offset of file header from start of archive + time, # mod time of file (in dos format) + date, # mod data of file (in dos format) + crc, # crc checksum of the data + ) + Directories can be recognized by the trailing SEP in the name, + data_size and file_offset are 0. + + + + + + + Given a (sub)modulename, write the potential file path in the + archive (without extension) to the path buffer. + + + + + + + + Determines the type of module we have (package or module, or not found). + + + + + + + + Provides a StreamContentProvider for a stream of content backed by a file on disk. + + + + + This class represents adler32 checksum algorithm + + + + + This static method returns adler32 checksum of the buffer data + + + + + Implementation of the Deflate compression algorithm. + + + + + Maximum memory level + + + + + Defalult compression method + + + + + Default memory level + + + + + block not completed, need more input or more output + + + + + Block internalFlush performed + + + + + Finish started, need only more output at next deflate + + + + + finish done, accept no more input or output + + + + + preset dictionary flag in zlib header + + + + + The deflate compression method + + + + + The size of the buffer + + + + + repeat previous bit length 3-6 times (2 bits of repeat count) + + + + + repeat a zero length 3-10 times (3 bits of repeat count) + + + + + repeat a zero length 11-138 times (7 bits of repeat count) + + + + + Deflate class congiration table + + + + + Pointer back to this zlib stream + + + + + As the name implies + + + + + Output still pending + + + + + Size of Pending_buf + + + + + Next pending byte to output to the stream + + + + + Number of bytes in the pending buffer + + + + + suppress zlib header and adler32 + + + + + UNKNOWN, BINARY or ASCII + + + + + STORED (for zip only) or DEFLATED + + + + + Value of internalFlush parameter for previous deflate call + + + + + LZ77 Window size (32K by default) + + + + + log2(w_size) (8..16) + + + + + w_size - 1 + + + + + Sliding Window. Input bytes are ReadPos into the second half of the Window, + and move to the first half later to keep a dictionary of at least wSize + bytes. With this organization, matches are limited to a distance of + wSize-MAX_MATCH bytes, but this ensures that IO is always + performed with a length multiple of the block size. Also, it limits + the Window size to 64K, which is quite useful on MSDOS. + To do: use the user input buffer as sliding Window. + + + + + Actual size of Window: 2*wSize, except when the user input buffer is directly used as sliding Window. + + + + + Link to older string with same hash index. To limit the size of this + array to 64K, this link is maintained only for the last 32K strings. + An index in this array is thus a Window index modulo 32K. + + + + + Heads of the hash chains or NIL. + + + + + hash index of string to be inserted + + + + + number of elements in hash table + + + + + log2(hash_size) + + + + + hash_size-1 + + + + + Number of bits by which ins_h must be shifted at each input + step. It must be such that after MIN_MATCH steps, the oldest + byte no longer takes part in the hash key, that is: + hash_shift * MIN_MATCH >= hash_bits + + + + + Window position at the beginning of the current output block. Gets negative when the Window is moved backwards. + + + + + length of best match + + + + + previous match + + + + + set if previous match exists + + + + + start of string to insert + + + + + start of matching string + + + + + number of valid bytes ahead in Window + + + + + Length of the best match at previous step. Matches not greater than this + are discarded. This is used in the lazy match evaluation. + + + + + To speed up deflation, hash chains are never searched beyond this + length. A higher limit improves compression ratio but degrades the speed. + + + + + Attempt to find a better match only when the current match is strictly + smaller than this value. This mechanism is used only for compression + levels >= 4. + + + + + compression level (1..9) + + + + + favor or force Huffman coding + + + + + Use a faster search when the previous match is longer than this + + + + + Stop searching when current match exceeds this + + + + + literal and length tree + + + + + distance tree + + + + + Huffman tree for bit lengths + + + + + Desc for literal tree + + + + + desc for distance tree + + + + + desc for bit length tree + + + + + number of codes at each bit length for an optimal tree + + + + + heap used to build the Huffman trees + + + + + number of elements in the heap + + + + + element of largest frequency + + + + + Depth of each subtree used as tie breaker for trees of equal frequency + + + + + index for literals or lengths + + + + + Size of match buffer for literals/lengths. There are 4 reasons for + limiting lit_bufsize to 64K: + - frequencies can be kept in 16 bit counters + - if compression is not successful for the first block, all input + data is still in the Window so we can still emit a stored block even + when input comes from standard input. (This can also be done for + all blocks if lit_bufsize is not greater than 32K.) + - if compression is not successful for a file smaller than 64K, we can + even emit a stored file instead of a stored block (saving 5 bytes). + This is applicable only for zip (not gzip or zlib). + - creating new Huffman trees less frequently may not provide fast + adaptation to changes in the input data statistics. (Take for + example a binary file with poorly compressible code followed by + a highly compressible string table.) Smaller buffer sizes give + fast adaptation but have of course the overhead of transmitting + trees more frequently. + - I can't count above 4 + + + + + running index in l_buf + + + + + index of pendig_buf + + + + + bit length of current block with optimal trees + + + + + bit length of current block with static trees + + + + + number of string matches in current block + + + + + bit length of EOB code for last block + + + + + Output buffer. bits are inserted starting at the bottom (least + significant bits). + + + + + Number of valid bits in bi_buf. All bits above the last valid bit + are always zero. + + + + + Default constructor + + + + + Initialization + + + + + Initialize the tree data structures for a new zlib stream. + + + + + Initializes block + + + + + Restore the heap property by moving down the tree starting at node k, + exchanging a node with the smallest of its two sons if necessary, stopping + when the heap property is re-established (each father smaller than its + two sons). + + + + + Scan a literal or distance tree to determine the frequencies of the codes + in the bit length tree. + + + + + Construct the Huffman tree for the bit lengths and return the index in + bl_order of the last bit length code to send. + + + + + Send the header for a block using dynamic Huffman trees: the counts, the + lengths of the bit length codes, the literal tree and the distance tree. + IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. + + + + + Send a literal or distance tree in compressed form, using the codes in + bl_tree. + + + + + Output a byte on the stream. + IN assertion: there is enough room in Pending_buf. + + + + + Adds a byte to the buffer + + + + + Send one empty static block to give enough lookahead for inflate. + This takes 10 bits, of which 7 may remain in the bit buffer. + The current inflate code requires 9 bits of lookahead. If the + last two codes for the previous block (real code plus EOB) were coded + on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode + the last real code. In this case we send two empty static blocks instead + of one. (There are no problems if the previous block is stored or fixed.) + To simplify the code, we assume the worst case of last real code encoded + on one bit only. + + + + + Save the match info and tally the frequency counts. Return true if + the current block must be flushed. + + + + + Send the block data compressed using the given Huffman trees + + + + + Set the data type to ASCII or BINARY, using a crude approximation: + binary if more than 20% of the bytes are <= 6 or >= 128, ascii otherwise. + IN assertion: the fields freq of dyn_ltree are set and the total of all + frequencies does not exceed 64K (to fit in an int on 16 bit machines). + + + + + Flush the bit buffer, keeping at most 7 bits in it. + + + + + Flush the bit buffer and align the output on a byte boundary + + + + + Copy a stored block, storing first the length and its + one's complement if requested. + + + + + Flushes block + + + + + Copy without compression as much as possible from the input stream, return + the current block state. + This function does not insert new strings in the dictionary since + uncompressible data is probably not useful. This function is used + only for the level=0 compression option. + NOTE: this function should be optimized to avoid extra copying from + Window to Pending_buf. + + + + + Send a stored block + + + + + Determine the best encoding for the current block: dynamic trees, static + trees or store, and output the encoded block to the zip file. + + + + + Fill the Window when the lookahead becomes insufficient. + Updates strstart and lookahead. + + IN assertion: lookahead less than MIN_LOOKAHEAD + OUT assertions: strstart less than or equal to window_size-MIN_LOOKAHEAD + At least one byte has been ReadPos, or _avail_in == 0; reads are + performed for at least two bytes (required for the zip translate_eol + option -- not supported here). + + + + + Compress as much as possible from the input stream, return the current + block state. + This function does not perform lazy evaluation of matches and inserts + new strings in the dictionary only for unmatched strings or for short + matches. It is used only for the fast compression options. + + + + + Same as above, but achieves better compression. We use a lazy + evaluation for matches: a match is finally adopted only if there is + no better match at the next Window position. + + + + + Finds the longest matching data part + + + + + Deflate algorithm initialization + + ZStream object + Compression level + Window bits + A result code + + + + Initializes deflate algorithm + + ZStream object + Compression level + Operation result result code + + + + Deflate algorithm initialization + + ZStream object + Compression level + Compression method + Window bits + Memory level + Compression strategy + Operation result code + + + + Resets the current state of deflate object + + + + + Finish compression with deflate algorithm + + + + + Sets deflate algorithm parameters + + + + + Sets deflate dictionary + + + + + Performs data compression with the deflate algorithm + + + + + Static constructor initializes config_table + + + + + Compression level + + + + + Number of bytes in the pending buffer + + + + + Output still pending + + + + + Next pending byte to output to the stream + + + + + suppress zlib header and adler32 + + + + + Deflate algorithm configuration parameters class + + + + + reduce lazy search above this match length + + + + + do not perform lazy search above this match length + + + + + quit search above this match length + + + + + Constructor which initializes class inner fields + + + + + current inflate_block mode + + + + + if STORED, bytes left to copy + + + + + table lengths (14 bits) + + + + + index into blens (or border) + + + + + bit lengths of codes + + + + + bit length tree depth + + + + + bit length decoding tree + + + + + if CODES, current state + + + + + true if this block is the last block + + + + + bits in bit buffer + + + + + bit buffer + + + + + single malloc for tree space + + + + + sliding Window + + + + + one byte after sliding Window + + + + + Window ReadPos pointer + + + + + Window WritePos pointer + + + + + need check + + + + + check on output + + + + + Resets this InfBlocks class instance + + + + + Block processing functions + + + + + Frees inner buffers + + + + + Sets dictionary + + + + + Returns true if inflate is currently at the End of a block generated + by Z_SYNC_FLUSH or Z_FULL_FLUSH. + + + + + copy as much as possible from the sliding Window to the output area + + + + + sliding window + + + + + one byte after sliding Window + + + + + Window ReadPos pointer + + + + + Window WritePos pointer + + + + + bits in bit buffer + + + + + bit buffer + + + + + Inflate codes mode + + + + + This class is used by the InfBlocks class + + + + + current inflate_codes mode + + + + + length + + + + + pointer into tree + + + + + current index of the tree + + + + + + + + + + ltree bits decoded per branch + + + + + dtree bits decoded per branch + + + + + literal/length/eob tree + + + + + literal/length/eob tree index + + + + + distance tree + + + + + distance tree index + + + + + Constructor which takes literal, distance trees, corresponding bites decoded for branches, corresponding indexes and a ZStream object + + + + + Constructor which takes literal, distance trees, corresponding bites decoded for branches and a ZStream object + + + + + Block processing method + + An instance of the InfBlocks class + A ZStream object + A result code + + + + Frees allocated resources + + + + + Fast inflate procedure. Called with number of bytes left to WritePos in Window at least 258 + (the maximum string length) and number of input bytes available + at least ten. The ten bytes are six bytes for the longest length/ + distance pair plus four bytes for overloading the bit buffer. + + + + + This enumeration contains modes of inflate processing + + + + + waiting for method byte + + + + + waiting for flag byte + + + + + four dictionary check bytes to go + + + + + three dictionary check bytes to go + + + + + two dictionary check bytes to go + + + + + one dictionary check byte to go + + + + + waiting for inflateSetDictionary + + + + + decompressing blocks + + + + + four check bytes to go + + + + + three check bytes to go + + + + + two check bytes to go + + + + + one check byte to go + + + + + finished check, done + + + + + got an error--stay here + + + + + current inflate mode + + + + + if FLAGS, method byte + + + + + computed check value + + + + + stream check value + + + + + if BAD, inflateSync's marker bytes count + + + + + flag for no wrapper + + + + + log2(Window size) (8..15, defaults to 15) + + + + + current inflate_blocks state + + + + + Resets the Inflate algorithm + + A ZStream object + A result code + + + + Finishes the inflate algorithm processing + + A ZStream object + Operation result code + + + + Initializes the inflate algorithm + + A ZStream object + Window size + Operation result code + + + + Runs inflate algorithm + + A ZStream object + Flush strategy + Operation result code + + + + Sets dictionary for the inflate operation + + A ZStream object + An array of byte - dictionary + Dictionary length + Operation result code + + + + Inflate synchronization + + A ZStream object + Operation result code + + + + Returns true if inflate is currently at the End of a block generated + by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP + implementation to provide an additional safety check. PPP uses Z_SYNC_FLUSH + but removes the length bytes of the resulting empty stored block. When + decompressing, PPP checks that at the End of input packet, inflate is + waiting for these length bytes. + + + + + Contains utility information for the InfTree class + + + + + Given a list of code lengths and a maximum table size, make a set of + tables to decode that set of codes. + + Return (int)ZLibResultCode.Z_OK on success, (int)ZLibResultCode.Z_DATA_ERROR if the given code set is incomplete (the tables are still built in this case), (int)ZLibResultCode.Z_DATA_ERROR if the input is invalid (an over-subscribed set of lengths), or (int)ZLibResultCode.Z_DATA_ERROR if not enough memory. + + + + + Build trees + + + + + Builds dynamic trees + + + + + Build fixed trees + + + + + Bit length codes must not exceed MAX_BL_BITS bits + + + + + This class represents a tree and is used in the Deflate class + + + + + The dynamic tree + + + + + Largest code with non zero frequency + + + + + the corresponding static tree + + + + + Mapping from a distance to a distance code. dist is the distance - 1 and + must not have side effects. _dist_code[256] and _dist_code[257] are never + used. + + + + + Compute the optimal bit lengths for a tree and update the total bit length + for the current block. + IN assertion: the fields freq and dad are set, heap[heap_max] and + above are the tree nodes sorted by increasing frequency. + OUT assertions: the field count is set to the optimal bit length, the + array bl_count contains the frequencies for each bit length. + The length opt_len is updated; static_len is also updated if stree is + not null. + + + + + Construct one Huffman tree and assigns the code bit strings and lengths. + Update the total bit length for the current block. + IN assertion: the field freq is set for all tree elements. + OUT assertions: the fields count and code are set to the optimal bit length + and corresponding code. The length opt_len is updated; static_len is + also updated if stree is not null. The field max_code is set. + + + + + Generate the codes for a given tree and bit counts (which need not be + optimal). + IN assertion: the array bl_count contains the bit length statistics for + the given tree and the field count is set for all tree elements. + OUT assertion: the field code is set for all tree elements of non + zero code length. + + + + + Reverse the first count bits of a code, using straightforward code (a faster + method would use a table) + + + + + The dynamic tree + + + + + Largest code with non zero frequency + + + + + the corresponding static tree + + + + + Some constants for specifying compression levels. Methods which takes a compression level as a parameter expects an integer value from 0 to 9. You can either specify an integer value or use constants for some most widely used compression levels. + + + + + No compression should be used at all. + + + + + Minimal compression, but greatest speed. + + + + + Maximum compression, but slowest. + + + + + Select default compression level (good compression, good speed). + + + + + Compression strategies. The strategy parameter is used to tune the compression algorithm. The strategy parameter only affects the compression ratio but not the correctness of the compressed output even if it is not set appropriately. + + + + + This strategy is designed for filtered data. Data which consists of mostly small values, with random distribution should use Z_FILTERED. With this strategy, less string matching is performed. + + + + + Z_HUFFMAN_ONLY forces Huffman encoding only (no string match) + + + + + The default strategy is the most commonly used. With this strategy, string matching and huffman compression are balanced. + + + + + Flush strategies + + + + + Do not internalFlush data, but just write data as normal to the output buffer. This is the normal way in which data is written to the output buffer. + + + + + Obsolete. You should use Z_SYNC_FLUSH instead. + + + + + All pending output is flushed to the output buffer and the output is aligned on a byte boundary, so that the decompressor can get all input data available so far. + + + + + All output is flushed as with Z_SYNC_FLUSH, and the compression state is reset so that decompression can restart from this point if previous compressed data has been damaged or if random access is desired. Using Z_FULL_FLUSH too often can seriously degrade the compression. ZLib_InflateSync will locate points in the compression string where a full has been performed. + + + + + Notifies the module that the input has now been exhausted. Pending input is processed, pending output is flushed and calls return with Z_STREAM_END if there was enough output space. + + + + + Results of operations in ZLib library + + + + + No failure was encountered, the operation completed without problem. + + + + + No failure was encountered, and the input has been exhausted. + + + + + A preset dictionary is required for decompression of the data. + + + + + An internal error occurred + + + + + The stream structure was inconsistent + + + + + Input data has been corrupted (for decompression). + + + + + Memory allocation failed. + + + + + There was not enough space in the output buffer. + + + + + The version supplied does not match that supported by the ZLib module. + + + + + States of deflate operation + + + + + Data block types, i.e. binary or ascii text + + + + + Helper class + + + + + Max Window size + + + + + preset dictionary flag in zlib header + + + + + The size of the buffer + + + + + Deflate compression method index + + + + + see definition of array dist_code below + + + + + This method returns the literal value received + + The literal to return + The received value + + + + This method returns the literal value received + + The literal to return + The received value + + + + This method returns the literal value received + + The literal to return + The received value + + + + This method returns the literal value received + + The literal to return + The received value + + + + Performs an unsigned bitwise right shift with the specified number + + Number to operate on + Ammount of bits to shift + The resulting number from the shift operation + + + + Performs an unsigned bitwise right shift with the specified number + + Number to operate on + Ammount of bits to shift + The resulting number from the shift operation + + + + Performs an unsigned bitwise right shift with the specified number + + Number to operate on + Ammount of bits to shift + The resulting number from the shift operation + + + + Performs an unsigned bitwise right shift with the specified number + + Number to operate on + Ammount of bits to shift + The resulting number from the shift operation + + + Reads a number of characters from the current source Stream and writes the data to the target array at the specified index. + The source Stream to ReadPos from. + Contains the array of characters ReadPos from the source Stream. + The starting index of the target array. + The maximum number of characters to ReadPos from the source Stream. + The number of characters ReadPos. The number will be less than or equal to count depending on the data available in the source Stream. Returns -1 if the End of the stream is reached. + + + Reads a number of characters from the current source TextReader and writes the data to the target array at the specified index. + The source TextReader to ReadPos from + Contains the array of characteres ReadPos from the source TextReader. + The starting index of the target array. + The maximum number of characters to ReadPos from the source TextReader. + The number of characters ReadPos. The number will be less than or equal to count depending on the data available in the source TextReader. Returns -1 if the End of the stream is reached. + + + + Converts a string to an array of bytes + + The string to be converted + The new array of bytes + + + + Converts an array of bytes to an array of chars + + The array of bytes to convert + The new array of chars + + + + Copies large array which was passed as srcBuf to the Initialize method into the destination array which were passes as destBuff + + The number of bytes copied + + + + ZStream is used to store user data to compress/decompress. + + + + + Maximum memory level + + + + + Next input byte array + + + + + Index of the first byte in the input array. + + + + + Number of bytes available at _next_in + + + + + total nb of input bytes ReadPos so far + + + + + Byte array for the next output block + + + + + Index of the first byte in the _next_out array + + + + + Remaining free space at _next_out + + + + + Total number of bytes in output array + + + + + A string to store operation result message (corresponding to result codes) + + + + + A deflate object to perform data compression + + + + + Inflate object to perform data decompression + + + + + Best guess about the data type: ascii or binary + + + + + A checksum computed with Adler algorithm + + + + + Initializes the internal stream state for decompression. The fields , must be + initialized before by the caller. If is not null and is large + enough (the exact value depends on the compression method), determines the compression + method from the ZLib header and allocates all data structures accordingly; otherwise the allocation will be deferred + to the first call of . + + + inflateInit returns if success, if there was not enough memory, + if the ZLib library version is incompatible with the version assumed by the caller. + is set to null if there is no error message. does not perform any decompression + apart from reading the ZLib header if present: this will be done by . (So and + may be modified, but and are unchanged.) + + + + + This is another version of with an extra parameter. The fields , must be + initialized before by the caller. If is not null and is large enough + (the exact value depends on the compression method), determines the compression method from + the ZLib header and allocates all data structures accordingly; otherwise the allocation will be deferred to the first + call of . + + The windowBits parameter is the base two logarithm of the maximum window size (the size of the history buffer). + It should be in the range 8..15 for this version of the library. The default value is 15 if is used instead. + If a compressed stream with a larger window size is given as input, will return with the error code + instead of trying to allocate a larger window. + + inflateInit returns if success, if there was not enough memory, + if a parameter is invalid (such as a negative memLevel). is set to null + if there is no error message. does not perform any decompression apart from reading the ZLib header + if present: this will be done by . (So and may be modified, + but and are unchanged.) + + + + + This method decompresses as much data as possible, and stops when the input buffer () becomes empty or + the output buffer () becomes full. It may some introduce some output latency (reading input without producing any output) + except when forced to flush. + The detailed semantics are as follows. performs one or both of the following actions: + + + Decompress more input starting at and update and + accordingly. If not all input can be processed (because there is not enough room in the output buffer), is updated and + processing will resume at this point for the next call of . + Provide more output starting at and update and + accordingly. provides as much output as possible, until there is no more input data or no more space in + the output buffer (see below about the parameter). + + + + Flush strategy to use. + + Before the call of , the application should ensure that at least one of the actions is possible, by providing + more input and/or consuming more output, and updating the next_* and avail_* values accordingly. The application can consume the uncompressed + output when it wants, for example when the output buffer is full (avail_out == 0), or after each call of . + If returns and with zero , it must be called again + after making room in the output buffer because there might be more output pending. + If the parameter is set to , flushes + as much output as possible to the output buffer. The flushing behavior of is not specified for values of + the parameter other than and , + but the current implementation actually flushes as much output as possible anyway. + should normally be called until it returns or an error. + However if all decompression is to be performed in a single step (a single call of inflate), the parameter + should be set to . In this case all pending input is processed and all pending output is flushed; + must be large enough to hold all the uncompressed data. (The size of the uncompressed data may have been + saved by the compressor for this purpose.) The next operation on this stream must be to deallocate the decompression + state. The use of is never required, but can be used to inform that a faster + routine may be used for the single call. + If a preset dictionary is needed at this point (see ), sets strm-adler + to the adler32 checksum of the dictionary chosen by the compressor and returns ; otherwise it + sets strm->adler to the adler32 checksum of all output produced so far (that is, bytes) and returns + , or an error code as described below. At the end of the stream, + ) checks that its computed adler32 checksum is equal to that saved by the compressor and returns + only if the checksum is correct. + + + returns if some progress has been made (more input processed or more output produced), + if the end of the compressed data has been reached and all uncompressed output has been produced, + if a preset dictionary is needed at this point, if + the input data was corrupted (input stream not conforming to the ZLib format or incorrect adler32 checksum), + if the stream structure was inconsistent (for example if or + was null), if there was not enough memory, + if no progress is possible or if there was not enough room in the output buffer + when is used. In the case, the application + may then call to look for a good compression block. + + + + + All dynamically allocated data structures for this stream are freed. This function discards any unprocessed input and does not flush any + pending output. + + + inflateEnd returns if success, + if the stream state was inconsistent. In the error case, msg may be set but then points to a static string (which must not be deallocated). + + + + + Skips invalid compressed data until a full flush point (see the description of deflate with Z_FULL_FLUSH) can be found, + or until all available input is skipped. No output is provided. + + + returns if a full flush point has been found, + if no more input was provided, if no flush point has been found, or + if the stream structure was inconsistent. In the success case, the application may save the current + current value of which indicates where valid compressed data was found. In the error case, the application may repeatedly + call , providing more input each time, until success or end of the input data. + + + + + Initializes the decompression dictionary from the given uncompressed byte sequence. This function must be called immediately after a call of if this call returned . The dictionary chosen by the compressor can be determined from the Adler32 value returned by this call of . The compressor and decompresser must use exactly the same dictionary. + + A byte array - a dictionary. + The length of the dictionary. + + inflateSetDictionary returns if success, if a parameter is invalid (such as null dictionary) or the stream state is inconsistent, if the given dictionary doesn't match the expected one (incorrect Adler32 value). inflateSetDictionary does not perform any decompression: this will be done by subsequent calls of . + + + + + Initializes the internal stream state for compression. + + An integer value from 0 to 9 indicating the desired compression level. + + deflateInit returns if success, if there was not enough memory, + if level is not a valid compression level. is set to null if there is + no error message. does not perform any compression: this will be done by . + + + + + Initializes the internal stream state for compression. + + An integer value from 0 to 9 indicating the desired compression level. + The windowBits parameter is the base two logarithm of the window size (the size of the history buffer). It should be in the + range 8..15 for this version of the library. Larger values of this parameter result in better compression at the expense of memory usage. + The default value is 15 if deflateInit is used instead. + + deflateInit returns if success, if there was not enough memory, + if level is not a valid compression level. is set to null if there + is no error message. does not perform any compression: this will be done by . + + + + + Deflate compresses as much data as possible, and stops when the input buffer becomes empty or the + output buffer becomes full. It may introduce some output latency (reading input without producing any output) + except when forced to flush. + The detailed semantics are as follows. deflate performs one or both of the following actions: + + Compress more input starting at and update and accordingly. + If not all input can be processed (because there is not enough room in the output buffer), and + are updated and processing will resume at this point for the next call of . + Provide more output starting at and update and accordingly. + This action is forced if the parameter flush is non zero. Forcing flush frequently degrades the compression ratio, so this parameter should + be set only when necessary (in interactive applications). Some output may be provided even if flush is not set. + + + + The flush strategy to use. + + + Before the call of , the application should ensure that at least one of the actions is possible, by providing + more input and/or consuming more output, and updating or accordingly ; + should never be zero before the call. The application can consume the compressed output when it wants, for example when the output buffer is full + (avail_out == 0), or after each call of . If returns + and with zero , it must be called again after making room in the output buffer because there might be more output pending. + + + If the parameter is set to , all pending output is flushed to the + output buffer and the output is aligned on a byte boundary, so that the decompressor can get all input + data available so far. (In particular is zero after the call if enough output space has been provided before the call.) + Flushing may degrade compression for some compression algorithms and so it should be used only when necessary. + + + If flush is set to , all output is flushed as with , + and the compression state is reset so that decompression can restart from this point if previous compressed data has been damaged or if + random access is desired. Using too often can seriously degrade the compression. + + + + + If deflate returns with == 0, this function must be called again with the same value of the flush + parameter and more output space (updated ), until the flush is complete ( returns with + non-zero ). + + + If the parameter is set to , pending input is processed, pending + output is flushed and deflate returns with if there was enough output space ; + if deflate returns with , this function must be called again with + and more output space (updated ) but no more input data, until it returns with + or an error. After deflate has returned , the only possible operation on the stream is + . + + can be used immediately after if all the compression is to be + done in a single step. In this case, avail_out must be at least 0.1% larger than avail_in plus 12 bytes. If deflate does not return + Z_STREAM_END, then it must be called again as described above. + + + sets strm-> adler to the adler32 checksum of all input read so far (that is, bytes). + + + may update data_type if it can make a good guess about the input data type (Z_ASCII or Z_BINARY). + In doubt, the data is considered binary. This field is only for information purposes and does not affect the compression algorithm in any manner. + + + returns if some progress has been made (more input processed or more output produced), + if all input has been consumed and all output has been produced (only when flush is set to + ), if the stream state was inconsistent (for example if + or was null), if no progress is possible + (for example or was zero). + + + + + + All dynamically allocated data structures for this stream are freed. This function discards any unprocessed input and does not flush any pending + output. + + + deflateEnd returns if success, if the stream state was inconsistent, + if the stream was freed prematurely (some input or output was discarded). In the error case, + may be set but then points to a static string (which must not be deallocated). + + + + + Dynamically update the compression level and compression strategy. The interpretation of level is as in . + This can be used to switch between compression and straight copy of the input data, or to switch to a different kind of input data + requiring a different strategy. If the compression level is changed, the input available so far is compressed with the old level + (and may be flushed); the new level will take effect only at the next call of + + An integer value indicating the desired compression level. + A flush strategy to use. + + Before the call of , the stream state must be set as for a call of , since the + currently available input may have to be compressed and flushed. In particular, must be non-zero. + + + deflateParams returns if success, if the source stream + state was inconsistent or if a parameter was invalid, if was zero. + + + + + Initializes the compression dictionary from the given byte sequence without producing any compressed output. This function must be called + immediately after , before any call of . The compressor and decompressor must use + exactly the same dictionary (see ). + + A byte array - a dictionary. + The length of the dictionary byte array + + + The dictionary should consist of strings (byte sequences) that are likely to be encountered later in the data to be compressed, + with the most commonly used strings preferably put towards the end of the dictionary. Using a dictionary is most useful when the data + to be compressed is short and can be predicted with good accuracy; the data can then be compressed better than with the default empty dictionary. + + Depending on the size of the compression data structures selected by , a part of the dictionary may + in effect be discarded, for example if the dictionary is larger than the window size in . Thus the strings most likely + to be useful should be put at the end of the dictionary, not at the front. + Upon return of this function, adler is set to the Adler32 value of the dictionary; the decompresser may later use this value to determine + which dictionary has been used by the compressor. (The Adler32 value applies to the whole dictionary even if only a subset of the dictionary + is actually used by the compressor.) + + + deflateSetDictionary returns if success, or if a parameter + is invalid (such as null dictionary) or the stream state is inconsistent (for example if has already been + called for this stream or if the compression method is bsort). does not perform any compression: + this will be done by . + + + + + Flush as much pending output as possible. All output goes through this function so some applications may wish to + modify it to avoid allocating a large buffer and copying into it. + + + + + + Read a new buffer from the current input stream, update the adler32 and total number of bytes read. All input goes + through this function so some applications may wish to modify it to avoid allocating a large buffer and copying from it. + + + + + + Frees all inner buffers. + + + + + Adler-32 value for uncompressed data processed so far. + + + + + Best guess about the data type: ascii or binary + + + + + Gets/Sets the next input byte array. + + + + + Index of the first byte in the input array. + + + + + Gets/Sets the number of bytes available in the input buffer. + + + + + Gets/Sets the total number of bytes in the input buffer. + + + + + Gets/Sets the buffer for the next output data. + + + + + Gets/Sets the index of the first byte in the byte array to write to. + + + + + Gets/Sets the remaining free space in the buffer. + + + + + Gets/Sets the total number of bytes in the output array. + + + + + Gets sets the last error message occurred during class operations. + + + + + A deflate object to perform data compression + + + + + Inflate object to perform data decompression + + + + + Exceptions that occur in ZStream + + + + + Default constructor. + + + + + Constructor which takes one parameter - an error message + + + + + Creates an optimized encoding mapping that can be consumed by an optimized version of charmap_encode. + + + + + Decodes the input string using the provided string mapping. + + + + + Encodes the input string with the specified optimized encoding map. + + + + + Optimied encoding mapping that can be consumed by charmap_encode. + + + + + Provides helper functions which need to be called from generated code to implement various + portions of modules. + + + + + Convert string or bytes into bytes + + + + + Convert most bytearray-like objects into IList of byte + + + + + BytesIO([initializer]) -> object + + Create a buffered I/O implementation using an in-memory bytes + buffer, ready for reading and writing. + + + + + close() -> None. Disable all I/O operations. + + + + + getvalue() -> bytes. + + Retrieve the entire contents of the BytesIO object. + + + + + True if the file is closed. + + + + + Read and decode the next chunk from the buffered reader. Returns true if EOF was + not reached. Places decoded string in _decodedChars. + + + + + Remove all 'b's from mode string to simplify parsing + + + + + Walks the queue calling back to the specified delegate for + each populated index in the queue. + + + + + Throw TypeError with a specified message if object isn't callable. + + + + + Convert object to ushort, throwing ValueError on overflow. + + + + + Interface for "file-like objects" that implement the protocol needed by load() and friends. + This enables the creation of thin wrappers that make fast .NET types and slow Python types look the same. + + + + + Interface for "file-like objects" that implement the protocol needed by dump() and friends. + This enables the creation of thin wrappers that make fast .NET types and slow Python types look the same. + + + + + Call the appropriate reduce method for obj and pickle the object using + the resulting data. Use the first available of + copy_reg.dispatch_table[type(obj)], obj.__reduce_ex__, and obj.__reduce__. + + + + + Pickle the result of a reduce function. + + Only context, obj, func, and reduceCallable are required; all other arguments may be null. + + + + + Write value in pickle decimalnl_short format. + + + + + Write value in pickle float8 format. + + + + + Write value in pickle uint1 format. + + + + + Write value in pickle uint2 format. + + + + + Write value in pickle int4 format. + + + + + Write value in pickle decimalnl_short format. + + + + + Write value in pickle decimalnl_short format. + + + + + Write value in pickle decimalnl_long format. + + + + + Write value in pickle unicodestringnl format. + + + + + Write value in pickle unicodestring4 format. + + + + + Write value in pickle stringnl_noescape_pair format. + + + + + Return true if value is appropriate for formatting in pickle uint1 format. + + + + + Return true if value is appropriate for formatting in pickle uint2 format. + + + + + Return true if value is appropriate for formatting in pickle int4 format. + + + + + Emit a series of opcodes that will set append all items indexed by iter + to the object at the top of the stack. Use APPENDS if possible, but + append no more than BatchSize items at a time. + + + + + Emit a series of opcodes that will set all (key, value) pairs indexed by + iter in the object at the top of the stack. Use SETITEMS if possible, + but append no more than BatchSize items at a time. + + + + + Emit a series of opcodes that will set all (key, value) pairs indexed by + iter in the object at the top of the stack. Use SETITEMS if possible, + but append no more than BatchSize items at a time. + + + + + Find the module for obj and ensure that obj is reachable in that module by the given name. + + Throw PicklingError if any of the following are true: + - The module couldn't be determined. + - The module couldn't be loaded. + - The given name doesn't exist in the module. + - The given name is a different object than obj. + + Otherwise, return the name of the module. + + To determine which module obj lives in, obj.__module__ is used if available. The + module named by obj.__module__ is loaded if needed. If obj has no __module__ + attribute, then each loaded module is searched. If a loaded module has an + attribute with the given name, and that attribute is the same object as obj, + then that module is used. + + + + + Interpret everything from markIndex to the top of the stack as a sequence + of key, value, key, value, etc. Set dict[key] = value for each. Pop + everything from markIndex up when done. + + + + + Used to check the type to see if we can do a comparison. Returns true if we can + or false if we should return NotImplemented. May throw if the type's really wrong. + + + + + Helper function for doing the comparisons. time has no __cmp__ method + + + + + Base class used for iterator wrappers. + + + + + Returns the dialects from the code context. + + + + + + + Populates the given directory w/ the locale information from the given + CultureInfo. + + + + + Error function on real values + + + + + Complementary error function on real values: erfc(x) = 1 - erf(x) + + + + + Gamma function on real values + + + + + Natural log of absolute value of Gamma function + + + + + Checks for the specific permissions, provided by the mode parameter, are available for the provided path. Permissions can be: + + F_OK: Check to see if the file exists + R_OK | W_OK | X_OK: Check for the specific permissions. Only W_OK is respected. + + + + + single instance of environment dictionary is shared between multiple runtimes because the environment + is shared by multiple runtimes. + + + + + lstat(path) -> stat result + Like stat(path), but do not follow symbolic links. + + + + + spawns a new process. + + If mode is nt.P_WAIT then then the call blocks until the process exits and the return value + is the exit code. + + Otherwise the call returns a handle to the process. The caller must then call nt.waitpid(pid, options) + to free the handle and get the exit code of the process. Failure to call nt.waitpid will result + in a handle leak. + + + + + spawns a new process. + + If mode is nt.P_WAIT then then the call blocks until the process exits and the return value + is the exit code. + + Otherwise the call returns a handle to the process. The caller must then call nt.waitpid(pid, options) + to free the handle and get the exit code of the process. Failure to call nt.waitpid will result + in a handle leak. + + + + + spawns a new process. + + If mode is nt.P_WAIT then then the call blocks until the process exits and the return value + is the exit code. + + Otherwise the call returns a handle to the process. The caller must then call nt.waitpid(pid, options) + to free the handle and get the exit code of the process. Failure to call nt.waitpid will result + in a handle leak. + + + + + spawns a new process. + + If mode is nt.P_WAIT then then the call blocks until the process exits and the return value + is the exit code. + + Otherwise the call returns a handle to the process. The caller must then call nt.waitpid(pid, options) + to free the handle and get the exit code of the process. Failure to call nt.waitpid will result + in a handle leak. + + + + + Copy elements from a Python mapping of dict environment variables to a StringDictionary. + + + + + Convert a sequence of args to a string suitable for using to spawn a process. + + + + + Python regular expression module. + + + + + Preparses a regular expression text returning a ParsedRegex class + that can be used for further regular expressions. + + + + + Compiled reg-ex pattern + + + + + Process a sequence of objects that are compatible with ObjectToSocket(). Return two + things as out params: an in-order List of sockets that correspond to the original + objects in the passed-in sequence, and a mapping of these socket objects to their + original objects. + + The socketToOriginal mapping is generated because the CPython select module supports + passing to select either file descriptor numbers or an object with a fileno() method. + We try to be faithful to what was originally requested when we return. + + + + + Return the System.Net.Sockets.Socket object that corresponds to the passed-in + object. obj can be a System.Net.Sockets.Socket, a PythonSocket.SocketObj, a + long integer (representing a socket handle), or a Python object with a fileno() + method (whose result is used to look up an existing PythonSocket.SocketObj, + which is in turn converted to a Socket. + + + + + Convert an object to a 32-bit integer. This adds two features to Converter.ToInt32: + 1. Sign is ignored. For example, 0xffff0000 converts to 4294901760, where Convert.ToInt32 + would throw because 0xffff0000 is less than zero. + 2. Overflow exceptions are thrown. Converter.ToInt32 throws TypeError if x is + an integer, but is bigger than 32 bits. Instead, we throw OverflowException. + + + + + Convert an object to a 16-bit integer. This adds two features to Converter.ToInt16: + 1. Sign is ignored. For example, 0xff00 converts to 65280, where Convert.ToInt16 + would throw because signed 0xff00 is -256. + 2. Overflow exceptions are thrown. Converter.ToInt16 throws TypeError if x is + an integer, but is bigger than 16 bits. Instead, we throw OverflowException. + + + + + Return a standard socket exception (socket.error) whose message and error code come from a SocketException + This will eventually be enhanced to generate the correct error type (error, herror, gaierror) based on the error code. + + + + + Convert an IPv6 address byte array to a string in standard colon-hex notation. + The .NET IPAddress.ToString() method uses dotted-quad for the last 32 bits, + which differs from the normal Python implementation (but is allowed by the IETF); + this method returns the standard (no dotted-quad) colon-hex form. + + + + + Handle conversion of "" to INADDR_ANY and "<broadcast>" to INADDR_BROADCAST. + Otherwise returns host unchanged. + + + + + Return the IP address associated with host, with optional address family checking. + host may be either a name or an IP address (in string form). + + If family is non-null, a gaierror will be thrown if the host's address family is + not the same as the specified family. gaierror is also raised if the hostname cannot be + converted to an IP address (e.g. through a name lookup failure). + + + + + Return the IP address associated with host, with optional address family checking. + host may be either a name or an IP address (in string form). + + If family is non-null, a gaierror will be thrown if the host's address family is + not the same as the specified family. gaierror is also raised if the hostname cannot be + converted to an IP address (e.g. through a name lookup failure). + + + + + Return fqdn, but with its domain removed if it's on the same domain as the local machine. + + + + + Convert a (host, port) tuple [IPv4] (host, port, flowinfo, scopeid) tuple [IPv6] + to its corresponding IPEndPoint. + + Throws gaierror if host is not a valid address. + Throws ArgumentTypeException if any of the following are true: + - address does not have exactly two elements + - address[0] is not a string + - address[1] is not an int + + + + + Convert an IPEndPoint to its corresponding (host, port) [IPv4] or (host, port, flowinfo, scopeid) [IPv6] tuple. + Throws SocketException if the address family is other than IPv4 or IPv6. + + + + + handleToSocket allows us to translate from Python's idea of a socket resource (file + descriptor numbers) to .NET's idea of a socket resource (System.Net.Socket objects). + In particular, this allows the select module to convert file numbers (as returned by + fileno()) and convert them to Socket objects so that it can do something useful with them. + + + + + Return the internal System.Net.Sockets.Socket socket object associated with the given + handle (as returned by GetHandle()), or null if no corresponding socket exists. This is + primarily intended to be used by other modules (such as select) that implement + networking primitives. User code should not normally need to call this function. + + + + + Create a Python socket object from an existing .NET socket object + (like one returned from Socket.Accept()) + + + + + Perform initialization common to all constructors + + + + + Wrapper class for emitting locals/variables during marshalling code gen. + + + + + A wrapper around allocated memory to ensure it gets released and isn't accessed + when it could be finalized. + + + + + Creates a new MemoryHolder and allocates a buffer of the specified size. + + + + + Creates a new MemoryHolder at the specified address which is not tracked + by us and we will never free. + + + + + Creates a new MemoryHolder at the specified address which will keep alive the + parent memory holder. + + + + + Used to track the lifetime of objects when one memory region depends upon + another memory region. For example if you have an array of objects that + each have an element which has it's own lifetime the array needs to keep + the individual elements alive. + + The keys used here match CPython's keys as tested by CPython's test_ctypes. + Typically they are a string which is the array index, "ffffffff" when + from_buffer is used, or when it's a simple type there's just a string + instead of the full dictionary - we store that under the key "str". + + + + + Copies the data in data into this MemoryHolder. + + + + + Copies memory from one location to another keeping the associated memory holders alive during the + operation. + + + + + Gets the address of the held memory. The caller should ensure the MemoryHolder + is always alive as long as the address will continue to be accessed. + + + + + Gets a list of objects which need to be kept alive for this MemoryHolder to be + remain valid. + + + + + Native functions used for exposing ctypes functionality. + + + + + Allocates memory that's zero-filled + + + + + Helper function for implementing memset. Could be more efficient if we + could P/Invoke or call some otherwise native code to do this. + + + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + + + Implementation of our cast function. data is marshalled as a void* + so it ends up as an address. obj and type are marshalled as an object + so we need to unmarshal them. + + + + + Returns a new type which represents a pointer given the existing type. + + + + + Converts an address acquired from PyObj_FromPtr or that has been + marshaled as type 'O' back into an object. + + + + + Converts an object into an opaque address which can be handed out to + managed code. + + + + + Decreases the ref count on an object which has been increased with + Py_INCREF. + + + + + Increases the ref count on an object ensuring that it will not be collected. + + + + + returns address of C instance internal buffer. + + It is the callers responsibility to ensure that the provided instance will + stay alive if memory in the resulting address is to be used later. + + + + + Gets the required alignment of the given type. + + + + + Gets the required alignment of an object. + + + + + Returns a pointer instance for the given CData + + + + + Given a specific size returns a .NET type of the equivalent size that + we can use when marshalling these values across calls. + + + + + Shared helper between struct and union for getting field info and validating it. + + + + + Verifies that the provided bit field settings are valid for this type. + + + + + Shared helper to get the _fields_ list for struct/union and validate it. + + + + + Helper function for translating from memset to NT's FillMemory API. + + + + + Helper function for translating from memset to NT's FillMemory API. + + + + + Emits the marshalling code to create a CData object for reverse marshalling. + + + + + Gets a function which casts the specified memory. Because this is used only + w/ Python API we use a delegate as the return type instead of an actual address. + + + + + Gets the ModuleBuilder used to generate our unsafe call stubs into. + + + + + The enum used for tracking the various ctypes primitive types. + + + + 'c' + + + 'b' + + + 'B' + + + 'h' + + + 'H' + + + 'i' + + + 'I' + + + 'l' + + + 'L' + + + 'f' + + + 'd', 'g' + + + 'q' + + + 'Q' + + + 'O' + + + 'P' + + + 'z' + + + 'Z' + + + 'u' + + + '?' + + + 'v' + + + 'X' + + + + Base class for all ctypes interop types. + + + + + The meta class for ctypes array instances. + + + + + Common functionality that all of the meta classes provide which is part of + our implementation. This is used to implement the serialization/deserialization + of values into/out of memory, emit the marshalling logic for call stubs, and + provide common information (size/alignment) for the types. + + + + + Deserialized the value of this type from the given address at the given + offset. Any new objects which are created will keep the provided + MemoryHolder alive. + + raw determines if the cdata is returned or if the primitive value is + returned. This is only applicable for subtypes of simple cdata types. + + + + + Serializes the provided value into the specified address at the given + offset. + + + + + Gets the .NET type which is used when calling or returning the value + from native code. + + + + + Gets the .NET type which the native type is converted into when going to Python + code. This is usually int, BigInt, double, object, or a CData type. + + + + + Emits marshalling of an object from Python to native code. This produces the + native type from the Python type. + + + + + Emits marshalling from native code to Python code This produces the python type + from the native type. This is used for return values and parameters + to Python callable objects that are passed back out to native code. + + + + + Gets the native size of the type + + + + + Gets the required alignment for the type + + + + + Returns a string which describes the type. Used for _buffer_info implementation which + only exists for testing purposes. + + + + + Converts an object into a function call parameter. + + + + + Creates a new CFuncPtr object from a tuple. The 1st element of the + tuple is the ordinal or function name. The second is an object with + a _handle property. The _handle property is the handle of the module + from which the function will be loaded. + + + + + Creates a new CFuncPtr which calls a COM method. + + + + + Creates a new CFuncPtr with the specfied address. + + + + + Creates a new CFuncPtr with the specfied address. + + + + + we need to keep alive any methods which have arguments for the duration of the + call. Otherwise they could be collected on the finalizer thread before we come back. + + + + + Creates a method for calling with the specified signature. The returned method has a signature + of the form: + + (IntPtr funcAddress, arg0, arg1, ..., object[] constantPool) + + where IntPtr is the address of the function to be called. The arguments types are based upon + the types that the ArgumentMarshaller requires. + + + + + Base class for marshalling arguments from the user provided value to the + call stub. This class provides the logic for creating the call stub and + calling it. + + + + + Emits the IL to get the argument for the call stub generated into + a dynamic method. + + + + + Gets an expression which keeps alive the argument for the duration of the call. + + Returns null if a keep alive is not necessary. + + + + + Gets the expression used to provide the argument. This is the expression + from an incoming DynamicMetaObject. + + + + + Provides marshalling of primitive values when the function type + has no type information or when the user has provided us with + an explicit cdata instance. + + + + + Provides marshalling for when the function type provide argument information. + + + + + Provides marshalling for when the user provides a native argument object + (usually gotten by byref or pointer) and the function type has no type information. + + + + + The meta class for ctypes function pointer instances. + + + + + Converts an object into a function call parameter. + + + + + Fields are created when a Structure is defined and provide + introspection of the structure. + + + + + Called for fields which have been limited to a range of bits. Given the + value for the full type this extracts the individual bits. + + + + + Called for fields which have been limited to a range of bits. Sets the + specified value into the bits for the field. + + + + + The meta class for ctypes pointers. + + + + + Converts an object into a function call parameter. + + + + + Access an instance at the specified address + + + + + The meta class for ctypes simple data types. These include primitives like ints, + floats, etc... char/wchar pointers, and untyped pointers. + + + + + Converts an object into a function call parameter. + + + + + Helper function for reading char/wchar's. This is used for reading from + arrays and pointers to avoid creating lots of 1-char strings. + + + + + Meta class for structures. Validates _fields_ on creation, provides factory + methods for creating instances from addresses and translating to parameters. + + + + + Converts an object into a function call parameter. + + Structures just return themselves. + + + + + If our size/alignment hasn't been initialized then grabs the size/alignment + from all of our base classes. If later new _fields_ are added we'll be + initialized and these values will be replaced. + + + + + Base class for data structures. Subclasses can define _fields_ which + specifies the in memory layout of the values. Instances can then + be created with the initial values provided as the array. The values + can then be accessed from the instance by field name. The value can also + be passed to a foreign C API and the type can be used in other structures. + + class MyStructure(Structure): + _fields_ = [('a', c_int), ('b', c_int)] + + MyStructure(1, 2).a + MyStructure() + + class MyOtherStructure(Structure): + _fields_ = [('c', MyStructure), ('b', c_int)] + + MyOtherStructure((1, 2), 3) + MyOtherStructure(MyStructure(1, 2), 3) + + + + + The meta class for ctypes unions. + + + + + Converts an object into a function call parameter. + + + + + Enum which specifies the format type for a compiled struct + + + + + Struct used to store the format and the number of times it should be repeated. + + + + + Stops execution of Python or other .NET code on the main thread. If the thread is + blocked in native code the thread will be interrupted after it returns back to Python + or other .NET code. + + + + + Provides a dictionary storage implementation whose storage is local to + the thread. + + + + + Represents the date components that we found while parsing the date. Used for zeroing out values + which have different defaults from CPython. Currently we only know that we need to do this for + the year. + + + + + Samples on how to subtype built-in types from C# + + + + + an int variable for demonstration purposes + + + + + an int variable for demonstration purposes + + + + + Returns a new callable object with the provided initial set of arguments + bound to it. Calling the new function then appends to the additional + user provided arguments. + + + + + Creates a new partial object with the provided positional arguments. + + + + + Creates a new partial object with the provided positional and keyword arguments. + + + + + Calls func with the previously provided arguments and more positional arguments. + + + + + Calls func with the previously provided arguments and more positional arguments and keyword arguments. + + + + + Operator method to set arbitrary members on the partial object. + + + + + Operator method to get additional arbitrary members defined on the partial object. + + + + + Operator method to delete arbitrary members defined in the partial object. + + + + + Gets the function which will be called + + + + + Gets the initially provided positional arguments. + + + + + Gets the initially provided keyword arguments or None. + + + + + Gets or sets the dictionary used for storing extra attributes on the partial object. + + + + + BER encoding of an integer value is the number of bytes + required to represent the integer followed by the bytes + + + + + Duplicates a subprocess handle which was created for piping. + + This is only called when we're duplicating the handle to make it inheritable to the child process. In CPython + the parent handle is always reliably garbage collected. Because we know this handle is not going to be + used we close the handle being duplicated. + + + + + Special hash function because IStructuralEquatable.GetHashCode is not allowed to throw. + + + + + Special equals because none of the special cases in Ops.Equals + are applicable here, and the reference equality check breaks some tests. + + + + + gets the object or throws a reference exception + + + + + Special equality function because IStructuralEquatable.Equals is not allowed to throw. + + + + + gets the object or throws a reference exception + + + + + Special equality function because IStructuralEquatable.Equals is not allowed to throw. + + +
+
diff --git a/packages/IronPython.2.7.4/lib/Net35/IronPython.SQLite.dll b/packages/IronPython.2.7.4/lib/Net35/IronPython.SQLite.dll new file mode 100644 index 0000000000..aec90b3952 Binary files /dev/null and b/packages/IronPython.2.7.4/lib/Net35/IronPython.SQLite.dll differ diff --git a/packages/IronPython.2.7.4/lib/Net35/IronPython.SQLite.xml b/packages/IronPython.2.7.4/lib/Net35/IronPython.SQLite.xml new file mode 100644 index 0000000000..a58a149621 --- /dev/null +++ b/packages/IronPython.2.7.4/lib/Net35/IronPython.SQLite.xml @@ -0,0 +1,34 @@ + + + + IronPython.SQLite + + + + * The rest are extensions, not normally found in printf() */ + + + * beginning-of-error-codes */ + + + * previously SQLITE_CONFIG_CHUNKALLOC 12 which is now unused. */ + + + * x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE xF */ + + + + Basic locking strategy for Console/Winform applications + + + + + Locking strategy for Medium Trust. It uses the same trick used in the native code for WIN_CE + which doesn't support LockFileEx as well. + + + + * The methods above are in version 1 of the sqlite_module object. Those + + + diff --git a/packages/IronPython.2.7.4/lib/Net35/IronPython.dll b/packages/IronPython.2.7.4/lib/Net35/IronPython.dll new file mode 100644 index 0000000000..a4addbc44c Binary files /dev/null and b/packages/IronPython.2.7.4/lib/Net35/IronPython.dll differ diff --git a/packages/IronPython.2.7.4/lib/Net35/IronPython.xml b/packages/IronPython.2.7.4/lib/Net35/IronPython.xml new file mode 100644 index 0000000000..10e5b87a50 --- /dev/null +++ b/packages/IronPython.2.7.4/lib/Net35/IronPython.xml @@ -0,0 +1,7533 @@ + + + + IronPython + + + + + Creates a method frame for tracking purposes and enforces recursion + + + + + Removes the frames from generated code for when we're compiling the tracing delegate + which will track the frames it's self. + + + + + Returns true if the node can throw, false otherwise. Used to determine + whether or not we need to update the current dynamic stack info. + + + + + A temporary variable to track if the current line number has been emitted via the fault update block. + + For example consider: + + try: + raise Exception() + except Exception, e: + # do something here + raise + + At "do something here" we need to have already emitted the line number, when we re-raise we shouldn't add it + again. If we handled the exception then we should have set the bool back to false. + + We also sometimes directly check _lineNoUpdated to avoid creating this unless we have nested exceptions. + + + + + A temporary variable to track the current line number + + + + + Fake ScopeStatement for FunctionCode's to hold on to after we have deserialized pre-compiled code. + + + + + Gets or creates the FunctionCode object for this FunctionDefinition. + + + + + Gets the expression for updating the dynamic stack trace at runtime when an + exception is thrown. + + + + + Gets the expression for the actual updating of the line number for stack traces to be available + + + + + Wraps the body of a statement which should result in a frame being available during + exception handling. This ensures the line number is updated as the stack is unwound. + + + + + The variable used to hold out parents closure tuple in our local scope. + + + + + Gets the expression associated with the local CodeContext. If the function + doesn't have a local CodeContext then this is the global context. + + + + + True if this scope accesses a variable from an outer scope. + + + + + True if an inner scope is accessing a variable defined in this scope. + + + + + True if we are forcing the creation of a dictionary for storing locals. + + This occurs for calls to locals(), dir(), vars(), unqualified exec, and + from ... import *. + + + + + True if variables can be set in a late bound fashion that we don't + know about at code gen time - for example via from foo import *. + + This is tracked independently of the ContainsUnqualifiedExec/NeedsLocalsDictionary + + + + + Variables that are bound in an outer scope - but not a global scope + + + + + Variables that are bound to the global scope + + + + + Variables that are referred to from a nested scope and need to be + promoted to cells. + + + + + Provides a place holder for the expression which represents + a FunctionCode. For functions/classes this gets updated after + the AST has been generated because the FunctionCode needs to + know about the tree which gets generated. For modules we + immediately have the value because it always comes in as a parameter. + + + + + Reducible node so that re-writing for profiling does not occur until + after the script code has been completed and is ready to be compiled. + + Without this extra node profiling would force reduction of the node + and we wouldn't have setup our constant access correctly yet. + + + + + A global allocator that puts all of the globals into an array access. The array is an + array of PythonGlobal objects. We then just close over the array for any inner functions. + + Once compiled a RuntimeScriptCode is produced which is closed over the entire execution + environment. + + + + + Specifies the compilation mode which will be used during the AST transformation + + + + + Compilation will proceed in a manner in which the resulting AST can be serialized to disk. + + + + + Compilation will use a type and declare static fields for globals. The resulting type + is uncollectible and therefore extended use of this will cause memory leaks. + + + + + Compilation will use an array for globals. The resulting code will be fully collectible + and once all references are released will be collected. + + + + + Compilation will force all global accesses to do a full lookup. This will also happen for + any unbound local references. This is the slowest form of code generation and is only + used for exec/eval code where we can run against an arbitrary dictionary. + + + + + Implements globals which are backed by a static type, followed by an array if the static types' slots become full. The global + variables are stored in static fields on a type for fast access. The type also includes fields for constants and call sites + so they can be accessed much fasetr. + + We don't generate any code into the type though - DynamicMethod's are much faster for code gen then normal ref emit. + + + Implements globals which are backed by a static type, followed by an array if the static types' slots become full. The global + variables are stored in static fields on a type for fast access. The type also includes fields for constants and call sites + so they can be accessed much fasetr. + + We don't generate any code into the type though - DynamicMethod's are much faster for code gen then normal ref emit. + + + + Ensures the underlying array is long enough to accomodate the given index + The context storage type corresponding to the given index + + + Ensures the underlying array is long enough to accomodate the given index + The constant storage type corresponding to the given index + + + Ensures the underlying array is long enough to accomodate the given index + The global storage type corresponding to the given index + + + Ensures the underlying array is long enough to accomodate the given index + The site storage type corresponding to the given index + + + + Not used. + + + + + Not used. + + + + + PythonWalker class - The Python AST Walker (default result is true) + + + + + Not an actual node. We don't create this, but it's here for compatibility. + + + + + Interface used to mark objects which contain a dictionary of custom attributes that shadow + their existing attributes in a dynamic fashion. + + + + + Ensures that a non-null IDictionary instance is created for CustomAttributes and + returns it. + + + + + Meta-object which allows IPythonExpandable objects to behave like Python objects in their + ability to dynamically add and remove new or existing custom attributes, generally shadowing + existing built-in members. + + Getting: Member accesses first consult the object's CustomAttributes dictionary, then fall + through to the underlying object. + + Setting: Values can be bound to any member name, shadowing any existing attributes except + public non-PythonHidden fields and properties, which will bypass the dictionary. Thus, + it is possible for SetMember to fail, for example if the property is read-only or of + the wrong type. + + Deleting: Any member represented in the dictionary can be deleted, re-exposing the + underlying member if it exists. Any other deletions will fail. + + + + + Provides a way for the binder to provide a custom error message when lookup fails. Just + doing this for the time being until we get a more robust error return mechanism. + + + + + Provides a way for the binder to provide a custom error message when lookup fails. Just + doing this for the time being until we get a more robust error return mechanism. + + + + + Gets the PythonBinder associated with tihs CodeContext + + + + + Performs .NET member resolution. This looks within the given type and also + includes any extension members. Base classes and their extension members are + not searched. + + + + + Performs .NET member resolution. This looks within the given type and also + includes any extension members. Base classes and their extension members are + not searched. + + This version allows PythonType's for protected member resolution. It shouldn't + be called externally for other purposes. + + + + + Performs .NET member resolution. This looks the type and any base types + for members. It also searches for extension members in the type and any base types. + + + + + Gets the member names which are defined in this type and any extension members. + + This search does not include members in any subtypes or their extension members. + + + + + Gets the member names which are defined in the type and any subtypes. + + This search includes members in the type and any subtypes as well as extension + types of the type and its subtypes. + + + + + Creates the initial table of extension types. These are standard extension that we apply + to well known .NET types to make working with them better. Being added to this table does + not make a type a Python type though so that it's members are generally accessible w/o an + import clr and their type is not re-named. + + + + + Creates a table of standard .NET types which are also standard Python types. These types have a standard + set of extension types which are shared between all runtimes. + + + + + Event handler for when our domain manager has an assembly loaded by the user hosting the script + runtime. Here we can gather any information regarding extension methods. + + Currently DLR-style extension methods become immediately available w/o an explicit import step. + + + + + Provides a cache from Type/name -> PythonTypeSlot and also allows access to + all members (and remembering whether all members are cached). + + + + + Writes to a cache the result of a type lookup. Null values are allowed for the slots and they indicate that + the value does not exist. + + + + + Looks up a cached type slot for the specified member and type. This may return true and return a null slot - that indicates + that a cached result for a member which doesn't exist has been stored. Otherwise it returns true if a slot is found or + false if it is not. + + + + + Looks up a cached member group for the specified member and type. This may return true and return a null group - that indicates + that a cached result for a member which doesn't exist has been stored. Otherwise it returns true if a group is found or + false if it is not. + + + + + Checks to see if all members have been populated for the provided type. + + + + + Populates the type with all the provided members and marks the type + as being fully cached. + + The dictionary is used for the internal storage and should not be modified after + providing it to the cache. + + + + + Returns an enumerable object which provides access to all the members of the provided type. + + The caller must check that the type is fully cached and populate the cache if it isn't before + calling this method. + + + + + Implements a built-in module which is instanced per PythonContext. + + Implementers can subclass this type and then have a module which has efficient access + to internal state (this doesn't need to go through PythonContext.GetModuleState). These + modules can also declare module level globals which they'd like to provide efficient + access to by overloading GetGlobalVariableNames. When Initialize is called these + globals are provided and can be cached in the instance for fast global access. + + Just like normal static modules these modules are registered with the PythonModuleAttribute. + + + + + Initializes the module for it's first usage. By default this calls PerformModuleReload with the + the dictionary. + + The CodeContext for the module. + A list of globals which have optimize access. Contains at least all of the global variables reutrned by GetGlobalVariableNames. + + + + Gets a list of variable names which should have optimized storage (instances of PythonGlobal objects). + The module receives the global objects during the Initialize call and can hold onto them for + direct access to global members. + + + + + Called when the user attempts to reload() on your module and by the base class Initialize method. + + This provides an opportunity to allocate any per-module data which is not simply function definitions. + + A common usage here is to create exception objects which are allocated by the module using PythonExceptions.CreateSubType. + + + + + Provides access to the PythonContext which this module was created for. + + + + + Provides access to the CodeContext for the module. Returns null before Initialize() is called. + + + + + Copy on write constant dictionary storage used for dictionaries created with constant items. + + + + + Abstract base class for all PythonDictionary storage. + + Defined as a class instead of an interface for performance reasons. Also not + using IDictionary* for keeping a simple interface. + + Full locking is defined as being on the DictionaryStorage object it's self, + not an internal member. This enables subclasses to provide their own locking + aruond large operations and call lock free functions. + + + + + Adds items from this dictionary into the other dictionary + + + + + Provides fast access to the __path__ attribute if the dictionary storage supports caching it. + + + + + Provides fast access to the __package__ attribute if the dictionary storage supports caching it. + + + + + Provides fast access to the __builtins__ attribute if the dictionary storage supports caching it. + + + + + Provides fast access to the __name__ attribute if the dictionary storage supports caching it. + + + + + Provides fast access to the __import__ attribute if the dictionary storage supports caching it. + + + + + Provides more specific type information for Python dictionaries which are not strongly typed. + + This attribute can be applied to fields, parameters, proeprties, and return values. It can be + inspected to get type information about the types of the keys and values of the expected + dictionary or the returned dictionary. + + + + + Adapts an IDictionary[object, object] for use as a PythonDictionary used for + our debug frames. Also hides the special locals which start with $. + + + + + An interface that is implemented on DynamicMetaObjects. + + This allows objects to opt-into custom conversions when calling + COM APIs. The IronPython binders all call this interface before + doing any COM binding. + + + + + Captures and flows the state of executing code from the generated + Python code into the IronPython runtime. + + + + + Creates a new CodeContext which is backed by the specified Python dictionary. + + + + + Attempts to lookup the provided name in this scope or any outer scope. + + + + + Looks up a global variable. If the variable is not defined in the + global scope then built-ins is consulted. + + + + + Attempts to lookup the variable in the local scope. + + + + + Removes a variable from the local scope. + + + + + Sets a variable in the local scope. + + + + + Gets a variable from the global scope. + + + + + Sets a variable in the global scope. + + + + + Removes a variable from the global scope. + + + + + Returns the dictionary associated with __builtins__ if one is + set or null if it's not available. If __builtins__ is a module + the module's dictionary is returned. + + + + + Gets the module state for top-level code. + + + + + Gets the DLR scope object that corresponds to the global variables of this context. + + + + + Gets the PythonContext which created the CodeContext. + + + + + Gets the dictionary for the global variables from the ModuleContext. + + + + + True if this global context should display CLR members on shared types (for example .ToString on int/bool/etc...) + + False if these attributes should be hidden. + + + + + Gets the dictionary used for storage of local variables. + + + + + Marks a type so that IronPython will not expose the IEnumerable interface out as + __iter__ + + + + + ArgBuilder which provides the CodeContext parameter to a method. + + + + + Small reducable node which just fetches the value from a ClosureCell + object. Like w/ global variables the compiler recognizes these on + sets and turns them into assignments on the python global object. + + + + + Creates the storage for the closure cell. If this is a closure over a parameter it + captures the initial incoming parameter value. + + + + + Reduces the closure cell to a read of the value stored in the cell. + + + + + Assigns a value to the closure cell. + + + + + Removes the current value from the closure cell. + + + + + Gets the expression which points at the closure cell. + + + + + The original expression for the incoming parameter if this is a parameter closure. Otherwise + the value is null. + + + + + Gets the PythonVariable for which this closure expression was created. + + + + + Tracking for variables lifted into closure objects. Used to store information in a function + about the outer variables it accesses. + + + + + When finding a yield return or yield break, this rewriter flattens out + containing blocks, scopes, and expressions with stack state. All + scopes encountered have their variables promoted to the generator's + closure, so they survive yields. + + + + + Spills the right side into a temp, and replaces it with its temp. + Returns the expression that initializes the temp. + + + + + Makes an assignment to this variable. Pushes the assignment as far + into the right side as possible, to allow jumps into it. + + + + + Accesses the property of a tuple. The node can be created first and then the tuple and index + type can be filled in before the tree is actually generated. This enables creation of these + nodes before the tuple type is actually known. + + + + + Represents code which can be lazily compiled. + + The code is created in an AST which provides the Expression of T and + whether or not the code should be interpreted. For non-pre compiled + scenarios the code will not be compiled until the 1st time it is run. + + For pre-compiled scenarios the code is IExpressionSerializable and will + turn into a normal pre-compiled method. + + + + + Marks a type so that IronPython will not expose types which have GetMemberNames + as having a __dir__ method. + + Also suppresses __dir__ on something which implements IDynamicMetaObjectProvider + but is not an IPythonObject. + + + + + Marks a type so that IronPython will not expose the ICollection interface out as + __len__. + + + + + Marks a type so that IronPython will not expose the IDisposable interface out as + __enter__ and __exit__ methods of a context manager. + + + + + Marks a type so that IronPython will not expose the IEnumerable interface out as + __contains__ + + + + + Singleton used for dictionaries which contain no items. + + + + + Represents the set of extension methods which are loaded into a module. + + This set is immutable (as far the external viewer is considered). When a + new extension method set is loaded into a module we create a new ExtensionMethodsSet object. + + Multiple modules which have the same set of extension methods use the same set. + + + + + Returns all of the extension methods with the given name. + + + + + Returns all of the extension methods which are applicable for the given type. + + + + + Tracks the extension types that are loaded for a given assembly. + + We can have either types, namespaces, or a full assembly added as a reference. + + When the user just adds types we just add them to the type hash set. + + When the user adds namespaces we add them to the namespaces hashset. On the + next lookup we'll lazily load the types from that namespace and put them in Types. + + When the user adds assemblies we set the value to the NotYetLoadedButFullAssembly + value. The next load request will load the types from that namespace and put them + in Types. When we do that we'll mark the assembly as FullyLoaded so we don't + have to go through that again if the user adds a namespace. + + + + + Return a copy of this tuple's data array. + + + + + ModuleDictionaryStorage for a built-in module which is bound to a specific instance. + + These modules don't need to use PythonContext.GetModuleState() for storage and therefore + can provide efficient access to internal variables. They can also cache PythonGlobal + objects and provide efficient access to module globals. + + To the end user these modules appear just like any other module. These modules are + implemented by subclassing the BuiltinPythonModule class. + + + + + Enables lazy initialization of module dictionaries. + + + + + Gets all of the extra names and values stored in the dictionary. + + + + + Attemps to sets a value in the extra keys. Returns true if the value is set, false if + the value is not an extra key. + + + + + Attempts to get a value from the extra keys. Returns true if the value is an extra + key and has a value. False if it is not an extra key or doesn't have a value. + + + + + Attempts to remove the key. Returns true if the key is removed, false + if the key was not removed, or null if the key is not an extra key. + + + + + A TypeSlot is an item that gets stored in a type's dictionary. Slots provide an + opportunity to customize access at runtime when a value is get or set from a dictionary. + + + + + Gets the value stored in the slot for the given instance binding it to an instance if one is provided and + the slot binds to instances. + + + + + Sets the value of the slot for the given instance. + + true if the value was set, false if it can't be set + + + + Deletes the value stored in the slot from the instance. + + true if the value was deleted, false if it can't be deleted + + + + Gets an expression which is used for accessing this slot. If the slot lookup fails the error expression + is used again. + + The default implementation just calls the TryGetValue method. Subtypes of PythonTypeSlot can override + this and provide a more optimal implementation. + + + + + True if generating code for gets can result in more optimal accesses. + + + + + True if TryGetValue will always succeed, false if it may fail. + + This is used to optimize away error generation code. + + + + + Defines the internal interface used for accessing weak references and adding finalizers + to user-defined types. + + + + + Gets the current WeakRefTracker for an object that can be used to + append additional weak references. + + + + + Attempts to set the WeakRefTracker for an object. Used on the first + addition of a weak ref tracker to an object. If the object doesn't + support adding weak references then it returns false. + + + + + Sets a WeakRefTracker on an object for the purposes of supporting finalization. + All user types (new-style and old-style) support finalization even if they don't + support weak-references, and therefore this function always succeeds. Note the + slot used to store the WeakRefTracker is still shared between SetWeakRef and + SetFinalizer if a type supports both. + + + + + + Provides a list of all the members of an instance. ie. all the keys in the + dictionary of the object. Note that it can contain objects that are not strings. + + Such keys can be added in IronPython using syntax like: + obj.__dict__[100] = someOtherObject + + This Python specific version also supports filtering based upon the show cls + flag by flowing in the code context. + + + + + Validates that the current self object is usable for this method. + + + + + Marks a class as being hidden from the Python hierarchy. This is applied to the base class + and then all derived types will not see the base class in their hierarchy and will not be + able to access members declaredo on the base class. + + + + + Provides more specific type information for Python lists which are not strongly typed. + + This attribute can be applied to fields, parameters, proeprties, and return values. It can be + inspected to get type information about the types of the values of the expected + list or the returned list. + + + + + Captures the globals and other state of module code. + + + + + Creates a new ModuleContext which is backed by the specified dictionary. + + + + + Creates a new ModuleContext for the specified module. + + + + + Initializes __builtins__ for the module scope. + + + + + Gets the dictionary used for the global variables in the module + + + + + Gets the language context which created this module. + + + + + Gets the DLR Scope object which is associated with the modules dictionary. + + + + + Gets the global CodeContext object which is used for execution of top-level code. + + + + + Gets the module object which this code is executing in. + + This module may or may not be published in sys.modules. For user defined + code typically the module gets published at the start of execution. But if + this ModuleContext is attached to a Scope, or if we've just created a new + module context for executing code it will not be in sys.modules. + + + + + Gets the features that code has been compiled with in the module. + + + + + Gets or sets whether code running in this context should display + CLR members (for example .ToString on objects). + + + + + Cached global value. Created and maintained on a per-language basis. Default + implementation returns a singleton which indicates caching is not occuring. + + + + + Creates a new ModuleGlobalCache with the specified value. + + + + + Event handler for when the value has changed. Language implementors should call this when + the cached value is invalidated. + + + + + True if the ModuleGlobalCache is participating in a caching strategy. + + + + + True if there is currently a value associated with this global variable. False if + it is currently unassigned. + + + + + Gets or sets the current cached value + + + + + Enable true division (1/2 == .5) + + + + + Indicates that .NET methods such as .ToString should be available on Python objects. + + + + + Indicates that the module should be generated in an optimal form which will result + in it being uncollectable. + + + + + Indicates when the module should be executed immedatiately upon creation. + + + + + Enable usage of the with statement + + + + + Enable absolute imports + + + + + Indiciates that __builtins__ should not be set in the module + + + + + Indiciates that when the module is initialized it should set __builtins__ to the __builtin__ module + instead of the __builtin__ dictionary. + + + + + Marks code as being created for exec, eval. Code generated this way will + be capable of running against different scopes and will do lookups at runtime + for free global variables. + + + + + Indiciates that the first line of code should be skipped. + + + + + Enable usage of print as a function for better compatibility with Python 3.0. + + + + + Forces the code to be interpreted rather than compiled + + + + + String Literals should be parsed as Unicode strings + + + + + Include comments in the parse tree + + + + + Generated code should support light exceptions + + + + + Manages the acquisition of profiling data for a single ScriptRuntime + + + + + Get the unique Profiler instance for this ScriptRuntime + + + + + Given a MethodBase, return an index into the array of perf data. Treat each + CLR method as unique. + + + + + Given the unique name of something we're profiling, return an index into the array of perf data. + + + + + Add a new profiler entry. Not all names are unique. + + + + + Gets the current summary of profile data + + + + + Resets the current summary of profile data back to zero + + + + + Adds profiling calls to a Python method. + Calculates both the time spent only in this method + + + + + Wraps a call to a MethodInfo with profiling capture for that MethodInfo + + + + + Encapsulates profiler data to return to clients + + + + + Marks that this built-in method should be treated as external by the profiler. + When placed on a call emitted into a Python method, all the time spent in this + call will still show up in its parent's inclusive time, but will not be + part of its exclusive time. + + + + + Gets the closure tuple from our parent context. + + + + + PythonWalkerNonRecursive class - The Python AST Walker (default result is false) + + + + + Pulls the closure tuple from our function/generator which is flowed into each function call. + + + + + Returns an expression which creates the function object. + + + + + Creates the LambdaExpression which is the actual function body. + + + + + Creates the LambdaExpression which implements the body of the function. + + The functions signature is either "object Function(PythonFunction, ...)" + where there is one object parameter for each user defined parameter or + object Function(PythonFunction, object[]) for functions which take more + than PythonCallTargets.MaxArgs arguments. + + + + + Determines delegate type for the Python function + + + + + Scope for the comprehension. Because scopes are usually statements and comprehensions are expressions + this doesn't actually show up in the AST hierarchy and instead hangs off the comprehension expression. + + + + + Provides globals for when we need to lookup into a dictionary for each global access. + + This is the slowest form of globals and is only used when we need to run against an + arbitrary dictionary given to us by a user. + + + + + Provides a wrapper around "dynamic" expressions which we've opened coded (for optimized code generation). + + This lets us recognize both normal Dynamic and our own Dynamic expressions and apply the combo binder on them. + + + + + A ScriptCode which can be saved to disk. We only create this when called via + the clr.CompileModules API. This ScriptCode does not support running. + + + + + Parameter base class + + + + + Position of the parameter: 0-based index + + + + + Parameter name + + + + + Top-level ast for all Python code. Typically represents a module but could also + be exec or eval code. + + + + + Creates a new PythonAst without a body. ParsingFinished should be called afterwards to set + the body. + + + + + Called when parsing is complete, the body is built, the line mapping and language features are known. + + This is used in conjunction with the constructor which does not take a body. It enables creating + the outer most PythonAst first so that nodes can always have a global parent. This lets an un-bound + tree to still provide it's line information immediately after parsing. When we set the location + of each node during construction we also set the global parent. When we name bind the global + parent gets replaced with the real parent ScopeStatement. + + a mapping of where each line begins + The body of code + The language features which were set during parsing. + + + + Binds an AST and makes it capable of being reduced and compiled. Before calling Bind an AST cannot successfully + be reduced. + + + + + Creates a variable at the global level. Called for known globals (e.g. __name__), + for variables explicitly declared global by the user, and names accessed + but not defined in the lexical scope. + + + + + Reduces the PythonAst to a LambdaExpression of type Type. + + + + + Returns a ScriptCode object for this PythonAst. The ScriptCode object + can then be used to execute the code against it's closed over scope or + to execute it against a different scope. + + + + + Rewrites the tree for performing lookups against globals instead of being bound + against the optimized scope. This is used if the user compiles optimied code and then + runs it against a different scope. + + + + + True division is enabled in this AST. + + + + + True if the with statement is enabled in this AST. + + + + + True if absolute imports are enabled + + + + + True if this is on-disk code which we don't really have an AST for. + + + + + Represents a reference to a name. A PythonReference is created for each name + referred to in a scope (global, class, or function). + + + + + True if the user provided a step parameter (either providing an explicit parameter + or providing an empty step parameter) false if only start and stop were provided. + + + + + The statements under the try-block. + + + + + Array of except (catch) blocks associated with this try. NULL if there are no except blocks. + + + + + The body of the optional Else block for this try. NULL if there is no Else block. + + + + + The body of the optional finally associated with this try. NULL if there is no finally block. + + + + + Transform multiple python except handlers for a try block into a single catch body. + + The variable for the exception in the catch block. + Null if there are no except handlers. Else the statement to go inside the catch handler + + + + Surrounds the body of an except block w/ the appropriate code for maintaining the traceback. + + + + + True iff there is a path in control flow graph on which the variable is used before initialized (assigned or deleted). + + + + + True iff the variable is referred to from the inner scope. + + + + + Local variable. + + Local variables can be referenced from nested lambdas + + + + + Parameter to a LambdaExpression + + Like locals, they can be referenced from nested lambdas + + + + + Global variable + + Should only appear in global (top level) lambda. + + + + + WithStatement is translated to the DLR AST equivalent to + the following Python code snippet (from with statement spec): + + mgr = (EXPR) + exit = mgr.__exit__ # Not calling it yet + value = mgr.__enter__() + exc = True + try: + VAR = value # Only if "as VAR" is present + BLOCK + except: + # The exceptional case is handled here + exc = False + if not exit(*sys.exc_info()): + raise + # The exception is swallowed if exit() returns true + finally: + # The normal and non-local-goto cases are handled here + if exc: + exit(None, None, None) + + + + + + A ScriptCode which has been loaded from an assembly which is saved on disk. + + + + + Creates a fake PythonAst object which is represenative of the on-disk script code. + + + + + Base class for all of our fast get delegates. This holds onto the + delegate and provides the Update function. + + + + + Updates the call site when the current rule is no longer applicable. + + + + + Base class for all of our fast set delegates. This holds onto the + delegate and provides the Update and Optimize functions. + + + + + Updates the call site when the current rule is no longer applicable. + + + + + Provides cached global variable for modules to enable optimized access to + module globals. Both the module global value and the cached value can be held + onto and the cached value can be invalidated by the providing LanguageContext. + + The cached value is provided by the LanguageContext.GetModuleCache API. + + + + + Small reducable node which just fetches the value from a PythonGlobal + object. The compiler recognizes these on sets and turns them into + assignments on the python global object. + + + + + Represents a script code which can be dynamically bound to execute against + arbitrary Scope objects. This is used for code when the user runs against + a particular scope as well as for exec and eval code as well. It is also + used when tracing is enabled. + + + + + Represents a script code which can be consumed at runtime as-is. This code has + no external dependencies and is closed over its scope. + + + + + Helper class for implementing the Python class. + + This is exposed as a service through PythonEngine and the helper class + uses this service to get the correct remoting semantics. + + + + + Returns an ObjectHandle to a delegate of type Action[Action] which calls the current + command dispatcher. + + + + + Marks that the return value of a function might include NotImplemented. + + This is added to an operator method to ensure that all necessary methods are called + if one cannot guarantee that it can perform the comparison. + + + + + Provides support for emitting warnings when built in methods are invoked at runtime. + + + + + Backwards compatible Convert for the old sites that need to flow CodeContext + + + + + Creates a new InvokeBinder which will call with positional splatting. + + The signature of the target site should be object(function), object[], retType + + + + + + + Creates a new InvokeBinder which will call with positional and keyword splatting. + + The signature of the target site should be object(function), object[], dictionary, retType + + + + + Fallback action for performing an invoke from Python. We translate the + CallSignature which supports splatting position and keyword args into + their expanded form. + + + + + Gets the PythonContext which the CallSiteBinder is associated with. + + + + + Fallback action for performing a new() on a foreign IDynamicMetaObjectProvider. used + when call falls back. + + + + + Python's Invoke is a non-standard action. Here we first try to bind through a Python + internal interface (IPythonInvokable) which supports CallSigantures. If that fails + and we have an IDO then we translate to the DLR protocol through a nested dynamic site - + this includes unsplatting any keyword / position arguments. Finally if it's just a plain + old .NET type we use the default binder which supports CallSignatures. + + + + + Interface used to mark objects as being invokable from Python. These objects support + calling with splatted positional and keyword arguments. + + + + + Provides binding logic which is implemented to follow various Python protocols. This includes + things such as calling __call__ to perform calls, calling __nonzero__/__len__ to convert to + bool, calling __add__/__radd__ to do addition, etc... + + This logic gets shared between both the IDynamicMetaObjectProvider implementation for Python objects as well + as the Python sites. This ensures the logic we follow for our builtin types and user defined + types is identical and properly conforming to the various protocols. + + + + + Gets a MetaObject which converts the provided object to a bool using __nonzero__ or __len__ + protocol methods. This code is shared between both our fallback for a site and our MetaObject + for user defined objects. + + + + + Used for conversions to bool + + + + + Creates a rule for the contains operator. This is exposed via "x in y" in + IronPython. It is implemented by calling the __contains__ method on x and + passing in y. + + If a type doesn't define __contains__ but does define __getitem__ then __getitem__ is + called repeatedly in order to see if the object is there. + + For normal .NET enumerables we'll walk the iterator and see if it's present. + + + + + Helper to handle a comparison operator call. Checks to see if the call can + return NotImplemented and allows the caller to modify the expression that + is ultimately returned (e.g. to turn __cmp__ into a bool after a comparison) + + + + + calls __coerce__ for old-style classes and performs the operation if the coercion is successful. + + + + + Makes the comparison rule which returns an int (-1, 0, 1). TODO: Better name? + + + + + Python has three protocols for slicing: + Simple Slicing x[i:j] + Extended slicing x[i,j,k,...] + Long Slice x[start:stop:step] + + The first maps to __*slice__ (get, set, and del). + This takes indexes - i, j - which specify the range of elements to be + returned. In the slice variants both i, j must be numeric data types. + The 2nd and 3rd are both __*item__. + This receives a single index which is either a Tuple or a Slice object (which + encapsulates the start, stop, and step values) + + This is in addition to a simple indexing x[y]. + + For simple slicing and long slicing Python generates Operators.*Slice. For + the extended slicing and simple indexing Python generates a Operators.*Item + action. + + Extended slicing maps to the normal .NET multi-parameter input. + + So our job here is to first determine if we're to call a __*slice__ method or + a __*item__ method. + + + + + Helper to convert all of the arguments to their known types. + + + + + Gets the arguments that need to be provided to __*item__ when we need to pass a slice object. + + + + + Helper to get the symbols for __*item__ and __*slice__ based upon if we're doing + a get/set/delete and the minimum number of arguments required for each of those. + + + + + Checks if a coercion check should be performed. We perform coercion under the following + situations: + 1. Old instances performing a binary operator (excluding rich comparisons) + 2. User-defined new instances calling __cmp__ but only if we wouldn't dispatch to a built-in __coerce__ on the parent type + + This matches the behavior of CPython. + + + + + + Produces an error message for the provided message and type names. The error message should contain + string formatting characters ({0}, {1}, etc...) for each of the type names. + + + + + Delegate for finishing the comparison. This takes in a condition and a return value and needs to update the ConditionalBuilder + with the appropriate resulting body. The condition may be null. + + + + + Base class for calling indexers. We have two subclasses that target built-in functions and user defined callable objects. + + The Callable objects get handed off to ItemBuilder's which then call them with the appropriate arguments. + + + + + Creates a new CallableObject. If BuiltinFunction is available we'll create a BuiltinCallable otherwise + we create a SlotCallable. + + + + + Gets the arguments in a form that should be used for extended slicing. + + Python defines that multiple tuple arguments received (x[1,2,3]) get + packed into a Tuple. For most .NET methods we just want to expand + this into the multiple index arguments. For slots and old-instances + we want to pass in the tuple + + + + + Adds the target of the call to the rule. + + + + + Subclass of Callable for a built-in function. This calls a .NET method performing + the appropriate bindings. + + + + + Callable to a user-defined callable object. This could be a Python function, + a class defining __call__, etc... + + + + + Base class for building a __*item__ or __*slice__ call. + + + + + Derived IndexBuilder for calling __*slice__ methods + + + + + Derived IndexBuilder for calling __*item__ methods. + + + + + Common helpers used by the various binding logic. + + + + + Tries to get the BuiltinFunction for the given name on the type of the provided MetaObject. + + Succeeds if the MetaObject is a BuiltinFunction or BuiltinMethodDescriptor. + + + + + Gets the best CallSignature from a MetaAction. + + The MetaAction should be either a Python InvokeBinder, or a DLR InvokeAction or + CreateAction. For Python we can use a full-fidelity + + + + + + + Transforms an invoke member into a Python GetMember/Invoke. The caller should + verify that the given attribute is not resolved against a normal .NET class + before calling this. If it is a normal .NET member then a fallback InvokeMember + is preferred. + + + + + Determines if the type associated with the first MetaObject is a subclass of the + type associated with the second MetaObject. + + + + + Adds a try/finally which enforces recursion limits around the target method. + + + + + Helper to do fallback for Invoke's so we can handle both StandardAction and Python's + InvokeBinder. + + + + + Converts arguments into a form which can be used for COM interop. + + The argument is only converted if we have an IronPython specific + conversion when calling COM methods. + + + + + Converts a single argument into a form which can be used for COM + interop. + + The argument is only converted if we have an IronPython specific + conversion when calling COM methods. + + + + + Builds up a series of conditionals when the False clause isn't yet known. We can + keep appending conditions and if true's. Each subsequent true branch becomes the + false branch of the previous condition and body. Finally a non-conditional terminating + branch must be added. + + + + + Adds a new conditional and body. The first call this becomes the top-level + conditional, subsequent calls will have it added as false statement of the + previous conditional. + + + + + Adds a new condition to the last added body / condition. + + + + + Adds the non-conditional terminating node. + + + + + Gets the resulting meta object for the full body. FinishCondition + must have been called. + + + + + Adds a variable which will be scoped at the level of the final expression. + + + + + Returns true if no conditions have been added + + + + + Returns true if a final, non-conditional, body has been added. + + + + + Creates a target which creates a new dynamic method which contains a single + dynamic site that invokes the callable object. + + TODO: This should be specialized for each callable object + + + + + Various helpers related to calling Python __*__ conversion methods + + + + + Helper for falling back - if we have a base object fallback to it first (which can + then fallback to the calling site), otherwise fallback to the calling site. + + + + + Helper for falling back - if we have a base object fallback to it first (which can + then fallback to the calling site), otherwise fallback to the calling site. + + + + + Checks to see if this type has __getattribute__ that overrides all other attribute lookup. + + This is more complex then it needs to be. The problem is that when we have a + mixed new-style/old-style class we have a weird __getattribute__ defined. When + we always dispatch through rules instead of PythonTypes it should be easy to remove + this. + + + + + Looks up the associated PythonTypeSlot from the object. Indicates if the result + came from a standard .NET type in which case we will fallback to the sites binder. + + + + + Helper for falling back - if we have a base object fallback to it first (which can + then fallback to the calling site), otherwise fallback to the calling site. + + + + + Helper for falling back - if we have a base object fallback to it first (which can + then fallback to the calling site), otherwise fallback to the calling site. + + + + + Provides the lookup logic for resolving a Python object. Subclasses + provide the actual logic for producing the binding result. Currently + there are two forms of the binding result: one is the DynamicMetaObject + form used for non-optimized bindings. The other is the Func of CallSite, + object, CodeContext, object form which is used for fast binding and + pre-compiled rules. + + + + + GetBinder which produces a DynamicMetaObject. This binder always + successfully produces a DynamicMetaObject which can perform the requested get. + + + + + Makes a rule which calls a user-defined __getattribute__ function and falls back to __getattr__ if that + raises an AttributeError. + + slot is the __getattribute__ method to be called. + + + + + Checks a range of the MRO to perform old-style class lookups if any old-style classes + are present. We will call this twice to produce a search before a slot and after + a slot. + + + + + Helper for falling back - if we have a base object fallback to it first (which can + then fallback to the calling site), otherwise fallback to the calling site. + + + + + Custom dynamic site kinds for simple sites that just take a fixed set of parameters. + + + + + Unary operator. + + Gets various documentation about the object returned as a string + + + + + Unary operator. + + Gets information about the type of parameters, returned as a string. + + + + + Unary operator. + + Checks whether the object is callable or not, returns true if it is. + + + + + Binary operator. + + Checks to see if the instance contains another object. Returns true or false. + + + + + Unary operator. + + Returns the number of items stored in the object. + + + + + Binary operator. + + Compares two instances returning an integer indicating the relationship between them. May + throw if the object types are uncomparable. + + + + + Binary operator. + + Returns both the dividend and quotioent of x / y. + + + + + Unary operator. + + Get the absolute value of the instance. + + + + + Unary operator. + + Gets the positive value of the instance. + + + + + Unary operator. + + Negates the instance and return the new value. + + + + + Unary operator. + + Returns the ones complement of the instance. + + + + + Unary operator. + + Boolean negation + + + + + Unary operator. + + Negation, returns object + + + + + Get enumerator for iteration binder. Returns a KeyValuePair<IEnumerator, IDisposable> + + The IEnumerator is used for iteration. The IDisposable is provided if the object was an + IEnumerable or IEnumerable<T> and is a disposable object. + + + + Operator for performing add + + + Operator for performing sub + + + Operator for performing pow + + + Operator for performing mul + + + Operator for performing floordiv + + + Operator for performing div + + + Operator for performing truediv + + + Operator for performing mod + + + Operator for performing lshift + + + Operator for performing rshift + + + Operator for performing and + + + Operator for performing or + + + Operator for performing xor + + + Operator for performing lt + + + Operator for performing gt + + + Operator for performing le + + + Operator for performing ge + + + Operator for performing eq + + + Operator for performing ne + + + Operator for performing lg + + + Operator for performing in-place add + + + Operator for performing in-place sub + + + Operator for performing in-place pow + + + Operator for performing in-place mul + + + Operator for performing in-place floordiv + + + Operator for performing in-place div + + + Operator for performing in-place truediv + + + Operator for performing in-place mod + + + Operator for performing in-place lshift + + + Operator for performing in-place rshift + + + Operator for performing in-place and + + + Operator for performing in-place or + + + Operator for performing in-place xor + + + Operator for performing reverse add + + + Operator for performing reverse sub + + + Operator for performing reverse pow + + + Operator for performing reverse mul + + + Operator for performing reverse floordiv + + + Operator for performing reverse div + + + Operator for performing reverse truediv + + + Operator for performing reverse mod + + + Operator for performing reverse lshift + + + Operator for performing reverse rshift + + + Operator for performing reverse and + + + Operator for performing reverse or + + + Operator for performing reverse xor + + + Operator for performing reverse divmod + + + + Provides an abstraction for calling something which might be a builtin function or + might be some arbitrary user defined slot. If the object is a builtin function the + call will go directly to the underlying .NET method. If the object is an arbitrary + callable object we will setup a nested dynamic site for performing the additional + dispatch. + + TODO: We could probably do a specific binding to the object if it's another IDyanmicObject. + + + + + Combines two methods, which came from two different binary types, selecting the method which has the best + set of conversions (the conversions which result in the least narrowing). + + + + + Tries to get a MethodBinder associated with the slot for the specified type. + + If a method is found the binder is set and true is returned. + If nothing is found binder is null and true is returned. + If something other than a method is found false is returned. + + TODO: Remove rop + + + + + bytearray(string, encoding[, errors]) -> bytearray + bytearray(iterable) -> bytearray + + Construct a mutable bytearray object from: + - an iterable yielding values in range(256), including: + + a list of integer values + + a bytes, bytearray, buffer, or array object + - a text string encoded using the specified encoding + + bytearray([int]) -> bytearray + + Construct a zero-ititialized bytearray of the specified length. + (default=0) + + + + + return true if self is a titlecased string and there is at least one + character in self; also, uppercase characters may only follow uncased + characters (e.g. whitespace) and lowercase characters only cased ones. + return false otherwise. + + + + + Return a string which is the concatenation of the strings + in the sequence seq. The separator between elements is the + string providing this method + + + + + return true if self is a titlecased string and there is at least one + character in self; also, uppercase characters may only follow uncased + characters (e.g. whitespace) and lowercase characters only cased ones. + return false otherwise. + + + + + Return a string which is the concatenation of the strings + in the sequence seq. The separator between elements is the + string providing this method + + + + + Returns a copy of the internal byte array. + + + System.Byte[] + + + + + This method returns the underlying byte array directly. + It should be used sparingly! + + + System.Byte[] + + + + + Marks a method as being a class method. The PythonType which was used to access + the method will then be passed as the first argument. + + + + + this class contains objecs and static methods used for + .NET/CLS interop with Python. + + + + + Gets the current ScriptDomainManager that IronPython is loaded into. The + ScriptDomainManager can then be used to work with the language portion of the + DLR hosting APIs. + + + + + Use(name) -> module + + Attempts to load the specified module searching all languages in the loaded ScriptRuntime. + + + + + Use(path, language) -> module + + Attempts to load the specified module belonging to a specific language loaded into the + current ScriptRuntime. + + + + + SetCommandDispatcher(commandDispatcher) + + Sets the current command dispatcher for the Python command line. + + The command dispatcher will be called with a delegate to be executed. The command dispatcher + should invoke the target delegate in the desired context. + + A common use for this is to enable running all REPL commands on the UI thread while the REPL + continues to run on a non-UI thread. + + + + + LoadTypeLibrary(rcw) -> type lib desc + + Gets an ITypeLib object from OLE Automation compatible RCW , + reads definitions of CoClass'es and Enum's from this library + and creates an object that allows to instantiate coclasses + and get actual values for the enums. + + + + + LoadTypeLibrary(guid) -> type lib desc + + Reads the latest registered type library for the corresponding GUID, + reads definitions of CoClass'es and Enum's from this library + and creates a IDynamicMetaObjectProvider that allows to instantiate coclasses + and get actual values for the enums. + + + + + AddReferenceToTypeLibrary(rcw) -> None + + Makes the type lib desc available for importing. See also LoadTypeLibrary. + + + + + AddReferenceToTypeLibrary(guid) -> None + + Makes the type lib desc available for importing. See also LoadTypeLibrary. + + + + + Gets the CLR Type object from a given Python type object. + + + + + Gets the Python type object from a given CLR Type object. + + + + + OBSOLETE: Gets the Python type object from a given CLR Type object. + + Use clr.GetPythonType instead. + + + + + accepts(*types) -> ArgChecker + + Decorator that returns a new callable object which will validate the arguments are of the specified types. + + + + + + + returns(type) -> ReturnChecker + + Returns a new callable object which will validate the return type is of the specified type. + + + + + returns the result of dir(o) as-if "import clr" has not been performed. + + + + + Returns the result of dir(o) as-if "import clr" has been performed. + + + + + Attempts to convert the provided object to the specified type. Conversions that + will be attempted include standard Python conversions as well as .NET implicit + and explicit conversions. + + If the conversion cannot be performed a TypeError will be raised. + + + + + Provides a helper for compiling a group of modules into a single assembly. The assembly can later be + reloaded using the clr.AddReference API. + + + + + clr.CompileSubclassTypes(assemblyName, *typeDescription) + + Provides a helper for creating an assembly which contains pre-generated .NET + base types for new-style types. + + This assembly can then be AddReferenced or put sys.prefix\DLLs and the cached + types will be used instead of generating the types at runtime. + + This function takes the name of the assembly to save to and then an arbitrary + number of parameters describing the types to be created. Each of those + parameter can either be a plain type or a sequence of base types. + + clr.CompileSubclassTypes(object) -> create a base type for object + clr.CompileSubclassTypes(object, str, System.Collections.ArrayList) -> create + base types for both object and ArrayList. + + clr.CompileSubclassTypes(object, (object, IComparable)) -> create base types for + object and an object which implements IComparable. + + + + + + clr.GetSubclassedTypes() -> tuple + + Returns a tuple of information about the types which have been subclassed. + + This tuple can be passed to clr.CompileSubclassTypes to cache these + types on disk such as: + + clr.CompileSubclassTypes('assembly', *clr.GetSubclassedTypes()) + + + + + Goes through the list of files identifying the relationship between packages + and subpackages. Returns a dictionary with all of the package filenames (minus __init__.py) + mapping to their full name. For example given a structure: + + C:\ + someDir\ + package\ + __init__.py + a.py + b\ + __init.py + c.py + + Returns: + {r'C:\somedir\package' : 'package', r'C:\somedir\package\b', 'package.b'} + + This can then be used for calculating the full module name of individual files + and packages. For example a's full name is "package.a" and c's full name is + "package.b.c". + + + + + Returns a list of profile data. The values are tuples of Profiler.Data objects + + All times are expressed in the same unit of measure as DateTime.Ticks + + + + + Resets all profiler counters back to zero + + + + + Enable or disable profiling for the current ScriptEngine. This will only affect code + that is compiled after the setting is changed; previously-compiled code will retain + whatever setting was active when the code was originally compiled. + + The easiest way to recompile a module is to reload() it. + + + + + Serializes data using the .NET serialization formatter for complex + types. Returns a tuple identifying the serialization format and the serialized + data which can be fed back into clr.Deserialize. + + Current serialization formats include custom formats for primitive .NET + types which aren't already recognized as tuples. None is used to indicate + that the Binary .NET formatter is used. + + + + + Deserializes the result of a Serialize call. This can be used to perform serialization + for .NET types which are serializable. This method is the callable object provided + from __reduce_ex__ for .serializable .NET types. + + The first parameter indicates the serialization format and is the first tuple element + returned from the Serialize call. + + The second parameter is the serialized data. + + + + + Decorator for verifying the arguments to a function are of a specified type. + + + + + Returned value when using clr.accepts/ArgChecker. Validates the argument types and + then calls the original function. + + + + + Decorator for verifying the return type of functions. + + + + + Returned value when using clr.returns/ReturnChecker. Calls the original function and + validates the return type is of a specified type. + + + + + Provides a StreamContentProvider for a stream of content backed by a file on disk. + + + + + Wrapper class used when a user defined type (new-style or old-style) + defines __index__. We provide a conversion from all user defined + types to the Index type so they can be used for determing and method bind + time the most appropriate method to dispatch to. + + + + + New string formatter for 'str'.format(...) calls and support for the Formatter + library via the _formatter_parser / _formatter_field_name_split + methods. + + We parse this format: + + replacement_field = "{" field_name ["!" conversion] [":" format_spec] "}" + field_name = (identifier | integer) ("." attribute_name | "[" element_index "]")* + attribute_name = identifier + element_index = identifier + conversion = "r" | "s" + format_spec = any char, { must be balanced (for computed values), passed to __format__ method on object + + + + + Runs the formatting operation on the given format and keyword arguments + + + + + Gets the formatting information for the given format. This is a list of tuples. The tuples + include: + + text, field name, format spec, conversion + + + + + Parses a field name returning the argument name and an iterable + object which can be used to access the individual attribute + or element accesses. The iterator yields tuples of: + + bool (true if attribute, false if element index), attribute/index value + + + + + Parses the field name including attribute access or element indexing. + + + + + Parses the field name including attribute access or element indexing. + + + + + Converts accessors from our internal structure into a PythonTuple matching how CPython + exposes these + + + + + Parses an identifier and returns it + + + + + Base class used for parsing the format. Subclasss override Text/ReplacementField methods. Those + methods get called when they call Parse and then they can do the appropriate actions for the + format. + + + + + Gets an enumerable object for walking the parsed format. + + TODO: object array? struct? + + + + + Provides an enumerable of the parsed format. The elements of the tuple are: + the text preceding the format information + the field name + the format spec + the conversion + + + + + Handles {{ and }} within the string. Returns true if a double bracket + is found and yields the text + + + + + Parses the conversion character and returns it + + + + + Checks to see if we're at the end of the format. If there's no more characters left we report + the error, otherwise if we hit a } we return true to indicate parsing should stop. + + + + + Parses the format spec string and returns it. + + + + + Parses the field name and returns it. + + + + + Handles parsing the field name and the format spec and returns it. At the parse + level these are basically the same - field names just have more terminating characters. + + The most complex part of parsing them is they both allow nested braces and require + the braces are matched. Strangely though the braces need to be matched across the + combined field and format spec - not within each format. + + + + + Provides the built-in string formatter which is exposed to Python via the str.format API. + + + + + Inspects a format spec to see if it contains nested format specs which + we need to compute. If so runs another string formatter on the format + spec to compute those values. + + + + + Given the field name gets the object from our arguments running + any of the member/index accessors. + + + + + Applies the known built-in conversions to the object if a conversion is + specified. + + + + + Gets the initial object represented by the field name - e.g. the 0 or + keyword name. + + + + + Given the object value runs the accessors in the field name (if any) against the object. + + + + + Encodes all the information about the field name. + + + + + Encodes a single field accessor (.b or [number] or [str]) + + + + + For IList arguments: Marks that the argument is typed to accept a bytes or + bytearray object. This attribute disallows passing a Python list object and + auto-applying our generic conversion. It also enables conversion of a string to + a IList of byte in IronPython 2.6. + + For string arguments: Marks that the argument is typed to accept a bytes object + as well. (2.6 only) + + + + stored for copy_reg module, used for reduce protocol + + + stored for copy_reg module, used for reduce protocol + + + + Creates a new PythonContext not bound to Engine. + + + + + Checks to see if module state has the current value stored already. + + + + + Gets per-runtime state used by a module. The module should have a unique key for + each piece of state it needs to store. + + + + + Sets per-runtime state used by a module. The module should have a unique key for + each piece of state it needs to store. + + + + + Sets per-runtime state used by a module and returns the previous value. The module + should have a unique key for each piece of state it needs to store. + + + + + Sets per-runtime state used by a module and returns the previous value. The module + should have a unique key for each piece of state it needs to store. + + + + + Initializes the sys module on startup. Called both to load and reload sys + + + + + Reads one line keeping track of the # of bytes read + + + + + We use Assembly.LoadFile to load assemblies from a path specified by the script (in LoadAssemblyFromFileWithPath). + However, when the CLR loader tries to resolve any of assembly references, it will not be able to + find the dependencies, unless we can hook into the CLR loader. + + + + + Returns (and creates if necessary) the PythonService that is associated with this PythonContext. + + The PythonService is used for providing remoted convenience helpers for the DLR hosting APIs. + + + + + Gets the member names associated with the object + TODO: Move "GetMemberNames" functionality into MetaObject implementations + + + + + Gets a SiteLocalStorage when no call site is available. + + + + + Invokes the specified operation on the provided arguments and returns the new resulting value. + + operation is usually a value from StandardOperators (standard CLR/DLR operator) or + OperatorStrings (a Python specific operator) + + + + + Sets the current command dispatcher for the Python command line. The previous dispatcher + is returned. Null can be passed to remove the current command dispatcher. + + The command dispatcher will be called with a delegate to be executed. The command dispatcher + should invoke the target delegate in the desired context. + + A common use for this is to enable running all REPL commands on the UI thread while the REPL + continues to run on a non-UI thread. + + The ipy.exe REPL will call into PythonContext.DispatchCommand to dispatch each execution to + the correct thread. Other REPLs can do the same to support this functionality as well. + + + + + Dispatches the command to the current command dispatcher. If there is no current command + dispatcher the command is executed immediately on the current thread. + + + + + Gets a function which can be used for comparing two values. If cmp is not null + then the comparison will use the provided comparison function. Otherwise + it will use the normal Python semantics. + + If type is null then a generic comparison function is returned. If type is + not null a comparison function is returned that's used for just that type. + + + + + Performs a GC collection including the possibility of freeing weak data structures held onto by the Python runtime. + + + + + + Gets a PythonContext given a DynamicMetaObjectBinder. + + + + + Gets or sets the maximum depth of function calls. Equivalent to sys.getrecursionlimit + and sys.setrecursionlimit. + + + + + Gets or sets the main thread which should be interupted by thread.interrupt_main + + + + + Gets or sets the default encoding for this system state / engine. + + + + + Dictionary from name to type of all known built-in module names. + + + + + Dictionary from type to name of all built-in modules. + + + + + TODO: Remove me, or stop caching built-ins. This is broken if the user changes __builtin__ + + + + Dictionary of error handlers for string codecs. + + + Table of functions used for looking for additional codecs. + + + + Returns a shared code context for the current PythonContext. This shared + context can be used for performing general operations which usually + require a CodeContext. + + + + + Returns an overload resolver for the current PythonContext. The overload + resolver will flow the shared context through as it's CodeContext. + + + + + Returns a shared code context for the current PythonContext. This shared + context can be used for doing lookups which need to occur as if they + happened in a module which has done "import clr". + + + + + A DynamicStackFrame which has Python specific data. Currently this + includes the code context which may provide access to locals and the + function code object which is needed to build frame objects from. + + + + + Gets the code context of the function. + + If the function included a call to locals() or the FullFrames + option is enabled then the code context includes all local variables. + + Null if deserialized. + + + + + Gets the code object for this frame. This is used in creating + the trace back. Null if deserialized. + + + + + Created for a user-defined function. + + + + + Python ctor - maps to function.__new__ + + y = func(x.__code__, globals(), 'foo', None, (a, )) + + + + + Calculates the _compat value which is used for call-compatibility checks + for simple calls. Whenver any of the dependent values are updated this + must be called again. + + The dependent values include: + _nparams - this is readonly, and never requies an update + _defaults - the user can mutate this (func_defaults) and that forces + an update + expand dict/list - based on nparams and flags, both read-only + + Bits are allocated as: + 00003fff - Normal argument count + 0fffb000 - Default count + 10000000 - unused + 20000000 - expand list + 40000000 - expand dict + 80000000 - unused + + Enforce recursion is added at runtime. + + + + + The parent CodeContext in which this function was declared. + + + + + Captures the # of args and whether we have kw / arg lists. This + enables us to share sites for simple calls (calls that don't directly + provide named arguments or the list/dict params). + + + + + Generators w/ exception handling need to have some data stored + on them so that we appropriately set/restore the exception state. + + + + + Returns an ID for the function if one has been assigned, or zero if the + function has not yet required the use of an ID. + + + + + Gets the position for the expand list argument or -1 if the function doesn't have an expand list parameter. + + + + + Gets the position for the expand dictionary argument or -1 if the function doesn't have an expand dictionary parameter. + + + + + Gets the number of normal (not params or kw-params) parameters. + + + + + Gets the number of extra arguments (params or kw-params) + + + + + Gets the collection of command line arguments. + + + + + Should we strip out all doc strings (the -O command line option). + + + + + Should we strip out all doc strings (the -OO command line option). + + + + + List of -W (warning filter) options collected from the command line. + + + + + Enables warnings related to Python 3.0 features. + + + + + Enables 3.0 features that are implemented in IronPython. + + + + + Enables debugging support. When enabled a .NET debugger can be attached + to the process to step through Python code. + + + + + Enables inspect mode. After running the main module the REPL will be started + within that modules context. + + + + + Suppresses addition of the user site directory. This is ignored by IronPython + except for updating sys.flags. + + + + + Disables import site on startup. + + + + + Ignore environment variables that configure the IronPython context. + + + + + Enables the verbose option which traces import statements. This is ignored by IronPython + except for setting sys.flags. + + + + + Sets the maximum recursion depth. Setting to Int32.MaxValue will disable recursion + enforcement. + + + + + Makes available sys._getframe. Local variables will not be available in frames unless the + function calls locals(), dir(), vars(), etc... For ensuring locals are always available use + the FullFrames option. + + + + + Makes available sys._getframe. All locals variables will live on the heap (for a considerable + performance cost) enabling introspection of all code. + + + + + Tracing is always available. Without this option tracing is only enabled when sys.settrace + is called. This means code that was already running before sys.settrace will not be debuggable. + + With this option pdb.set_trace and pdb.post_mortem will always work properly. + + + + + Severity of a warning that indentation is formatted inconsistently. + + + + + The division options (old, new, warn, warnall) + + + + + Forces all code to be compiled in a mode in which the code can be reliably collected by the CLR. + + + + + Enable profiling code + + + + + Returns a regular expression of Python files which should not be emitted in debug mode. + + + + + Gets the CPython version which IronPython will emulate. Currently limited + to either 2.6 or 3.0. + + + + + Marks a member as being hidden from Python code. + + + + + This assembly-level attribute specifies which types in the engine represent built-in Python modules. + + Members of a built-in module type should all be static as an instance is never created. + + + + + Creates a new PythonModuleAttribute that can be used to specify a built-in module that exists + within an assembly. + + The built-in module name + The type that implements the built-in module. + + + + The built-in module name + + + + + The type that implements the built-in module + + + + + Marks a type as being a PythonType for purposes of member lookup, creating instances, etc... + + If defined a PythonType will use __new__ / __init__ when creating instances. This allows the + object to match the native Python behavior such as returning cached values from __new__ or + supporting initialization to run multiple times via __init__. + + The attribute also allows you to specify an alternate type name. This allows the .NET name to + be different from the Python name so they can follow .NET naming conventions. + + Types defining this attribute also don't show CLR methods such as Equals, GetHashCode, etc... until + the user has done an import clr. + + + + + General-purpose storage used for Python sets and frozensets. + + The set storage is thread-safe for multiple readers or writers. + + Mutations to the set involve a simple locking strategy of locking on the SetStorage object + itself to ensure mutual exclusion. + + Reads against the set happen lock-free. When the set is mutated, it adds or removes buckets + in an atomic manner so that the readers will see a consistent picture as if the read + occurred either before or after the mutation. + + + + + Creates a new set storage with no buckets + + + + + Creates a new set storage with no buckets + + + + + Adds a new item to the set, unless an equivalent item is already present + + + + + Static helper which adds the given non-null item with a precomputed hash code. Returns + true if the item was added, false if it was already present in the set. + + + + + Lock-free helper on a non-null item with a pre-calculated hash code. Removes the item + if it is present in the set, otherwise adds it. + + + + + Clears the contents of the set + + + + + Clones the set, returning a new SetStorage object + + + + + Checks to see if the given item exists in the set + + + + + Checks to see if the given item exists in the set, and tries to hash it even + if it is known not to be in the set. + + + + + + + Adds items from this set into the other set + + + + + Removes the first set element in the iteration order. + + true if an item was removed, false if the set was empty + + + + Removes an item from the set and returns true if it was present, otherwise returns + false + + + + + Removes an item from the set and returns true if it was removed. The item will always + be hashed, throwing if it is unhashable - even if the set has no buckets. + + + + + Lock-free helper to remove a non-null item + + + + + Determines whether the current set shares no elements with the given set + + + + + Determines whether the current set is a subset of the given set + + + + + Determines whether the current set is a strict subset of the given set + + + + + Mutates this set to contain its union with 'other'. The caller must lock the current + set if synchronization is desired. + + + + + Mutates this set to contain its intersection with 'other'. The caller must lock the + current set if synchronization is desired. + + + + + Mutates this set to contain its symmetric difference with 'other'. The caller must + lock the current set if synchronization is desired. + + + + + Mutates this set to contain its difference with 'other'. The caller must lock the + current set if synchronization is desired. + + + + + Computes the union of self and other, returning an entirely new set. This method is + thread-safe and makes no modifications to self or other. + + + + + Computes the intersection of self and other, returning an entirely new set. This + method is thread-safe and makes no modifications to self or other. + + + + + Computes the symmetric difference of self and other, returning an entirely new set. + This method is thread-safe and makes no modifications to self or other. + + + + + Computes the difference of self and other, returning an entirely new set. This + method is thread-safe and makes no modifications to self or other. + + + + + Helper to hash the given item w/ support for null + + + + + Helper which ensures that the first argument x requires the least work to enumerate + + + + + A factory which creates a SetStorage object from any Python iterable. It extracts + the underlying storage of a set or frozen set without copying, which is left to the + caller if necessary. + + + + + A factory which creates a SetStorage object from any Python iterable. It extracts + the underlying storage of a set or frozen set without copying, which is left to the + caller if necessary. + Returns true if the given object was a set or frozen set, false otherwise. + + + + + A factory which creates a SetStorage object from any Python iterable. It extracts + the underlying storage of a set or frozen set, copying in the former case, to return + a SetStorage object that is guaranteed not to receive any outside mutations. + + + + + Extracts the SetStorage object from o if it is a set or frozenset and returns true. + Otherwise returns false. + + + + + Creates a hashable set from the given set, or does nothing if the given object + is not a set. + + True if o is a set or frozenset, false otherwise + + + + Returns the number of items currently in the set + + + + + Used to store a single hashed item. + + Bucket is not serializable because it stores the computed hash code, which could change + between serialization and deserialization. + + + + + Provides storage which is flowed into a callers site. The same storage object is + flowed for multiple calls enabling the callee to cache data that can be re-used + across multiple calls. + + Data is a public field so that this works properly with DynamicSite's as the reference + type (and EnsureInitialize) + + + + + Provides a representation and parsing for the default formatting specification. This is used + by object.__format__, int.__format__, long.__format__, and float.__format__ to do the common + format spec parsing. + + The default specification is: + + format_spec = [[fill]align][sign][#][0][width][,][.precision][type] + fill = a character other than } + align = "<" | ">" | "=" | "^" + sign = "+" | "-" | " " + width = integer + precision = integer + type = "b" | "c" | "d" | "e" | "E" | "f" | "F" | "g" | "G" | "n" | "o" | "x" | "X" | "%" + + + + + Parses a format spec and returns a new StringFormatSpec object. + + + + + Optimized storage for setting exc_type, exc_value, and exc_traceback. + + This optimization can go away in Python 3.0 when these attributes are no longer used. + + + + + Marks a type as being a suitable type to be used for user-defined classes. + + The requirements for this are that a type has to follow the patterns + that NewTypeMaker derived types follow. This includes: + The type's constructors must all take PythonType as the 1st parameter + which sets the underlying type for the actual object + The type needs to implement IPythonObject + Dictionary-based storage needs to be provided for setting individual members + Virtual methods exposed to Python need to support checking the types dictionary for invocations + + + + + Base class for helper which creates instances. We have two derived types: One for user + defined types which prepends the type before calling, and one for .NET types which + doesn't prepend the type. + + + + + Contains helper methods for converting C# names into Python names. + + + + + TypeInfo captures the minimal CLI information required by NewTypeMaker for a Python object + that inherits from a CLI type. + + + + + "bases" contains a set of PythonTypes. These can include types defined in Python (say cpy1, cpy2), + CLI types (say cCLI1, cCLI2), and CLI interfaces (say iCLI1, iCLI2). Here are some + examples of how this works: + + (bases) => baseType, {interfaceTypes} + + (cpy1) => System.Object, {} + (cpy1, cpy2) => System.Object, {} + (cpy1, cCLI1, iCLI1, iCLI2) => cCLI1, {iCLI1, iCLI2} + [some type that satisfies the line above] => + cCLI1, {iCLI1, iCLI2} + (cCLI1, cCLI2) => error + + + + + Filters out old-classes and throws if any non-types are included, returning a + yielding the remaining PythonType objects. + + + + + Python class hierarchy is represented using the __class__ field in the object. It does not + use the CLI type system for pure Python types. However, Python types which inherit from a + CLI type, or from a builtin Python type which is implemented in the engine by a CLI type, + do have to use the CLI type system to interoperate with the CLI world. This means that + objects of different Python types, but with the same CLI base type, can use the same CLI type - + they will just have different values for the __class__ field. + + The easiest way to inspect the functionality implemented by NewTypeMaker is to persist the + generated IL using "ipy.exe -X:SaveAssemblies", and then inspect the + persisted IL using ildasm. + + + + + Loads any available new types from the provided assembly and makes them + available via the GetNewType API. + + + + + Is this a type used for instances Python types (and not for the types themselves)? + + + + + Gets the position for the parameter which we are overriding. + + + + + + + + + Defines an interface on the type that forwards all calls + to a helper method in UserType. The method names all will + have Helper appended to them to get the name for UserType. The + UserType version should take 1 extra parameter (self). + + + + + Overrides methods - this includes all accessible virtual methods as well as protected non-virtual members + including statics and non-statics. + + + + + Loads all the incoming arguments and forwards them to mi which + has the same signature and then returns the result + + + + + Emits code to check if the class has overridden this specific + function. For example: + + MyDerivedType.SomeVirtualFunction = ... + or + + class MyDerivedType(MyBaseType): + def SomeVirtualFunction(self, ...): + + + + + + Emit code to convert object to a given type. This code is semantically equivalent + to PythonBinder.EmitConvertFromObject, except this version accepts ILGen whereas + PythonBinder accepts Compiler. The Binder will chagne soon and the two will merge. + + + + + Emits code to check if the class has overridden this specific + function. For example: + + MyDerivedType.SomeVirtualFunction = ... + or + + class MyDerivedType(MyBaseType): + def SomeVirtualFunction(self, ...): + + + + + + Emits the call to lookup a member defined in the user's type. Returns + the local which stores the resulting value and leaves a value on the + stack indicating the success of the lookup. + + + + + Creates a method for doing a base method dispatch. This is used to support + super(type, obj) calls. + + + + + Generates stub to receive the CLR call and then call the dynamic language code. + This code is same as StubGenerator.cs in the Microsoft.Scripting, except it + accepts ILGen instead of Compiler. + + + + + Called from PythonTypeOps - the BuiltinFunction._function lock must be held. + + + + + Same as the DLR ReturnFixer, but accepts lower level constructs, + such as LocalBuilder, ParameterInfos and ILGen. + + + + + Creates a new PythonCompilerOptions with the default language features enabled. + + + + + Creates a new PythonCompilerOptions with the specified language features enabled. + + + + + Creates a new PythonCompilerOptions and enables or disables true division. + + This overload is obsolete, instead you should use the overload which takes a + ModuleOptions. + + + + + Gets or sets the initial indentation. This can be set to allow parsing + partial blocks of code that are already indented. + + For each element of the array there is an additional level of indentation. + Each integer value represents the number of spaces used for the indentation. + + If this value is null then no indentation level is specified. + + + + + Language features initialized on parser construction and possibly updated during parsing. + The code can set the language features (e.g. "from __future__ import division"). + + + + + Parse one or more lines of interactive input + + null if input is not yet valid but could be with more lines + + + + Given the interactive text input for a compound statement, calculate what the + indentation level of the next line should be + + + + + Peek if the next token is a 'yield' and parse a yield expression. Else return null. + + Called w/ yield already eaten. + + A yield expression if present, else null. + + + + Maybe eats a new line token returning true if the token was + eaten. + + Python always tokenizes to have only 1 new line character in a + row. But we also craete NLToken's and ignore them except for + error reporting purposes. This gives us the same errors as + CPython and also matches the behavior of the standard library + tokenize module. This function eats any present NL tokens and throws + them away. + + + + + Eats a new line token throwing if the next token isn't a new line. + + Python always tokenizes to have only 1 new line character in a + row. But we also craete NLToken's and ignore them except for + error reporting purposes. This gives us the same errors as + CPython and also matches the behavior of the standard library + tokenize module. This function eats any present NL tokens and throws + them away. + + + + + Summary description for Token. + + + + + IronPython tokenizer + + + + + Used to create tokenizer for hosting API. + + + + + Returns whether the + + + + + Resizes an array to a speficied new size and copies a portion of the original array into its beginning. + + + + + True if the last characters in the buffer are a backslash followed by a new line indicating + that their is an incompletement statement which needs further input to complete. + + + + + Equality comparer that can compare strings to our current token w/o creating a new string first. + + + + + A simple Python command-line should mimic the standard python.exe + + + + + Returns the display look for IronPython. + + The returned string uses This \n instead of Environment.NewLine for it's line seperator + because it is intended to be outputted through the Python I/O system. + + + + + Loads any extension DLLs present in sys.prefix\DLLs directory and adds references to them. + + This provides an easy drop-in location for .NET assemblies which should be automatically referenced + (exposed via import), COM libraries, and pre-compiled Python code. + + + + + Attempts to run a single interaction and handle any language-specific + exceptions. Base classes can override this and call the base implementation + surrounded with their own exception handling. + + Returns null if successful and execution should continue, or an exit code. + + + + + Parses a single interactive command and executes it. + + Returns null if successful and execution should continue, or the appropiate exit code. + + + + + Skip the first line of the code to execute. This is useful for executing Unix scripts which + have the command to execute specified in the first line. + This only apply to the script code executed by the ScriptEngine APIs, but not for other script code + that happens to get called as a result of the execution. + + + + On error. + + + + Provides helpers for interacting with IronPython. + + + + + Creates a new ScriptRuntime with the IronPython scipting engine pre-configured. + + + + + + Creates a new ScriptRuntime with the IronPython scipting engine pre-configured and + additional options. + + + + + Creates a new ScriptRuntime with the IronPython scripting engine pre-configured + in the specified AppDomain. The remote ScriptRuntime may be manipulated from + the local domain but all code will run in the remote domain. + + + + + Creates a new ScriptRuntime with the IronPython scripting engine pre-configured + in the specified AppDomain with additional options. The remote ScriptRuntime may + be manipulated from the local domain but all code will run in the remote domain. + + + + + Creates a new ScriptRuntime and returns the ScriptEngine for IronPython. If + the ScriptRuntime is required it can be acquired from the Runtime property + on the engine. + + + + + Creates a new ScriptRuntime with the specified options and returns the + ScriptEngine for IronPython. If the ScriptRuntime is required it can be + acquired from the Runtime property on the engine. + + + + + Creates a new ScriptRuntime and returns the ScriptEngine for IronPython. If + the ScriptRuntime is required it can be acquired from the Runtime property + on the engine. + + The remote ScriptRuntime may be manipulated from the local domain but + all code will run in the remote domain. + + + + + Creates a new ScriptRuntime with the specified options and returns the + ScriptEngine for IronPython. If the ScriptRuntime is required it can be + acquired from the Runtime property on the engine. + + The remote ScriptRuntime may be manipulated from the local domain but + all code will run in the remote domain. + + + + + Given a ScriptRuntime gets the ScriptEngine for IronPython. + + + + + Gets a ScriptScope which is the Python sys module for the provided ScriptRuntime. + + + + + Gets a ScriptScope which is the Python sys module for the provided ScriptEngine. + + + + + Gets a ScriptScope which is the Python __builtin__ module for the provided ScriptRuntime. + + + + + Gets a ScriptScope which is the Python __builtin__ module for the provided ScriptEngine. + + + + + Gets a ScriptScope which is the Python clr module for the provided ScriptRuntime. + + + + + Gets a ScriptScope which is the Python clr module for the provided ScriptEngine. + + + + + Imports the Python module by the given name and returns its ScriptSCope. If the + module does not exist an exception is raised. + + + + + Imports the Python module by the given name and returns its ScriptSCope. If the + module does not exist an exception is raised. + + + + + Imports the Python module by the given name and inserts it into the ScriptScope as that name. If the + module does not exist an exception is raised. + + + + + + + Sets sys.exec_prefix, sys.executable and sys.version and adds the prefix to sys.path + + + + + Sets sys.exec_prefix, sys.executable and sys.version and adds the prefix to sys.path + + + + + Enables call tracing for the current thread in this ScriptEngine. + + TracebackDelegate will be called back for each function entry, exit, exception, and line change. + + + + + Enables call tracing for the current thread for the Python engine in this ScriptRuntime. + + TracebackDelegate will be called back for each function entry, exit, exception, and line change. + + + + + Provides nested level debugging support when SetTrace or SetProfile are used. + + This saves the current tracing information and then calls the provided object. + + + + + Provides nested level debugging support when SetTrace or SetProfile are used. + + This saves the current tracing information and then calls the provided object. + + + + + Creates a ScriptRuntimeSetup object which includes the Python script engine with the specified options. + + The ScriptRuntimeSetup object can then be additional configured and used to create a ScriptRuntime. + + + + + Creates a LanguageSetup object which includes the Python script engine with the specified options. + + The LanguageSetup object can be used with other LanguageSetup objects from other languages to + configure a ScriptRuntimeSetup object. + + + + + Creates a new PythonModule with the specified name and published it in sys.modules. + + Returns the ScriptScope associated with the module. + + + + + Creates a new PythonModule with the specified name and filename published it + in sys.modules. + + Returns the ScriptScope associated with the module. + + + + + Creates a new PythonModule with the specified name, filename, and doc string and + published it in sys.modules. + + Returns the ScriptScope associated with the module. + + + + + Gets the list of loaded Python module files names which are available in the provided ScriptEngine. + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to couldn't find member {0}. + + + + + Looks up a localized string similar to default value must be specified here. + + + + + Looks up a localized string similar to duplicate argument '{0}' in function definition. + + + + + Looks up a localized string similar to duplicate keyword argument. + + + + + Looks up a localized string similar to <eof> while reading string. + + + + + Looks up a localized string similar to EOF while scanning triple-quoted string. + + + + + Looks up a localized string similar to EOL while scanning single-quoted string. + + + + + Looks up a localized string similar to expected an indented block. + + + + + Looks up a localized string similar to expected name. + + + + + Looks up a localized string similar to Expecting identifier:. + + + + + Looks up a localized string similar to inconsistent use of tabs and spaces in indentation. + + + + + Looks up a localized string similar to unindent does not match any outer indentation level. + + + + + Looks up a localized string similar to Invalid argument value.. + + + + + Looks up a localized string similar to MakeGenericType on non-generic type. + + + + + Looks up a localized string similar to Invalid parameter collection for the function.. + + + + + Looks up a localized string similar to invalid syntax. + + + + + Looks up a localized string similar to object ({0}) is not creatable w/ keyword arguments. + + + + + Looks up a localized string similar to keywords must come before * args. + + + + + Looks up a localized string similar to type does not have {0} field. + + + + + Looks up a localized string similar to from __future__ imports must occur at the beginning of the file. + + + + + Looks up a localized string similar to 'return' outside function. + + + + + Looks up a localized string similar to 'yield' outside function. + + + + + Looks up a localized string similar to NEWLINE in double-quoted string. + + + + + Looks up a localized string similar to NEWLINE in single-quoted string. + + + + + Looks up a localized string similar to future statement does not support import *. + + + + + Looks up a localized string similar to non-keyword arg after keyword arg. + + + + + Looks up a localized string similar to not a chance. + + + + + Looks up a localized string similar to The method or operation is not implemented.. + + + + + Looks up a localized string similar to only one ** allowed. + + + + + Looks up a localized string similar to only one * allowed. + + + + + Looks up a localized string similar to Context must be PythonCompilerContext. + + + + + Looks up a localized string similar to cannot delete slot. + + + + + Looks up a localized string similar to cannot get slot. + + + + + Looks up a localized string similar to cannot set slot. + + + + + Looks up a localized string similar to static property '{0}' of '{1}' can only be read through a type, not an instance. + + + + + Looks up a localized string similar to static property '{0}' of '{1}' can only be assigned to through a type, not an instance. + + + + + Looks up a localized string similar to no value for this token. + + + + + Looks up a localized string similar to too many versions. + + + + + Looks up a localized string similar to unexpected token '{0}'. + + + + + Looks up a localized string similar to future feature is not defined:. + + + + + The Action used for Python call sites. This supports both splatting of position and keyword arguments. + + When a foreign object is encountered the arguments are expanded into normal position/keyword arguments. + + + + + Python's Invoke is a non-standard action. Here we first try to bind through a Python + internal interface (IPythonInvokable) which supports CallSigantures. If that fails + and we have an IDO then we translate to the DLR protocol through a nested dynamic site - + this includes unsplatting any keyword / position arguments. Finally if it's just a plain + old .NET type we use the default binder which supports CallSignatures. + + + + + Fallback - performs the default binding operation if the object isn't recognized + as being invokable. + + + + + Creates a nested dynamic site which uses the unpacked arguments. + + + + + Translates our CallSignature into a DLR Argument list and gives the simple MetaObject's which are extracted + from the tuple or dictionary parameters being splatted. + + + + + Gets the CallSignature for this invocation which describes how the MetaObject array + is to be mapped. + + + + + General purpose storage used for most PythonDictionarys. + + This dictionary storage is thread safe for multiple readers or writers. + + Mutations to the dictionary involves a simple locking strategy of + locking on the DictionaryStorage object to ensure that only one + mutation happens at a time. + + Reads against the dictionary happen lock free. When the dictionary is mutated + it is either adding or removing buckets in a thread-safe manner so that the readers + will either see a consistent picture as if the read occured before or after the mutation. + + When resizing the dictionary the buckets are replaced atomically so that the reader + sees the new buckets or the old buckets. When reading the reader first reads + the buckets and then calls a static helper function to do the read from the bucket + array to ensure that readers are not seeing multiple bucket arrays. + + + + + Creates a new dictionary storage with no buckets + + + + + Creates a new dictionary storage with no buckets + + + + + Creates a new dictionary geting values/keys from the + items arary + + + + + Creates a new dictionary storage with the given set of buckets + and size. Used when cloning the dictionary storage. + + + + + Adds a new item to the dictionary, replacing an existing one if it already exists. + + + + + Initializes the buckets to their initial capacity, the caller + must check if the buckets are empty first. + + + + + Add helper that works over a single set of buckets. Used for + both the normal add case as well as the resize case. + + + + + Add helper which adds the given key/value (where the key is not null) with + a pre-computed hash code. + + + + + Removes an entry from the dictionary and returns true if the + entry was removed or false. + + + + + Removes an entry from the dictionary and returns true if the + entry was removed or false. The key will always be hashed + so if it is unhashable an exception will be thrown - even + if the dictionary has no buckets. + + + + + Checks to see if the key exists in the dictionary. + + + + + Trys to get the value associated with the given key and returns true + if it's found or false if it's not present. + + + + + Static helper to try and get the value from the dictionary. + + Used so the value lookup can run against a buckets while a writer + replaces the buckets. + + + + + Clears the contents of the dictionary. + + + + + Clones the storage returning a new DictionaryStorage object. + + + + + Helper to hash the given key w/ support for null. + + + + + Returns the number of key/value pairs currently in the dictionary. + + + + + Used to store a single hashed key/value. + + Bucket is not serializable because it stores the computed hash + code which could change between serialization and deserialization. + + + + + Special marker NullValue used during deserialization to not add + an extra field to the dictionary storage type. + + + + + The error involved an incomplete statement due to an unexpected EOF. + + + + + The error involved an incomplete token. + + + + + The mask for the actual error values + + + + + The error was a general syntax error + + + + + The error was an indentation error. + + + + + The error was a tab error. + + + + + syntax error shouldn't include a caret (no column offset should be included) + + + + + GeneratorExitException is a standard exception raised by Generator.Close() to allow a caller + to close out a generator. + + GeneratorExit is introduced in Pep342 for Python2.5. + + + + .NET exception thrown when a Python syntax error is related to incorrect indentation. + + + + + Implementation of the Python exceptions module and the IronPython/CLR exception mapping + mechanism. The exception module is the parent module for all Python exception classes + and therefore is built-in to IronPython.dll instead of IronPython.Modules.dll. + + The exception mapping mechanism is exposed as internal surface area available to only + IronPython / IronPython.Modules.dll. The actual exceptions themselves are all public. + + Because the oddity of the built-in exception types all sharing the same physical layout + (see also PythonExceptions.BaseException) some classes are defined as classes w/ their + proper name and some classes are defined as PythonType fields. When a class is defined + for convenience their's also an _TypeName version which is the PythonType. + + + + + Creates a new throwable exception of type type where the type is an new-style exception. + + Used at runtime when creating the exception from a user provided type via the raise statement. + + + + + Creates a throwable exception of type type where the type is an OldClass. + + Used at runtime when creating the exception form a user provided type that's an old class (via the raise statement). + + + + + Returns the CLR exception associated with a Python exception + creating a new exception if necessary + + + + + Given a CLR exception returns the Python exception which most closely maps to the CLR exception. + + + + + Creates a new style Python exception from the .NET exception + + + + + Internal helper to associate a .NET exception and a Python exception. + + + + + Internal helper to get the associated Python exception from a .NET exception. + + + + + Converts the DLR SyntaxErrorException into a Python new-style SyntaxError instance. + + + + + Creates a PythonType for a built-in module. These types are mutable like + normal user types. + + + + + Creates a PythonType for a built-in module. These types are mutable like + normal user types. + + + + + Creates a PythonType for a built-in module, where the type may inherit + from multiple bases. These types are mutable like normal user types. + + + + + Creates a new type for a built-in exception which derives from another Python + type. . These types are built-in and immutable like any other normal type. For + example StandardError.x = 3 is illegal. This isn't for module exceptions which + are like user defined types. thread.error.x = 3 is legal. + + + + + Creates a new type for a built-in exception which is the root concrete type. + + + + + Gets the list of DynamicStackFrames for the current exception. + + + + + Base class for all Python exception objects. + + When users throw exceptions they typically throw an exception which is + a subtype of this. A mapping is maintained between Python exceptions + and .NET exceptions and a corresponding .NET exception is thrown which + is associated with the Python exception. This class represents the + base class for the Python exception hierarchy. + + Users can catch exceptions rooted in either hierarchy. The hierarchy + determines whether the user catches the .NET exception object or the + Python exception object. + + Most built-in Python exception classes are actually instances of the BaseException + class here. This is important because in CPython the exceptions do not + add new members and therefore their layouts are compatible for multiple + inheritance. The exceptions to this rule are the classes which define + their own fields within their type, therefore altering their layout: + EnvironmentError + SyntaxError + IndentationError (same layout as SyntaxError) + TabError (same layout as SyntaxError) + SystemExit + UnicodeDecodeError + UnicodeEncodeError + UnicodeTranslateError + + These exceptions cannot be combined in multiple inheritance, e.g.: + class foo(EnvironmentError, IndentationError): pass + + fails but they can be combined with anything which is just a BaseException: + class foo(UnicodeDecodeError, SystemError): pass + + Therefore the majority of the classes are just BaseException instances with a + custom PythonType object. The specialized ones have their own .NET class + which inherits from BaseException. User defined exceptions likewise inherit + from this and have their own .NET class. + + + + + This interface is used for implementing parts of the IronPython type system. It + is not intended for consumption from user programs. + + + + + Thread-safe dictionary set. Returns the dictionary set or the previous value if already set or + null if the dictionary set isn't supported. + + + + + + + Dictionary replacement. Returns true if replaced, false if the dictionary set isn't supported. + + + + + + + Initializes the Exception object with an unlimited number of arguments + + + + + Returns a tuple of (type, (arg0, ..., argN)) for implementing pickling/copying + + + + + Returns a tuple of (type, (arg0, ..., argN)) for implementing pickling/copying + + + + + Updates the exception's state (dictionary) with the new values + + + + + Provides custom member lookup access that fallbacks to the dictionary + + + + + Provides custom member assignment which stores values in the dictionary + + + + + Provides custom member deletion which deletes values from the dictionary + or allows clearing 'message'. + + + + + Implements __repr__ which returns the type name + the args + tuple code formatted. + + + + + Initializes the Python exception from a .NET exception + + + + + + Helper to get the CLR exception associated w/ this Python exception + creating it if one has not already been created. + + + + + Returns the exception 'message' if only a single argument was provided + during creation or an empty string. + + + + + Gets or sets the arguments used for creating the exception + + + + + Gets the nth member of the args property + + + + + Gets or sets the dictionary which is used for storing members not declared to have space reserved + within the exception object. + + + + + Gets the CLR exception associated w/ this Python exception. Not visible + until a .NET namespace is imported. + + + + + .NET exception that is thrown to signal the end of iteration in Python + + + + + .NET exception that is thrown to shutdown the interpretter and exit the system. + + + + + Result of sys.exit(n) + + + null if the script exited using "sys.exit(int_value)" + null if the script exited using "sys.exit(None)" + x if the script exited using "sys.exit(x)" where isinstance(x, int) == False + + + int_value if the script exited using "sys.exit(int_value)" + 1 otherwise + + + + + .NET Exception thrown when a Python syntax error is related to incorrect tabs. + + + + + Represents a sequence which may have been provided as a set of parameters to an indexer. + + TODO: This should be removed, and all uses of this should go to [SpecialName]object GetItem(..., params object[] keys) + and [SpecialName]void SetItem(..., params object [] keys) or this[params object[]xyz] which is also legal. + + currently this exists for backwards compatibility w/ IronPython's "expandable tuples". + + + + + Provides a MetaObject for instances of Python's old-style classes. + + TODO: Lots of CodeConetxt references, need to move CodeContext onto OldClass and pull it from there. + + + + + Performs the actual work of binding to the function. + + Overall this works by going through the arguments and attempting to bind all the outstanding known + arguments - position arguments and named arguments which map to parameters are easy and handled + in the 1st pass for GetArgumentsForRule. We also pick up any extra named or position arguments which + will need to be passed off to a kw argument or a params array. + + After all the normal args have been assigned to do a 2nd pass in FinishArguments. Here we assign + a value to either a value from the params list, kw-dict, or defaults. If there is ambiguity between + this (e.g. we have a splatted params list, kw-dict, and defaults) we call a helper which extracts them + in the proper order (first try the list, then the dict, then the defaults). + + + + + Makes the test for our rule. + + + + + Makes the test when we just have simple positional arguments. + + + + + Makes the test when we have a keyword argument call or splatting. + + + + + + Gets the array of expressions which correspond to each argument for the function. These + correspond with the function as it's defined in Python and must be transformed for our + delegate type before being used. + + + + + Binds any missing arguments to values from params array, kw dictionary, or default values. + + + + + Creates the argument for the list expansion parameter. + + + + + Adds extra positional arguments to the start of the expanded list. + + + + + Creates the argument for the dictionary expansion parameter. + + + + + Adds an unbound keyword argument into the dictionary. + + + + + + Adds a check to the last parameter (so it's evaluated after we've extracted + all the parameters) to ensure that we don't have any extra params or kw-params + when we don't have a params array or params dict to expand them into. + + + + + Helper function to validate that a named arg isn't duplicated with by + a params list or the dictionary (or both). + + + + + Helper function to get a value (which has no default) from either the + params list or the dictionary (or both). + + + + + Helper function to get the specified variable from the dictionary. + + + + + Helper function to extract the variable from defaults, or to call a helper + to check params / kw-dict / defaults to see which one contains the actual value. + + + + + Helper function to extract from the params list or dictionary depending upon + which one has an available value. + + + + + Helper function to extract the next argument from the params list. + + + + + Fixes up the argument list for the appropriate target delegate type. + + + + + Helper function to get the function argument strongly typed. + + + + + Called when the user is expanding a dictionary - we copy the user + dictionary and verify that it contains only valid string names. + + + + + Called when the user is expanding a params argument + + + + + Called when the user hasn't supplied a dictionary to be expanded but the + function takes a dictionary to be expanded. + + + + + Helper function to create the expression for creating the actual tuple passed through. + + + + + Creates the code to invoke the target delegate function w/ the specified arguments. + + + + + Appends the initialization code for the call to the function if any exists. + + + + + Creating a standard .NET type is easy - we just call it's constructor with the provided + arguments. + + + + + Creating a Python type involves calling __new__ and __init__. We resolve them + and generate calls to either the builtin funcions directly or embed sites which + call the slots at runtime. + + + + + Checks if we have a default new and init - in this case if we have any + arguments we don't allow the call. + + + + + Creates a test which tests the specific version of the type. + + + + + Base class for performing member binding. Derived classes override Add methods + to produce the actual final result based upon what the GetBinderHelper resolves. + + + + + + Provides the normal meta binder binding. + + + + + Provides delegate based fast binding. + + + + + The result type of the operation. + + + + + Looks up __init__ avoiding calls to __getattribute__ and handling both + new-style and old-style classes in the MRO. + + + + + Gets a builtin function for the given declaring type and member infos. + + Given the same inputs this always returns the same object ensuring there's only 1 builtinfunction + for each .NET method. + + This method takes both a cacheName and a pythonName. The cache name is the real method name. The pythonName + is the name of the method as exposed to Python. + + + + + Checks to see if the provided members are always visible for the given type. + + This filters out methods such as GetHashCode and Equals on standard .NET + types that we expose directly as Python types (e.g. object, string, etc...). + + It also filters out the base helper overrides that are added for supporting + super calls on user defined types. + + + + + a function is static if it's a static .NET method and it's defined on the type or is an extension method + with StaticExtensionMethod decoration. + + + + + If we have only interfaces, we'll need to insert object's base + + + + + Simple implementation of ASCII encoding/decoding. The default instance (PythonAsciiEncoding.Instance) is + setup to always convert even values outside of the ASCII range. The EncoderFallback/DecoderFallbacks can + be replaced with versions that will throw exceptions instead though. + + + + + Specialized version because enumerating tuples by Python's definition + doesn't call __getitem__, but filter does! + + + + + Opens a file and returns a new file object. + + name -> the name of the file to open. + mode -> the mode to open the file (r for reading, w for writing, a for appending, default is r). + bufsize -> the size of the buffer to be used (<= 0 indicates to use the default size) + + + + + Creates a new Python file object from a .NET stream object. + + stream -> the stream to wrap in a file object. + + + + + object overload of range - attempts to convert via __int__, and __trunc__ if arg is + an OldInstance + + + + + object overload of range - attempts to convert via __int__, and __trunc__ if arg is + an OldInstance + + + + + Gets the appropriate LanguageContext to be used for code compiled with Python's compile, eval, execfile, etc... + + + + Returns true if we should inherit our callers context (true division, etc...), false otherwise + + + Returns the default compiler flags or the flags the user specified. + + + + Gets a scope used for executing new code in optionally replacing the globals and locals dictionaries. + + + + + Set if the function includes a *args argument list. + + + + + Set if the function includes a **kwargs argument dictionary. + + + + + Set if the function is a generator. + + + + + Set if the function was compiled with future division. + + + + + IronPython specific: Set if the function includes nested exception handling and therefore can alter + sys.exc_info(). + + + + + IronPython specific: Set if the function includes a try/finally block. + + + + + Represents a piece of code. This can reference either a CompiledCode + object or a Function. The user can explicitly call FunctionCode by + passing it into exec or eval. + + + + + This is both the lock that is held while enumerating the threads or updating the thread accounting + information. It's also a marker CodeList which is put in place when we are enumerating the thread + list and all additions need to block. + + This lock is also acquired whenever we need to calculate how a function's delegate should be created + so that we don't race against sys.settrace/sys.setprofile. + + + + + Constructor used to create a FunctionCode for code that's been serialized to disk. + + Code constructed this way cannot be interpreted or debugged using sys.settrace/sys.setprofile. + + Function codes created this way do support recursion enforcement and are therefore registered in the global function code registry. + + + + + Constructor to create a FunctionCode at runtime. + + Code constructed this way supports both being interpreted and debugged. When necessary the code will + be re-compiled or re-interpreted for that specific purpose. + + Function codes created this way do support recursion enforcement and are therefore registered in the global function code registry. + + the initial delegate provided here should NOT be the actual code. It should always be a delegate which updates our Target lazily. + + + + + Registers the current function code in our global weak list of all function codes. + + The weak list can be enumerated with GetAllCode(). + + Ultimately there are 3 types of threads we care about races with: + 1. Other threads which are registering function codes + 2. Threads calling sys.settrace which require the world to stop and get updated + 3. Threads running cleanup (thread pool thread, or call to gc.collect). + + The 1st two must have perfect synchronization. We cannot have a thread registering + a new function which another thread is trying to update all of the functions in the world. Doing + so would mean we could miss adding tracing to a thread. + + But the cleanup thread can run in parallel to either registrying or sys.settrace. The only + thing it needs to take a lock for is updating our accounting information about the + number of code objects are alive. + + + + + Enumerates all function codes for updating the current type of targets we generate. + + While enumerating we hold a lock so that users cannot change sys.settrace/sys.setprofile + until the lock is released. + + + + + Creates a FunctionCode object for exec/eval/execfile'd/compile'd code. + + The code is then executed in a specific CodeContext by calling the .Call method. + + If the code is being used for compile (vs. exec/eval/execfile) then it needs to be + registered incase our tracing mode changes. + + + + + Called the 1st time a function is invoked by our OriginalCallTarget* methods + over in PythonCallTargets. This computes the real delegate which needs to be + created for the function. Usually this means starting off interpretering. It + also involves adding the wrapper function for recursion enforcement. + + Because this can race against sys.settrace/setprofile we need to take our + _ThreadIsEnumeratingAndAccountingLock to ensure no one is actively changing all + of the live functions. + + + + + Updates the delegate based upon current Python context settings for recursion enforcement + and for tracing. + + + + + Called to set the initial target delegate when the user has passed -X:Debug to enable + .NET style debugging. + + + + + Gets the LambdaExpression for tracing. + + If this is a generator function code then the lambda gets tranformed into the correct generator code. + + + + + Gets the correct final LambdaExpression for this piece of code. + + This is either just _lambda or _lambda re-written to be a generator expression. + + + + + Returns a list of variable names which are accessed from nested functions. + + + + + Returns the byte code. IronPython does not implement this and always + returns an empty string for byte code. + + + + + Returns a list of constants used by the function. + + The first constant is the doc string, or None if no doc string is provided. + + IronPython currently does not include any other constants than the doc string. + + + + + Returns the filename that the code object was defined in. + + + + + Returns the 1st line number of the code object. + + + + + Returns a set of flags for the function. + + 0x04 is set if the function used *args + 0x08 is set if the function used **args + 0x20 is set if the function is a generator + + + + + Returns a list of free variables (variables accessed + from an outer scope). This does not include variables + accessed in the global scope. + + + + + Returns a mapping between byte code and line numbers. IronPython does + not implement this because byte code is not available. + + + + + Returns the name of the code (function name, class name, or <module>). + + + + + Returns a list of global variable names accessed by the code. + + + + + Returns the number of local varaibles defined in the function. + + + + + Returns the stack size. IronPython does not implement this + because byte code is not supported. + + + + + Extremely light weight linked list of weak references used for tracking + all of the FunctionCode objects which get created and need to be updated + for purposes of recursion enforcement or tracing. + + + + + General conversion routine TryConvert - tries to convert the object to the desired type. + Try to avoid using this method, the goal is to ultimately remove it! + + + + + This function tries to convert an object to IEnumerator, or wraps it into an adapter + Do not use this function directly. It is only meant to be used by Ops.GetEnumerator. + + + + + This function tries to convert an object to IEnumerator, or wraps it into an adapter + Do not use this function directly. It is only meant to be used by Ops.GetEnumerator. + + + + + Attempts to convert value into a index usable for slicing and return the integer + value. If the conversion fails false is returned. + + If throwOverflowError is true then BigInteger's outside the normal range of integers will + result in an OverflowError. + + + + + Attempts to convert value into a index usable for slicing and return the integer + value. If the conversion fails false is returned. + + If throwOverflowError is true then BigInteger's outside the normal range of integers will + result in an OverflowError. + + + + + Converts a value to int ignoring floats + + + + + Note: + IEnumerator innerEnum = Dictionary<K,V>.KeysCollections.GetEnumerator(); + innerEnum.MoveNext() will throw InvalidOperation even if the values get changed, + which is supported in python + + + + + Note: + IEnumerator innerEnum = Dictionary<K,V>.KeysCollections.GetEnumerator(); + innerEnum.MoveNext() will throw InvalidOperation even if the values get changed, + which is supported in python + + + + + Note: + IEnumerator innerEnum = Dictionary<K,V>.KeysCollections.GetEnumerator(); + innerEnum.MoveNext() will throw InvalidOperation even if the values get changed, + which is supported in python + + + + + Provides both helpers for implementing Python dictionaries as well + as providing public methods that should be exposed on all dictionary types. + + Currently these are published on IDictionary<object, object> + + + + + Creates a DLR OverloadDoc object which describes information about this overload. + + The method to document + The name of the method if it should override the name in the MethodBase + Parameters to skip at the end - used for removing the value on a setter method + true to include self on instance methods + + + + True iff the thread is currently inside the generator (ie, invoking the _next delegate). + This can be used to enforce that a generator does not call back into itself. + Pep255 says that a generator should throw a ValueError if called reentrantly. + + + + + We cache the GeneratorFinalizer of generators that were closed on the user + thread, and did not get finalized on the finalizer thread. We can then reuse + the object. Reusing objects with a finalizer is good because it reduces + the load on the GC's finalizer queue. + + + + + Fields set by Throw() to communicate an exception to the yield point. + These are plumbed through the generator to become parameters to Raise(...) invoked + at the yield suspension point in the generator. + + + + + Value sent by generator.send(). + Since send() could send an exception, we need to keep this different from throwable's value. + + + + + See PEP 342 (http://python.org/dev/peps/pep-0342/) for details of new methods on Generator. + Full signature including default params for throw is: + throw(type, value=None, traceback=None) + Use multiple overloads to resolve the default parameters. + + + + + Throw(...) is like Raise(...) being called from the yield point within the generator. + Note it must come from inside the generator so that the traceback matches, and so that it can + properly cooperate with any try/catch/finallys inside the generator body. + + If the generator catches the exception and yields another value, that is the return value of g.throw(). + + + + + send() was added in Pep342. It sends a result back into the generator, and the expression becomes + the result of yield when used as an expression. + + + + + Close introduced in Pep 342. + + + + + Core implementation of IEnumerator.MoveNext() + + + + + Core implementation of Python's next() method. + + + + + Helper called from PythonOps after the yield statement + Keepin this in a helper method: + - reduces generated code size + - allows better coupling with PythonGenerator.Throw() + - avoids throws from emitted code (which can be harder to debug). + + + + + + Called to throw an exception set by Throw(). + + + + + Gets the name of the function that produced this generator object. + + + + + True if the generator has finished (is "closed"), else false. + Python language spec mandates that calling Next on a closed generator gracefully throws a StopIterationException. + This can never be reset. + + + + + True if the generator can set sys exc info and therefore needs exception save/restore. + + + + + Importer class - used for importing modules. Used by Ops and __builtin__ + Singleton living on Python engine. + + + + + Gateway into importing ... called from Ops. Performs the initial import of + a module and returns the module. + + + + + Gateway into importing ... called from Ops. Performs the initial import of + a module and returns the module. This version returns light exceptions instead of throwing. + + + + + Gateway into importing ... called from Ops. This is called after + importing the module and is used to return individual items from + the module. The outer modules dictionary is then updated with the + result. + + + + + Called by the __builtin__.__import__ functions (general importing) and ScriptEngine (for site.py) + + level indiciates whether to perform absolute or relative imports. + -1 indicates both should be performed + 0 indicates only absolute imports should be performed + Positive numbers indicate the # of parent directories to search relative to the calling module + + + + + Interrogates the importing module for __name__ and __path__, which determine + whether the imported module (whose name is 'name') is being imported as nested + module (__path__ is present) or as sibling. + + For sibling import, the full name of the imported module is parent.sibling + For nested import, the full name of the imported module is parent.module.nested + where parent.module is the mod.__name__ + + + the globals dictionary + Name of the module to be imported + Output - full name of the module being imported + Path to use to search for "full" + the import level for relaive imports + the parent module + the global __package__ value + + + + + Given the parent module name looks up the __path__ property. + + + + + Trys to get an existing module and if that fails fall backs to searching + + + + + Attempts to load a module from sys.meta_path as defined in PEP 302. + + The meta_path provides a list of importer objects which can be used to load modules before + searching sys.path but after searching built-in modules. + + + + + Given a user defined importer object as defined in PEP 302 tries to load a module. + + First the find_module(fullName, path) is invoked to get a loader, then load_module(fullName) is invoked + + + + + Finds a user defined importer for the given path or returns null if no importer + handles this path. + + + + + Creates a new list with the data in the array and a size + the same as the length of the array. The array is held + onto and may be mutated in the future by the list. + + params array to use for lists storage + + + + Gets a reasonable size for the addition of two arrays. We round + to a power of two so that we usually have some extra space if + the resulting array gets added to. + + + + + Non-thread safe adder, should only be used by internal callers that + haven't yet exposed their list. + + + + + Compares the two specified keys + + + + + Supports __index__ on arbitrary types, also prevents __float__ + + + + + we need to lock both objects (or copy all of one's data w/ it's lock held, and + then compare, which is bad). Therefore we have a strong order for locking on + the two objects based upon the hash code or object identity in case of a collision + + + + + Summary description for ConstantValue. + + + + + Multiply two object[] arrays - slow version, we need to get the type, etc... + + + + + Multiply two object[] arrays - internal version used for objects backed by arrays + + + + + Add two arrays - internal versions for objects backed by arrays + + + + + + + + + + We override the behavior of equals, compare and hashcode to make + chars seem as much like strings as possible. In Python there is no + difference between these types. + + + + + Helper class that all custom type descriptor implementations call for + the bulk of their implementation. + + + + + Returns the digits for the format spec, no sign is included. + + + + + InstanceOps contains methods that get added to CLS types depending on what + methods and constructors they define. These have not been added directly to + PythonType since they need to be added conditionally. + + Possibilities include: + + __new__, one of 3 __new__ sets can be added: + DefaultNew - This is the __new__ used for a PythonType (list, dict, object, etc...) that + has only 1 default public constructor that takes no parameters. These types are + mutable types, and __new__ returns a new instance of the type, and __init__ can be used + to re-initialize the types. This __new__ allows an unlimited number of arguments to + be passed if a non-default __init__ is also defined. + + NonDefaultNew - This is used when a type has more than one constructor, or only has one + that takes more than zero parameters. This __new__ does not allow an arbitrary # of + extra arguments. + + DefaultNewCls - This is the default new used for CLS types that have only a single ctor + w/ an arbitray number of arguments. This constructor allows setting of properties + based upon an extra set of kw-args, e.g.: System.Windows.Forms.Button(Text='abc'). It + is only used on non-Python types. + + __init__: + For types that do not define __init__ we have an __init__ function that takes an + unlimited number of arguments and does nothing. All types share the same reference + to 1 instance of this. + + next: Defined when a type is an enumerator to expose the Python iter protocol. + + + repr: Added for types that override ToString + + get: added for types that implement IDescriptor + + + + + __dir__(self) -> Returns the list of members defined on a foreign IDynamicMetaObjectProvider. + + + + + Provides the implementation of __enter__ for objects which implement IDisposable. + + + + + Provides the implementation of __exit__ for objects which implement IDisposable. + + + + + Determines if a type member can be imported. This is used to treat static types like modules. + + + + + Implements __contains__ for types implementing IEnumerable of T. + + + + + Implements __contains__ for types implementing IEnumerable + + + + + Implements __contains__ for types implementing IEnumerable of T. + + + + + Implements __contains__ for types implementing IEnumerable + + + + + 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. + + + + + Contains Python extension methods that are added to object + + + + Types for which the pickle module has built-in support (from PEP 307 case 2) + + + + __class__, a custom slot so that it works for both objects and types. + + + + + Removes an attribute from the provided member + + + + + Returns the hash code of the given object + + + + + Gets the specified attribute from the object without running any custom lookup behavior + (__getattr__ and __getattribute__) + + + + + Initializes the object. The base class does nothing. + + + + + Initializes the object. The base class does nothing. + + + + + Initializes the object. The base class does nothing. + + + + + Creates a new instance of the type + + + + + Creates a new instance of the type + + + + + Creates a new instance of the type + + + + + Runs the pickle protocol + + + + + Runs the pickle protocol + + + + + Runs the pickle protocol + + + + + Returns the code representation of the object. The default implementation returns + a string which consists of the type and a unique numerical identifier. + + + + + Sets an attribute on the object without running any custom object defined behavior. + + + + + Returns the number of bytes of memory required to allocate the object. + + + + + Returns a friendly string representation of the object. + + + + + Return a dict that maps slot names to slot values, but only include slots that have been assigned to. + Looks up slots in base types as well as the current type. + + Sort-of Python equivalent (doesn't look up base slots, while the real code does): + return dict([(slot, getattr(self, slot)) for slot in type(self).__slots__ if hasattr(self, slot)]) + + Return null if the object has no __slots__, or empty dict if it has __slots__ but none are initialized. + + + + + Implements the default __reduce_ex__ method as specified by PEP 307 case 2 (new-style instance, protocol 0 or 1) + + + + + Returns the closest base class (in terms of MRO) that isn't defined in Python code + + + + + Implements the default __reduce_ex__ method as specified by PEP 307 case 3 (new-style instance, protocol 2) + + + + + Contains functions that are called directly from + generated code to perform low-level runtime functionality. + + + + + Creates a new dictionary extracting the keys and values from the + provided data array. Keys/values are adjacent in the array with + the value coming first. + + + + + Creates a new dictionary extracting the keys and values from the + provided data array. Keys/values are adjacent in the array with + the value coming first. + + + + + Wraps up all the semantics of multiplying sequences so that all of our sequences + don't duplicate the same logic. When multiplying sequences we need to deal with + only multiplying by valid sequence types (ints, not floats), support coercion + to integers if the type supports it, not multiplying by None, and getting the + right semantics for multiplying by negative numbers and 1 (w/ and w/o subclasses). + + This function assumes that it is only called for case where count is not implicitly + coercible to int so that check is skipped. + + + + + Supports calling of functions that require an explicit 'this' + Currently, we check if the function object implements the interface + that supports calling with 'this'. If not, the 'this' object is dropped + and a normal call is made. + + + + + Called from generated code emitted by NewTypeMaker. + + + + + Handles the descriptor protocol for user-defined objects that may implement __get__ + + + + + Handles the descriptor protocol for user-defined objects that may implement __set__ + + + + + Handles the descriptor protocol for user-defined objects that may implement __delete__ + + + + + Python runtime helper for raising assertions. Used by AssertStatement. + + Object representing the assertion message + + + + Python runtime helper to create instance of Python List object. + + New instance of List + + + + Python runtime helper to create a populated instance of Python List object. + + + + + Python runtime helper to create a populated instance of Python List object w/o + copying the array contents. + + + + + Python runtime helper to create a populated instance of Python List object. + + List is populated by arbitrary user defined object. + + + + + Python runtime helper to create an instance of Python List object. + + List has the initial provided capacity. + + + + + Python runtime helper to create an instance of Tuple + + + + + + + Python runtime helper to create an instance of Tuple + + + + + + Python Runtime Helper for enumerator unpacking (tuple assignments, ...) + Creates enumerator from the input parameter e, and then extracts + expected number of values, returning them as array + + If the input is a Python tuple returns the tuples underlying data array. Callers + should not mutate the resulting tuple. + + The code context of the AST getting enumerator values. + object to enumerate + expected number of objects to extract from the enumerator + + array of objects (.Lengh == expected) if exactly expected objects are in the enumerator. + Otherwise throws exception + + + + + Python runtime helper to create instance of Slice object + + Start of the slice. + End of the slice. + Step of the slice. + Slice + + + + Prints newline into default standard output + + + + + Prints newline into specified destination. Sets softspace property to false. + + + + + Prints value into default standard output with Python comma semantics. + + + + + Prints value into specified destination with Python comma semantics. + + + + + Called from generated code when we are supposed to print an expression value + + + + + Called from generated code for: + + import spam.eggs + + + + + Python helper method called from generated code for: + + import spam.eggs as ham + + + + + Called from generated code for: + + from spam import eggs1, eggs2 + + + + + Imports one element from the module in the context of: + + from module import a, b, c, d + + Called repeatedly for all elements being imported (a, b, c, d above) + + + + + Called from generated code for: + + from spam import * + + + + + Unqualified exec statement support. + A Python helper which will be called for the statement: + + exec code + + + + + Qualified exec statement support, + Python helper which will be called for the statement: + + exec code in globals [, locals ] + + + + + Called from generated code at the start of a catch block. + + + + + Get an exception tuple for the "current" exception. This is used for sys.exc_info() + + + + + Get an exception tuple for a given exception. This is like the inverse of MakeException. + + the code context + the exception to create a tuple for. + a tuple of (type, value, traceback) + This is called directly by the With statement so that it can get an exception tuple + in its own private except handler without disturbing the thread-wide sys.exc_info(). + + + + helper function for re-raised exceptions. + + + + + helper function for non-re-raise exceptions. + + type is the type of exception to throw or an instance. If it + is an instance then value should be null. + + If type is a type then value can either be an instance of type, + a Tuple, or a single value. This case is handled by EC.CreateThrowable. + + + + + Extracts an argument from either the dictionary or params + + + + + Creates a new array the values set to Uninitialized.Instance. The array + is large enough to hold for all of the slots allocated for the type and + its sub types. + + + + + Helper to determine if the value is a simple numeric type (int or big int or bool) - used for OldInstance + deprecated form of slicing. + + + + + Helper to determine if the type is a simple numeric type (int or big int or bool) - used for OldInstance + deprecated form of slicing. + + + + + Helper to determine if the type is a simple numeric type (int or big int or bool) but not a subclass + + + + + For slicing. Fixes up a BigInteger and returns an integer w/ the length of the + object added if the value is negative. + + + + + For slicing. Gets the length of the object, used to only get the length once. + + + + + Helper method for DynamicSite rules that check the version of their dynamic object + TODO - Remove this method for more direct field accesses + + + + + + + + Called from generated code. Gets a builtin function and the BuiltinFunctionData associated + with the object. Tests to see if the function is bound and has the same data for the generated + rule. + + + + + Convert object to a given type. This code is equivalent to NewTypeMaker.EmitConvertFromObject + except that it happens at runtime instead of compile time. + + + + + Provides access to AppDomain.DefineDynamicAssembly which cannot be called from a DynamicMethod + + + + + Generates a new delegate type. The last type in the array is the return type. + + + + + Generates a new delegate type. The last type in the array is the return type. + + + + + Provides the entry point for a compiled module. The stub exe calls into InitializeModule which + does the actual work of adding references and importing the main module. Upon completion it returns + the exit code that the program reported via SystemExit or 0. + + + + + Provides the entry point for a compiled module. The stub exe calls into InitializeModule which + does the actual work of adding references and importing the main module. Upon completion it returns + the exit code that the program reported via SystemExit or 0. + + + + + Called from generated code, helper to remove a name + + + + + Called from generated code, helper to do name lookup + + + + + Called from generated code, helper to do name assignment + + + + + Returns an IntPtr in the proper way to CPython - an int or a Python long + + + + + Create at TypeError exception for when Raise() can't create the exception requested. + + original type of exception requested + a TypeEror exception + + + + Gets a list of DynamicStackFrames for the given exception. These stack frames + can be programmatically inspected to understand the frames the exception crossed + through including Python frames. + + Dynamic stack frames are not preserved when an exception crosses an app domain + boundary. + + + + + Helper clas for calls to unicode(...). We generate code which checks if unicode + is str and if it is we redirect those calls to the unicode function defined on this + class. + + + + + ExtensibleString is the base class that is used for types the user defines + that derive from string. It carries along with it the string's value and + our converter recognizes it as a string. + + + + + StringOps is the static class that contains the methods defined on strings, i.e. 'abc' + + Here we define all of the methods that a Python user would see when doing dir('abc'). + If the user is running in a CLS aware context they will also see all of the methods + defined in the CLS System.String type. + + + + + Returns a copy of this string converted to uppercase + + + + + return true if self is a titlecased string and there is at least one + character in self; also, uppercase characters may only follow uncased + characters (e.g. whitespace) and lowercase characters only cased ones. + return false otherwise. + + + + + Return a string which is the concatenation of the strings + in the sequence seq. The separator between elements is the + string providing this method + + + + + Replaces each replacement field in the string with the provided arguments. + + replacement_field = "{" field_name ["!" conversion] [":" format_spec] "}" + field_name = (identifier | integer) ("." identifier | "[" element_index "]")* + + format_spec: [[fill]align][sign][#][0][width][,][.precision][type] + + Conversion can be 'r' for repr or 's' for string. + + + + + Replaces each replacement field in the string with the provided arguments. + + replacement_field = "{" field_name ["!" conversion] [":" format_spec] "}" + field_name = (identifier | integer) ("." identifier | "[" element_index "]")* + + format_spec: [[fill]align][sign][#][0][width][.precision][type] + + Conversion can be 'r' for repr or 's' for string. + + + + + Gets the starting offset checking to see if the incoming bytes already include a preamble. + + + + When encoding or decoding strings if an error occurs CPython supports several different + behaviors, in addition it supports user-extensible behaviors as well. For the default + behavior we're ok - both of us support throwing and replacing. For custom behaviors + we define a single fallback for decoding and encoding that calls the python function to do + the replacement. + + When we do the replacement we call the provided handler w/ a UnicodeEncodeError or UnicodeDecodeError + object which contains: + encoding (string, the encoding the user requested) + end (the end of the invalid characters) + object (the original string being decoded) + reason (the error, e.g. 'unexpected byte code', not sure of others) + start (the start of the invalid sequence) + + The decoder returns a tuple of (unicode, int) where unicode is the replacement string + and int is an index where encoding should continue. + + + + Indexer for generic parameter resolution. We bind to one of the generic versions + available in this type collision. A user can also do someType[()] to force to + bind to the non-generic version, but we will always present the non-generic version + when no bindings are available. + + + + + Object.ToString() displays the CLI type name. But we want to display the class name (e.g. + '<foo object at 0x000000000000002C>' unless we've overridden __repr__ but not __str__ in + which case we'll display the result of __repr__. + + + + + Provides a debug view for user defined types. This class is declared as public + because it is referred to from generated code. You should not use this class. + + + + + A DynamicMetaObject which is just used to support custom conversions to COM. + + + + + A marker interface so we can recognize and access sequence members on our array objects. + + + + + List of unary operators which we have sites for to enable fast dispatch that + doesn't collide with other operators. + + + + + Sets the mode to text or binary. Returns true if previously set to text, false if previously set to binary. + + + + + Truncates the file to the current length as indicated by tell(). + + + + + Truncates the file to the specified length. + + + + + + Provides storage of IronPython specific data in the DLR Scope ScopeExtension. + + This enables IronPython to track code compilation flags such as from __future__ + flags and import clr flags across multiple executions of user-provided scopes. + + + + + Provides human readable names for how Python maps the various DLR NarrowingLevel's. + + + + + No narrowing conversions are performed + + + + + Double/Single to Decimal + PythonTuple to Array + Generic conversions + BigInteger to Int64 + + + + + Numeric conversions excluding from floating point values + Boolean conversions + Delegate conversions + Enumeration conversions + + + + + Enables Python protocol conversions (__int__, etc...) + + + + + Provides dictionary based storage which is backed by a Scope object. + + + + + Mutable set class + + + + + Appends an IEnumerable to an existing set + + + + + Immutable set class + + + + + Iterator over sets + + + + + Gets the indices for the deprecated __getslice__, __setslice__, __delslice__ functions + + This form is deprecated in favor of using __getitem__ w/ a slice object as an index. This + form also has subtly different mechanisms for fixing the slice index before calling the function. + + If an index is negative and __len__ is not defined on the object than an AttributeError + is raised. + + + + + StringFormatter provides Python's % style string formatting services. + + + + + Read a possible mapping key for %(key)s. + + The key name enclosed between the '%(key)s', + or null if there are no paranthesis such as '%s'. + + + + AppendBase appends an integer at the specified radix doing all the + special forms for Python. We have a copy and paste version of this + for BigInteger below that should be kept in sync. + + + + + BigInteger version of AppendBase. Should be kept in sync w/ AppendBase + + + + + public class to get optimized + + + + + Returns detailed call statistics. Not implemented in IronPython and always returns None. + + + + + Handles output of the expression statement. + Prints the value and sets the __builtin__._ + + + + + Provides a CustomTracker which handles special fields which have custom + behavior on get/set. + + + + + Provides custom, versioned, dictionary access for instances. Used for both + new-style and old-style instances. + + Each class can allocate a version for instance storage using the + CustomInstanceDictionaryStorage.AllocateInstance method. The version allocated + is dependent upon the names which are likely to appear in the instance + dictionary. Currently these names are calculated by collecting the names + that are assigned to during the __init__ method and combining these with + all such names in the types MRO. + + When creating the dictionary for storing instance values the class can then create + a PythonDictionary backed by a CustomInstanceDictionaryStorage with it's + version. When doing a get/set optimized code can then be produced that + verifies we have CustomInstanceDictionaryStorage and it has the + correct version. If we have a matching dictionary then gets/sets can turn + into simple array accesses rather than dictionary gets/sets. For programs + which access a large number of instance variables this can dramatically + speed up the program. + + TODO: Should we attempt to unify all versions which share the same keys? + + + + + Interface used for things which can convert to delegates w/o code gen. Currently + this is just non-overloaded builtin functions and bound builtin functions. Avoiding + the code gen is not only nice for compilation but it also enables delegates to be added + in C# and removed in Python. + + + + + Represents a set of attributes that different functions can have. + + + + No flags have been set + + + This is a function w/ no instance pointer + + + This is a method that requires an instance + + + Built-in functions can encapsulate both methods and functions, in which case both bits are set + + + True is the function/method should be visible from pure-Python code + + + True if this is a __r*__ method for a CLS overloaded operator method + + + + This method represents a binary operator method for a CLS overloaded operator method. + + Being a binary operator causes the following special behaviors to kick in: + A failed binding at call time returns NotImplemented instead of raising an exception + A reversed operator will automatically be created if: + 1. The parameters are both of the instance type + 2. The parameters are in reversed order (other, this) + + This enables simple .NET operator methods to be mapped into the Python semantics. + + + + + A method declared on a built-in module + + + + + OperatorMapping provides a mapping from DLR operators to their associated .NET methods. + + + + + Given an operator returns the OperatorMapping associated with the operator or null + + + + + The operator the OperatorMapping provides info for. + + + + + The primary method name associated with the method. This method name is + usally in the form of op_Operator (e.g. op_Addition). + + + + + The secondary method name associated with the method. This method name is + usually a standard .NET method name with pascal casing (e.g. Add). + + + + + The return type that must match for the alternate operator to be valid. + + This is available alternate operators don't have special names and therefore + could be confused for a normal method which isn't fulfilling the contract. + + + + + This helper type lets us build a fake ParameterInfo object with a specific type and name + to pass along to methods that expect ParameterInfos. This is currently found useful + for the NewTypeMaker code and may be useful in other situations as well. + + + + + Cached CallSites. User types are cached on the PythonType and System types are cached on the + PythonContext to avoid cross-runtime contamination due to the binder on the site. + + + + + Represents a PythonType. Instances of PythonType are created via PythonTypeBuilder. + + + + + Used in copy_reg which is the only consumer of __flags__ in the standard library. + + Set if the type is user defined + + + + + Set if the type has __abstractmethods__ defined + + + + + Implements fast binding for user defined types. This ensures that common highly dynamic + scenarios will run fast (for instance creating new types repeatedly and only creating a limited + number of instances of them). It also gives better code sharing amongst different subclasses + of the same types and improved startup time due to reduced code generation. + + + + + Provides delegates that will invoke a parameterless type ctor. The first key provides + the dictionary for a specific type, the 2nd key provides the delegate for a specific + call site type used in conjunction w/ our IFastInvokable implementation. + + + + + Shared built-in functions for creating instances of user defined types. Because all + types w/ the same UnderlyingSystemType share the same constructors these can be + shared across multiple types. + + + + + Creates a new type for a user defined type. The name, base classes (a tuple of type + objects), and a dictionary of members is provided. + + + + + Creates a new type for a user defined type. The name, base classes (a tuple of type + objects), and a dictionary of members is provided. + + + + + Creates a new PythonType object which is backed by the specified .NET type for + storage. The type is considered a system type which can not be modified + by the user. + + + + + + Creates a new PythonType which is a subclass of the specified PythonType. + + Used for runtime defined new-style classes which require multiple inheritance. The + primary example of this is the exception system. + + + + + Creates a new PythonType which is a subclass of the specified PythonTypes. + + Used for runtime defined new-style classes which require multiple inheritance. The + primary example of this is the exception system. + + + + + Creates a new PythonType which is a subclass of the specified PythonTypes. + + Used for runtime defined new-style classes which require multiple inheritance. The + primary example of this is the exception system. + + + + + Creates a new PythonType which is a subclass of the specified PythonType. + + Used for runtime defined new-style classes which require multiple inheritance. The + primary example of this is the exception system. + + + + + Creates a new PythonType which is a subclass of the specified PythonTypes. + + Used for runtime defined new-style classes which require multiple inheritance. The + primary example of this is the exception system. + + + + + Creates a new PythonType which is a subclass of the specified PythonTypes. + + Used for runtime defined new-style classes which require multiple inheritance. The + primary example of this is the exception system. + + + + + Creates a new PythonType object which represents an Old-style class. + + + + + Returns true if the specified object is an instance of this type. + + + + + Gets the dynamic type that corresponds with the provided static type. + + Returns null if no type is available. TODO: In the future this will + always return a PythonType created by the DLR. + + + + + + + Sets the python type that corresponds with the provided static type. + + This is used for built-in types which have a metaclass. Currently + only used by ctypes. + + + + + Allocates the storage for the instance running the .NET constructor. This provides + the creation functionality for __new__ implementations. + + + + + Allocates the storage for the instance running the .NET constructor. This provides + the creation functionality for __new__ implementations. + + + + + Allocates the storage for the instance running the .NET constructor. This provides + the creation functionality for __new__ implementations. + + + + + Allocates the storage for the instance running the .NET constructor. This provides + the creation functionality for __new__ implementations. + + + + + Allocates the storage for the instance running the .NET constructor. This provides + the creation functionality for __new__ implementations. + + + + + Allocates the storage for the instance running the .NET constructor. This provides + the creation functionality for __new__ implementations. + + + + + Returns true if this type is a subclass of other + + + + + Looks up a slot on the dynamic type + + + + + Searches the resolution order for a slot matching by name + + + + + Searches the resolution order for a slot matching by name. + + Includes searching for methods in old-style classes + + + + + Internal helper to add a new slot to the type + + + + + + + Gets a value from a dynamic type and any sub-types. Values are stored in slots (which serve as a level of + indirection). This searches the types resolution order and returns the first slot that + contains the value. + + + + + Attempts to lookup a member w/o using the customizer. Equivelent to object.__getattribute__ + but it doens't throw an exception. + + + + + + Gets a value from a dynamic type and any sub-types. Values are stored in slots (which serve as a level of + indirection). This searches the types resolution order and returns the first slot that + contains the value. + + + + + Attempts to lookup a member w/o using the customizer. + + + + + + Sets a value on an instance. If a slot is available in the most derived type the slot + is set there, otherwise the value is stored directly in the instance. + + + + + Attempst to set a value w/o going through the customizer. + + This enables languages to provide the "base" implementation for setting attributes + so that the customizer can call back here. + + + + + Returns a list of all slot names for the type and any subtypes. + + The context that is doing the inquiry of InvariantContext.Instance. + + + + Returns a list of all slot names for the type, any subtypes, and the instance. + + The context that is doing the inquiry of InvariantContext.Instance. + the instance to get instance members from, or null. + + + + Adds members from a user defined type. + + + + + Adds members from a user defined type instance + + + + + Gets the .NET type which is used for instances of the Python type. + + When overridden by a metaclass enables a customization of the .NET type which + is used for instances of the Python type. Meta-classes can construct custom + types at runtime which include new .NET methods, fields, custom attributes or + other features to better interoperate with .NET. + + + + + Initializes a PythonType that represents a standard .NET type. The same .NET type + can be shared with the Python type system. For example object, string, int, + etc... are all the same types. + + + + + Creates a __new__ method for the type. If the type defines interesting constructors + then the __new__ method will call that. Otherwise if it has only a single argless + + + + + This will return a unique integer for every version of every type in the system. + This means that DynamicSite code can generate a check to see if it has the correct + PythonType and version with a single integer compare. + + TODO - This method and related code should fail gracefully on overflow. + + + + + Internal helper function to add a subtype + + + + + Returns a CLR WeakReference object to this PythonType that can be shared + between anyone who needs a weak reference to the type. + + + + + Gets the name of the dynamic type + + + + + Gets the resolution order used for attribute lookup + + + + + Gets the underlying system type that is backing this type. All instances of this + type are an instance of the underlying system type. + + + + + Gets the extension type for this type. The extension type provides + a .NET type which can be inherited from to extend sealed classes + or value types which Python allows inheritance from. + + + + + Gets the base types from which this type inherits. + + + + + True if the type is a system type. A system type is a type which represents an + underlying .NET type and not a subtype of one of these types. + + + + + Gets a list of weak references to all the subtypes of this class. May return null + if there are no subtypes of the class. + + + + + Base class for doing fast type invoke binding. Subclasses are created using + reflection once during the binding. The subclasses can then proceed to do + the binding w/o using reflection. Otherwise we'd have lots more reflection + calls which would slow the binding up. + + + + + Gets or creates delegate for calling the constructor function. + + + + + The type has a ctor which does not accept PythonTypes. This is used + for user defined types which implement __clrtype__ + + + + + Used when a type overrides __new__ with a Python function or other object + that can return an arbitrary value. If the return value is not the same type + as the type which had __new__ then we need to lookup __init__ on the type + and invoke it. Also handles initialization for finalization when __del__ + is defined for the same reasons. + + + + + target is the newly initialized value. + args are the arguments to be passed to __init__ + + + + + Couples a MemberGroup and the name which produces the member group together + + + + + Represents an ops-extension which adds a new slot. The slot can have arbitrary + get/set behavior above and beyond normal .NET methods or properties. This is + typically in regards to how it processes access from instances or subtypes. + + + + + Provides a slot object for the dictionary to allow setting of the dictionary. + + + + + Calculates the method resolution order for a Python class + the rules are: + If A is a subtype of B, then A has precedence (A > B) + If C appears before D in the list of bases then C > D + If E > F in one __mro__ then E > F in all __mro__'s for our subtype + + class A(object): pass + class B(object): pass + class C(B): pass + class N(A,B,C): pass # illegal + + This is because: + C.__mro__ == (C, B, object) + N.__mro__ == (N, A, B, C, object) + which would conflict, but: + + N(B,A) is ok (N, B, a, object) + N(C, B, A) is ok (N, C, B, A, object) + + Calculates a C3 MRO as described in "The Python 2.3 Method Resolution Order" + plus support for old-style classes. + + We build up a list of our base classes MRO's plus our base classes themselves. + We go through the list in order. Look at the 1st class in the current list, and + if it's not the non-first class in any other list then remove it from all the lists + and append it to the mro. Otherwise continue to the next list. If all the classes at + the start are no-good then the MRO is bad and we throw. + + For old-style classes if the old-style class is the only one in the list of bases add + it as a depth-first old-style MRO, otherwise compute a new-style mro for all the classes + and use that. + + + + + + + + + Returns the dictionary used to store state for this object + + + + + Python module. Stores classes, functions, and data. Usually a module + is created by importing a file or package from disk. But a module can also + be directly created by calling the module type and providing a name or + optionally a documentation string. + + + + + Creates a new module backed by a Scope. Used for creating modules for foreign Scope's. + + + + + Creates a new PythonModule with the specified dictionary. + + Used for creating modules for builtin modules which don't have any code associated with them. + + + + + Represents a member of a user-defined type which defines __slots__. The names listed in + __slots__ have storage allocated for them with the type and provide fast get/set access. + + + + + Gets the index into the object array to be used for the slot storage. + + + + + Helpers for interacting w/ .NET types. This includes: + + Member resolution via GetMember/GetMembers. This performs a member lookup which includes the registered + extension types in the PythonBinder. Internally the class has many MemberResolver's which provide + the various resolution behaviors. + + Cached member access - this is via static classes such as Object and provides various MemberInfo's so we're + not constantly looking up via reflection. + + + + list of resolvers which we run to resolve items + + + + Gets the statically known member from the type with the specific name. Searches the entire type hierarchy to find the specified member. + + + + + Gets all the statically known members from the specified type. Searches the entire type hierarchy to get all possible members. + + The result may include multiple resolution. It is the callers responsibility to only treat the 1st one by name as existing. + + + + + Gets the statically known member from the type with the specific name. Searches only the specified type to find the member. + + + + + Gets all the statically known members from the specified type. Searches only the specified type to find the members. + + The result may include multiple resolution. It is the callers responsibility to only treat the 1st one by name as existing. + + + + + Creates the resolver table which includes all the possible resolutions. + + + + + + Provides a resolution for __str__. + + + + + Provides a resolution for __repr__ + + + + + Helper to see if the type explicitly overrides the method. This ignores members + defined on object. + + + + + Provides a resolution for __hash__, first looking for IStructuralEquatable.GetHashCode, + then IValueEquality.GetValueHashCode. + + + + + Provides a resolution for __new__. For standard .NET types __new__ resolves to their + constructor. For Python types they inherit __new__ from their base class. + + TODO: Can we just always fallback to object.__new__? If not why not? + + + + + Provides a resolution for next + + + + + Provides a resolution for __len__ + + + + + Provides a resolution for __iter__ + + + + + Looks for an Equals overload defined on the type and if one is present binds __ne__ to an + InstanceOps helper. + + + + + Provides an implementation of __contains__. We can pull contains from: + ICollection of T which defines Contains directly + IList which defines Contains directly + IDictionary which defines Contains directly + IDictionary of K,V which defines Contains directly + IEnumerable of K which we have an InstaceOps helper for + IEnumerable which we have an instance ops helper for + IEnumerator of K which we have an InstanceOps helper for + IEnumerator which we have an instance ops helper for + + String is ignored here because it defines __contains__ via extension methods already. + + The lookup is well ordered and not dependent upon the order of values returned by reflection. + + + + + Helper for IEnumerable/IEnumerator __contains__ + + + + + Primary worker for getting the member(s) associated with a single name. Can be called with different MemberBinder's to alter the + scope of the search. + + + + + Primary worker for returning a list of all members in a type. Can be called with different MemberBinder's to alter the scope + of the search. + + + + + Helper to get a MemberGroup for methods declared on InstanceOps + + + + + Helper to get the proper typecasting method, according to the following precedence rules: + + 1. Strongest (most specific) declaring type + 2. Strongest (most specific) parameter type + 3. Type of conversion + i. Implicit + ii. Explicit + 4. Return type (order specified in toTypes) + + + + + Helper for creating a typecast resolver + + + + + Helper for creating __getitem__/__setitem__ resolvers + + false for a getter, true for a setter + + + + Filters out methods which are present on standard .NET types but shouldn't be there in Python + + + + + When private binding is enabled we can have a collision between the private Event + and private field backing the event. We filter this out and favor the event. + + This matches the v1.0 behavior of private binding. + + + + + Filters down to include only protected methods + + + + + If an operator is a reverisble operator (e.g. addition) then we need to filter down to just the forward/reverse + versions of the .NET method. For example consider: + + String.op_Multiplication(int, string) + String.op_Multiplication(string, int) + + If this method were defined on string it defines that you can do: + 2 * 'abc' + or: + 'abc' * 2 + + either of which will produce 'abcabc'. The 1st form is considered the reverse form because it is declared on string + but takes a non-string for the 1st argument. The 2nd is considered the forward form because it takes a string as the + 1st argument. + + When dynamically dispatching for 2 * 'abc' we'll first try __mul__ on int, which will fail with a string argument. Then we'll try + __rmul__ on a string which will succeed and dispatch to the (int, string) overload. + + For multiplication in this case it's not too interesting because it's commutative. For addition this might be more interesting + if, for example, we had unicode and ASCII strings. In that case Unicode strings would define addition taking both unicode and + ASCII strings in both forms. + + + + + Checks to see if the parameter type and the declaring type are compatible to determine + if an operator is forward or reverse. + + + + + Checks to see if this is an operator method which Python recognizes. For example + op_Comma is not recognized by Python and therefore should exposed to the user as + a method that is callable by name. + + + + + Provides a resolution for __complex__ + + + + + Provides a resolution for __float__ + + + + + Provides a resolution for __int__ + + + + + Provides a resolution for __long__ + + + + + Provides a resolution for __getitem__ + + + + + Provides a resolution for __setitem__ + + + + + Abstract class used for resolving members. This provides two methods of member look. The first is looking + up a single member by name. The other is getting all of the members. + + There are various subclasses of this which have different methods of resolving the members. The primary + function of the resolvers are to provide the name->value lookup. They also need to provide a simple name + enumerator. The enumerator is kept simple because it's allowed to return duplicate names as well as return + names of members that don't exist. The base MemberResolver will then verify their existance as well as + filter duplicates. + + + + + Looks up an individual member and returns a MemberGroup with the given members. + + + + + Returns a list of members that exist on the type. The ResolvedMember structure indicates both + the name and provides the MemberGroup. + + + + + Returns a list of possible members which could exist. ResolveMember needs to be called to verify their existance. Duplicate + names can also be returned. + + + + + One off resolver for various special methods which are known by name. A delegate is provided to provide the actual member which + will be resolved. + + + + + Standard resolver for looking up .NET members. Uses reflection to get the members by name. + + + + + Resolves methods mapped to __eq__ and __ne__ from: + 1. IStructuralEquatable.Equals + 2. IValueEquality.Equals (CLR2 only) + + + + + Resolves methods mapped to __gt__, __lt__, __ge__, __le__, as well as providing an alternate resolution + for __eq__ and __ne__, from the comparable type's CompareTo method. + + This should be run after the EqualityResolver. + + + + + Resolves methods mapped to __*__ methods automatically from the .NET operator. + + + + + Filters alternative methods out that don't match the expected signature and therefore + are just sharing a common method name. + + + + + Removes Object.Equals methods as we never return these for PythonOperationKind. + + + + + Provides bindings to private members when that global option is enabled. + + + + + Provides resolutions for protected members that haven't yet been + subclassed by NewTypeMaker. + + + + + Base class used for resolving a name into a member on the type. + + + + + Gets an instance op method for the given type and name. + + Instance ops methods appaer on the base most class that's required to expose it. So + if we have: Array[int], Array, object we'd only add an instance op method to Array and + Array[int] inherits it. It's obviously not on object because if it was there we'd just + put the method in ObjectOps. + + Therefore the different binders expose this at the appropriate times. + + + + + MemberBinder which searches the entire type hierarchy and their extension types to find a member. + + + + + MemberBinder which searches only the current type and it's extension types to find a member. + + + + + BuiltinFunction represents any standard CLR function exposed to Python. + This is used for both methods on standard Python types such as list or tuple + and for methods from arbitrary .NET assemblies. + + All calls are made through the optimizedTarget which is created lazily. + + TODO: Back BuiltinFunction's by MethodGroup's. + + + + + Creates a new builtin function for a static .NET function. This is used for module methods + and well-known __new__ methods. + + + + + Creates a built-in function for a .NET method declared on a type. + + + + + Creates a bound built-in function. The instance may be null for built-in functions + accessed for None. + + + + + Returns a BuiltinFunction bound to the provided type arguments. Returns null if the binding + cannot be performed. + + + + + Returns a descriptor for the built-in function if one is + neededed + + + + + Makes a test for the built-in function against the private _data + which is unique per built-in function. + + + + + Helper for generating the call to a builtin function. This is used for calls from built-in method + descriptors and built-in functions w/ and w/o a bound instance. + + This provides all sorts of common checks on top of the call while the caller provides a delegate + to do the actual call. The common checks include: + check for generic-only methods + reversed operator support + transforming arguments so the default binder can understand them (currently user defined mapping types to PythonDictionary) + returning NotImplemented from binary operators + Warning when calling certain built-in functions + + + The call binder we're doing the call for + An expression which points to the code context + the meta object for the built in function + true if we're calling with an instance + The arguments being passed to the function + A restriction for the built-in function, method desc, etc... + A delegate to perform the actual call to the method. + + + + Gets the target methods that we'll be calling. + + + + + True if the method should be visible to non-CLS opt-in callers + + + + + Provides (for reflected methods) a mapping from a signature to the exact target + which takes this signature. + signature with syntax like the following: + someClass.SomeMethod.Overloads[str, int]("Foo", 123) + + + + + Gets the overload dictionary for the logical function. These overloads + are never bound to an instance. + + + + + Returns the instance used for binding. This differs on module functions implemented + using instance methods so the built-in functions there don't expose the instance. + + + + + A custom built-in function which supports indexing + + + + + Use indexing on generic methods to provide a new reflected method with targets bound with + the supplied type arguments. + + + + + The unbound representation of an event property + + + + + BoundEvent is the object that gets returned when the user gets an event object. An + BoundEvent tracks where the event was received from and is used to verify we get + a proper add when dealing w/ statics events. + + + + + Represents a ReflectedProperty created for an extension method. Logically the property is an + instance property but the method implementing it is static. + + + + + Base class for properties backed by methods. These include our slot properties, + indexers, and normal properties. This class provides the storage of these as well + as the storage of our optimized getter/setter methods, documentation for the property, + etc... + + + + + Convenience function for users to call directly + + + + + This function can be used to set a field on a value type without emitting a warning. Otherwise it is provided only to have symmetry with properties which have GetValue/SetValue for supporting explicitly implemented interfaces. + + Setting fields on value types usually warns because it can silently fail to update the value you expect. For example consider this example where Point is a value type with the public fields X and Y: + + arr = System.Array.CreateInstance(Point, 10) + arr[0].X = 42 + print arr[0].X + + prints 0. This is because reading the value from the array creates a copy of the value. Setting the value then mutates the copy and the array does not get updated. The same problem exists when accessing members of a class. + + + + + Provides access to non-default .NET indexers (aka properties w/ parameters). + + C# doesn't support these, but both COM and VB.NET do. The types dictionary + gets populated w/a ReflectedGetterSetter indexer which is a descriptor. Getting + the descriptor returns a bound indexer. The bound indexer supports indexing. + We support multiple indexer parameters via expandable tuples. + + + + + Convenience function for users to call directly + + + + + Convenience function for users to call directly + + + + + True if generating code for gets can result in more optimal accesses. + + + + + single finalizable instance used to track and deliver all the + callbacks for a single object that has been weakly referenced by + one or more references and proxies. The reference to this object + is held in objects that implement IWeakReferenceable. + + + + + Finalizable object used to hook up finalization calls for OldInstances. + + We create one of these each time an object w/ a finalizer gets created. The + only reference to this object is the instance so when that goes out of context + this does as well and this will get finalized. + + + + + Marks a method/field/property as being a wrapper descriptor. A wrapper desriptor + is a member defined on PythonType but is available both for type and other + instances of type. For example type.__bases__. + + + + diff --git a/packages/IronPython.2.7.4/lib/Net35/Microsoft.Dynamic.dll b/packages/IronPython.2.7.4/lib/Net35/Microsoft.Dynamic.dll new file mode 100644 index 0000000000..64eb947014 Binary files /dev/null and b/packages/IronPython.2.7.4/lib/Net35/Microsoft.Dynamic.dll differ diff --git a/packages/IronPython.2.7.4/lib/Net35/Microsoft.Dynamic.xml b/packages/IronPython.2.7.4/lib/Net35/Microsoft.Dynamic.xml new file mode 100644 index 0000000000..71f095061e --- /dev/null +++ b/packages/IronPython.2.7.4/lib/Net35/Microsoft.Dynamic.xml @@ -0,0 +1,6569 @@ + + + + Microsoft.Dynamic + + + + + Binds named arguments to the parameters. Returns a permutation of indices that captures the relationship between + named arguments and their corresponding parameters. Checks for duplicate and unbound named arguments. + + Ensures that for all i: namedArgs[i] binds to parameters[args.Length + bindingPermutation[i]] + + + + + The number of arguments not counting the collapsed ones. + + + + + Gets the total number of visible arguments passed to the call site including collapsed ones. + + + + + ArgBuilder provides an argument value used by the MethodBinder. One ArgBuilder exists for each + physical parameter defined on a method. + + Contrast this with ParameterWrapper which represents the logical argument passed to the method. + + + + + Provides the Expression which provides the value to be passed to the argument. + If null is returned the argument is skipped (not passed to the callee). + + + + + Provides an Expression which will update the provided value after a call to the method. May + return null if no update is required. + + + + + If the argument produces a return value (e.g. a ref or out value) this provides + the additional value to be returned. + + + + + The number of actual arguments consumed by this builder. + + + + + Returns the type required for the argument or null if the ArgBuilder + does not consume a type. + + + + + An assignable value that is passed to a byref parameter + After the call it will contain the updated value + + + + + Indicates the specific type of failure, if any, from binding to a method. + + + + + The binding succeeded. Only one method was applicable or had the best conversion. + + + + + More than one method was applicable for the provided parameters and no method was considered the best. + + + + + There are no overloads that match the number of parameters required for the call + + + + + None of the target method(s) can successfully be called. The failure can be due to: + 1. Arguments could not be successfully converted for the call + 2. Keyword arguments could not be assigned to positional arguments + 3. Keyword arguments could be assigned but would result in an argument being assigned + multiple times (keyword and positional arguments conflit or dupliate keyword arguments). + + + + + Actual arguments cannot be constructed. + + + + + No method is callable. For example, all methods have an unbound generic parameter. + + + + + Encapsulates the result of an attempt to bind to one or methods using the OverloadResolver. + + Users should first check the Result property to see if the binding was successful or + to determine the specific type of failure that occured. If the binding was successful + MakeExpression can then be called to create an expression which calls the method. + If the binding was a failure callers can then create a custom error message based upon + the reason the call failed. + + + + + Creates a new BindingTarget when the method binding has succeeded. + + + + + Creates a new BindingTarget when the method binding has failed due to an incorrect argument count + + + + + Creates a new BindingTarget when the method binding has failued due to + one or more parameters which could not be converted. + + + + + Creates a new BindingTarget when the match was ambiguous + + + + + Other failure. + + + + + Gets an Expression which calls the binding target if the method binding succeeded. + + Throws InvalidOperationException if the binding failed. + + + + + Gets the result of the attempt to bind. + + + + + Returns the method if the binding succeeded, or null if no method was applicable. + + + + + Returns the selected overload if the binding succeeded, or null if no one was applicable. + + + + + Gets the name of the method as supplied to the OverloadResolver. + + + + + Returns the MethodTarget if the binding succeeded, or null if no method was applicable. + + + + + Returns the methods which don't have any matches or null if Result == BindingResult.AmbiguousMatch + + + + + Returns the methods and their associated conversion failures if Result == BindingResult.CallFailure. + + + + + Returns the acceptable number of arguments which can be passed to the method if Result == BindingResult.IncorrectArgumentCount. + + + + + Returns the total number of arguments provided to the call. 0 if the call succeeded or failed for a reason other + than argument count mismatch. + + + + + Gets the MetaObjects which we originally did binding against in their restricted form. + + The members of the array correspond to each of the arguments. All members of the array + have a value. + + + + + Returns the return type of the binding, or null if no method was applicable. + + + + + Returns the NarrowingLevel of the method if the call succeeded. If the call + failed returns NarrowingLevel.None. + + + + + Returns true if the binding was succesful, false if it failed. + + This is an alias for BindingTarget.Result == BindingResult.Success. + + + + + Creates a ReturnBuilder + + the type the ReturnBuilder will leave on the stack + + + + Represents the reason why a call to a specific method could not be performed by the OverloadResolver. + + The reason for the failure is specified by the CallFailureReason property. Once this property + has been consulted the other properties can be consulted for more detailed information regarding + the failure. + + If reason is ConversionFailure the ConversionResults property will be non-null. + If reason is UnassignableKeyword the KeywordArguments property will be non-null and include + the keywords which could not be assigned. + If reason is DuplicateKeyword the KeywordArguments property will be non-null and include + the keywords which were duplicated (either by the keywords themselves or by positional + arguments). + + MethodTarget is always set and indicates the method which failed to bind. + + + + + Gets the MethodTarget which the call failed for. + + + + + Gets the reason for the call failure which determines the other + properties of the CallFailure which should be consulted. + + + + + Gets a list of ConversionResult's for each parameter indicating + whether the conversion was successful or failed and the types + being converted. + + + + + Gets the list of keyword arguments that were either dupliated or + unassignable. + + + + + Default value, their was no CallFailure. + + + + + One of more parameters failed to be converted + + + + + One or more keyword arguments could not be successfully assigned to a positional argument + + + + + One or more keyword arguments were duplicated or would have taken the spot of a + provided positional argument. + + + + + Type arguments could not be inferred + + + + + Represents a collection of MethodCandidate's which all accept the + same number of logical parameters. For example a params method + and a method with 3 parameters would both be a CandidateSet for 3 parameters. + + + + + Represents information about a failure to convert an argument from one + type to another. + + + + + Value of the argument or null if it is not available. + + + + + Argument actual type or its limit type if the value not known. + DynamicNull if the argument value is null. + + + + + ArgBuilder which provides a default parameter value for a method call. + + + + + Provides binding and overload resolution to .NET methods. + + MethodBinder's can be used for: + generating new AST code for calling a method + calling a method via reflection at runtime + (not implemented) performing an abstract call + + MethodBinder's support default arguments, optional arguments, by-ref (in and out), and keyword arguments. + + Implementation Details: + + The MethodBinder works by building up a CandidateSet for each number of effective arguments that can be + passed to a set of overloads. For example a set of overloads such as: + foo(object a, object b, object c) + foo(int a, int b) + + would have 2 target sets - one for 3 parameters and one for 2 parameters. For parameter arrays + we fallback and create the appropriately sized CandidateSet on demand. + + Each CandidateSet consists of a set of MethodCandidate's. Each MethodCandidate knows the flattened + parameters that could be received. For example for a function such as: + foo(params int[] args) + + When this method is in a CandidateSet of size 3 the MethodCandidate takes 3 parameters - all of them + ints; if it's in a CandidateSet of size 4 it takes 4 parameters. Effectively a MethodCandidate is + a simplified view that allows all arguments to be treated as required positional arguments. + + Each MethodCandidate in turn refers to a MethodTarget. The MethodTarget is composed of a set + of ArgBuilder's and a ReturnBuilder which know how to consume the positional arguments and pass + them to the appropriate argument of the destination method. This includes routing keyword + arguments to the correct position, providing the default values for optional arguments, etc... + + After binding is finished the MethodCandidates are thrown away and a BindingTarget is returned. + The BindingTarget indicates whether the binding was successful and if not any additional information + that should be reported to the user about the failed binding. It also exposes the MethodTarget which + allows consumers to get the flattened list of required parameters for the call. MethodCandidates + are not exposed and are an internal implementation detail of the MethodBinder. + + + + + Resolves a method overload and returns back a BindingTarget. + + The BindingTarget can then be tested for the success or particular type of + failure that prevents the method from being called. If successfully bound the BindingTarget + contains a list of argument meta-objects with additional restrictions that ensure the selection + of the particular overload. + + + + + Checks to see if the language allows named arguments to be bound to instance fields or + properties and turned into setters. By default this is only allowed on contructors. + + + + + Gets an expression that evaluates to the result of GetByRefArray operation. + + + + + Allow to bind an array/dictionary instance or a null reference to params array/dictionary parameter. + + + + + Called before arguments binding. + + + A bitmask that indicates (set bits) the parameters that were mapped by this method. + A default mapping will be constructed for the remaining parameters (cleared bits). + + + + + Return null if arguments cannot be constructed and overload resolution should produce an error. + + + + + Determines whether given overloads are overloaded on index-th parameter (the types of the index-th parameters are the same). + + + + + Selects the best (of two) candidates for conversion from actualType + + + + + Provides ordering for two parameter types if there is no conversion between the two parameter types. + + + + + The method is called each time an item of lazily splatted argument is needed. + + + + + The number of actual arguments consumed by this builder. + + + + + ArgBuilder which provides a value for a keyword argument. + + The KeywordArgBuilder calculates its position at emit time using it's initial + offset within the keyword arguments, the number of keyword arguments, and the + total number of arguments provided by the user. It then delegates to an + underlying ArgBuilder which only receives the single correct argument. + + Delaying the calculation of the position to emit time allows the method binding to be + done without knowing the exact the number of arguments provided by the user. Hence, + the method binder can be dependent only on the set of method overloads and keyword names, + but not the user arguments. While the number of user arguments could be determined + upfront, the current MethodBinder does not have this design. + + + + + The underlying builder should expect a single parameter as KeywordArgBuilder is responsible + for calculating the correct parameter to use + + + + + + Updates fields/properties of the returned value with unused keyword parameters. + + + + + MethodCandidate represents the different possible ways of calling a method or a set of method overloads. + A single method can result in multiple MethodCandidates. Some reasons include: + - Every optional parameter or parameter with a default value will result in a candidate + - The presence of ref and out parameters will add a candidate for languages which want to return the updated values as return values. + - ArgumentKind.List and ArgumentKind.Dictionary can result in a new candidate per invocation since the list might be different every time. + + Each MethodCandidate represents the parameter type for the candidate using ParameterWrapper. + + + + + Builds a new MethodCandidate which takes count arguments and the provided list of keyword arguments. + + The basic idea here is to figure out which parameters map to params or a dictionary params and + fill in those spots w/ extra ParameterWrapper's. + + + + + Narrowing conversions are conversions that cannot be proved to always succeed, conversions that are + known to possibly lose information, and conversions across domains of types sufficiently different + to merit narrowing notation like casts. + + Its upto every language to define the levels for conversions. The narrowling levels can be used by + for method overload resolution, where the overload is based on the parameter types (and not the number + of parameters). + + + + + Conversions at this level do not do any narrowing. Typically, this will include + implicit numeric conversions, Type.IsAssignableFrom, StringBuilder to string, etc. + + + + + Language defined prefered narrowing conversion. First level that introduces narrowing + conversions. + + + + + Language defined preferred narrowing conversion. Second level that introduces narrowing + conversions and should have more conversions than One. + + + + + Language defined preferred narrowing conversion. Third level that introduces narrowing + conversions and should have more conversions that Two. + + + + + A somewhat meaningful conversion is possible, but it will quite likely be lossy. + For eg. BigInteger to an Int32, Boolean to Int32, one-char string to a char, + larger number type to a smaller numeric type (where there is no overflow), etc + + + + + Builds the argument for an out argument when not passed a StrongBox. The out parameter + is returned as an additional return value. + + + + + Defines a method overload abstraction for the purpose of overload resolution. + It provides the overload resolver the metadata it needs to perform the resolution. + + + WARNING: This is a temporary API that will undergo breaking changes in future versions. + + + + + Null for constructors. + + + + + The method arity can vary, i.e. the method has params array or params dict parameters. + + + + + Represents a method overload that is bound to a . + + + Not thread safe. + WARNING: This is a temporary API that will undergo breaking changes in future versions. + + + + + Maps out parameters to return args and ref parameters to ones that don't accept StrongBox. + + + + + ParameterWrapper represents the logical view of a parameter. For eg. the byref-reduced signature + of a method with byref parameters will be represented using a ParameterWrapper of the underlying + element type, since the logical view of the byref-reduced signature is that the argument will be + passed by value (and the updated value is included in the return value). + + Contrast this with ArgBuilder which represents the real physical argument passed to the method. + + + + + ParameterInfo is not available. + + + + + Creates a parameter that represents an expanded item of params-array. + + + + + True if the wrapper represents a params-array parameter (false for parameters created by expansion of a params-array). + + + + + True if the wrapper represents a params-dict parameter (false for parameters created by expansion of a params-dict). + + + + + Builds the parameter for a params dictionary argument - this collects all the extra name/value + pairs provided to the function into a SymbolDictionary which is passed to the function. + + + + + An argument that the user wants to explicitly pass by-reference (with copy-in copy-out semantics). + The user passes a StrongBox[T] object whose value will get updated when the call returns. + + + + + SimpleArgBuilder produces the value produced by the user as the argument value. It + also tracks information about the original parameter and is used to create extended + methods for params arrays and param dictionary functions. + + + + + Parameter info is not available for this argument. + + + + + Type and whether the parameter is a params-array or params-dictionary is derived from info. + + + + + True if there are restrictions beyond just simple type restrictions + + + + + Builds a parameter for a reference argument when a StrongBox has not been provided. The + updated return value is returned as one of the resulting return values. + + + + + Gets the generic arguments for method based upon the constraints discovered during + type inference. Returns null if not all generic arguments had their types inferred. + + + + + Creates a new set of arg builders for the given generic method definition which target the new + parameters. + + + + + Creates a new list of ParameterWrappers for the generic method replacing the old parameters with the new ones. + + + + + Gets the generic type arguments sorted so that the type arguments + that are depended upon by other type arguments are sorted before + their dependencies. + + + + + Checks to see if the x type parameter is dependent upon the y type parameter. + + + + + Builds a mapping based upon generic parameter constraints between related generic + parameters. This is then used to sort the generic parameters so that we can process + the least dependent parameters first. For example given the method: + + void Foo{T0, T1}(T0 x, T1 y) where T0 : T1 + + We need to first infer the type information for T1 before we infer the type information + for T0 so that we can ensure the constraints are correct. + + + + + Returns a mapping from generic type parameter to the input DMOs which map to it. + + + + + Adds any additional ArgumentInputs entries for the given object and parameter type. + + + + + Walks the nested generic hierarchy to construct all of the generic parameters referred + to by this type. For example if getting the generic parameters for the x parameter on + the method: + + void Foo{T0, T1}(Dictionary{T0, T1} x); + + We would add both typeof(T0) and typeof(T1) to the list of generic arguments. + + + + + Provides generic type inference for a single parameter. + + + For example: + M{T}(T x) + M{T}(IList{T} x) + M{T}(ref T x) + M{T}(T[] x) + M{T}(ref Dictionary{T,T}[] x) + + + + + Provides generic type inference for a single parameter. + + + For example: + M{T}(T x) + M{T}(IList{T} x) + M{T}(ref T x) + M{T}(T[] x) + M{T}(ref Dictionary{T,T}[] x) + + + + + Checks if the constraints are violated by the given input for the specified generic method parameter. + + This method must be supplied with a mapping for any dependent generic method type parameters which + this one can be constrained to. For example for the signature "void Foo{T0, T1}(T0 x, T1 y) where T0 : T1". + we cannot know if the constraints are violated unless we know what we have calculated T1 to be. + + + + + Finds all occurences of genericParameter in openType and the corresponding concrete types in closedType. + Returns true iff all occurences of the generic parameter in the open type correspond to the same concrete type in the closed type + and this type satisfies given constraints. Returns the concrete type in match if so. + + + + + Maps a single type parameter to the possible parameters and DynamicMetaObjects + we can get inference from. For example for the signature: + + void Foo{T0, T1}(T0 x, T1 y, IList{T1} z); + + We would have one ArgumentInput for T0 which holds onto the DMO providing the argument + value for x. We would also have one ArgumentInput for T1 which holds onto the 2 DMOs + for y and z. Associated with y would be a GenericParameterInferer and associated with + z would be a ConstructedParameterInferer. + + + + + Implemented by DynamicMetaObject subclasses when the associated object + can participate in generic method type inference. This interface + is used when the inference engine is attempting to perform type inference + for a parameter which is typed to a delegate type. + + + + + Returns the type inferred for parameterType when performing + inference for a conversion to delegateType. + + + + + Provides information about the result of a custom object which dynamically + infers back types. + + Currently only used for invokable objects to feedback the types for a delegate + type. + + + + + Determines the result of a conversion action. The result can either result in an exception, a value that + has been successfully converted or default(T), or a true/false result indicating if the value can be converted. + + + + + Attempts to perform available implicit conversions and throws if there are no available conversions. + + + + + Attempst to perform available implicit and explicit conversions and throws if there are no available conversions. + + + + + Attempts to perform available implicit conversions and returns default(ReturnType) if no conversions can be performed. + + If the return type of the rule is a value type then the return value will be zero-initialized. If the return type + of the rule is object or another class then the return type will be null (even if the conversion is to a value type). + This enables ImplicitTry to be used to do TryConvertTo even if the type is value type (and the difference between + null and a real value can be distinguished). + + + + + Attempts to perform available implicit and explicit conversions and returns default(ReturnType) if no conversions + can be performed. + + If the return type of the rule is a value type then the return value will be zero-initialized. If the return type + of the rule is object or another class then the return type will be null (even if the conversion is to a value type). + This enables ExplicitTry to be used to do TryConvertTo even if the type is value type (and the difference between + null and a real value can be distinguished). + + + + + Provides binding semantics for a language. This include conversions as well as support + for producing rules for actions. These optimized rules are used for calling methods, + performing operators, and getting members using the ActionBinder's conversion semantics. + + + + + Provides binding semantics for a language. This include conversions as well as support + for producing rules for actions. These optimized rules are used for calling methods, + performing operators, and getting members using the ActionBinder's conversion semantics. + + + + + Converts an object at runtime into the specified type. + + + + + Determines if a conversion exists from fromType to toType at the specified narrowing level. + toNotNullable is true if the target variable doesn't allow null values. + + + + + Provides ordering for two parameter types if there is no conversion between the two parameter types. + + + + + Converts the provided expression to the given type. The expression is safe to evaluate multiple times. + + + + + Gets the members that are visible from the provided type of the specified name. + + The default implemetnation first searches the type, then the flattened heirachy of the type, and then + registered extension methods. + + + + + Called when a set is attempting to assign to a field or property from a derived class through the base class. + + The default behavior is to allow the assignment. + + + + + Creates an ErrorInfo object when a static property is accessed from an instance member. The default behavior is throw + an exception indicating that static members properties be accessed via an instance. Languages can override this to + customize the exception, message, or to produce an ErrorInfo object which reads or writes to the property being accessed. + + The static property being accessed through an instance + True if the user is assigning to the property, false if the user is reading from the property + The parameters being used to access the property. This includes the instance as the first entry, any index parameters, and the + value being assigned as the last entry if isAssignment is true. + + + + + Provides a way for the binder to provide a custom error message when lookup fails. Just + doing this for the time being until we get a more robust error return mechanism. + + Deprecated, use the non-generic version instead + + + + + Gets the extension members of the given name from the provided type. Base classes are also + searched for their extension members. Once any of the types in the inheritance hierarchy + provide an extension member the search is stopped. + + + + + Gets the extension members of the given name from the provided type. Subclasses of the + type and their extension members are not searched. + + + + + Provides an opportunity for languages to replace all MemberTracker's with their own type. + + Alternatlely a language can expose MemberTracker's directly. + + The member which is being returned to the user. + Tthe type which the memberTrack was accessed from + + + + + Determines if the binder should allow access to non-public members. + + By default the binder does not allow access to non-public members. Base classes + can inherit and override this value to customize whether or not private binding + is available. + + + + + Creates the MetaObject for indexing directly into arrays or indexing into objects which have + default members. Returns null if we're not an indexing operation. + + + + + Creates the MetaObject for indexing directly into arrays or indexing into objects which have + default members. Returns null if we're not an indexing operation. + + + + + Creates the meta object for the rest of the operations: comparisons and all other + ExpressionType. If the operation cannot be completed a MetaObject which indicates an + error will be returned. + + + + + Creates the meta object for the rest of the operations: comparisons and all other + ExpressionType. If the operation cannot be completed a MetaObject which indicates an + error will be returned. + + + + + Produces a rule for comparing a value to null - supports comparing object references and nullable types. + + + + + Checks if the conversion is to object and produces a target if it is. + + + + + Checks if any conversions are available and if so builds the target for that conversion. + + + + + Checks if the conversion can be handled by a simple cast. + + + + + Checks if the conversion can be handled by calling a user-defined conversion method. + + + + + Helper that checkes both types to see if either one defines the specified conversion + method. + + + + + Checks if any of the members of the MemberGroup provide the applicable conversion and + if so uses it to build a conversion rule. + + + + + Checks if the conversion is to applicable by extracting the value from Extensible of T. + + + + + Checks if there's an implicit numeric conversion for primitive data types. + + + + + Checks if there's a conversion to/from Nullable of T. + + + + + Checks to see if there's a conversion of null to a reference type + + + + + Helper to produce an error when a conversion cannot occur + + + + + Helper to produce a rule which just boxes a value type + + + + + Helper to produce a conversion rule by calling the helper method to do the convert + + + + + Helper to produce a conversion rule by calling the helper method to do the convert + + + + + Helper to produce a conversion rule by calling the method to do the convert. This version takes the parameter + to be passed to the conversion function and we call it w/ our own value or w/ our Extensible.Value. + + + + + Helper to wrap explicit conversion call into try/catch incase it throws an exception. If + it throws the default value is returned. + + + + + Helper to produce a rule when no conversion is required (the strong type of the expression + input matches the type we're converting to or has an implicit conversion at the IL level) + + + + + Helper to produce a rule when no conversion is required from an extensible type's + underlying storage to the type we're converting to. The type of extensible type + matches the type we're converting to or has an implicit conversion at the IL level. + + + + + Helper to extract the value from an Extensible of T + + + + + Helper to convert a null value to nullable of T + + + + + Helper to produce the rule for converting T to Nullable of T + + + + + Helper to produce the rule for converting T to Nullable of T + + + + + Returns a value which indicates failure when a OldConvertToAction of ImplicitTry or + ExplicitTry. + + + + + Helper to extract the Value of an Extensible of T from the + expression being converted. + + + + + Helper that checks if fromType is an Extensible of T or a subtype of + Extensible of T and if so returns the T. Otherwise it returns fromType. + + This is used to treat extensible types the same as their underlying types. + + + + + Creates a target which returns null for a reference type. + + + + if a member-injector is defined-on or registered-for this type call it + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + Returns a DynamicMetaObject which represents the value that will be returned when the member is accessed. + + The returned DynamicMetaObject may be strongly typed to a value type which needs boxing before being + returned from a standard DLR GetMemberBinder. The language is responsible for performing any boxing + so that it has an opportunity to perform custom boxing. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + Provides overload resolution and method binding for any calls which need to be performed for the GetMember. + + + Returns a DynamicMetaObject which represents the value that will be returned when the member is accessed. + + The returned DynamicMetaObject may be strongly typed to a value type which needs boxing before being + returned from a standard DLR GetMemberBinder. The language is responsible for performing any boxing + so that it has an opportunity to perform custom boxing. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + An OverloadResolverFactory which can be used for performing overload resolution and method binding. + + + True if the operation should return Operation.Failed on failure, false if it + should return the exception produced by MakeMissingMemberError. + + + The meta object to be used if the get results in an error. + + + Returns a DynamicMetaObject which represents the value that will be returned when the member is accessed. + + The returned DynamicMetaObject may be strongly typed to a value type which needs boxing before being + returned from a standard DLR GetMemberBinder. The language is responsible for performing any boxing + so that it has an opportunity to perform custom boxing. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + True if the operation should return Operation.Failed on failure, false if it + should return the exception produced by MakeMissingMemberError. + + + The meta object to be used if the get results in an error. + + + Returns a DynamicMetaObject which represents the value that will be returned when the member is accessed. + + The returned DynamicMetaObject may be strongly typed to a value type which needs boxing before being + returned from a standard DLR GetMemberBinder. The language is responsible for performing any boxing + so that it has an opportunity to perform custom boxing. + + + + if a member-injector is defined-on or registered-for this type call it + + + + Provides default binding for performing a call on the specified meta objects. + + The signature describing the call + The meta object to be called. + + Additional meta objects are the parameters for the call as specified by the CallSignature in the CallAction. + + A MetaObject representing the call or the error. + + + + Provides default binding for performing a call on the specified meta objects. + + The signature describing the call + The meta object to be called. + + Additional meta objects are the parameters for the call as specified by the CallSignature in the CallAction. + + Overload resolver factory. + A MetaObject representing the call or the error. + + + + Provides default binding for performing a call on the specified meta objects. + + The signature describing the call + The meta object to be called. + + Additional meta objects are the parameters for the call as specified by the CallSignature in the CallAction. + + Overload resolver factory. + The result should the object be uncallable. + A MetaObject representing the call or the error. + + + + Gets a TargetInfo object for performing a call on this object. + + If this object is a delegate we bind to the Invoke method. + If this object is a MemberGroup or MethodGroup we bind to the methods in the member group. + If this object is a BoundMemberTracker we bind to the methods with the bound instance. + If the underlying type has defined an operator Call method we'll bind to that method. + + + + + Binds to the methods in a method group. + + + + + Binds to the methods in a member group. + + TODO: We should really only have either MemberGroup or MethodGroup, not both. + + + + + Binds to the BoundMemberTracker and uses the instance in the tracker and restricts + based upon the object instance type. + + + + + Binds to the Invoke method on a delegate if this is a delegate type. + + + + + Attempts to bind to an operator Call method. + + + + + Performs binding against a set of overloaded methods using the specified arguments. The arguments are + consumed as specified by the CallSignature object. + + Overload resolver. + The methods to be called + A meta object which results from the call. + + + + Performs binding against a set of overloaded methods using the specified arguments. The arguments are + consumed as specified by the CallSignature object. + + Overload resolver. + The methods to be called + The name of the method or null to use the name from targets. + A meta object which results from the call. + + + + Performs binding against a set of overloaded methods using the specified arguments. The arguments are + consumed as specified by the CallSignature object. + + Overload resolver. + The methods to be called + Additional restrictions which should be applied to the resulting MetaObject. + A meta object which results from the call. + + + + Performs binding against a set of overloaded methods using the specified arguments. The arguments are + consumed as specified by the CallSignature object. + + Overload resolver. + The methods to be called + Additional restrictions which should be applied to the resulting MetaObject. + The name of the method or null to use the name from targets. + A meta object which results from the call. + + + + Performs binding against a set of overloaded methods using the specified arguments. The arguments are + consumed as specified by the CallSignature object. + + TODO. + TODO. + Overload resolver. + The methods to be called + Additional restrictions which should be applied to the resulting MetaObject. + The resulting binding target which can be used for producing error information. + The name of the method or null to use the name from targets. + A meta object which results from the call. + + + + Makes test for param arrays and param dictionary parameters. + + + + + Pulls out the right argument to build the splat test. MakeParamsTest makes the actual test. + + + + + Builds the restrictions for calling with a splatted argument array. Ensures that the + argument is still an ICollection of object and that it has the same number of arguments. + + + + + Builds the restrictions for calling with keyword arguments. The restrictions include + tests on the individual keys of the dictionary to ensure they have the same names. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + The value being assigned to the target member. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + The value being assigned to the target member. + + + Provides overload resolution and method binding for any calls which need to be performed for the SetMember. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + The value being assigned to the target member. + + + Provides a DynamicMetaObject that is to be used as the result if the member cannot be set. If null then then a language + specific error code is provided by ActionBinder.MakeMissingMemberErrorForAssign which can be overridden by the language. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + The value being assigned to the target member. + + + Provides overload resolution and method binding for any calls which need to be performed for the SetMember. + + + Provides a DynamicMetaObject that is to be used as the result if the member cannot be set. If null then then a language + specific error code is provided by ActionBinder.MakeMissingMemberErrorForAssign which can be overridden by the language. + + + + if a member-injector is defined-on or registered-for this type call it + + + + Provides a way for the binder to provide a custom error message when lookup fails. Just + doing this for the time being until we get a more robust error return mechanism. + + + + + Called when the user is accessing a protected or private member on a get. + + The default implementation allows access to the fields or properties using reflection. + + + + + Provides a way for the binder to provide a custom error message when lookup fails. Just + doing this for the time being until we get a more robust error return mechanism. + + + + + Helper class for flowing information about the GetMember request. + + + + + Helper class for flowing information about the GetMember request. + + + + + Encapsulates information about the target of the call. This includes an implicit instance for the call, + the methods that we'll be calling as well as any restrictions required to perform the call. + + + + + A MetaObject which was produced as the result of a failed binding. + + + + + Interceptor prototype. The interceptor is a call site binder that wraps + a real call site binder and can perform arbitrary operations on the expression + trees that the wrapped binder produces: + * Dumping the trees + * Additional rewriting + * Static compilation + * ... + + + + + Returns true if the method should not be displayed in the stack frame. + + + + + Specifies the action for which the default binder is requesting a member. + + + + + If the number of items added to the builder is greater than 4 returns a read-only collection builder containing all the items. + Returns null otherwise. + + + + + Returns null if no expression was added into the builder. + If only a single expression was added returns it. + Otherwise returns a containing the expressions added to the builder. + + + + + Wrapping a tree in this node enables jumps from finally blocks + It does this by generating control-flow logic in the tree + + Reducing this node requires a full tree walk of its body + (but not nested lambdas) + + WARNING: this node cannot contain jumps across blocks, because it + assumes any unknown jumps are jumps to an outer scope. + + + + + Factory methods. + + + + + Determines whether specified expression type represents an assignment. + + + True if the expression type represents an assignment. + + + Note that some other nodes can also assign to variables, members or array items: + MemberInit, NewArrayInit, Call with ref params, New with ref params, Dynamic with ref params. + + + + + Determines if the left child of the given expression is read or written to or both. + + + + + Converts an expression to a void type. + + An to convert to void. + An that has the property equal to and the and property set to void. + + + + Returns an expression that boxes a given value. Uses boxed objects cache for Int32 and Boolean types. + + + + + Creates a generator with type IEnumerable{T}, where T is the label.Type + + + + + + + + Null coalescing expression + {result} ::= ((tmp = {_left}) == null) ? {right} : tmp + '??' operator in C#. + + + + + True coalescing expression. + {result} ::= IsTrue(tmp = {left}) ? {right} : tmp + Generalized AND semantics. + + + + + False coalescing expression. + {result} ::= IsTrue(tmp = {left}) ? tmp : {right} + Generalized OR semantics. + + + + + True coalescing expression. + {result} ::= IsTrue(tmp = {left}) ? {right} : tmp + Generalized AND semantics. + + + + + False coalescing expression. + {result} ::= IsTrue(tmp = {left}) ? tmp : {right} + Generalized OR semantics. + + + + + Wraps the given value in a WeakReference and returns a tree that will retrieve + the value from the WeakReference. + + + + + Creates new instance of the LambdaBuilder with the specified name and return type. + + Return type of the lambda being built. + Name for the lambda being built. + new LambdaBuilder instance + + + + The helper to create the AST method call node. Will add conversions (Utils.Convert) + to parameters and instance if necessary. + + + + + The helper to create the AST method call node. Will add conversions (Utils.Convert) + to parameters and instance if necessary. + + + + + The complex call helper to create the AST method call node. + Will add conversions (Expression.Convert()), deals with default parameter values and params arrays. + + + + + The purpose of this rewriter is simple: ETs do not allow jumps (break, continue, return, goto) + that would go through a finally/fault. So we replace them with code that instead stores a flag, + and then jumps to the end of the finally/fault. At the end of the try-finally, we emit a switch + that then jumps to the correct label. + + A few things that make this more complicated: + + 1. If a finally contains a jump out, then jumps in the try/catch need to be replaced as well. + It's to support cases like this: + # returns 234 + def foo(): + try: return 123 + finally: return 234 + + We need to replace the "return 123" because after it jumps, we'll go to the finally, which + might decide to jump again, but once the IL finally exits, it ignores the finally jump and + keeps going with the original jump. The moral of the story is: if any jumps in finally are + rewritten, try/catch jumps must be also. + + 2. To generate better code, we only have one state variable, so if we have to jump out of + multiple finallys we just keep jumping. It looks sort of like this: + foo: + try { ... } finally { + try { ... } finally { + ... + if (...) { + // was: goto foo; + $flow = 1; goto endInnerFinally; + } + ... + endInnerFinally: + } + switch ($flow) { + case 1: goto endOuterFinally; + } + ... + endOuterFinally: + } + switch ($flow) { + case 1: $flow = 0; goto foo; + } + ... + + + + + + Implemented by expressions which can provide a version which is aware of light exceptions. + + Normally these expressions will simply reduce to a version which throws a real exception. + When the expression is used inside of a region of code which supports light exceptions + the light exception re-writer will call ReduceForLightExceptions. The expression can + then return a new expression which can return a light exception rather than throwing + a real .NET exception. + + + + + Implemented by binders which support light exceptions. Dynamic objects + binding against a binder which implements this interface can check + SupportsLightThrow to see if the binder currently supports safely + returning a light exception. Light exceptions can be created with + LightException.Throw. + + Binders also need to implement GetlightBinder. This method + returns a new call site binder which may return light exceptions if + the binder supports them. + + + + + Gets a binder which will support light exception if one is + available. + + + + + Returns true if a callsite binding against this binder can + return light exceptions. + + + + + Provides a method call to a method which may return light exceptions. + + The call is to a method which supports light exceptions. When reducing + an additional check and throw is added. When a block code of is re-written + for light exceptions this instead reduces to not throw a .NET exception. + + + + + Expression which produces a light exception value. This should be constructed + with the expression which creates the exception and this method will then call + a helper method which wraps the exception in our internal light exception class. + + + + + Used by compilers to provide additional debug information about LambdaExpression to DebugContext + + + + + Implemented by compilers to allow the traceback engine to get additional information. + + + + + Provides services to compilers for instrumenting code with tracebacks. + + + + + Creates a new instance of DebugContext + + + + + Transforms a LambdaExpression to a debuggable LambdaExpression + + + + + Transforms a LambdaExpression to a debuggable LambdaExpression + + + + + Resets a state associated with a source file that's maintained in the DebugContext + + + + + Threads + + + + + Hook + + + + + // This method is called from the generator to update the frame with generator's locals + + + + + Remaps the frame's state to use the generator for execution. + + Int32.MaxValue to map to latest version + + + + Thread + + + + + FrameOrder + + + + + Variables + + + + + CurrentSequencePointIndex + + + + + DebuggableLambdaBuilder is used to transform a DLR expression tree into a debuggable lambda expression. + + + + + Used to wrap a lambda that was already a generator prior to transform. + + + + + Used to rewrite expressions containing DebugInfoExpressions. + + + + + Combines source file and span. Also provides Contains and Intersects functionality. + + + + + Implementation of IDebugRuntimeVariables, which wraps IRuntimeVariables + FunctionInfo/DebugMarker + + + + + IDebugRuntimeVariables is used to wrap IRuntimeVariables and add properties for retrieving + FunctionInfo and DebugMarker from debuggable labmdas. + + + + + Default implementation of BaseDebugThread, which uses DLR's RuntimeVariablesExpression for lifting locals. + + + + + Default implementation of IDebugThreadFactory, which uses DLR's RuntimeVariablesExpression for lifting locals. + + + + + IDebugThreadFactory is used to abstract how frames and local variables are maintained at run/debug time. + + + + + GetTraceLocations + + + + + + SequencePoints + + + + + Name + + + + + CustomPayload + + + + + Callback that is fired by the traceback engine + + + + + Used to extract locals information from expressions. + + + + + Strongly-typed and parameterized string factory. + + + + + Implements IRuntimeVariables in a way that preserves scoping within the lambda. + + + + + TraceSession + + + + + Used to provide information about locals/parameters at debug time. + + + + + Type + + + + + Name + + + + + Parameter + + + + + Caches type member lookup. + + + When enumerating members (methods, properties, events) of a type (declared or inherited) Reflection enumerates all + runtime members of the type and its base types and caches the result. + When looking for a member of a specific name Reflection still enumerates all and filters out those that don't match the name. + That's inefficient when looking for members of multiple names one by one. + Instead we build a map of name to member list and then answer subsequent queries by simply looking up the dictionary. + + + + + Marks a method which may return a light exception. Such + methods need to have their return value checked and the exception + will need to be thrown if the caller is not light exception aware. + + + + + Internal re-writer class which creates code which is light exception aware. + + + + + Adds light exception handling to the provided expression which + is light exception aware. + + + + + Class used to be avoid overhead of creating expression trees when we're usually + + + + + Provides support for light exceptions. These exceptions are propagated by + returning an instance of a private wrapper class containing the exception. Code + which is aware of light exceptions will branch to apporiate exception handling + blocks when in a try and otherwise return the value up the stack. This avoids + using the underlying CLR exception mechanism with overhead such as creating stack + traces. + + When a light exception reaches the boundary of code which is not light exception + aware the caller must check to see if a light exception is being thrown and if + so raise a .NET exception. + + This class provides methods for re-writing expression trees to support light exceptions, + methods to create light throw objects, check if an object is a light + throw object, and turn such an object back into a .NET Exception which can be thrown. + + Light exceptions also don't build up stack traces or interoperate with filter blocks + via 2-pass exception handling. + + + + + Rewrites the provided expression to support light exceptions. + + Calls to the returned expression, if not from other light-weight aware calls, + need to call GetLightException on return to see if an exception was thrown + and if so throw it. + + + + + Returns a new expression which will lazily reduce to a light + expression re-written version of the same expression. + + + + + Returns a new expression which is re-written for light exceptions + but will throw an exception if it escapes the expression. If this + expression is part of a larger experssion which is later re-written + for light exceptions then it will propagate the light exception up. + + + + + Returns an object which represents a light exception. + + + + + Returns an object which represents a light exception. + + + + + Returns an object which represents a light exception. + + + + + If the binder supports light exceptions then a light exception throwing expression is returned. + + Otherwise a normal throwing expression is returned. + + + + + If the binder supports light exceptions then a light exception throwing expression is returned. + + Otherwise a normal throwing expression is returned. + + + + + Throws the exception if the value represents a light exception + + + + + Wraps the expression in a check and rethrow. + + + + + Checks to see if the provided value is a light exception. + + + + + Gets the light exception from an object which may contain a light + exception. Returns null if the object is not a light exception. + + Used for throwing the exception at non-light exception boundaries. + + + + + Returns true if the call site binder is a light exception binder and supports + light throws. Returns false otherwise. + + + + + + + Sealed wrapper class to indicate something is a light exception. + + + + + Stores information needed to emit debugging symbol information for a + source file, in particular the file name and unique language identifier + + + + + The source file name + + + + + Returns the language's unique identifier, if any + + + + + Returns the language vendor's unique identifier, if any + + + + + ArgBuilder provides an argument value used by the MethodBinder. One ArgBuilder exists for each + physical parameter defined on a method. + + Contrast this with ParameterWrapper which represents the logical argument passed to the method. + + + + + Provides the Expression which provides the value to be passed to the argument. + + + + + Provides the Expression which provides the value to be passed to the argument. + This method is called when result is intended to be used ByRef. + + + + + Provides an Expression which will update the provided value after a call to the method. + May return null if no update is required. + + + + + SimpleArgBuilder produces the value produced by the user as the argument value. It + also tracks information about the original parameter and is used to create extended + methods for params arrays and param dictionary functions. + + + + + Provides the implementation of performing AddAssign and SubtractAssign binary operations. + + The binder provided by the call site. + The handler for the operation. + The result of the operation. + true if the operation is complete, false if the call site should determine behavior. + + + + Adds a handler to an event. + + The handler to be added. + The original event with handler added. + + + + Removes handler from the event. + + The handler to be removed. + The original event with handler removed. + + + + Provides helper methods to bind COM objects dynamically. + + + + + Determines if an object is a COM object. + + The object to test. + true if the object is a COM object, false otherwise. + + + + Tries to perform binding of the dynamic get member operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + The new representing the result of the binding. + true if member evaluation may be delayed. + true if operation was bound successfully; otherwise, false. + + + + Tries to perform binding of the dynamic get member operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + The new representing the result of the binding. + true if operation was bound successfully; otherwise, false. + + + + Tries to perform binding of the dynamic set member operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + The representing the value for the set member operation. + The new representing the result of the binding. + true if operation was bound successfully; otherwise, false. + + + + Tries to perform binding of the dynamic invoke operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + An array of instances - arguments to the invoke member operation. + The new representing the result of the binding. + true if operation was bound successfully; otherwise, false. + + + + Tries to perform binding of the dynamic invoke member operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + An array of instances - arguments to the invoke member operation. + The new representing the result of the binding. + true if operation was bound successfully; otherwise, false. + + + + Tries to perform binding of the dynamic get index operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + An array of instances - arguments to the invoke member operation. + The new representing the result of the binding. + true if operation was bound successfully; otherwise, false. + + + + Tries to perform binding of the dynamic set index operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + An array of instances - arguments to the invoke member operation. + The representing the value for the set index operation. + The new representing the result of the binding. + true if operation was bound successfully; otherwise, false. + + + + Tries to perform binding of the dynamic Convert operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + The new representing the result of the binding. + true if operation was bound successfully; otherwise, false. + + + + Gets the member names associated with the object. + This function can operate only with objects for which returns true. + + The object for which member names are requested. + The collection of member names. + + + + Gets the member names of the data-like members associated with the object. + This function can operate only with objects for which returns true. + + The object for which member names are requested. + The collection of member names. + + + + Gets the data-like members and associated data for an object. + This function can operate only with objects for which returns true. + + The object for which data members are requested. + The enumeration of names of data members for which to retrieve values. + The collection of pairs that represent data member's names and their data. + + + + Special binder that indicates special semantics for COM GetMember operation. + + + + + This class implements an event sink for a particular RCW. + Unlike the implementation of events in TlbImp'd assemblies, + we will create only one event sink per RCW (theoretically RCW might have + several ComEventSink evenk sinks - but all these implement different source intefaces). + Each ComEventSink contains a list of ComEventSinkMethod objects - which represent + a single method on the source interface an a multicast delegate to redirect + the calls. Notice that we are chaining multicast delegates so that same + ComEventSinkMedhod can invoke multiple event handlers). + + ComEventSink implements an IDisposable pattern to Unadvise from the connection point. + Typically, when RCW is finalized the corresponding Dispose will be triggered by + ComEventSinksContainer finalizer. Notice that lifetime of ComEventSinksContainer + is bound to the lifetime of the RCW. + + + + + Contains a methods DISPID (in a string formatted of "[DISPID=N]" + and a chained list of delegates to invoke + + + + + ComEventSinkProxy class is responsible for handling QIs for sourceIid + on instances of ComEventSink. + + Background: When a COM even sink advises to a connection point it is + supposed to hand over the dispinterface. Now, some hosts will trust + the COM client to pass the correct pointer, but some will not. + E.g. Excel's implementation of Connection Points will not cause a + QI on the pointer that has been passed, however Word will QI the + pointer to return the required interface. + + ComEventSink does not, strongly speaking, implements the interface + that it claims to implement - it is just "faking" it by using IReflect. + Thus, Word's QIs on the pointer passed to ICP::Advise would fail. To + prevent this we take advangate of RealProxy's ability of + "dressing up" like other classes and hence successfully respond to QIs + for interfaces that it does not really support( it is OK to say + "I implement this interface" for event sinks only since the common + practice is to use IDistpach.Invoke when calling into event sinks). + + + + + ComEventSinksContainer is just a regular list with a finalizer. + This list is usually attached as a custom data for RCW object and + is finalized whenever RCW is finalized. + + + + + Layout of the IDispatch vtable + + + + + Invokes the object. If it falls back, just produce an error. + + + + + Splats the arguments to another nested dynamic site, which does the + real invocation of the IDynamicMetaObjectProvider. + + + + + Create a stub for the target of the optimized lopop. + + + + + + Gets expressions to access all the arguments. This includes the instance argument. + + + + + This is a helper class for runtime-callable-wrappers of COM instances. We create one instance of this type + for every generic RCW instance. + + + + + The runtime-callable wrapper + + + + + This is the factory method to get the ComObject corresponding to an RCW + + + + + + The parameter description of a method defined in a type library + + + + + Creates a representation for the paramter of a COM method + + + + + Creates a representation for the return value of a COM method + TODO: Return values should be represented by a different type + + + + + DBNull.Value if there is no default value + + + + + Look for typeinfo using IDispatch.GetTypeInfo + + + + Some COM objects just dont expose typeinfo. In these cases, this method will return null. + Some COM objects do intend to expose typeinfo, but may not be able to do so if the type-library is not properly + registered. This will be considered as acceptable or as an error condition depending on throwIfMissingExpectedTypeInfo + + + + + This method should be called when typeinfo is not available for an object. The function + will check if the typeinfo is expected to be missing. This can include error cases where + the same error is guaranteed to happen all the time, on all machines, under all circumstances. + In such cases, we just have to operate without the typeinfo. + + However, if accessing the typeinfo is failing in a transient way, we might want to throw + an exception so that we will eagerly predictably indicate the problem. + + + + + This class contains methods that either cannot be expressed in C#, or which require writing unsafe code. + Callers of these methods need to use them extremely carefully as incorrect use could cause GC-holes + and other problems. + + + + + + Ensure that "value" is a local variable in some caller's frame. So converting + the byref to an IntPtr is a safe operation. Alternatively, we could also allow + allowed "value" to be a pinned object. + + + + + We will emit an indirect call to an unmanaged function pointer from the vtable of the given interface pointer. + This approach can take only ~300 instructions on x86 compared with ~900 for Marshal.Release. We are relying on + the JIT-compiler to do pinvoke-stub-inlining and calling the pinvoke target directly. + + + + + We will emit an indirect call to an unmanaged function pointer from the vtable of the given IDispatch interface pointer. + It is not possible to express this in C#. Using an indirect pinvoke call allows us to do our own marshalling. + We can allocate the Variant arguments cheaply on the stack. We are relying on the JIT-compiler to do + pinvoke-stub-inlining and calling the pinvoke target directly. + The alternative of calling via a managed interface declaration of IDispatch would have a performance + penalty of going through a CLR stub that would have to re-push the arguments on the stack, etc. + Marshal.GetDelegateForFunctionPointer could be used here, but its too expensive (~2000 instructions on x86). + + + + + Cached information from a TLB. Only information that is required is saved. CoClasses are used + for event hookup. Enums are stored for accessing symbolic names from scripts. + + + + + Reads the latest registered type library for the corresponding GUID, + reads definitions of CoClass'es and Enum's from this library + and creates a IDynamicMetaObjectProvider that allows to instantiate coclasses + and get actual values for the enums. + + Type Library Guid + ComTypeLibDesc object + + + + Gets an ITypeLib object from OLE Automation compatible RCW , + reads definitions of CoClass'es and Enum's from this library + and creates a IDynamicMetaObjectProvider that allows to instantiate coclasses + and get actual values for the enums. + + OLE automation compatible RCW + ComTypeLibDesc object + + + + This represents a bound dispmember on a IDispatch object. + + + + + Strongly-typed and parameterized string factory. + + + Strongly-typed and parameterized string factory. + + + + + A string like "Unexpected VarEnum {0}." + + + + + A string like "Error while invoking {0}." + + + + + A string like "Error while invoking {0}." + + + + + A string like "Error while invoking {0}. Named arguments are not supported." + + + + + A string like "Error while invoking {0}." + + + + + A string like "Could not convert argument {0} for call to {1}." + + + + + A string like "Error while invoking {0}. A required parameter was omitted." + + + + + A string like "IDispatch::GetIDsOfNames behaved unexpectedly for {0}." + + + + + A string like "Could not get dispatch ID for {0} (error: {1})." + + + + + A string like "There are valid conversions from {0} to {1}." + + + + + A string like "Variant.GetAccessor cannot handle {0}." + + + + + A string like "Cannot access member {1} declared on type {0} because the type contains generic parameters." + + + + + A string like "Type '{0}' is missing or cannot be loaded." + + + + + A string like "static property "{0}" of "{1}" can only be read through a type, not an instance" + + + + + A string like "static property "{0}" of "{1}" can only be assigned to through a type, not an instance" + + + + + A string like "Type parameter is {0}. Expected a delegate." + + + + + A string like "Cannot cast from type '{0}' to type '{1}" + + + + + A string like "unknown member type: '{0}'. " + + + + + A string like "The operation requires a non-generic type for {0}, but this represents generic types only" + + + + + A string like "Invalid operation: '{0}'" + + + + + A string like "Cannot create default value for type {0}." + + + + + A string like "Unhandled convert: {0}" + + + + + A string like "{0}.{1} has no publiclly visible method." + + + + + A string like "Extension type {0} must be public." + + + + + A string like "Invalid type of argument {0}; expecting {1}." + + + + + A string like "Field {0} is read-only" + + + + + A string like "Property {0} is read-only" + + + + + A string like "Expected event from {0}.{1}, got event from {2}.{3}." + + + + + A string like "expected bound event, got {0}." + + + + + A string like "Expected type {0}, got {1}." + + + + + A string like "can only write to member {0}." + + + + + A string like "Invalid stream type: {0}." + + + + + A string like "can't add another casing for identifier {0}" + + + + + A string like "can't add new identifier {0}" + + + + + A string like "Type '{0}' doesn't provide a suitable public constructor or its implementation is faulty: {1}" + + + + + A string like "Cannot emit constant {0} ({1})" + + + + + A string like "No implicit cast from {0} to {1}" + + + + + A string like "No explicit cast from {0} to {1}" + + + + + A string like "name '{0}' not defined" + + + + + A string like "Cannot create instance of {0} because it contains generic parameters" + + + + + A string like "Non-verifiable assembly generated: {0}:\nAssembly preserved as {1}\nError text:\n{2}\n" + + + + + A string like "COM object is expected." + + + + + A string like "Cannot perform call." + + + + + A string like "COM object does not support events." + + + + + A string like "COM object does not support specified source interface." + + + + + A string like "Marshal.SetComObjectData failed." + + + + + A string like "This method exists only to keep the compiler happy." + + + + + A string like "ResolveComReference.CannotRetrieveTypeInformation." + + + + + A string like "Attempting to wrap an unsupported enum type." + + + + + A string like "Attempting to pass an event handler of an unsupported type." + + + + + A string like "Method precondition violated" + + + + + A string like "Invalid argument value" + + + + + A string like "Non-empty string required" + + + + + A string like "Non-empty collection required" + + + + + A string like "must by an Exception instance" + + + + + A string like "Type of test must be bool" + + + + + A string like "Type of the expression must be bool" + + + + + A string like "Empty string is not a valid path." + + + + + A string like "Invalid delegate type (Invoke method not found)." + + + + + A string like "expected only static property" + + + + + A string like "Property doesn't exist on the provided type" + + + + + A string like "Field doesn't exist on provided type" + + + + + A string like "Type doesn't have constructor with a given signature" + + + + + A string like "Type doesn't have a method with a given name." + + + + + A string like "Type doesn't have a method with a given name and signature." + + + + + A string like "Count must be non-negative." + + + + + A string like "arrayType must be an array type" + + + + + A string like "Either code or target must be specified." + + + + + A string like "RuleBuilder can only be used with delegates whose first argument is CallSite." + + + + + A string like "no instance for call." + + + + + A string like "Missing Test." + + + + + A string like "Missing Target." + + + + + A string like "Finally already defined." + + + + + A string like "Can not have fault and finally." + + + + + A string like "Fault already defined." + + + + + A string like "Global/top-level local variable names must be unique." + + + + + A string like "Generating code from non-serializable CallSiteBinder." + + + + + A string like "pecified path is invalid." + + + + + A string like "Dictionaries are not hashable." + + + + + A string like "language already registered." + + + + + A string like "The method or operation is not implemented." + + + + + A string like "No exception." + + + + + A string like "Already initialized." + + + + + A string like "CreateScopeExtension must return a scope extension." + + + + + A string like "Invalid number of parameters for the service." + + + + + A string like "Cannot change non-caching value." + + + + + A string like "No code to compile." + + + + + A string like "Queue empty." + + + + + A string like "Enumeration has not started. Call MoveNext." + + + + + A string like "Enumeration already finished." + + + + + A string like "Invalid output directory." + + + + + A string like "Invalid assembly name or file extension." + + + + + A string like "No default value for a given type." + + + + + A string like "Specified language provider type is not registered." + + + + + A string like "can't read from property" + + + + + A string like "can't write to property" + + + + + Strongly-typed and parameterized exception factory. + + + Strongly-typed and parameterized exception factory. + + + + + ArgumentException with message like "COM object does not support events." + + + + + ArgumentException with message like "COM object does not support specified source interface." + + + + + InvalidOperationException with message like "Marshal.SetComObjectData failed." + + + + + InvalidOperationException with message like "This method exists only to keep the compiler happy." + + + + + InvalidOperationException with message like "Unexpected VarEnum {0}." + + + + + System.Reflection.TargetParameterCountException with message like "Error while invoking {0}." + + + + + MissingMemberException with message like "Error while invoking {0}." + + + + + ArgumentException with message like "Error while invoking {0}. Named arguments are not supported." + + + + + OverflowException with message like "Error while invoking {0}." + + + + + ArgumentException with message like "Could not convert argument {0} for call to {1}." + + + + + ArgumentException with message like "Error while invoking {0}. A required parameter was omitted." + + + + + InvalidOperationException with message like "ResolveComReference.CannotRetrieveTypeInformation." + + + + + ArgumentException with message like "IDispatch::GetIDsOfNames behaved unexpectedly for {0}." + + + + + InvalidOperationException with message like "Attempting to wrap an unsupported enum type." + + + + + InvalidOperationException with message like "Attempting to pass an event handler of an unsupported type." + + + + + MissingMemberException with message like "Could not get dispatch ID for {0} (error: {1})." + + + + + System.Reflection.AmbiguousMatchException with message like "There are valid conversions from {0} to {1}." + + + + + NotImplementedException with message like "Variant.GetAccessor cannot handle {0}." + + + + + ArgumentException with message like "Either code or target must be specified." + + + + + InvalidOperationException with message like "Type parameter is {0}. Expected a delegate." + + + + + InvalidOperationException with message like "Cannot cast from type '{0}' to type '{1}" + + + + + InvalidOperationException with message like "unknown member type: '{0}'. " + + + + + InvalidOperationException with message like "RuleBuilder can only be used with delegates whose first argument is CallSite." + + + + + InvalidOperationException with message like "no instance for call." + + + + + InvalidOperationException with message like "Missing Test." + + + + + InvalidOperationException with message like "Missing Target." + + + + + TypeLoadException with message like "The operation requires a non-generic type for {0}, but this represents generic types only" + + + + + ArgumentException with message like "Invalid operation: '{0}'" + + + + + InvalidOperationException with message like "Finally already defined." + + + + + InvalidOperationException with message like "Can not have fault and finally." + + + + + InvalidOperationException with message like "Fault already defined." + + + + + ArgumentException with message like "Cannot create default value for type {0}." + + + + + ArgumentException with message like "Unhandled convert: {0}" + + + + + InvalidOperationException with message like "{0}.{1} has no publiclly visible method." + + + + + ArgumentException with message like "Global/top-level local variable names must be unique." + + + + + ArgumentException with message like "Generating code from non-serializable CallSiteBinder." + + + + + ArgumentException with message like "pecified path is invalid." + + + + + ArgumentTypeException with message like "Dictionaries are not hashable." + + + + + InvalidOperationException with message like "language already registered." + + + + + NotImplementedException with message like "The method or operation is not implemented." + + + + + InvalidOperationException with message like "No exception." + + + + + ArgumentException with message like "Extension type {0} must be public." + + + + + InvalidOperationException with message like "Already initialized." + + + + + InvalidImplementationException with message like "CreateScopeExtension must return a scope extension." + + + + + ArgumentException with message like "Invalid number of parameters for the service." + + + + + ArgumentException with message like "Invalid type of argument {0}; expecting {1}." + + + + + ArgumentException with message like "Cannot change non-caching value." + + + + + MissingMemberException with message like "Field {0} is read-only" + + + + + MissingMemberException with message like "Property {0} is read-only" + + + + + ArgumentException with message like "Expected event from {0}.{1}, got event from {2}.{3}." + + + + + ArgumentTypeException with message like "expected bound event, got {0}." + + + + + ArgumentTypeException with message like "Expected type {0}, got {1}." + + + + + MemberAccessException with message like "can only write to member {0}." + + + + + InvalidOperationException with message like "No code to compile." + + + + + ArgumentException with message like "Invalid stream type: {0}." + + + + + InvalidOperationException with message like "Queue empty." + + + + + InvalidOperationException with message like "Enumeration has not started. Call MoveNext." + + + + + InvalidOperationException with message like "Enumeration already finished." + + + + + InvalidOperationException with message like "can't add another casing for identifier {0}" + + + + + InvalidOperationException with message like "can't add new identifier {0}" + + + + + ArgumentException with message like "Invalid output directory." + + + + + ArgumentException with message like "Invalid assembly name or file extension." + + + + + ArgumentException with message like "Cannot emit constant {0} ({1})" + + + + + ArgumentException with message like "No implicit cast from {0} to {1}" + + + + + ArgumentException with message like "No explicit cast from {0} to {1}" + + + + + MissingMemberException with message like "name '{0}' not defined" + + + + + ArgumentException with message like "No default value for a given type." + + + + + ArgumentException with message like "Specified language provider type is not registered." + + + + + InvalidOperationException with message like "can't read from property" + + + + + InvalidOperationException with message like "can't write to property" + + + + + ArgumentException with message like "Cannot create instance of {0} because it contains generic parameters" + + + + + System.Security.VerificationException with message like "Non-verifiable assembly generated: {0}:\nAssembly preserved as {1}\nError text:\n{2}\n" + + + + + This is similar to ComTypes.EXCEPINFO, but lets us do our own custom marshaling + + + + + An object that implements IDispatch + + This currently has the following issues: + 1. If we prefer ComObjectWithTypeInfo over IDispatchComObject, then we will often not + IDispatchComObject since implementations of IDispatch often rely on a registered type library. + If we prefer IDispatchComObject over ComObjectWithTypeInfo, users get a non-ideal experience. + 2. IDispatch cannot distinguish between properties and methods with 0 arguments (and non-0 + default arguments?). So obj.foo() is ambiguous as it could mean invoking method foo, + or it could mean invoking the function pointer returned by property foo. + We are attempting to find whether we need to call a method or a property by examining + the ITypeInfo associated with the IDispatch. ITypeInfo tell's use what parameters the method + expects, is it a method or a property, what is the default property of the object, how to + create an enumerator for collections etc. + 3. IronPython processes the signature and converts ref arguments into return values. + However, since the signature of a DispMethod is not available beforehand, this conversion + is not possible. There could be other signature conversions that may be affected. How does + VB6 deal with ref arguments and IDispatch? + + We also support events for IDispatch objects: + Background: + COM objects support events through a mechanism known as Connect Points. + Connection Points are separate objects created off the actual COM + object (this is to prevent circular references between event sink + and event source). When clients want to sink events generated by + COM object they would implement callback interfaces (aka source + interfaces) and hand it over (advise) to the Connection Point. + + Implementation details: + When IDispatchComObject.TryGetMember request is received we first check + whether the requested member is a property or a method. If this check + fails we will try to determine whether an event is requested. To do + so we will do the following set of steps: + 1. Verify the COM object implements IConnectionPointContainer + 2. Attempt to find COM object's coclass's description + a. Query the object for IProvideClassInfo interface. Go to 3, if found + b. From object's IDispatch retrieve primary interface description + c. Scan coclasses declared in object's type library. + d. Find coclass implementing this particular primary interface + 3. Scan coclass for all its source interfaces. + 4. Check whether to any of the methods on the source interfaces matches + the request name + + Once we determine that TryGetMember requests an event we will return + an instance of BoundDispEvent class. This class has InPlaceAdd and + InPlaceSubtract operators defined. Calling InPlaceAdd operator will: + 1. An instance of ComEventSinksContainer class is created (unless + RCW already had one). This instance is hanged off the RCW in attempt + to bind the lifetime of event sinks to the lifetime of the RCW itself, + meaning event sink will be collected once the RCW is collected (this + is the same way event sinks lifetime is controlled by PIAs). + Notice: ComEventSinksContainer contains a Finalizer which will go and + unadvise all event sinks. + Notice: ComEventSinksContainer is a list of ComEventSink objects. + 2. Unless we have already created a ComEventSink for the required + source interface, we will create and advise a new ComEventSink. Each + ComEventSink implements a single source interface that COM object + supports. + 3. ComEventSink contains a map between method DISPIDs to the + multicast delegate that will be invoked when the event is raised. + 4. ComEventSink implements IReflect interface which is exposed as + custom IDispatch to COM consumers. This allows us to intercept calls + to IDispatch.Invoke and apply custom logic - in particular we will + just find and invoke the multicast delegate corresponding to the invoked + dispid. + + + + + ArgBuilder which always produces null. + + + + + If a managed user type (as opposed to a primitive type or a COM object) is passed as an argument to a COM call, we need + to determine the VarEnum type we will marshal it as. We have the following options: + 1. Raise an exception. Languages with their own version of primitive types would not be able to call + COM methods using the language's types (for eg. strings in IronRuby are not System.String). An explicit + cast would be needed. + 2. We could marshal it as VT_DISPATCH. Then COM code will be able to access all the APIs in a late-bound manner, + but old COM components will probably malfunction if they expect a primitive type. + 3. We could guess which primitive type is the closest match. This will make COM components be as easily + accessible as .NET methods. + 4. We could use the type library to check what the expected type is. However, the type library may not be available. + + VarEnumSelector implements option # 3 + + + + + Gets the managed type that an object needs to be coverted to in order for it to be able + to be represented as a Variant. + + In general, there is a many-to-many mapping between Type and VarEnum. However, this method + returns a simple mapping that is needed for the current implementation. The reason for the + many-to-many relation is: + 1. Int32 maps to VT_I4 as well as VT_ERROR, and Decimal maps to VT_DECIMAL and VT_CY. However, + this changes if you throw the wrapper types into the mix. + 2. There is no Type to represent COM types. __ComObject is a private type, and Object is too + general. + + + + + Creates a family of COM types such that within each family, there is a completely non-lossy + conversion from a type to an earlier type in the family. + + + + + Get the (one representative type for each) primitive type families that the argument can be converted to + + + + + If there is more than one type family that the argument can be converted to, we will throw a + AmbiguousMatchException instead of randomly picking a winner. + + + + + Is there a unique primitive type that has the best conversion for the argument + + + + + Get the COM Variant type that argument should be marshaled as for a call to COM + + + + + Variant is the basic COM type for late-binding. It can contain any other COM data type. + This type definition precisely matches the unmanaged data layout so that the struct can be passed + to and from COM calls. + + + + + Primitive types are the basic COM types. It includes valuetypes like ints, but also reference types + like BStrs. It does not include composite types like arrays and user-defined COM types (IUnknown/IDispatch). + + + + + Get the managed object representing the Variant. + + + + + + Release any unmanaged memory associated with the Variant + + + + + + VariantBuilder handles packaging of arguments into a Variant for a call to IDispatch.Invoke + + + + + Provides a simple expression which enables embedding FieldBuilder's + in an AST before the type is complete. + + + + + Used to dispatch a single interactive command. It can be used to control things like which Thread + the command is executed on, how long the command is allowed to execute, etc + + + + + Supports detecting the remote runtime being killed, and starting up a new one. + + Threading model: + + ConsoleRestartManager creates a separate thread on which to create and execute the consoles. + There are usually atleast three threads involved: + + 1. Main app thread: Instantiates ConsoleRestartManager and accesses its APIs. This thread has to stay + responsive to user input and so the ConsoleRestartManager APIs cannot be long-running or blocking. + Since the remote runtime process can terminate asynchronously, the current RemoteConsoleHost can + change at any time (if auto-restart is enabled). The app should typically not care which instance of + RemoteConsoleHost is currently being used. The flowchart of this thread is: + Create ConsoleRestartManager + ConsoleRestartManager.Start + Loop: + Respond to user input | Send user input to console for execution | BreakExecution | RestartConsole | GetMemberNames + ConsoleRestartManager.Terminate + TODO: Currently, BreakExecution and GetMemberNames are called by the main thread synchronously. + Since they execute code in the remote runtime, they could take arbitrarily long. We should change + this so that the main app thread can never be blocked indefinitely. + + 2. Console thread: Dedicated thread for creating RemoteConsoleHosts and executing code (which could + take a long time or block indefinitely). + Wait for ConsoleRestartManager.Start to be called + Loop: + Create RemoteConsoleHost + Wait for signal for: + Execute code | RestartConsole | Process.Exited + + 3. CompletionPort async callbacks: + Process.Exited | Process.OutputDataReceived | Process.ErrorDataReceived + + 4. Finalizer thred + Some objects may have a Finalize method (which possibly calls Dispose). Not many (if any) types + should have a Finalize method. + + + + + + Accessing _remoteConsoleHost from a thread other than console thread can result in race. + If _remoteConsoleHost is accessed while holding _accessLock, it is guaranteed to be + null or non-disposed. + + + + + This is created on the "creating thread", and goes on standby. Start needs to be called for activation. + + A host might want one of two behaviors: + 1. Keep the REPL loop alive indefinitely, even when a specific instance of the RemoteConsoleHost terminates normally + 2. Close the REPL loop when an instance of the RemoteConsoleHost terminates normally, and restart the loop + only if the instance terminates abnormally. + + + + Needs to be called for activation. + + + + + Request (from another thread) the console REPL loop to terminate + + + + + This allows the RemoteConsoleHost to abort a long-running operation. The RemoteConsoleHost itself + does not know which ThreadPool thread might be processing the remote call, and so it needs + cooperation from the remote runtime server. + + + + + Since OnOutputDataReceived is sent async, it can arrive late. The remote console + cannot know if all output from the current command has been received. So + RemoteCommandDispatcher writes out a marker to indicate the end of the output + + + + + Aborts the current active call to Execute by doing Thread.Abort + + true if a Thread.Abort was actually called. false if there is no active call to Execute + + + + Customize the CommandLine for remote scenarios + + + + + Command line hosting service. + + + + + Executes the comand line - depending upon the options provided we will + either run a single file, a single command, or enter the interactive loop. + + + + + Runs the command line. Languages can override this to provide custom behavior other than: + 1. Running a single command + 2. Running a file + 3. Entering the interactive console loop. + + + + + + Runs the specified filename + + + + + Starts the interactive loop. Performs any initialization necessary before + starting the loop and then calls RunInteractiveLoop to start the loop. + + Returns the exit code when the interactive loop is completed. + + + + + Runs the interactive loop. Repeatedly parse and run interactive actions + until an exit code is received. If any exceptions are unhandled displays + them to the console + + + + + Attempts to run a single interaction and handle any language-specific + exceptions. Base classes can override this and call the base implementation + surrounded with their own exception handling. + + Returns null if successful and execution should continue, or an exit code. + + + + + Parses a single interactive command or a set of statements and executes it. + + Returns null if successful and execution should continue, or the appropiate exit code. + + We check if the code read is an interactive command or statements is by checking for NewLine + If the code contains NewLine, it's a set of statements (most probably from SendToConsole) + If the code does not contain a NewLine, it's an interactive command typed by the user at the prompt + + + + + Private helper function to see if we should treat the current input as a blank link. + + We do this if we only have auto-indent text. + + + + + Read a statement, which can potentially be a multiple-line statement suite (like a class declaration). + + Should the console session continue, or did the user indicate + that it should be terminated? + Expression to evaluate. null for empty input + + + + Gets the next level for auto-indentation + + + + + Scope is not remotable, and this only works in the same AppDomain. + + + + + CommandDispatcher to ensure synchronize output from the remote runtime + + + + + ConsoleHost where the ScriptRuntime is hosted in a separate process (referred to as the remote runtime server) + + The RemoteConsoleHost spawns the remote runtime server and specifies an IPC channel name to use to communicate + with each other. The remote runtime server creates and initializes a ScriptRuntime and a ScriptEngine, and publishes + it over the specified IPC channel at a well-known URI. Note that the RemoteConsoleHost cannot easily participate + in the initialization of the ScriptEngine as classes like LanguageContext are not remotable. + + The RemoteConsoleHost then starts the interactive loop and executes commands on the ScriptEngine over the remoting channel. + The RemoteConsoleHost listens to stdout of the remote runtime server and echos it locally to the user. + + + + + Core functionality to implement an interactive console. This should be derived for concrete implementations + + + + + Request (from another thread) the console REPL loop to terminate + + The caller can specify the exitCode corresponding to the event triggering + the termination. This will be returned from CommandLine.Run + + + + To be called from entry point. + + + + + Console Host entry-point .exe name. + + + + + Allows the console to customize the environment variables, working directory, etc. + + At the least, processInfo.FileName should be initialized + + + + Aborts the current active call to Execute by doing Thread.Abort + + true if a Thread.Abort was actually called. false if there is no active call to Execute + + + + Called if the remote runtime process exits by itself. ie. without the remote console killing it. + + + + + The remote runtime server uses this class to publish an initialized ScriptEngine and ScriptRuntime + over a remoting channel. + + + + + Publish objects so that the host can use it, and then block indefinitely (until the input stream is open). + + Note that we should publish only one object, and then have other objects be accessible from it. Publishing + multiple objects can cause problems if the client does a call like "remoteProxy1(remoteProxy2)" as remoting + will not be able to know if the server object for both the proxies is on the same server. + + The IPC channel that the remote console expects to use to communicate with the ScriptEngine + A intialized ScriptScope that is ready to start processing script commands + + + Instruction can't be created due to insufficient privileges. + + + Instruction can't be created due to insufficient privileges. + + + + Gets the next type or null if no more types are available. + + + + + Uses reflection to create new instance of the appropriate ReflectedCaller + + + + + Fast creation works if we have a known primitive types for the entire + method siganture. If we have any non-primitive types then FastCreate + falls back to SlowCreate which works for all types. + + Fast creation is fast because it avoids using reflection (MakeGenericType + and Activator.CreateInstance) to create the types. It does this through + calling a series of generic methods picking up each strong type of the + signature along the way. When it runs out of types it news up the + appropriate CallInstruction with the strong-types that have been built up. + + One relaxation is that for return types which are non-primitive types + we can fallback to object due to relaxed delegates. + + + + + The number of arguments including "this" for instance methods. + + + + + This instruction implements a goto expression that can jump out of any expression. + It pops values (arguments) from the evaluation stack that the expression tree nodes in between + the goto expression and the target label node pushed and not consumed yet. + A goto expression can jump into a node that evaluates arguments only if it carries + a value and jumps right after the first argument (the carried value will be used as the first argument). + Goto can jump into an arbitrary child of a BlockExpression since the block doesn’t accumulate values + on evaluation stack as its child expressions are being evaluated. + + Goto needs to execute any finally blocks on the way to the target label. + + { + f(1, 2, try { g(3, 4, try { goto L } finally { ... }, 6) } finally { ... }, 7, 8) + L: ... + } + + The goto expression here jumps to label L while having 4 items on evaluation stack (1, 2, 3 and 4). + The jump needs to execute both finally blocks, the first one on stack level 4 the + second one on stack level 2. So, it needs to jump the first finally block, pop 2 items from the stack, + run second finally block and pop another 2 items from the stack and set instruction pointer to label L. + + Goto also needs to rethrow ThreadAbortException iff it jumps out of a catch handler and + the current thread is in "abort requested" state. + + + + + The first instruction of finally block. + + + + + The last instruction of finally block. + + + + + The last instruction of a catch exception handler. + + + + + The last instruction of a fault exception handler. + + + + + Implements dynamic call site with many arguments. Wraps the arguments into . + + + + + Contains compiler state corresponding to a LabelTarget + See also LabelScopeInfo. + + + + + Returns true if we can jump into this node + + + + + Attaches a cookie to the last emitted instruction. + + + + Instruction can't be created due to insufficient privileges. + + + + Manages creation of interpreted delegates. These delegates will get + compiled if they are executed often enough. + + + + + Used by LightLambda to get the compiled delegate. + + + + + Create a compiled delegate for the LightLambda, and saves it so + future calls to Run will execute the compiled code instead of + interpreting. + + + + + true if the compiled delegate has the same type as the lambda; + false if the type was changed for interpretation. + + + + + Provides notification that the LightLambda has been compiled. + + + + + A simple forth-style stack machine for executing Expression trees + without the need to compile to IL and then invoke the JIT. This trades + off much faster compilation time for a slower execution performance. + For code that is only run a small number of times this can be a + sweet spot. + + The core loop in the interpreter is the RunInstructions method. + + + + + Runs instructions within the given frame. + + + Interpreted stack frames are linked via Parent reference so that each CLR frame of this method corresponds + to an interpreted stack frame in the chain. It is therefore possible to combine CLR stack traces with + interpreted stack traces by aligning interpreted frames to the frames of this method. + Each group of subsequent frames of Run method corresponds to a single interpreted frame. + + + + + Visits a LambdaExpression, replacing the constants with direct accesses + to their StrongBox fields. This is very similar to what + ExpressionQuoter does for LambdaCompiler. + + Also inserts debug information tracking similar to what the interpreter + would do. + + + + + Local variable mapping. + + + + + The variable that holds onto the StrongBox{object}[] closure from + the interpreter + + + + + A stack of variables that are defined in nested scopes. We search + this first when resolving a variable in case a nested scope shadows + one of our variable instances. + + + + + Walks the lambda and produces a higher order function, which can be + used to bind the lambda to a closure array from the interpreter. + + The lambda to bind. + Variables which are being accessed defined in the outer scope. + A delegate that can be called to produce a delegate bound to the passed in closure array. + + + + Provides a list of variables, supporing read/write of the values + + + + + Gets a copy of the local variables which are defined in the current scope. + + + + + + Checks to see if the given variable is defined within the current local scope. + + + + + Gets the variables which are defined in an outer scope and available within the current scope. + + + + + Tracks where a variable is defined and what range of instructions it's used in + + + + + A single interpreted frame might be represented by multiple subsequent Interpreter.Run CLR frames. + This method filters out the duplicate CLR frames. + + + + + arbitrary precision integers + + + + + Create a BigInteger from a little-endian twos-complement byte array + (inverse of ToByteArray()) + + + + + Return the magnitude of this BigInteger as an array of zero or more uints. + Element zero is the value of the least significant four bytes, element one is + the value of the four next most significant bytes, etc. + + The returned data is the unsigned magnitude of the number. To determine the sign, + use GetSign(). + + It is guaranteed that the highest element of the returned array is never zero. + This means that if the value of this BigInteger is zero, a zero-length array + is returned. + + + + + Do an in-place twos complement of d and also return the result. + + + + + Calculates the natural logarithm of the BigInteger. + + + + + Calculates log base 10 of a BigInteger. + + + + + Return the value of this BigInteger as a little-endian twos-complement + byte array, using the fewest number of bytes possible. If the value is zero, + return an array of one byte whose element is 0x00. + + + + + Return the sign of this BigInteger: -1, 0, or 1. + + + + + Wraps all arguments passed to a dynamic site with more arguments than can be accepted by a Func/Action delegate. + The binder generating a rule for such a site should unwrap the arguments first and then perform a binding to them. + + + + + Provides support for converting objects to delegates using the DLR binders + available by the provided language context. + + Primarily this supports converting objects implementing IDynamicMetaObjectProvider + to the appropriate delegate type. + + If the provided object is already a delegate of the appropriate type then the + delegate will simply be returned. + + + + Table of dynamically generated delegates which are shared based upon method signature. + + + + Creates a delegate with a given signature that could be used to invoke this object from non-dynamic code (w/o code context). + A stub is created that makes appropriate conversions/boxing and calls the object. + The stub should be executed within a context of this object's language. + + The converted delegate. + The object is either a subclass of Delegate but not the requested type or does not implement IDynamicMetaObjectProvider. + + + + Represents the type of a null value. + + + + + Private constructor is never called since 'null' is the only valid instance. + + + + + These are some generally useful helper methods. Currently the only methods are those to + cached boxed representations of commonly used primitive types so that they can be shared. + This is useful to most dynamic languages that use object as a universal type. + + The methods in RuntimeHelepers are caleld by the generated code. From here the methods may + dispatch to other parts of the runtime to get bulk of the work done, but the entry points + should be here. + + + + + Used by prologue code that is injected in lambdas to ensure that delegate signature matches what + lambda body expects. Such code typically unwraps subset of the params array manually, + but then passes the rest in bulk if lambda body also expects params array. + + This calls ArrayUtils.ShiftLeft, but performs additional checks that + ArrayUtils.ShiftLeft assumes. + + + + + A singleton boxed boolean true. + + + + + A singleton boxed boolean false. + + + + + Gets a singleton boxed value for the given integer if possible, otherwise boxes the integer. + + The value to box. + The boxed value. + + + + Helper method to create an instance. Work around for Silverlight where Activator.CreateInstance + is SecuritySafeCritical. + + TODO: Why can't we just emit the right thing for default(T)? + It's always null for reference types and it's well defined for value types + + + + + EventInfo.EventHandlerType getter is marked SecuritySafeCritical in CoreCLR + This method is to get to the property without using Reflection + + + + + + + Provides the test to see if an interpreted call site should switch over to being compiled. + + + + + A parameterless generator, that is of type IEnumerable, IEnumerable{T}, + IEnumerator, or IEnumerator{T}. Its body can contain a series of + YieldExpressions. Each call into MoveNext on the enumerator reenters + the generator, and executes until it reaches a YieldReturn or YieldBreak + expression + + + + + The label used by YieldBreak and YieldReturn expressions to yield + from this generator + + + + + The body of the generator, which can contain YieldBreak and + YieldReturn expressions + + + + + Indicates whether the lhs instances are preserved when assignments + are made to expressions containing yields. + + + + + When finding a yield return or yield break, this rewriter flattens out + containing blocks, scopes, and expressions with stack state. All + scopes encountered have their variables promoted to the generator's + closure, so they survive yields. + + + + + Makes an assignment to this variable. Pushes the assignment as far + into the right side as possible, to allow jumps into it. + + + + + Returns true if the expression remains constant no matter when it is evaluated. + + + + + Represents either a YieldBreak or YieldReturn in a GeneratorExpression + If Value is non-null, it's a YieldReturn; otherwise it's a YieldBreak + and executing it will stop enumeration of the generator, causing + MoveNext to return false. + + + + + The value yieled from this expression, if it is a yield return + + + + + The label used to yield from this generator + + + + + Tests to see if the expression is a constant with the given value. + + The expression to examine + The constant value to check for. + true/false + + + + Tests to see if the expression is a constant with the given value. + + The expression to examine + The constant value to check for. + true/false + + + + Begins a catch block. + + + + + Begins an exception block for a filtered exception. + + + + + Begins an exception block for a non-filtered exception. + + + + + + Begins an exception fault block + + + + + Begins a finally block + + + + + Ends an exception block. + + + + + Begins a lexical scope. + + + + + Ends a lexical scope. + + + + + Declares a local variable of the specified type. + + + + + Declares a local variable of the specified type, optionally + pinning the object referred to by the variable. + + + + + Declares a new label. + + + + + Marks the label at the current position. + + + + + Emits an instruction. + + + + + Emits an instruction with a byte argument. + + + + + Emits an instruction with the metadata token for the specified contructor. + + + + + Emits an instruction with a double argument. + + + + + Emits an instruction with the metadata token for the specified field. + + + + + Emits an instruction with a float argument. + + + + + Emits an instruction with an int argument. + + + + + Emits an instruction with a label argument. + + + + + Emits an instruction with multiple target labels (switch). + + + + + Emits an instruction with a reference to a local variable. + + + + + Emits an instruction with a long argument. + + + + + Emits an instruction with the metadata token for a specified method. + + + + + Emits an instruction with a signed byte argument. + + + + + Emits an instruction with a short argument. + + + + + Emits an instruction with a signature token. + + + + + Emits an instruction with a string argument. + + + + + Emits an instruction with the metadata token for a specified type argument. + + + + + Emits a call or a virtual call to the varargs method. + + + + + Emits an unmanaged indirect call instruction. + + + + + Emits a managed indirect call instruction. + + + + + Marks a sequence point. + + + + + Specifies the namespace to be used in evaluating locals and watches for the + current active lexical scope. + + + + + Emits a Ldind* instruction for the appropriate type + + + + + Emits a Stind* instruction for the appropriate type. + + + + + Emits a Stelem* instruction for the appropriate type. + + + + + Boxes the value of the stack. No-op for reference types. Void is + converted to a null reference. For almost all value types this + method will box them in the standard way. Int32 and Boolean are + handled with optimized conversions that reuse the same object for + small values. For Int32 this is purely a performance optimization. + For Boolean this is use to ensure that True and False are always + the same objects. + + + + + Emits an array of constant values provided in the given list. + The array is strongly typed. + + + + + Emits an array of values of count size. The items are emitted via the callback + which is provided with the current item index to emit. + + + + + Emits an array construction code. + The code assumes that bounds for all dimensions + are already emitted. + + + + + Emits default(T) + Semantics match C# compiler behavior + + + + + A simple dictionary of queues, keyed off a particular type + This is useful for storing free lists of variables + + + + + Directory where snippet assembly will be saved if SaveSnippets is set. + + + + + Save snippets to an assembly (see also SnippetsDirectory, SnippetsFileName). + + + + + Gets the Compiler associated with the Type Initializer (cctor) creating it if necessary. + + + + + A tree rewriter which will find dynamic sites which consume dynamic sites and + turn them into a single combo dynamic site. The combo dynamic site will then run the + individual meta binders and produce the resulting code in a single dynamic site. + + + + + A reducible node which we use to generate the combo dynamic sites. Each time we encounter + a dynamic site we replace it with a ComboDynamicSiteExpression. When a child of a dynamic site + turns out to be a ComboDynamicSiteExpression we will then merge the child with the parent updating + the binding mapping info. If any of the inputs cause side effects then we'll stop the combination. + + + + + A binder which can combine multiple binders into a single dynamic site. The creator + of this needs to perform the mapping of parameters, constants, and sub-site expressions + and provide a List of BinderMappingInfo representing this data. From there the ComboBinder + just processes the list to create the resulting code. + + + + + Provides a mapping for inputs of combo action expressions. The input can map + to either an input of the new dynamic site, an input of a previous DynamicExpression, + or a ConstantExpression which has been pulled out of the dynamic site arguments. + + + + + Contains the mapping information for a single Combo Binder. This includes the original + meta-binder and the mapping of parameters, sub-sites, and constants into the binding. + + + + + Builds up a series of conditionals when the False clause isn't yet known. We can + keep appending conditions and if true's. Each subsequent true branch becomes the + false branch of the previous condition and body. Finally a non-conditional terminating + branch must be added. + + + + + Adds a new conditional and body. The first call this becomes the top-level + conditional, subsequent calls will have it added as false statement of the + previous conditional. + + + + + Adds the non-conditional terminating node. + + + + + Adds the non-conditional terminating node. + + + + + Gets the resulting meta object for the full body. FinishCondition + must have been called. + + + + + Adds a variable which will be scoped at the level of the final expression. + + + + + Marks a method as not having side effects. used by the combo binder + to allow calls to methods. + + + + + OperatorInfo provides a mapping from DLR ExpressionType to their associated .NET methods. + + + + + Given an operator returns the OperatorInfo associated with the operator or null + + + + + The operator the OperatorInfo provides info for. + + + + + The primary method name associated with the method. This method name is + usally in the form of op_Operator (e.g. op_Addition). + + + + + The secondary method name associated with the method. This method name is + usually a standard .NET method name with pascal casing (e.g. Add). + + + + + The builder for creating the LambdaExpression node. + + Since the nodes require that parameters and variables are created + before hand and then passed to the factories creating LambdaExpression + this builder keeps track of the different pieces and at the end creates + the LambdaExpression. + + TODO: This has some functionality related to CodeContext that should be + removed, in favor of languages handling their own local scopes + + + + + Creates a parameter on the lambda with a given name and type. + + Parameters maintain the order in which they are created, + however custom ordering is possible via direct access to + Parameters collection. + + + + + Creates a parameter on the lambda with a given name and type. + + Parameters maintain the order in which they are created, + however custom ordering is possible via direct access to + Parameters collection. + + + + + adds existing parameter to the lambda. + + Parameters maintain the order in which they are created, + however custom ordering is possible via direct access to + Parameters collection. + + + + + Creates a hidden parameter on the lambda with a given name and type. + + Parameters maintain the order in which they are created, + however custom ordering is possible via direct access to + Parameters collection. + + + + + Creates a params array argument on the labmda. + + The params array argument is added to the signature immediately. Before the lambda is + created, the builder validates that it is still the last (since the caller can modify + the order of parameters explicitly by maniuplating the parameter list) + + + + + Creates a local variable with specified name and type. + TODO: simplify by pushing logic into callers + + + + + Creates a local variable with specified name and type. + TODO: simplify by pushing logic into callers + + + + + Creates a temporary variable with specified name and type. + + + + + Adds the temporary variable to the list of variables maintained + by the builder. This is useful in cases where the variable is + created outside of the builder. + + + + + Creates the LambdaExpression from the builder. + After this operation, the builder can no longer be used to create other instances. + + Desired type of the lambda. + New LambdaExpression instance. + + + + Creates the LambdaExpression from the builder. + After this operation, the builder can no longer be used to create other instances. + + New LambdaExpression instance. + + + + Creates the generator LambdaExpression from the builder. + After this operation, the builder can no longer be used to create other instances. + + New LambdaExpression instance. + + + + Fixes up lambda body and parameters to match the signature of the given delegate if needed. + + + + + + Validates that the builder has enough information to create the lambda. + + + + + The name of the lambda. + Currently anonymous/unnamed lambdas are not allowed. + + + + + Return type of the lambda being created. + + + + + List of lambda's local variables for direct manipulation. + + + + + List of lambda's parameters for direct manipulation + + + + + The params array argument, if any. + + + + + The body of the lambda. This must be non-null. + + + + + The generated lambda should have dictionary of locals + instead of allocating them directly on the CLR stack. + + + + + The scope is visible (default). Invisible if false. + + + + + marks a field, class, or struct as being safe to have statics which can be accessed + from multiple runtimes. + + Static fields which are not read-only or marked with this attribute will be flagged + by a test which looks for state being shared between runtimes. Before applying this + attribute you should ensure that it is safe to share the state. This is typically + state which is lazy initialized or state which is caching values which are identical + in all runtimes and are immutable. + + + + + This class is useful for quickly collecting performance counts for expensive + operations. Usually this means operations involving either reflection or + code gen. Long-term we need to see if this can be plugged better into the + standard performance counter architecture. + + + + + temporary categories for quick investigation, use a custom key if you + need to track multiple items, and if you want to keep it then create + a new Categories entry and rename all your temporary entries. + + + + + Represents the context that is flowed for doing Compiler. Languages can derive + from this class to provide additional contextual information. + + + + + Source unit currently being compiled in the CompilerContext + + + + + Current error sink. + + + + + Sink for parser callbacks (e.g. brace matching, etc.). + + + + + Compiler specific options. + + + + + Indicates that a DynamicMetaObject might be convertible to a CLR type. + + + + + Gets custom data to be serialized when saving script codes to disk. + + + + + Indicates that a MetaObject is already representing a restricted type. Useful + when we're already restricted to a known type but this isn't captured in + the type info (e.g. the type is not sealed). + + + + + Returns Microsoft.Scripting.Runtime.DynamicNull if the object contains a null value, + otherwise, returns self.LimitType + + + + + Returns Microsoft.Scripting.Runtime.DynamicNull if the object contains a null value, + otherwise, returns self.RuntimeType + + + + + ScriptCode is an instance of compiled code that is bound to a specific LanguageContext + but not a specific ScriptScope. The code can be re-executed multiple times in different + scopes. Hosting API counterpart for this class is CompiledCode. + + + + + This takes an assembly name including extension and saves the provided ScriptCode objects into the assembly. + + The provided script codes can constitute code from multiple languages. The assemblyName can be either a fully qualified + or a relative path. The DLR will simply save the assembly to the desired location. The assembly is created by the DLR and + if a file already exists than an exception is raised. + + The DLR determines the internal format of the ScriptCode and the DLR can feel free to rev this as appropriate. + + + + + This will take an assembly object which the user has loaded and return a new set of ScriptCode’s which have + been loaded into the provided ScriptDomainManager. + + If the language associated with the ScriptCode’s has not already been loaded the DLR will load the + LanguageContext into the ScriptDomainManager based upon the saved LanguageContext type. + + If the LanguageContext or the version of the DLR the language was compiled against is unavailable a + TypeLoadException will be raised unless policy has been applied by the administrator to redirect bindings. + + + + + Sets the current position inside current token or one character behind it. + + + + + Sets the current position inside current token or one character behind it. + A relative displacement with respect to the current position in the token is specified. + + + + + Marks token end. Enables to read the current token. + + + + + Marks token start. It means the buffer can drop the current token. + Can be called even if no token has been read yet. + + + + + Reads till the end of line and returns the character that stopped the reading. + The returned character is not skipped. + + + + + Resizes an array to a speficied new size and copies a portion of the original array into its beginning. + + + + + Helper class to remove methods w/ identical signatures. Used for GetDefaultMembers + which returns members from all types in the hierarchy. + + + + + Handles input and output for the console. It is comparable to System.IO.TextReader, + System.IO.TextWriter, System.Console, etc + + + + + Read a single line of interactive input, or a block of multi-line statements. + + An event-driven GUI console can implement this method by creating a thread that + blocks and waits for an event indicating that input is available + + The indentation level to be used for the current suite of a compound statement. + The console can ignore this argument if it does not want to support auto-indentation + null if the input stream has been closed. A string with a command to execute otherwise. + It can be a multi-line string which should be processed as block of statements + + + + + + + + name == null means that the argument doesn't specify an option; the value contains the entire argument + name == "" means that the option name is empty (argument separator); the value is null then + + + + + Literal script command given using -c option + + + + + Filename to execute passed on the command line options. + + + + + Only print the version of the script interpreter and exit + + + + On error. + + + + The console input buffer. + + + + + Current position - index into the input buffer + + + + + The number of white-spaces displayed for the auto-indenation of the current line + + + + + Length of the output currently rendered on screen. + + + + + Command history + + + + + Tab options available in current context + + + + + Cursort anchor - position of cursor when the routine was called + + + + + The command line that this console is attached to. + + + + + Displays the next option in the option list, + or beeps if no options available for current input prefix. + If no input prefix, simply print tab. + + + + + + + Handle the enter key. Adds the current input (if not empty) to the history. + + + The input string. + + + + Class managing the command history. + + + + + List of available options + + + + + Cursor position management + + + + + Beginning position of the cursor - top coordinate. + + + + + Beginning position of the cursor - left coordinate. + + + + + Implementation of the complex number data type. + + + + + Helper methods that calls are generated to from the default DLR binders. + + + + + Helper function to combine an object array with a sequence of additional parameters that has been splatted for a function call. + + + + + EventInfo.EventHandlerType getter is marked SecuritySafeCritical in CoreCLR + This method is to get to the property without using Reflection + + + + + + + Implements explicit casts supported by the runtime. + + + Implements explicit casts supported by the runtime. + + + + + Explicitly casts the object to a given type (and returns it as object) + + + + + Used as the value for the ScriptingRuntimeHelpers.GetDelegate method caching system + + + + + Generates stub to receive the CLR call and then call the dynamic language code. + + + + + Used as the key for the LanguageContext.GetDelegate method caching system + + + + + A useful interface for taking slices of numeric arrays, inspired by Python's Slice objects. + + + + + The starting index of the slice or null if no first index defined + + + + + The ending index of the slice or null if no ending index defined + + + + + The length of step to take + + + + + Given an ID returns the object associated with that ID. + + + + + Gets a unique ID for an object + + + + + Goes over the hashtable and removes empty entries + + + + + Weak-ref wrapper caches the weak reference, our hash code, and the object ID. + + + + + WrapperComparer treats Wrapper as transparent envelope + + + + + Internal class which binds a LanguageContext, StreamContentProvider, and Encoding together to produce + a TextContentProvider which reads binary data with the correct language semantics. + + + + + Creates a dictionary of locals in this scope + + + + + Abstract base class used for optimized thread-safe dictionaries which have a set + of pre-defined string keys. + + Implementers derive from this class and override the GetExtraKeys, TrySetExtraValue, + and TryGetExtraValue methods. When looking up a value first the extra keys will be + searched using the optimized Try*ExtraValue functions. If the value isn't found there + then the value is stored in the underlying .NET dictionary. + + This dictionary can store object values in addition to string values. It also supports + null keys. + + + + + Provides hashing and equality based upon the value of the object instead of the reference. + + + + + Gets the hash code for the value of the instance. + + A hash code + The type is mutable and cannot be hashed by value + + + + Determines if two values are equal + + The object to compare the current object against. + Returns true if the objects are equal, false if they are not. + + + + Gets a list of the extra keys that are cached by the the optimized implementation + of the module. + + + + + Try to set the extra value and return true if the specified key was found in the + list of extra values. + + + + + Try to get the extra value and returns true if the specified key was found in the + list of extra values. Returns true even if the value is Uninitialized. + + + + + Efficiently tracks (line,column) information as text is added, and + collects line mappings between the original and generated source code + so we can generate correct debugging information later + + + + + Marks the current position of the writer as corresponding to the + original location passed in + + the line pragma corresponding to the + current position in the generated code + + + + Provides a dictionary-like object used for caches which holds onto a maximum + number of elements specified at construction time. + + This class is not thread safe. + + + + + Creates a dictionary-like object used for caches. + + The maximum number of elements to store. + + + + Tries to get the value associated with 'key', returning true if it's found and + false if it's not present. + + + + + Adds a new element to the cache, replacing and moving it to the front if the + element is already present. + + + + + Returns the value associated with the given key, or throws KeyNotFoundException + if the key is not present. + + + + + Wraps the provided enumerable into a ReadOnlyCollection{T} + + Copies all of the data into a new array, so the data can't be + changed after creation. The exception is if the enumerable is + already a ReadOnlyCollection{T}, in which case we just return it. + + + + + List optimized for few writes and multiple reads. It provides thread-safe read and write access. + Iteration is not thread-safe by default, but GetCopyForRead allows for iteration + without taking a lock. + + + + + Gets a copy of the contents of the list. The copy will not change even if the original + CopyOnWriteList object is modified. This method should be used to iterate the list in + a thread-safe way if no lock is taken. Iterating on the original list is not guaranteed + to be thread-safe. + + The returned copy should not be modified by the caller. + + + + Returns the list of expressions represented by the instances. + + An array of instances to extract expressions from. + The array of expressions. + + + + Creates an instance of for a runtime value and the expression that represents it during the binding process. + + The runtime value to be represented by the . + An expression to represent this during the binding process. + The new instance of . + + + + Produces an interpreted binding using the given binder which falls over to a compiled + binding after hitCount tries. + + This method should be called whenever an interpreted binding is required. Sometimes it will + return a compiled binding if a previous binding was produced and it's hit count was exhausted. + In this case the binder will not be called back for a new binding - the previous one will + be used. + + The delegate type being used for the call site + The binder used for the call site + The number of calls before the binder should switch to a compiled mode. + The arguments that are passed for the binding (as received in a BindDelegate call) + A delegate which represents the interpreted binding. + + + + Expression which reduces to the normal test but under the interpreter adds a count down + check which enables compiling when the count down is reached. + + + + + Base class for storing information about the binding that a specific rule is applicable for. + + We have a derived generic class but this class enables us to refer to it w/o having the + generic type information around. + + This class tracks both the count down to when we should compile. When we compile we + take the Expression[T] that was used before and compile it. While this is happening + we continue to allow the interpreted code to run. When the compilation is complete we + store a thread static which tells us what binding failed and the current rule is no + longer functional. Finally the language binder will call us again and we'll retrieve + and return the compiled overload. + + + + + A hybrid dictionary which compares based upon object identity. + + + + + Calculates the quotient of two 32-bit signed integers rounded towards negative infinity. + + Dividend. + Divisor. + The quotient of the specified numbers rounded towards negative infinity, or (int)Floor((double)x/(double)y). + is 0. + The caller must check for overflow (x = Int32.MinValue, y = -1) + + + + Calculates the quotient of two 32-bit signed integers rounded towards negative infinity. + + Dividend. + Divisor. + The quotient of the specified numbers rounded towards negative infinity, or (int)Floor((double)x/(double)y). + is 0. + The caller must check for overflow (x = Int64.MinValue, y = -1) + + + + Calculates the remainder of floor division of two 32-bit signed integers. + + Dividend. + Divisor. + The remainder of of floor division of the specified numbers, or x - (int)Floor((double)x/(double)y) * y. + is 0. + + + + Calculates the remainder of floor division of two 32-bit signed integers. + + Dividend. + Divisor. + The remainder of of floor division of the specified numbers, or x - (int)Floor((double)x/(double)y) * y. + is 0. + + + + Behaves like Math.Round(value, MidpointRounding.AwayFromZero) + Needed because CoreCLR doesn't support this particular overload of Math.Round + + + + + Behaves like Math.Round(value, precision, MidpointRounding.AwayFromZero) + However, it works correctly on negative precisions and cases where precision is + outside of the [-15, 15] range. + + (This function is also needed because CoreCLR lacks this overload.) + + + + + Evaluates a polynomial in v0 where the coefficients are ordered in increasing degree + + + + + Evaluates a polynomial in v0 where the coefficients are ordered in increasing degree + if reverse is false, and increasing degree if reverse is true. + + + + + A numerically precise version of sin(v0 * pi) + + + + + A numerically precise version of |sin(v0 * pi)| + + + + + Take the quotient of the 2 polynomials forming the Lanczos approximation + with N=13 and G=13.144565 + + + + + Computes the Gamma function on positive values, using the Lanczos approximation. + Lanczos parameters are N=13 and G=13.144565. + + + + + Computes the Log-Gamma function on positive values, using the Lanczos approximation. + Lanczos parameters are N=13 and G=13.144565. + + + + + Thread safe dictionary that allows lazy-creation where readers will block for + the creation of the lazily created value. Call GetOrCreateValue w/ a key + and a callback function. If the value exists it is returned, if not the create + callback is called (w/o any locks held). The create call back will only be called + once for each key. + + + + + Helper class which stores the published value + + + + + Dictionary[TKey, TValue] is not thread-safe in the face of concurrent reads and writes. SynchronizedDictionary + provides a thread-safe implementation. It holds onto a Dictionary[TKey, TValue] instead of inheriting from + it so that users who need to do manual synchronization can access the underlying Dictionary[TKey, TValue]. + + + + + This returns the raw unsynchronized Dictionary[TKey, TValue]. Users are responsible for locking + on it before accessing it. Also, it should not be arbitrarily handed out to other code since deadlocks + can be caused if other code incorrectly locks on it. + + + + + Provides fast strongly typed thread local storage. This is significantly faster than + Thread.GetData/SetData. + + + + + True if the caller will guarantee that all cleanup happens as the thread + unwinds. + + This is typically used in a case where the thread local is surrounded by + a try/finally block. The try block pushes some state, the finally block + restores the previous state. Therefore when the thread exits the thread + local is back to it's original state. This allows the ThreadLocal object + to not check the current owning thread on retrieval. + + + + + Gets the current value if its not == null or calls the provided function + to create a new value. + + + + + Calls the provided update function with the current value and + replaces the current value with the result of the function. + + + + + Replaces the current value with a new one and returns the old value. + + + + + Gets the StorageInfo for the current thread. + + + + + Called when the fast path storage lookup fails. if we encountered the Empty storage + during the initial fast check then spin until we hit non-empty storage and try the fast + path again. + + + + + Creates the StorageInfo for the thread when one isn't already present. + + + + + Gets or sets the value for the current thread. + + + + + Helper class for storing the value. We need to track if a ManagedThreadId + has been re-used so we also store the thread which owns the value. + + + + + Returns a numerical code of the size of a type. All types get both a horizontal + and vertical code. Types that are lower in both dimensions have implicit conversions + to types that are higher in both dimensions. + + + + + Represents an array that has value equality. + + + + + Simple class for tracking a list of items and enumerating over them. + The items are stored in weak references; if the objects are collected, + they will not be seen when enumerating. + + The type of the collection element. + + + + Similar to Dictionary[TKey,TValue], but it also ensures that the keys will not be kept alive + if the only reference is from this collection. The value will be kept alive as long as the key + is alive. + + This currently has a limitation that the caller is responsible for ensuring that an object used as + a key is not also used as a value in *any* instance of a WeakHash. Otherwise, it will result in the + object being kept alive forever. This effectively means that the owner of the WeakHash should be the + only one who has access to the object used as a value. + + Currently, there is also no guarantee of how long the values will be kept alive even after the keys + get collected. This could be fixed by triggerring CheckCleanup() to be called on every garbage-collection + by having a dummy watch-dog object with a finalizer which calls CheckCleanup(). + + + + + Check if any of the keys have gotten collected + + Currently, there is also no guarantee of how long the values will be kept alive even after the keys + get collected. This could be fixed by triggerring CheckCleanup() to be called on every garbage-collection + by having a dummy watch-dog object with a finalizer which calls CheckCleanup(). + + + + + This class holds onto internal debugging options used in this assembly. + These options can be set via environment variables DLR_{option-name}. + Boolean options map "true" to true and other values to false. + + These options are for internal debugging only, and should not be + exposed through any public APIs. + + + + + Sets the value at the given index for a tuple of the given size. This set supports + walking through nested tuples to get the correct final index. + + + + + Gets the value at the given index for a tuple of the given size. This get + supports walking through nested tuples to get the correct final index. + + + + + Gets the unbound generic Tuple type which has at lease size slots or null if a large enough tuple is not available. + + + + + Creates a generic tuple with the specified types. + + If the number of slots fits within the maximum tuple size then we simply + create a single tuple. If it's greater then we create nested tuples + (e.g. a Tuple`2 which contains a Tuple`128 and a Tuple`8 if we had a size of 136). + + + + + Gets the number of usable slots in the provided Tuple type including slots available in nested tuples. + + + + + Creates a new instance of tupleType with the specified args. If the tuple is a nested + tuple the values are added in their nested forms. + + + + + Gets the values from a tuple including unpacking nested values. + + + + + Gets the series of properties that needs to be accessed to access a logical item in a potentially nested tuple. + + + + + Gets the series of properties that needs to be accessed to access a logical item in a potentially nested tuple. + + + + + Provides an expression for creating a tuple with the specified values. + + + + + TODO: Alternatively, it should be sufficient to remember indices for this, list, dict and block. + + + + + Convention for an individual argument at a callsite. + + Multiple different callsites can match against a single declaration. + Some argument kinds can be "unrolled" into multiple arguments, such as list and dictionary. + + + + + Simple unnamed positional argument. + In Python: foo(1,2,3) are all simple arguments. + + + + + Argument with associated name at the callsite + In Python: foo(a=1) + + + + + Argument containing a list of arguments. + In Python: foo(*(1,2*2,3)) would match 'def foo(a,b,c)' with 3 declared arguments such that (a,b,c)=(1,4,3). + it could also match 'def foo(*l)' with 1 declared argument such that l=(1,4,3) + + + + + Argument containing a dictionary of named arguments. + In Python: foo(**{'a':1, 'b':2}) + + + + + Represents a logical member of a type. The member could either be real concrete member on a type or + an extension member. + + This seperates the "physical" members that .NET knows exist on types from the members that + logically exist on a type. It also provides other abstractions above the level of .NET reflection + such as MemberGroups and NamespaceTracker's. + + It also provides a wrapper around the reflection APIs which cannot be extended from partial trust. + + + + + Gets the expression that creates the value. + + Returns null if it's an error to get the value. The caller can then call GetErrorForGet to get + the correct error Expression (or null if they should provide a default). + + + + + Gets an expression that assigns a value to the left hand side. + + Returns null if it's an error to assign to. The caller can then call GetErrorForSet to + get the correct error Expression (or null if a default error should be provided). + + + + + Gets an expression that assigns a value to the left hand side. + + Returns null if it's an error to assign to. The caller can then call GetErrorForSet to + get the correct error Expression (or null if a default error should be provided). + + + + + Gets an expression that performs a call on the object using the specified arguments. + + Returns null if it's an error to perform the specific operation. The caller can then call + GetErrorsForDoCall to get the correct error Expression (or null if a default error should be provided). + + + + + Returns the error associated with getting the value. + + A null return value indicates that the default error message should be provided by the caller. + + + + + Returns the error associated with accessing this member via a bound instance. + + A null return value indicates that the default error message should be provided by the caller. + + + + + Helper for getting values that have been bound. Called from BoundMemberTracker. Custom member + trackers can override this to provide their own behaviors when bound to an instance. + + + + + Helper for setting values that have been bound. Called from BoundMemberTracker. Custom member + trackers can override this to provide their own behaviors when bound to an instance. + + + + + Helper for setting values that have been bound. Called from BoundMemberTracker. Custom member + trackers can override this to provide their own behaviors when bound to an instance. + + + + + Binds the member tracker to the specified instance rturning a new member tracker if binding + is possible. If binding is not possible the existing member tracker will be returned. For example + binding to a static field results in returning the original MemberTracker. Binding to an instance + field results in a new BoundMemberTracker which will get GetBoundValue/SetBoundValue to pass the + instance through. + + + + + The type of member tracker. + + + + + The logical declaring type of the member. + + + + + The name of the member. + + + + + We ensure we only produce one MemberTracker for each member which logically lives on the declaring type. So + for example if you get a member from a derived class which is declared on the base class it should be the same + as getting the member from the base class. That’s easy enough until you get into extension members – here there + might be one extension member which is being applied to multiple types. Therefore we need to take into account the + extension type when ensuring that we only have 1 MemberTracker ever created. + + + + + Richly represents the signature of a callsite. + + + + + Array of additional meta information about the arguments, such as named arguments. + Null for a simple signature that's just an expression list. eg: foo(a*b,c,d) + + + + + Number of arguments in the signature. + + + + + True if the OldCallAction includes an ArgumentInfo of ArgumentKind.Dictionary or ArgumentKind.Named. + + + + + Gets the number of positional arguments the user provided at the call site. + + + + + All arguments are unnamed and matched by position. + + + + + A custom member tracker which enables languages to plug in arbitrary + members into the lookup process. + + + + + Encapsulates information about the result that should be produced when + a OldDynamicAction cannot be performed. The ErrorInfo can hold one of: + an expression which creates an Exception to be thrown + an expression which produces a value which should be returned + directly to the user and represents an error has occured (for + example undefined in JavaScript) + an expression which produces a value which should be returned + directly to the user but does not actually represent an error. + + ErrorInfo's are produced by an ActionBinder in response to a failed + binding. + + + + + Private constructor - consumers must use static From* factories + to create ErrorInfo objects. + + + + + Creates a new ErrorInfo which represents an exception that should + be thrown. + + + + + Creates a new ErrorInfo which represents a value which should be + returned to the user. + + + + + Crates a new ErrorInfo which represents a value which should be returned + to the user but does not represent an error. + + + + + + + The ErrorInfo expression produces an exception + + + + + The ErrorInfo expression produces a value which represents the error (e.g. undefined) + + + + + The ErrorInfo expression produces a value which is not an error + + + + + Gets the stub list for a COM Object. For COM objects we store the stub list + directly on the object using the Marshal APIs. This allows us to not have + any circular references to deal with via weak references which are challenging + in the face of COM. + + + + + Doesn't need to check PrivateBinding setting: no method that is part of the event is public the entire event is private. + If the code has already a reference to the event tracker instance for a private event its "static-ness" is not influenced + by private-binding setting. + + + + + Holds on a list of delegates hooked to the event. + We need the list because we cannot enumerate the delegates hooked to CLR event and we need to do so in + handler removal (we need to do custom delegate comparison there). If BCL enables the enumeration we could remove this. + + + + + Storage for the handlers - a key value pair of the callable object and the delegate handler. + + + + + Storage for the handlers - a key value pair of the callable object and the delegate handler. + + The delegate handler is closed over the callable object. Therefore as long as the object is alive the + delegate will stay alive and so will the callable object. That means it's fine to have a weak reference + to both of these objects. + + + + + Represents extension method. + + + + + The declaring type of the extension (the type this extension method extends) + + + + + The declaring type of the extension method. Since this is an extension method, + the declaring type is in fact the type this extension method extends, + not Method.DeclaringType + + + + + Represents a logical Property as a member of a Type. This Property can either be a real + concrete Property on a type (implemented with a ReflectedPropertyTracker) or an extension + property (implemented with an ExtensionPropertyTracker). + + + + + MemberGroups are a collection of MemberTrackers which are commonly produced + on-demand to talk about the available members. They can consist of a mix of + different member types or multiple membes of the same type. + + The most common source of MemberGroups is from ActionBinder.GetMember. From here + the DLR will perform binding to the MemberTrackers frequently producing the value + resulted from the user. If the result of the action produces a member it's self + the ActionBinder can provide the value exposed to the user via ReturnMemberTracker. + + ActionBinder provides default functionality for both getting members from a type + as well as exposing the members to the user. Getting members from the type maps + closely to reflection and exposing them to the user exposes the MemberTrackers + directly. + + + + + MethodGroup's represent a unique collection of method's. Typically this + unique set is all the methods which are overloaded by the same name including + methods with different arity. These methods represent a single logically + overloaded element of a .NET type. + + The base DLR binders will produce MethodGroup's when provided with a MemberGroup + which contains only methods. The MethodGroup's will be unique instances per + each unique group of methods. + + + + + Returns a BuiltinFunction bound to the provided type arguments. Returns null if the binding + cannot be performed. + + + + + NamespaceTracker represent a CLS namespace. + + + + + Provides a list of all the members of an instance. + + + + + Loads all the types from all assemblies that contribute to the current namespace (but not child namespaces) + + + + + Populates the tree with nodes for each part of the namespace + + + Full namespace name. It can be null (for top-level types) + + + + + As a fallback, so if the type does exist in any assembly. This would happen if a new type was added + that was not in the hardcoded list of types. + This code is not accurate because: + 1. We dont deal with generic types (TypeCollision). + 2. Previous calls to GetCustomMemberNames (eg. "from foo import *" in Python) would not have included this type. + 3. This does not deal with new namespaces added to the assembly + + + + + This stores all the public non-nested type names in a single namespace and from a single assembly. + This allows inspection of the namespace without eagerly loading all the types. Eagerly loading + types slows down startup, increases working set, and is semantically incorrect as it can trigger + TypeLoadExceptions sooner than required. + + + + + Enables implicit Type to TypeTracker conversions accross dynamic languages. + + + + + Represents the top reflected package which contains extra information such as + all the assemblies loaded and the built-in modules. + + + + + returns the package associated with the specified namespace and + updates the associated module to mark the package as imported. + + + + + Ensures that the assembly is loaded + + + true if the assembly was loaded for the first time. + false if the assembly had already been loaded before + + + + When an (interop) assembly is loaded, we scan it to discover the GUIDs of COM interfaces so that we can + associate the type definition with COM objects with that GUID. + Since scanning all loaded assemblies can be expensive, in the future, we might consider a more explicit + user binder to trigger scanning of COM types. + + + + Specifies that the member is a constructor, representing a ConstructorTracker + + + Specifies that the member is an event, representing a EventTracker + + + Specifies that the member is a field, representing a FieldTracker + + + Specifies that the member is a method, representing a MethodTracker + + + Specifies that the member is a property, representing a PropertyTracker + + + Specifies that the member is a property, representing a TypeTracker + + + Specifies that the member is a namespace, representing a NamespaceTracker + + + Specifies that the member is a group of method overloads, representing a MethodGroup + + + Specifies that the member is a group of types that very by arity, representing a TypeGroup + + + Specifies that the member is a custom meber, represetning a CustomTracker + + + Specifies that the member is a bound to an instance, representing a BoundMemberTracker + + + + A TypeCollision is used when we have a collision between + two types with the same name. Currently this is only possible w/ generic + methods that should logically have arity as a portion of their name. For eg: + System.EventHandler and System.EventHandler[T] + System.Nullable and System.Nullable[T] + System.IComparable and System.IComparable[T] + + The TypeCollision provides an indexer but also is a real type. When used + as a real type it is the non-generic form of the type. + + The indexer allows the user to disambiguate between the generic and + non-generic versions. Therefore users must always provide additional + information to get the generic version. + + + + The merged list so far. Could be null + The new type(s) to add to the merged list + The merged list. Could be a TypeTracker or TypeGroup + + + Gets the arity of generic parameters + + + No non-generic type is represented by this group. + + + + This returns the DeclaringType of all the types in the TypeGroup + + + + + This returns the base name of the TypeGroup (the name shared by all types minus arity) + + + + + This will return the result only for the non-generic type if one exists, and will throw + an exception if all types in the TypeGroup are generic + + + + + This will return the result only for the non-generic type if one exists, and will throw + an exception if all types in the TypeGroup are generic + + + + + True if the MethodBase is method which is going to construct an object + + + + + Returns the System.Type for any object, including null. The type of null + is represented by None.Type and all other objects just return the + result of Object.GetType + + + + + Simply returns a Type[] from calling GetType on each element of args. + + + + + EMITTED + Used by default method binder to check types of splatted arguments. + + + + + Given a MethodInfo which may be declared on a non-public type this attempts to + return a MethodInfo which will dispatch to the original MethodInfo but is declared + on a public type. + + Returns the original method if the method if a public version cannot be found. + + + + + Non-public types can have public members that we find when calling type.GetMember(...). This + filters out the non-visible members by attempting to resolve them to the correct visible type. + + If no correct visible type can be found then the member is not visible and we won't call it. + + + + + Sees if two MemberInfos point to the same underlying construct in IL. This + ignores the ReflectedType property which exists on MemberInfos which + causes direct comparisons to be false even if they are the same member. + + + + + Returns a value which indicates failure when a OldConvertToAction of ImplicitTry or + ExplicitTry. + + + + + Creates an interpreted delegate for the lambda. + + The lambda to compile. + A delegate which can interpret the lambda. + + + + Creates an interpreted delegate for the lambda. + + The lambda to compile. + The number of iterations before the interpreter starts compiling + A delegate which can interpret the lambda. + + + + Creates an interpreted delegate for the lambda. + + The lambda's delegate type. + The lambda to compile. + A delegate which can interpret the lambda. + + + + Creates an interpreted delegate for the lambda. + + The lambda to compile. + The number of iterations before the interpreter starts compiling + A delegate which can interpret the lambda. + + + + Compiles the lambda into a method definition. + + the lambda to compile + A which will be used to hold the lambda's IL. + A parameter that indicates if debugging information should be emitted to a PDB symbol store. + + + + Compiles the LambdaExpression. + + If the lambda is compiled with emitDebugSymbols, it will be + generated into a TypeBuilder. Otherwise, this method is the same as + calling LambdaExpression.Compile() + + This is a workaround for a CLR limitiation: DynamicMethods cannot + have debugging information. + + the lambda to compile + true to generate a debuggable method, false otherwise + the compiled delegate + + + + Compiles the LambdaExpression, emitting it into a new type, and + optionally making it debuggable. + + This is a workaround for a CLR limitiation: DynamicMethods cannot + have debugging information. + + the lambda to compile + Debugging information generator used by the compiler to mark sequence points and annotate local variables. + True if debug symbols (PDBs) are emitted by the . + the compiled delegate + + + + Reduces the provided DynamicExpression into site.Target(site, *args). + + + + + Removes all live objects and places them in static fields of a type. + + + + + Enables an object to be serializable to an Expression tree. The expression tree can then + be emitted into an assembly enabling the de-serialization of the object. + + + + + Serializes constants and dynamic sites so the code can be saved to disk + + + + + The MethodBinder will perform normal method binding. + + + + + The MethodBinder will return the languages definition of NotImplemented if the arguments are + incompatible with the signature. + + + + + The MethodBinder will set properties/fields for unused keyword arguments on the instance + that gets returned from the method. + + + + + The delegate representing the DLR Main function + + + + + An attribute that is applied to saved ScriptCode's to be used to re-create the ScriptCode + from disk. + + + + + Gets names stored in optimized scope. + + + + + Provides a mechanism for providing documentation stored in an assembly as metadata. + + Applying this attribute will enable documentation to be provided to the user at run-time + even if XML Documentation files are unavailable. + + + + + Updates an exception before it's getting re-thrown so + we can present a reasonable stack trace to the user. + + + + + Returns all the stack traces associates with an exception + + + + + Marks a class in the assembly as being an extension type for another type. + + + + + Marks a type in the assembly as being an extension type for another type. + + The type which is being extended + The type which provides the extension members. + + + + The type which contains extension members which are added to the type being extended. + + + + + The type which is being extended by the extension type. + + + + + Not all .NET enumerators throw exceptions if accessed in an invalid state. This type + can be used to throw exceptions from enumerators implemented in IronPython. + + + + + Event args for when a ScriptScope has had its contents changed. + + + + + Creates a new ModuleChangeEventArgs object with the specified name and type. + + + + + Creates a nwe ModuleChangeEventArgs with the specified name, type, and changed value. + + + + + Gets the name of the symbol that has changed. + + + + + Gets the way in which the symbol has changed: Set or Delete. + + + + + The the symbol has been set provides the new value. + + + + + The way in which a module has changed : Set or Delete + + + + + A new value has been set in the module (or a previous value has changed). + + + + + A value has been removed from the module. + + + + + A NullTextContentProvider to be provided when we have a pre-compiled ScriptCode which doesn't + have source code associated with it. + + + + + Singleton instance returned from an operator method when the operator method cannot provide a value. + + + + + Represents an ops-extension method which is added as an operator. + + The name must be a well-formed name such as "Add" that matches the CLS + naming conventions for adding overloads associated with op_* methods. + + + + + Represents an ops-extension method which is used to implement a property. + + + + + Provides a cache of reflection members. Only one set of values is ever handed out per a + specific request. + + + + + TODO: Make me private again + + + + + Indicates an extension method should be added as a static method, not a instance method. + + + + + Converts a generic ICollection of T into an array of T. + + If the collection is already an array of T the original collection is returned. + + + + + Converts a generic ICollection of T into an array of R using a given conversion. + + If the collection is already an array of R the original collection is returned. + + + + + Allows wrapping of proxy types (like COM RCWs) to expose their IEnumerable functionality + which is supported after casting to IEnumerable, even though Reflection will not indicate + IEnumerable as a supported interface + + + + + Requires the specified index to point inside the array. + + Array is null. + Index is outside the array. + + + + Requires the specified index to point inside the array. + + Index is outside the array. + + + + Requires the specified index to point inside the array or at the end + + Array is null. + Index is outside the array. + + + + Requires the specified index to point inside the array or at the end + + Array is null. + Index is outside the array. + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + Offset or count are out of range. + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + Offset or count are out of range. + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + Array is null. + Offset or count are out of range. + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + String is null. + Offset or count are out of range. + + + + Requires the array and all its items to be non-null. + + + + + Requires the enumerable collection and all its items to be non-null. + + + + + Presents a flat enumerable view of multiple dictionaries + + + + + Seeks the first character of a specified line in the text stream. + + The reader. + Line number. The current position is assumed to be line #1. + + Returns true if the line is found, false otherwise. + + + + + Reads characters to a string until end position or a terminator is reached. + Doesn't include the terminator into the resulting string. + Returns null, if the reader is at the end position. + + + + + Reads characters until end position or a terminator is reached. + Returns true if the character has been found (the reader is positioned right behind the character), + false otherwise. + + + + + Creates an open delegate for the given (dynamic)method. + + + + + Creates a closed delegate for the given (dynamic)method. + + + + + Gets a Func of CallSite, object * paramCnt, object delegate type + that's suitable for use in a non-strongly typed call site. + + + + + Returns true if the specified parameter is mandatory, i.e. is not optional and doesn't have a default value. + + + + + Yields all ancestors of the given type including the type itself. + Does not include implemented interfaces. + + + + + Like Type.GetInterfaces, but only returns the interfaces implemented by this type + and not its parents. + + + + + Enumerates extension methods in given assembly. Groups the methods by declaring namespace. + Uses a global cache if is true. + + + + + Binds occurances of generic parameters in against corresponding types in . + Invokes (parameter, type) for each such binding. + Returns false if the is structurally different from or if the binder returns false. + + + + + Determines if a given type matches the type that the method extends. + The match might be non-trivial if the extended type is an open generic type with constraints. + + + + + Splits text and optionally indents first lines - breaks along words, not characters. + + + + + Defines methods to support the comparison of objects for structural equality. + + + + + Determines whether an object is equal to the current instance. + + The object to compare with the current instance. + An object that determines whether the current instance and other are equal. + true if the two objects are equal; otherwise, false. + + + + Returns a hash code for the current instance. + + An object that computes the hash code of the current object. + The hash code for the current instance. + + + + Supports the structural comparison of collection objects. + + + + + Determines whether the current collection object precedes, occurs in the + same position as, or follows another object in the sort order. + + The object to compare with the current instance. + An object that compares the current object and other. + + An integer that indicates the relationship of the current collection object + to other, as shown in the following table. + Return value Description + -1 The current instance precedes other. + 0 The current instance and other are equal. + 1 The current instance follows other. + + + + + Provides a StreamContentProvider for a stream of content backed by a file on disk. + + + + diff --git a/packages/IronPython.2.7.4/lib/Net35/Microsoft.Scripting.AspNet.dll b/packages/IronPython.2.7.4/lib/Net35/Microsoft.Scripting.AspNet.dll new file mode 100644 index 0000000000..8efa03f05c Binary files /dev/null and b/packages/IronPython.2.7.4/lib/Net35/Microsoft.Scripting.AspNet.dll differ diff --git a/packages/IronPython.2.7.4/lib/Net35/Microsoft.Scripting.AspNet.xml b/packages/IronPython.2.7.4/lib/Net35/Microsoft.Scripting.AspNet.xml new file mode 100644 index 0000000000..b543f81049 --- /dev/null +++ b/packages/IronPython.2.7.4/lib/Net35/Microsoft.Scripting.AspNet.xml @@ -0,0 +1,8 @@ + + + + Microsoft.Scripting.AspNet + + + + diff --git a/packages/IronPython.2.7.4/lib/Net35/Microsoft.Scripting.Core.dll b/packages/IronPython.2.7.4/lib/Net35/Microsoft.Scripting.Core.dll new file mode 100644 index 0000000000..bf3aa76db6 Binary files /dev/null and b/packages/IronPython.2.7.4/lib/Net35/Microsoft.Scripting.Core.dll differ diff --git a/packages/IronPython.2.7.4/lib/Net35/Microsoft.Scripting.Core.xml b/packages/IronPython.2.7.4/lib/Net35/Microsoft.Scripting.Core.xml new file mode 100644 index 0000000000..626687c26c --- /dev/null +++ b/packages/IronPython.2.7.4/lib/Net35/Microsoft.Scripting.Core.xml @@ -0,0 +1,10867 @@ + + + + Microsoft.Scripting.Core + + + + + Describes arguments in the dynamic binding process. + + + ArgumentCount - all inclusive number of arguments. + ArgumentNames - names for those arguments that are named. + + Argument names match to the argument values in left to right order + and last name corresponds to the last argument. + + Example: + Foo(arg1, arg2, arg3, name1 = arg4, name2 = arg5, name3 = arg6) + + will correspond to: + ArgumentCount: 6 + ArgumentNames: {"name1", "name2", "name3"} + + + + + Creates a new PositionalArgumentInfo. + + The number of arguments. + The argument names. + The new CallInfo + + + + Creates a new CallInfo that represents arguments in the dynamic binding process. + + The number of arguments. + The argument names. + The new CallInfo + + + + Serves as a hash function for the current CallInfo. + + A hash code for the current CallInfo. + + + + Determines whether the specified CallInfo instance is considered equal to the current. + + The instance of CallInfo to compare with the current instance. + true if the specified instance is equal to the current one otherwise, false. + + + + The number of arguments. + + + + + The argument names. + + + + + This API supports the .NET Framework infrastructure and is not intended to be used directly from your code. + + + + + Creates an instance of a dynamic call site used for cache lookup. + + The type of the delegate of the . + The new call site. + + + + Checks if a dynamic site requires an update. + + An instance of the dynamic call site. + true if rule does not need updating, false otherwise. + + + + Checks whether the executed rule matched + + An instance of the dynamic call site. + true if rule matched, false otherwise. + + + + Clears the match flag on the matchmaker call site. + + An instance of the dynamic call site. + + + + Adds a rule to the cache maintained on the dynamic call site. + + The type of the delegate of the . + An instance of the dynamic call site. + An instance of the call site rule. + + + + Updates rules in the cache. + + The type of the delegate of the . + An instance of the dynamic call site. + The matched rule index. + + + + Gets the dynamic binding rules from the call site. + + The type of the delegate of the . + An instance of the dynamic call site. + An array of dynamic binding rules. + + + + Retrieves binding rule cache. + + The type of the delegate of the . + An instance of the dynamic call site. + The cache. + + + + Moves the binding rule within the cache. + + The type of the delegate of the . + The call site rule cache. + An instance of the call site rule. + An index of the call site rule. + + + + Searches the dynamic rule cache for rules applicable to the dynamic operation. + + The type of the delegate of the . + The cache. + The collection of applicable rules. + + + + Updates the call site target with a new rule based on the arguments. + + The type of the delegate of the . + The call site binder. + An instance of the dynamic call site. + Arguments to the call site. + The new call site target. + + + + Represents information about a dynamic get member operation, indicating + if the get member should invoke properties when performing the get. + + + + + Gets the value indicating if this GetMember should invoke properties + when performing the get. The default value when this interface is not present + is true. + + + This property is used by some languages to get a better COM interop experience. + When the value is set to false, the dynamic COM object won't invoke the object + but will instead bind to the name, and return an object that can be invoked or + indexed later. This is useful for indexed properties and languages that don't + produce InvokeMember call sites. + + + + + Represents the invoke member dynamic operation at the call site, + providing the binding semantic and the details about the operation. + + + + + The dynamic call site binder that participates in the binding protocol. + + + The performs the binding of the dynamic operation using the runtime values + as input. On the other hand, the participates in the + binding protocol. + + + + + Class responsible for runtime binding of the dynamic operations on the dynamic call site. + + + + + The Level 2 cache - all rules produced for the same binder. + + + + + Initializes a new instance of the class. + + + + + Performs the runtime binding of the dynamic operation on a set of arguments. + + An array of arguments to the dynamic operation. + The array of instances that represent the parameters of the call site in the binding process. + A LabelTarget used to return the result of the dynamic binding. + + 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 + subsequent occurrences of the dynamic operation, Bind will be called again + to produce a new for the new argument types. + + + + + Provides low-level runtime binding support. Classes can override this and provide a direct + delegate for the implementation of rule. This can enable saving rules to disk, having + specialized rules available at runtime, or providing a different caching policy. + + The target type of the CallSite. + The CallSite the bind is being performed for. + The arguments for the binder. + A new delegate which replaces the CallSite Target. + + + + Adds a target to the cache of known targets. The cached targets will + be scanned before calling BindDelegate to produce the new rule. + + The type of target being added. + The target delegate to be added to the cache. + + + + Gets a label that can be used to cause the binding to be updated. It + indicates that the expression's binding is no longer valid. + This is typically used when the "version" of a dynamic object has + changed. + + + + + Initializes a new instance of the class. + + + + + Performs the runtime binding of the dynamic operation on a set of arguments. + + An array of arguments to the dynamic operation. + The array of instances that represent the parameters of the call site in the binding process. + A LabelTarget used to return the result of the dynamic binding. + + An Expression that performs tests on the dynamic operation arguments, and + 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 for the new argument types. + + + + + When overridden in the derived class, performs the binding of the dynamic operation. + + The target of the dynamic operation. + An array of arguments of the dynamic operation. + The representing the result of the binding. + + + + Gets an expression that will cause the binding to be updated. It + indicates that the expression's binding is no longer valid. + This is typically used when the "version" of a dynamic object has + changed. + + The Type property of the resulting expression; any type is allowed. + The update expression. + + + + Defers the binding of the operation until later time when the runtime values of all dynamic operation arguments have been computed. + + The target of the dynamic operation. + An array of arguments of the dynamic operation. + The representing the result of the binding. + + + + Defers the binding of the operation until later time when the runtime values of all dynamic operation arguments have been computed. + + An array of arguments of the dynamic operation. + The representing the result of the binding. + + + + The result type of the operation. + + + + + Initializes a new instance of the . + + The name of the member to invoke. + true if the name should be matched ignoring case; false otherwise. + The signature of the arguments at the call site. + + + + Performs the binding of the dynamic invoke member operation. + + The target of the dynamic invoke member operation. + An array of arguments of the dynamic invoke member operation. + The representing the result of the binding. + + + + Performs the binding of the dynamic invoke member operation if the target dynamic object cannot bind. + + The target of the dynamic invoke member operation. + The arguments of the dynamic invoke member operation. + The representing the result of the binding. + + + + When overridden in the derived class, performs the binding of the dynamic invoke member operation if the target dynamic object cannot bind. + + The target of the dynamic invoke member operation. + The arguments of the dynamic invoke member operation. + The binding result to use if binding fails, or null. + The representing the result of the binding. + + + + When overridden in the derived class, performs the binding of the dynamic invoke operation if the target dynamic object cannot bind. + + The target of the dynamic invoke operation. + The arguments of the dynamic invoke operation. + The binding result to use if binding fails, or null. + The representing the result of the binding. + + This method is called by the target when the target implements the invoke member operation + as a sequence of get member, and invoke, to let the + request the binding of the invoke operation only. + + + + + The result type of the operation. + + + + + Gets the name of the member to invoke. + + + + + Gets the value indicating if the string comparison should ignore the case of the member name. + + + + + Gets the signature of the arguments at the call site. + + + + + Represents the binary dynamic operation at the call site, providing the binding semantic and the details about the operation. + + + + + Initializes a new instance of the class. + + The binary operation kind. + + + + Performs the binding of the binary dynamic operation if the target dynamic object cannot bind. + + The target of the dynamic binary operation. + The right hand side operand of the dynamic binary operation. + The representing the result of the binding. + + + + When overridden in the derived class, performs the binding of the binary dynamic operation if the target dynamic object cannot bind. + + The target of the dynamic binary operation. + The right hand side operand of the dynamic binary operation. + The binding result in case the binding fails, or null. + The representing the result of the binding. + + + + Performs the binding of the dynamic binary operation. + + The target of the dynamic operation. + An array of arguments of the dynamic operation. + The representing the result of the binding. + + + + The result type of the operation. + + + + + The binary operation kind. + + + + + A Dynamic Call Site base class. This type is used as a parameter type to the + dynamic site targets. The first parameter of the delegate (T) below must be + of this type. + + + + + The Binder responsible for binding operations at this call site. + This binder is invoked by the UpdateAndExecute below if all Level 0, + Level 1 and Level 2 caches experience cache miss. + + + + + used by Matchmaker sites to indicate rule match. + + + + + Creates a CallSite with the given delegate type and binder. + + The CallSite delegate type. + The CallSite binder. + The new CallSite. + + + + Class responsible for binding dynamic operations on the dynamic site. + + + + + Dynamic site type. + + The delegate type. + + + + The Level 0 cache - a delegate specialized based on the site history. + + + + + The Level 1 cache - a history of the dynamic site. + + + + + Creates an instance of the dynamic call site, initialized with the binder responsible for the + runtime binding of the dynamic operations at this call site. + + The binder responsible for the runtime binding of the dynamic operations at this call site. + The new instance of dynamic call site. + + + + Clears the rule cache ... used by the call site tests. + + + + + The update delegate. Called when the dynamic site experiences cache miss. + + The update delegate. + + + + Class that contains helper methods for DLR CallSites. + + + + + Checks if a is internally used by DLR and should not + be displayed on the language code's stack. + + The input + + True if the input is internally used by DLR and should not + be displayed on the language code's stack. Otherwise, false. + + + + + Represents the convert dynamic operation at the call site, providing the binding semantic and the details about the operation. + + + + + Initializes a new intsance of the . + + The type to convert to. + true if the conversion should consider explicit conversions; otherwise, false. + + + + Performs the binding of the dynamic convert operation if the target dynamic object cannot bind. + + The target of the dynamic convert operation. + The representing the result of the binding. + + + + When overridden in the derived class, performs the binding of the dynamic convert operation if the target dynamic object cannot bind. + + The target of the dynamic convert operation. + The binding result to use if binding fails, or null. + The representing the result of the binding. + + + + Performs the binding of the dynamic convert operation. + + The target of the dynamic convert operation. + An array of arguments of the dynamic convert operation. + The representing the result of the binding. + + + + The type to convert to. + + + + + Gets the value indicating if the conversion should consider explicit conversions. + + + + + The result type of the operation. + + + + + Represents the dynamic delete index operation at the call site, providing the binding semantic and the details about the operation. + + + + + Initializes a new instance of the . + + The signature of the arguments at the call site. + + + + Performs the binding of the dynamic delete index operation. + + The target of the dynamic delete index operation. + An array of arguments of the dynamic delete index operation. + The representing the result of the binding. + + + + Performs the binding of the dynamic delete index operation if the target dynamic object cannot bind. + + The target of the dynamic delete index operation. + The arguments of the dynamic delete index operation. + The representing the result of the binding. + + + + When overridden in the derived class, performs the binding of the dynamic delete index operation if the target dynamic object cannot bind. + + The target of the dynamic delete index operation. + The arguments of the dynamic delete index operation. + The binding result to use if binding fails, or null. + The representing the result of the binding. + + + + The result type of the operation. + + + + + Gets the signature of the arguments at the call site. + + + + + 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...) + to provide custom behavior that will be invoked at runtime. + + If a method is not overridden then the DynamicObject does not directly support that behavior and + the call site will determine how the binding should be performed. + + + + + Represents a dynamic object, that can have its operations bound at runtime. + + + Objects that want to participate in the binding process should implement an IDynamicMetaObjectProvider interface, + and implement to return a . + + + + + Returns the responsible for binding operations performed on this object. + + The expression tree representation of the runtime value. + The to bind this object. + + + + Enables derived types to create a new instance of DynamicObject. DynamicObject instances cannot be + directly instantiated because they have no implementation of dynamic behavior. + + + + + Provides the implementation of getting a member. Derived classes can override + this method to customize behavior. When not overridden the call site requesting the + binder determines the behavior. + + The binder provided by the call site. + The result of the get operation. + true if the operation is complete, false if the call site should determine behavior. + + + + Provides the implementation of setting a member. Derived classes can override + this method to customize behavior. When not overridden the call site requesting the + binder determines the behavior. + + The binder provided by the call site. + The value to set. + true if the operation is complete, false if the call site should determine behavior. + + + + Provides the implementation of deleting a member. Derived classes can override + this method to customize behavior. When not overridden the call site requesting the + binder determines the behavior. + + The binder provided by the call site. + true if the operation is complete, false if the call site should determine behavior. + + + + Provides the implementation of calling a member. Derived classes can override + this method to customize behavior. When not overridden the call site requesting the + binder determines the behavior. + + The binder provided by the call site. + The arguments to be used for the invocation. + The result of the invocation. + true if the operation is complete, false if the call site should determine behavior. + + + + Provides the implementation of converting the DynamicObject to another type. Derived classes + can override this method to customize behavior. When not overridden the call site + requesting the binder determines the behavior. + + The binder provided by the call site. + The result of the conversion. + true if the operation is complete, false if the call site should determine behavior. + + + + Provides the implementation of creating an instance of the DynamicObject. Derived classes + can override this method to customize behavior. When not overridden the call site requesting + the binder determines the behavior. + + The binder provided by the call site. + The arguments used for creation. + The created instance. + true if the operation is complete, false if the call site should determine behavior. + + + + Provides the implementation of invoking the DynamicObject. Derived classes can + override this method to customize behavior. When not overridden the call site requesting + the binder determines the behavior. + + The binder provided by the call site. + The arguments to be used for the invocation. + The result of the invocation. + true if the operation is complete, false if the call site should determine behavior. + + + + Provides the implementation of performing a binary operation. Derived classes can + override this method to customize behavior. When not overridden the call site requesting + the binder determines the behavior. + + The binder provided by the call site. + The right operand for the operation. + The result of the operation. + true if the operation is complete, false if the call site should determine behavior. + + + + Provides the implementation of performing a unary operation. Derived classes can + override this method to customize behavior. When not overridden the call site requesting + the binder determines the behavior. + + The binder provided by the call site. + The result of the operation. + true if the operation is complete, false if the call site should determine behavior. + + + + Provides the implementation of performing a get index operation. Derived classes can + override this method to customize behavior. When not overridden the call site requesting + the binder determines the behavior. + + The binder provided by the call site. + The indexes to be used. + The result of the operation. + true if the operation is complete, false if the call site should determine behavior. + + + + Provides the implementation of performing a set index operation. Derived classes can + override this method to custmize behavior. When not overridden the call site requesting + the binder determines the behavior. + + The binder provided by the call site. + The indexes to be used. + The value to set. + true if the operation is complete, false if the call site should determine behavior. + + + + Provides the implementation of performing a delete index operation. Derived classes + can override this method to custmize behavior. When not overridden the call site + requesting the binder determines the behavior. + + The binder provided by the call site. + The indexes to be deleted. + true if the operation is complete, false if the call site should determine behavior. + + + + Returns the enumeration of all dynamic member names. + + The list of dynamic member names. + + + + The provided MetaObject will dispatch to the Dynamic virtual methods. + The object can be encapsulated inside of another MetaObject to + provide custom behavior for individual actions. + + + + + Represents the dynamic binding and a binding logic of an object participating in the dynamic binding. + + + + + Represents an empty array of type . This field is read only. + + + + + Initializes a new instance of the class. + + The expression representing this during the dynamic binding process. + The set of binding restrictions under which the binding is valid. + + + + Initializes a new instance of the class. + + The expression representing this during the dynamic binding process. + The set of binding restrictions under which the binding is valid. + The runtime value represented by the . + + + + Performs the binding of the dynamic conversion operation. + + An instance of the that represents the details of the dynamic operation. + The new representing the result of the binding. + + + + Performs the binding of the dynamic get member operation. + + An instance of the that represents the details of the dynamic operation. + The new representing the result of the binding. + + + + Performs the binding of the dynamic set member operation. + + An instance of the that represents the details of the dynamic operation. + The representing the value for the set member operation. + The new representing the result of the binding. + + + + Performs the binding of the dynamic delete member operation. + + An instance of the that represents the details of the dynamic operation. + The new representing the result of the binding. + + + + Performs the binding of the dynamic get index operation. + + An instance of the that represents the details of the dynamic operation. + An array of instances - indexes for the get index operation. + The new representing the result of the binding. + + + + Performs the binding of the dynamic set index operation. + + An instance of the that represents the details of the dynamic operation. + An array of instances - indexes for the set index operation. + The representing the value for the set index operation. + The new representing the result of the binding. + + + + Performs the binding of the dynamic delete index operation. + + An instance of the that represents the details of the dynamic operation. + An array of instances - indexes for the delete index operation. + The new representing the result of the binding. + + + + Performs the binding of the dynamic invoke member operation. + + An instance of the that represents the details of the dynamic operation. + An array of instances - arguments to the invoke member operation. + The new representing the result of the binding. + + + + Performs the binding of the dynamic invoke operation. + + An instance of the that represents the details of the dynamic operation. + An array of instances - arguments to the invoke operation. + The new representing the result of the binding. + + + + Performs the binding of the dynamic create instance operation. + + An instance of the that represents the details of the dynamic operation. + An array of instances - arguments to the create instance operation. + The new representing the result of the binding. + + + + Performs the binding of the dynamic unary operation. + + An instance of the that represents the details of the dynamic operation. + The new representing the result of the binding. + + + + Performs the binding of the dynamic binary operation. + + An instance of the that represents the details of the dynamic operation. + An instance of the representing the right hand side of the binary operation. + The new representing the result of the binding. + + + + Returns the enumeration of all dynamic member names. + + The list of dynamic member names. + + + + Returns the list of expressions represented by the instances. + + An array of instances to extract expressions from. + The array of expressions. + + + + Creates a meta-object for the specified object. + + The object to get a meta-object for. + The expression representing this during the dynamic binding process. + + If the given object implements and is not a remote object from outside the current AppDomain, + returns the object's specific meta-object returned by . Otherwise a plain new meta-object + with no restrictions is created and returned. + + + + + The expression representing the during the dynamic binding process. + + + + + The set of binding restrictions under which the binding is valid. + + + + + The runtime value represented by this . + + + + + Gets a value indicating whether the has the runtime value. + + + + + Gets the of the runtime value or null if the has no value associated with it. + + + + + Gets the limit type of the . + + Represents the most specific type known about the object represented by the . if runtime value is available, a type of the otherwise. + + + + Helper method for generating expressions that assign byRef call + parameters back to their original variables + + + + + Helper method for generating arguments for calling methods + on DynamicObject. parameters is either a list of ParameterExpressions + to be passed to the method as an object[], or NoArgs to signify that + the target method takes no object[] parameter. + + + + + Helper method for generating a MetaObject which calls a + specific method on Dynamic that returns a result + + + + + Helper method for generating a MetaObject which calls a + specific method on Dynamic that returns a result + + + + + Helper method for generating a MetaObject which calls a + specific method on DynamicObject that returns a result. + + args is either an array of arguments to be passed + to the method as an object[] or NoArgs to signify that + the target method takes no parameters. + + + + + Helper method for generating a MetaObject which calls a + specific method on Dynamic, but uses one of the arguments for + the result. + + args is either an array of arguments to be passed + to the method as an object[] or NoArgs to signify that + the target method takes no parameters. + + + + + Helper method for generating a MetaObject which calls a + specific method on Dynamic, but uses one of the arguments for + the result. + + args is either an array of arguments to be passed + to the method as an object[] or NoArgs to signify that + the target method takes no parameters. + + + + + Checks if the derived type has overridden the specified method. If there is no + implementation for the method provided then Dynamic falls back to the base class + behavior which lets the call site determine how the binder is performed. + + + + + Returns a Restrictions object which includes our current restrictions merged + with a restriction limiting our type + + + + + Returns our Expression converted to DynamicObject + + + + + Represents the dynamic get member operation at the call site, providing the binding semantic and the details about the operation. + + + + + Initializes a new instance of the . + + The name of the member to get. + true if the name should be matched ignoring case; false otherwise. + + + + Performs the binding of the dynamic get member operation if the target dynamic object cannot bind. + + The target of the dynamic get member operation. + The representing the result of the binding. + + + + When overridden in the derived class, performs the binding of the dynamic get member operation if the target dynamic object cannot bind. + + The target of the dynamic get member operation. + The binding result to use if binding fails, or null. + The representing the result of the binding. + + + + Performs the binding of the dynamic get member operation. + + The target of the dynamic get member operation. + An array of arguments of the dynamic get member operation. + The representing the result of the binding. + + + + The result type of the operation. + + + + + Gets the name of the member to get. + + + + + Gets the value indicating if the string comparison should ignore the case of the member name. + + + + + Represents an object with members that can be dynamically added and removed at runtime. + + + + + Creates a new ExpandoObject with no members. + + + + + Try to get the data stored for the specified class at the specified index. If the + class has changed a full lookup for the slot will be performed and the correct + value will be retrieved. + + + + + Sets the data for the specified class at the specified index. If the class has + changed then a full look for the slot will be performed. If the new class does + not have the provided slot then the Expando's class will change. Only case sensitive + setter is supported in ExpandoObject. + + + + + Deletes the data stored for the specified class at the specified index. + + + + + Returns true if the member at the specified index has been deleted, + otherwise false. Call this function holding the lock. + + + + + Promotes the class from the old type to the new type and returns the new + ExpandoData object. + + + + + Internal helper to promote a class. Called from our RuntimeOps helper. This + version simply doesn't expose the ExpandoData object which is a private + data structure. + + + + + Exposes the ExpandoClass which we've associated with this + Expando object. Used for type checks in rules. + + + + + Adds a dynamic test which checks if the version has changed. The test is only necessary for + performance as the methods will do the correct thing if called with an incorrect version. + + + + + Gets the class and the index associated with the given name. Does not update the expando object. Instead + this returns both the original and desired new class. A rule is created which includes the test for the + original class, the promotion to the new class, and the set/delete based on the class post-promotion. + + + + + Returns our Expression converted to our known LimitType + + + + + Returns a Restrictions object which includes our current restrictions merged + with a restriction limiting our type + + + + + Stores the class and the data associated with the class as one atomic + pair. This enables us to do a class check in a thread safe manner w/o + requiring locks. + + + + + the dynamically assigned class associated with the Expando object + + + + + data stored in the expando object, key names are stored in the class. + + Expando._data must be locked when mutating the value. Otherwise a copy of it + could be made and lose values. + + + + + Constructs an empty ExpandoData object with the empty class and no data. + + + + + the version of the ExpandoObject that tracks set and delete operations + + + + + Constructs a new ExpandoData object with the specified class and data. + + + + + Update the associated class and increases the storage for the data array if needed. + + + + + + Indexer for getting/setting the data + + + + + This API supports the .NET Framework infrastructure and is not intended to be used directly from your code. + Contains helper methods called from dynamically generated methods. + + + + + Gets the value of an item in an expando object. + + The expando object. + The class of the expando object. + The index of the member. + The name of the member. + true if the name should be matched ignoring case; false otherwise. + The out parameter containing the value of the member. + True if the member exists in the expando object, otherwise false. + + + + Sets the value of an item in an expando object. + + The expando object. + The class of the expando object. + The index of the member. + The value of the member. + The name of the member. + true if the name should be matched ignoring case; false otherwise. + + Returns the index for the set member. + + + + + Deletes the value of an item in an expando object. + + The expando object. + The class of the expando object. + The index of the member. + The name of the member. + true if the name should be matched ignoring case; false otherwise. + true if the item was successfully removed; otherwise, false. + + + + Checks the version of the expando object. + + The expando object. + The version to check. + true if the version is equal; otherwise, false. + + + + Promotes an expando object from one class to a new class. + + The expando object. + The old class of the expando object. + The new class of the expando object. + + + + Creates an interface that can be used to modify closed over variables at runtime. + + The closure array. + An array of indicies into the closure array where variables are found. + An interface to access variables. + + + + Creates an interface that can be used to modify closed over variables at runtime. + + An interface to access variables. + + + + Quotes the provided expression tree. + + The expression to quote. + The hoisted local state provided by the compiler. + The actual hoisted local values. + The quoted expression. + + + + Combines two runtime variable lists and returns a new list. + + The first list. + The second list. + The index array indicating which list to get variables from. + The merged runtime variables. + + + + An interface to represent values of runtime variables. + + + + + Count of the variables. + + + + + An indexer to get/set the values of the runtime variables. + + An index of the runtime variable. + The value of the runtime variable. + + + + Provides a list of variables, supporing read/write of the values + Exposed via RuntimeVariablesExpression + + + + + Represents a visitor or rewriter for expression trees. + + + This class is designed to be inherited to create more specialized + classes whose functionality requires traversing, examining or copying + an expression tree. + + + + + Initializes a new instance of . + + + + + Dispatches the expression to one of the more specialized visit methods in this class. + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Dispatches the list of expressions to one of the more specialized visit methods in this class. + + The expressions to visit. + The modified expression list, if any of the elements were modified; + otherwise, returns the original expression list. + + + + Visits all nodes in the collection using a specified element visitor. + + The type of the nodes. + The nodes to visit. + A delegate that visits a single element, + optionally replacing it with a new element. + The modified node list, if any of the elements were modified; + otherwise, returns the original node list. + + + + Visits an expression, casting the result back to the original expression type. + + The type of the expression. + The expression to visit. + The name of the calling method; used to report to report a better error message. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + The visit method for this node returned a different type. + + + + Visits an expression, casting the result back to the original expression type. + + The type of the expression. + The expression to visit. + The name of the calling method; used to report to report a better error message. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + The visit method for this node returned a different type. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the extension expression. + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + This can be overridden to visit or rewrite specific extension nodes. + If it is not overridden, this method will call , + which gives the node a chance to walk its children. By default, + will try to reduce the node. + + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The type of the delegate. + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Visits the children of the . + + The expression to visit. + The modified expression, if it or any subexpression was modified; + otherwise, returns the original expression. + + + + Provides a list of variables, supporing read/write of the values + Exposed via RuntimeVariablesExpression + + + + + Represents a dynamically assigned class. Expando objects which share the same + members will share the same class. Classes are dynamically assigned as the + expando object gains members. + + + + + Constructs the empty ExpandoClass. This is the class used when an + empty Expando object is initially constructed. + + + + + Constructs a new ExpandoClass that can hold onto the specified keys. The + keys must be sorted ordinally. The hash code must be precalculated for + the keys. + + + + + Finds or creates a new ExpandoClass given the existing set of keys + in this ExpandoClass plus the new key to be added. Members in an + ExpandoClass are always stored case sensitively. + + + + + Gets the lists of transitions that are valid from this ExpandoClass + to an ExpandoClass whos keys hash to the apporopriate hash code. + + + + + Gets the index at which the value should be stored for the specified name. + + + + + Gets the index at which the value should be stored for the specified name + case sensitively. Returns the index even if the member is marked as deleted. + + + + + Gets the index at which the value should be stored for the specified name, + the method is only used in the case-insensitive case. + + the name of the member + The ExpandoObject associated with the class + that is used to check if a member has been deleted. + + the exact match if there is one + if there is exactly one member with case insensitive match, return it + otherwise we throw AmbiguousMatchException. + + + + + Gets the names of the keys that can be stored in the Expando class. The + list is sorted ordinally. + + + + + Represents the dynamic get index operation at the call site, providing the binding semantic and the details about the operation. + + + + + Initializes a new instance of the . + + The signature of the arguments at the call site. + + + + Performs the binding of the dynamic get index operation. + + The target of the dynamic get index operation. + An array of arguments of the dynamic get index operation. + The representing the result of the binding. + + + + Performs the binding of the dynamic get index operation if the target dynamic object cannot bind. + + The target of the dynamic get index operation. + The arguments of the dynamic get index operation. + The representing the result of the binding. + + + + When overridden in the derived class, performs the binding of the dynamic get index operation if the target dynamic object cannot bind. + + The target of the dynamic get index operation. + The arguments of the dynamic get index operation. + The binding result to use if binding fails, or null. + The representing the result of the binding. + + + + The result type of the operation. + + + + + Gets the signature of the arguments at the call site. + + + + + Represents the create dynamic operation at the call site, providing the binding semantic and the details about the operation. + + + + + Initializes a new intsance of the . + + The signature of the arguments at the call site. + + + + Performs the binding of the dynamic create operation if the target dynamic object cannot bind. + + The target of the dynamic create operation. + The arguments of the dynamic create operation. + The representing the result of the binding. + + + + When overridden in the derived class, performs the binding of the dynamic create operation if the target dynamic object cannot bind. + + The target of the dynamic create operation. + The arguments of the dynamic create operation. + The binding result to use if binding fails, or null. + The representing the result of the binding. + + + + Performs the binding of the dynamic create operation. + + The target of the dynamic create operation. + An array of arguments of the dynamic create operation. + The representing the result of the binding. + + + + The result type of the operation. + + + + + Gets the signature of the arguments at the call site. + + + + + Represents the dynamic delete member operation at the call site, providing the binding semantic and the details about the operation. + + + + + Initializes a new instance of the . + + The name of the member to delete. + true if the name should be matched ignoring case; false otherwise. + + + + Performs the binding of the dynamic delete member operation if the target dynamic object cannot bind. + + The target of the dynamic delete member operation. + The representing the result of the binding. + + + + When overridden in the derived class, performs the binding of the dynamic delete member operation if the target dynamic object cannot bind. + + The target of the dynamic delete member operation. + The binding result to use if binding fails, or null. + The representing the result of the binding. + + + + Performs the binding of the dynamic delete member operation. + + The target of the dynamic delete member operation. + An array of arguments of the dynamic delete member operation. + The representing the result of the binding. + + + + Gets the name of the member to delete. + + + + + Gets the value indicating if the string comparison should ignore the case of the member name. + + + + + The result type of the operation. + + + + + Represents the invoke dynamic operation at the call site, providing the binding semantic and the details about the operation. + + + + + Initializes a new instance of the . + + The signature of the arguments at the call site. + + + + Performs the binding of the dynamic invoke operation if the target dynamic object cannot bind. + + The target of the dynamic invoke operation. + The arguments of the dynamic invoke operation. + The representing the result of the binding. + + + + Performs the binding of the dynamic invoke operation if the target dynamic object cannot bind. + + The target of the dynamic invoke operation. + The arguments of the dynamic invoke operation. + The binding result to use if binding fails, or null. + The representing the result of the binding. + + + + Performs the binding of the dynamic invoke operation. + + The target of the dynamic invoke operation. + An array of arguments of the dynamic invoke operation. + The representing the result of the binding. + + + + The result type of the operation. + + + + + Gets the signature of the arguments at the call site. + + + + + Represents a set of binding restrictions on the under which the dynamic binding is valid. + + + + + Represents an empty set of binding restrictions. This field is read only. + + + + + Merges the set of binding restrictions with the current binding restrictions. + + The set of restrictions with which to merge the current binding restrictions. + The new set of binding restrictions. + + + + Creates the binding restriction that check the expression for runtime type identity. + + The expression to test. + The exact type to test. + The new binding restrictions. + + + + The method takes a DynamicMetaObject, and returns an instance restriction for testing null if the object + holds a null value, otherwise returns a type restriction. + + + + + Creates the binding restriction that checks the expression for object instance identity. + + The expression to test. + The exact object instance to test. + The new binding restrictions. + + + + Creates the binding restriction that checks the expression for arbitrary immutable properties. + + The expression expression the restrictions. + The new binding restrictions. + + By convention, the general restrictions created by this method must only test + immutable object properties. + + + + + Combines binding restrictions from the list of instances into one set of restrictions. + + The list of instances from which to combine restrictions. + The new set of binding restrictions. + + + + Creates the representing the binding restrictions. + + The expression tree representing the restrictions. + + + + Builds a balanced tree of AndAlso nodes. + We do this so the compiler won't stack overflow if we have many + restrictions. + + + + + 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. + + The delegate type. + + + + Represents the dynamic set index operation at the call site, providing the binding semantic and the details about the operation. + + + + + Initializes a new instance of the . + + The signature of the arguments at the call site. + + + + Performs the binding of the dynamic set index operation. + + The target of the dynamic set index operation. + An array of arguments of the dynamic set index operation. + The representing the result of the binding. + + + + Performs the binding of the dynamic set index operation if the target dynamic object cannot bind. + + The target of the dynamic set index operation. + The arguments of the dynamic set index operation. + The value to set to the collection. + The representing the result of the binding. + + + + When overridden in the derived class, performs the binding of the dynamic set index operation if the target dynamic object cannot bind. + + The target of the dynamic set index operation. + The arguments of the dynamic set index operation. + The value to set to the collection. + The binding result to use if binding fails, or null. + The representing the result of the binding. + + + + The result type of the operation. + + + + + Gets the signature of the arguments at the call site. + + + + + Represents the dynamic set member operation at the call site, providing the binding semantic and the details about the operation. + + + + + Initializes a new instance of the . + + The name of the member to get. + true if the name should be matched ignoring case; false otherwise. + + + + Performs the binding of the dynamic set member operation. + + The target of the dynamic set member operation. + An array of arguments of the dynamic set member operation. + The representing the result of the binding. + + + + Performs the binding of the dynamic set member operation if the target dynamic object cannot bind. + + The target of the dynamic set member operation. + The value to set to the member. + The representing the result of the binding. + + + + Performs the binding of the dynamic set member operation if the target dynamic object cannot bind. + + The target of the dynamic set member operation. + The value to set to the member. + The binding result to use if binding fails, or null. + The representing the result of the binding. + + + + The result type of the operation. + + + + + Gets the name of the member to get. + + + + + Gets the value indicating if the string comparison should ignore the case of the member name. + + + + + The base type for all nodes in Expression Trees. + + + + + Creates a with the specified span. + + The that represents the source file. + The start line of this . Must be greater than 0. + The start column of this . Must be greater than 0. + The end line of this . Must be greater or equal than the start line. + The end column of this . If the end line is the same as the start line, it must be greater or equal than the start column. In any case, must be greater than 0. + An instance of . + + + + Creates a for clearing a sequence point. + + The that represents the source file. + An instance of for clearning a sequence point. + + + + Creates an instance of . + + A to set the equal to. + A that has the property set to the specified value. + + + + Creates an instance of . + + A to set the equal to. + A to set the equal to. + A that has the + and properties set to the specified value. + + + + Creates an instance of . + + A to set the equal to. + A to set the equal to. + A to set the equal to. + A that has the + and + and properties set to the specified value. + + + + Creates an instance of . + + A to set the equal to. + A to set the equal to. + A to set the equal to. + A to set the equal to. + A that has the + and + and + and properties set to the specified value. + + + + Creates a representing a break statement. + + The that the will jump to. + + A with equal to Break, + the property set to , and a null value to be passed to the target label upon jumping. + + + + + Creates a representing a break statement. The value passed to the label upon jumping can be specified. + + The that the will jump to. + The value that will be passed to the associated label upon jumping. + + A with equal to Break, + the property set to , + and to be passed to the target label upon jumping. + + + + + Creates a representing a break statement with the specified type. + + The that the will jump to. + An to set the property equal to. + + A with equal to Break, + the property set to , + and the property set to . + + + + + Creates a representing a break statement with the specified type. + The value passed to the label upon jumping can be specified. + + The that the will jump to. + The value that will be passed to the associated label upon jumping. + An to set the property equal to. + + A with equal to Break, + the property set to , + the property set to , + and to be passed to the target label upon jumping. + + + + + Creates a representing a continue statement. + + The that the will jump to. + + A with equal to Continue, + the property set to , + and a null value to be passed to the target label upon jumping. + + + + + Creates a representing a continue statement with the specified type. + + The that the will jump to. + An to set the property equal to. + + A with equal to Continue, + the property set to , + the property set to , + and a null value to be passed to the target label upon jumping. + + + + + Creates a representing a return statement. + + The that the will jump to. + + A with equal to Return, + the property set to , + and a null value to be passed to the target label upon jumping. + + + + + Creates a representing a return statement with the specified type. + + The that the will jump to. + An to set the property equal to. + + A with equal to Return, + the property set to , + the property set to , + and a null value to be passed to the target label upon jumping. + + + + + Creates a representing a return statement. The value passed to the label upon jumping can be specified. + + The that the will jump to. + The value that will be passed to the associated label upon jumping. + + A with equal to Continue, + the property set to , + and to be passed to the target label upon jumping. + + + + + Creates a representing a return statement with the specified type. + The value passed to the label upon jumping can be specified. + + The that the will jump to. + The value that will be passed to the associated label upon jumping. + An to set the property equal to. + + A with equal to Continue, + the property set to , + the property set to , + and to be passed to the target label upon jumping. + + + + + Creates a representing a goto. + + The that the will jump to. + + A with equal to Goto, + the property set to the specified value, + and a null value to be passed to the target label upon jumping. + + + + + Creates a representing a goto with the specified type. + + The that the will jump to. + An to set the property equal to. + + A with equal to Goto, + the property set to the specified value, + the property set to , + and a null value to be passed to the target label upon jumping. + + + + + Creates a representing a goto. The value passed to the label upon jumping can be specified. + + The that the will jump to. + The value that will be passed to the associated label upon jumping. + + A with equal to Goto, + the property set to , + and to be passed to the target label upon jumping. + + + + + Creates a representing a goto with the specified type. + The value passed to the label upon jumping can be specified. + + The that the will jump to. + The value that will be passed to the associated label upon jumping. + An to set the property equal to. + + A with equal to Goto, + the property set to , + the property set to , + and to be passed to the target label upon jumping. + + + + + Creates a representing a jump of the specified . + The value passed to the label upon jumping can also be specified. + + The of the . + The that the will jump to. + The value that will be passed to the associated label upon jumping. + An to set the property equal to. + + A with equal to , + the property set to , + the property set to , + and to be passed to the target label upon jumping. + + + + + Creates a that represents a dynamic operation bound by the provided . + + The type of the delegate used by the . + The runtime binder for the dynamic operation. + The arguments to the dynamic operation. + + A that has equal to + Dynamic and has the + DelegateType, + Binder, and + Arguments set to the specified values. + + + + + Creates a that represents a dynamic operation bound by the provided . + + The type of the delegate used by the . + The runtime binder for the dynamic operation. + The arguments to the dynamic operation. + + A that has equal to + Dynamic and has the + DelegateType, + Binder, and + Arguments set to the specified values. + + + + + Creates a that represents a dynamic operation bound by the provided and one argument. + + The type of the delegate used by the . + The runtime binder for the dynamic operation. + The argument to the dynamic operation. + + A that has equal to + Dynamic and has the + DelegateType, + Binder, and + Arguments set to the specified values. + + + + + Creates a that represents a dynamic operation bound by the provided and two arguments. + + The type of the delegate used by the . + The runtime binder for the dynamic operation. + The first argument to the dynamic operation. + The second argument to the dynamic operation. + + A that has equal to + Dynamic and has the + DelegateType, + Binder, and + Arguments set to the specified values. + + + + + Creates a that represents a dynamic operation bound by the provided and three arguments. + + The type of the delegate used by the . + The runtime binder for the dynamic operation. + The first argument to the dynamic operation. + The second argument to the dynamic operation. + The third argument to the dynamic operation. + + A that has equal to + Dynamic and has the + DelegateType, + Binder, and + Arguments set to the specified values. + + + + + Creates a that represents a dynamic operation bound by the provided and four arguments. + + The type of the delegate used by the . + The runtime binder for the dynamic operation. + The first argument to the dynamic operation. + The second argument to the dynamic operation. + The third argument to the dynamic operation. + The fourth argument to the dynamic operation. + + A that has equal to + Dynamic and has the + DelegateType, + Binder, and + Arguments set to the specified values. + + + + + Creates a that represents a dynamic operation bound by the provided . + + The runtime binder for the dynamic operation. + The result type of the dynamic expression. + The arguments to the dynamic operation. + + A that has equal to + Dynamic and has the + Binder and + Arguments set to the specified values. + + + The DelegateType property of the + result will be inferred from the types of the arguments and the specified return type. + + + + + Creates a that represents a dynamic operation bound by the provided . + + The runtime binder for the dynamic operation. + The result type of the dynamic expression. + The first argument to the dynamic operation. + + A that has equal to + Dynamic and has the + Binder and + Arguments set to the specified values. + + + The DelegateType property of the + result will be inferred from the types of the arguments and the specified return type. + + + + + Creates a that represents a dynamic operation bound by the provided . + + The runtime binder for the dynamic operation. + The result type of the dynamic expression. + The first argument to the dynamic operation. + The second argument to the dynamic operation. + + A that has equal to + Dynamic and has the + Binder and + Arguments set to the specified values. + + + The DelegateType property of the + result will be inferred from the types of the arguments and the specified return type. + + + + + Creates a that represents a dynamic operation bound by the provided . + + The runtime binder for the dynamic operation. + The result type of the dynamic expression. + The first argument to the dynamic operation. + The second argument to the dynamic operation. + The third argument to the dynamic operation. + + A that has equal to + Dynamic and has the + Binder and + Arguments set to the specified values. + + + The DelegateType property of the + result will be inferred from the types of the arguments and the specified return type. + + + + + Creates a that represents a dynamic operation bound by the provided . + + The runtime binder for the dynamic operation. + The result type of the dynamic expression. + The first argument to the dynamic operation. + The second argument to the dynamic operation. + The third argument to the dynamic operation. + The fourth argument to the dynamic operation. + + A that has equal to + Dynamic and has the + Binder and + Arguments set to the specified values. + + + The DelegateType property of the + result will be inferred from the types of the arguments and the specified return type. + + + + + Creates a that represents a dynamic operation bound by the provided . + + The runtime binder for the dynamic operation. + The result type of the dynamic expression. + The arguments to the dynamic operation. + + A that has equal to + Dynamic and has the + Binder and + Arguments set to the specified values. + + + The DelegateType property of the + result will be inferred from the types of the arguments and the specified return type. + + + + + Creates a that represents an assignment operation. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + + Creates a BinaryExpression, given the left and right operands, by calling an appropriate factory method. + + The ExpressionType that specifies the type of binary operation. + An Expression that represents the left operand. + An Expression that represents the right operand. + The BinaryExpression that results from calling the appropriate factory method. + + + + Creates a BinaryExpression, given the left and right operands, by calling an appropriate factory method. + + The ExpressionType that specifies the type of binary operation. + An Expression that represents the left operand. + An Expression that represents the right operand. + true to set IsLiftedToNull to true; false to set IsLiftedToNull to false. + A MethodInfo that specifies the implementing method. + The BinaryExpression that results from calling the appropriate factory method. + + + + + Creates a BinaryExpression, given the left and right operands, by calling an appropriate factory method. + + The ExpressionType that specifies the type of binary operation. + An Expression that represents the left operand. + An Expression that represents the right operand. + true to set IsLiftedToNull to true; false to set IsLiftedToNull to false. + A MethodInfo that specifies the implementing method. + A LambdaExpression that represents a type conversion function. This parameter is used if binaryType is Coalesce or compound assignment. + The BinaryExpression that results from calling the appropriate factory method. + + + + Creates a that represents an equality comparison. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents an equality comparison. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + true to set IsLiftedToNull to true; false to set IsLiftedToNull to false. + A that has the property equal to + and the , , , and properties set to the specified values. + + + + + Creates a that represents a reference equality comparison. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + + Creates a that represents an inequality comparison. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents an inequality comparison. + + An to set the property equal to. + An to set the property equal to. + true to set IsLiftedToNull to true; false to set IsLiftedToNull to false. + A to set the property equal to. + A that has the property equal to + and the , , , and properties set to the specified values. + + + + + Creates a that represents a reference inequality comparison. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + + Creates a that represents a "greater than" numeric comparison. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents a "greater than" numeric comparison. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + true to set IsLiftedToNull to true; false to set IsLiftedToNull to false. + A that has the property equal to + and the , , , and properties set to the specified values. + + + + + Creates a that represents a "less than" numeric comparison. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents a "less than" numeric comparison. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + true to set IsLiftedToNull to true; false to set IsLiftedToNull to false. + A that has the property equal to + and the , , , and properties set to the specified values. + + + + + Creates a that represents a "greater than or equal" numeric comparison. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents a "greater than or equal" numeric comparison. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + true to set IsLiftedToNull to true; false to set IsLiftedToNull to false. + A that has the property equal to + and the , , , and properties set to the specified values. + + + + + Creates a that represents a "less than or equal" numeric comparison. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents a "less than or equal" numeric comparison. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + true to set IsLiftedToNull to true; false to set IsLiftedToNull to false. + A that has the property equal to + and the , , , and properties set to the specified values. + + + + + Creates a that represents a conditional AND operation that evaluates the second operand only if it has to. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents a conditional AND operation that evaluates the second operand only if it has to. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , and properties set to the specified values. + + + + + Creates a that represents a conditional OR operation that evaluates the second operand only if it has to. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents a conditional OR operation that evaluates the second operand only if it has to. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , and properties set to the specified values. + + + + + Creates a BinaryExpression that represents a coalescing operation. + + An to set the property equal to. + An to set the property equal to. + A BinaryExpression that has the NodeType property equal to Coalesce and the Left and Right properties set to the specified values. + + + + Creates a BinaryExpression that represents a coalescing operation. + + An to set the property equal to. + An to set the property equal to. + A LambdaExpression to set the Conversion property equal to. + A BinaryExpression that has the NodeType property equal to Coalesce and the Left, Right and Conversion properties set to the specified values. + + + + + Creates a that represents an arithmetic addition operation that does not have overflow checking. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents an arithmetic addition operation that does not have overflow checking. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , and properties set to the specified values. + + + + + Creates a that represents an addition assignment operation that does not have overflow checking. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents an addition assignment operation that does not have overflow checking. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , and properties set to the specified values. + + + + + Creates a that represents an addition assignment operation that does not have overflow checking. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , , + and properties set to the specified values. + + + + + Creates a that represents an addition assignment operation that has overflow checking. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and + properties set to the specified values. + + + + + Creates a that represents an addition assignment operation that has overflow checking. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , and properties set to the specified values. + + + + + Creates a that represents an addition assignment operation that has overflow checking. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , , + and properties set to the specified values. + + + + + Creates a that represents an arithmetic addition operation that has overflow checking. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents an arithmetic addition operation that has overflow checking. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , and properties set to the specified values. + + + + + Creates a that represents an arithmetic subtraction operation that does not have overflow checking. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents an arithmetic subtraction operation that does not have overflow checking. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , and properties set to the specified values. + + + + + Creates a that represents a subtraction assignment operation that does not have overflow checking. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents a subtraction assignment operation that does not have overflow checking. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , and properties set to the specified values. + + + + + Creates a that represents a subtraction assignment operation that does not have overflow checking. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , , + and properties set to the specified values. + + + + + Creates a that represents a subtraction assignment operation that has overflow checking. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents a subtraction assignment operation that has overflow checking. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , and properties set to the specified values. + + + + + Creates a that represents a subtraction assignment operation that has overflow checking. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , , + and properties set to the specified values. + + + + + Creates a that represents an arithmetic subtraction operation that has overflow checking. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents an arithmetic subtraction operation that has overflow checking. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , and properties set to the specified values. + + + + + Creates a that represents an arithmetic division operation. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents an arithmetic division operation. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , and properties set to the specified values. + + + + + Creates a that represents a division assignment operation that does not have overflow checking. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents a division assignment operation that does not have overflow checking. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , and properties set to the specified values. + + + + + Creates a that represents a division assignment operation that does not have overflow checking. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , , + and properties set to the specified values. + + + + + Creates a that represents an arithmetic remainder operation. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents an arithmetic remainder operation. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , and properties set to the specified values. + + + + + Creates a that represents a remainder assignment operation. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents a remainder assignment operation. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , and properties set to the specified values. + + + + + Creates a that represents a remainder assignment operation. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , , + and properties set to the specified values. + + + + + Creates a that represents an arithmetic multiplication operation that does not have overflow checking. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents an arithmetic multiplication operation that does not have overflow checking. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , and properties set to the specified values. + + + + + Creates a that represents a multiplication assignment operation that does not have overflow checking. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents a multiplication assignment operation that does not have overflow checking. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , and properties set to the specified values. + + + + + Creates a that represents a multiplication assignment operation that does not have overflow checking. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , , + and properties set to the specified values. + + + + + Creates a that represents a multiplication assignment operation that has overflow checking. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents a multiplication assignment operation that has overflow checking. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , and properties set to the specified values. + + + + + Creates a that represents a multiplication assignment operation that has overflow checking. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , , + and properties set to the specified values. + + + + + Creates a that represents an arithmetic multiplication operation that has overflow checking. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents an arithmetic multiplication operation that has overflow checking. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , and properties set to the specified values. + + + + + Creates a that represents an bitwise left-shift operation. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents an bitwise left-shift operation. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , and properties set to the specified values. + + + + + Creates a that represents a bitwise left-shift assignment operation. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents a bitwise left-shift assignment operation. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , and properties set to the specified values. + + + + + Creates a that represents a bitwise left-shift assignment operation. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , , + and properties set to the specified values. + + + + + Creates a that represents an bitwise right-shift operation. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents an bitwise right-shift operation. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , and properties set to the specified values. + + + + + Creates a that represents a bitwise right-shift assignment operation. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents a bitwise right-shift assignment operation. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , and properties set to the specified values. + + + + + Creates a that represents a bitwise right-shift assignment operation. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , , + and properties set to the specified values. + + + + + Creates a that represents an bitwise AND operation. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents an bitwise AND operation. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , and properties set to the specified values. + + + + + Creates a that represents a bitwise AND assignment operation. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents a bitwise AND assignment operation. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , and properties set to the specified values. + + + + + Creates a that represents a bitwise AND assignment operation. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , , + and properties set to the specified values. + + + + + Creates a that represents an bitwise OR operation. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents an bitwise OR operation. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , and properties set to the specified values. + + + + + Creates a that represents a bitwise OR assignment operation. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents a bitwise OR assignment operation. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , and properties set to the specified values. + + + + + Creates a that represents a bitwise OR assignment operation. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , , + and properties set to the specified values. + + + + + Creates a that represents a bitwise or logical XOR operation, using op_ExclusiveOr for user-defined types. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents a bitwise or logical XOR operation, using op_ExclusiveOr for user-defined types. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , and properties set to the specified values. + + + + + Creates a that represents a bitwise or logical XOR assignment operation, using op_ExclusiveOr for user-defined types. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents a bitwise or logical XOR assignment operation, using op_ExclusiveOr for user-defined types. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , and properties set to the specified values. + + + + + Creates a that represents a bitwise or logical XOR assignment operation, using op_ExclusiveOr for user-defined types. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , , + and properties set to the specified values. + + + + + Creates a that represents raising a number to a power. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents raising a number to a power. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , and properties set to the specified values. + + + + + Creates a that represents raising an expression to a power and assigning the result back to the expression. + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the and properties set to the specified values. + + + + Creates a that represents raising an expression to a power and assigning the result back to the expression. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , and properties set to the specified values. + + + + + Creates a that represents raising an expression to a power and assigning the result back to the expression. + + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , , + and properties set to the specified values. + + + + + Creates a BinaryExpression that represents applying an array index operator to an array of rank one. + + An Expression to set the Left property equal to. + An Expression to set the Right property equal to. + A BinaryExpression that has the NodeType property equal to ArrayIndex and the Left and Right properties set to the specified values. + + + + Creates a that contains two expressions and has no variables. + + The first expression in the block. + The second expression in the block. + The created . + + + + Creates a that contains three expressions and has no variables. + + The first expression in the block. + The second expression in the block. + The third expression in the block. + The created . + + + + Creates a that contains four expressions and has no variables. + + The first expression in the block. + The second expression in the block. + The third expression in the block. + The fourth expression in the block. + The created . + + + + Creates a that contains five expressions and has no variables. + + The first expression in the block. + The second expression in the block. + The third expression in the block. + The fourth expression in the block. + The fifth expression in the block. + The created . + + + + Creates a that contains the given expressions and has no variables. + + The expressions in the block. + The created . + + + + Creates a that contains the given expressions and has no variables. + + The expressions in the block. + The created . + + + + Creates a that contains the given expressions, has no variables and has specific result type. + + The result type of the block. + The expressions in the block. + The created . + + + + Creates a that contains the given expressions, has no variables and has specific result type. + + The result type of the block. + The expressions in the block. + The created . + + + + Creates a that contains the given variables and expressions. + + The variables in the block. + The expressions in the block. + The created . + + + + Creates a that contains the given variables and expressions. + + The result type of the block. + The variables in the block. + The expressions in the block. + The created . + + + + Creates a that contains the given variables and expressions. + + The variables in the block. + The expressions in the block. + The created . + + + + Creates a that contains the given variables and expressions. + + The result type of the block. + The variables in the block. + The expressions in the block. + The created . + + + + Creates a representing a catch statement. + The of object to be caught can be specified but no reference to the object + will be available for use in the . + + The of this will handle. + The body of the catch statement. + The created . + + + + Creates a representing a catch statement with a reference to the caught object for use in the handler body. + + A representing a reference to the object caught by this handler. + The body of the catch statement. + The created . + + + + Creates a representing a catch statement with + an filter but no reference to the caught object. + + The of this will handle. + The body of the catch statement. + The body of the filter. + The created . + + + + Creates a representing a catch statement with + an filter and a reference to the caught object. + + A representing a reference to the object caught by this handler. + The body of the catch statement. + The body of the filter. + The created . + + + + Creates a representing a catch statement with the specified elements. + + The of this will handle. + A representing a reference to the object caught by this handler. + The body of the catch statement. + The body of the filter. + The created . + must be non-null and match the type of (if it is supplied). + + + + Creates a . + + An to set the property equal to. + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the , , + and properties set to the specified values. + + + + Creates a . + + An to set the property equal to. + An to set the property equal to. + An to set the property equal to. + A to set the property equal to. + A that has the property equal to + and the , , + and properties set to the specified values. + This method allows explicitly unifying the result type of the conditional expression in cases where the types of + and expressions are not equal. Types of both and must be implicitly + reference assignable to the result type. The is allowed to be . + + + + Creates a . + + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the , , + properties set to the specified values. The property is set to default expression and + the type of the resulting returned by this method is . + + + + Creates a . + + An to set the property equal to. + An to set the property equal to. + An to set the property equal to. + A that has the property equal to + and the , , + and properties set to the specified values. The type of the resulting + returned by this method is . + + + + Creates a that has the property set to the specified value. . + + An to set the property equal to. + + A that has the property equal to + and the property set to the specified value. + + + + + Creates a that has the + and properties set to the specified values. . + + An to set the property equal to. + A to set the property equal to. + + A that has the property equal to + and the and + properties set to the specified values. + + + + + Creates an empty expression that has type. + + + A that has the property equal to + and the property set to . + + + + + Creates a that has the property set to the specified type. + + A to set the property equal to. + + A that has the property equal to + and the property set to the specified type. + + + + + Creates an ElementInit expression that represents the initialization of a list. + + The for the list's Add method. + An array containing the Expressions to be used to initialize the list. + The created ElementInit expression. + + + + Creates an ElementInit expression that represents the initialization of a list. + + The for the list's Add method. + An containing elements to initialize the list. + The created ElementInit expression. + + + + Constructs a new instance of . + + + + + Reduces this node to a simpler expression. If CanReduce returns + true, this should return a valid expression. This method is + allowed to return another node which itself must be reduced. + + The reduced expression. + + + + Reduces the node and then calls the visitor delegate on the reduced expression. + Throws an exception if the node isn't reducible. + + An instance of . + The expression being visited, or an expression which should replace it in the tree. + + Override this method to provide logic to walk the node's children. + A typical implementation will call visitor.Visit on each of its + children, and if any of them change, should return a new copy of + itself with the modified children. + + + + + Dispatches to the specific visit method for this node type. For + example, will call into + . + + The visitor to visit this node with. + The result of visiting this node. + + This default implementation for + nodes will call . + Override this method to call into a more specific method on a derived + visitor class of ExprressionVisitor. However, it should still + support unknown visitors by calling VisitExtension. + + + + + Reduces this node to a simpler expression. If CanReduce returns + true, this should return a valid expression. This method is + allowed to return another node which itself must be reduced. + + The reduced expression. + + Unlike Reduce, this method checks that the reduced node satisfies + certain invariants. + + + + + Reduces the expression to a known node type (i.e. not an Extension node) + or simply returns the expression if it is already a known type. + + The reduced expression. + + + + Creates a representation of the Expression. + + A representation of the Expression. + + + + Writes a representation of the to a . + + A that will be used to build the string representation. + + + + Helper used for ensuring we only return 1 instance of a ReadOnlyCollection of T. + + This is called from various methods where we internally hold onto an IList of T + or a readonly collection of T. We check to see if we've already returned a + readonly collection of T and if so simply return the other one. Otherwise we do + a thread-safe replacement of the list w/ a readonly collection which wraps it. + + Ultimately this saves us from having to allocate a ReadOnlyCollection for our + data types because the compiler is capable of going directly to the IList of T. + + + + + Helper used for ensuring we only return 1 instance of a ReadOnlyCollection of T. + + This is similar to the ReturnReadOnly of T. This version supports nodes which hold + onto multiple Expressions where one is typed to object. That object field holds either + an expression or a ReadOnlyCollection of Expressions. When it holds a ReadOnlyCollection + the IList which backs it is a ListArgumentProvider which uses the Expression which + implements IArgumentProvider to get 2nd and additional values. The ListArgumentProvider + continues to hold onto the 1st expression. + + This enables users to get the ReadOnlyCollection w/o it consuming more memory than if + it was just an array. Meanwhile The DLR internally avoids accessing which would force + the readonly collection to be created resulting in a typical memory savings. + + + + + Helper which is used for specialized subtypes which use ReturnReadOnly(ref object, ...). + This is the reverse version of ReturnReadOnly which takes an IArgumentProvider. + + This is used to return the 1st argument. The 1st argument is typed as object and either + contains a ReadOnlyCollection or the Expression. We check for the Expression and if it's + present we return that, otherwise we return the 1st element of the ReadOnlyCollection. + + + + + Creates an that represents accessing an indexed property in an object. + + The object to which the property belongs. Should be null if the property is static(shared). + An representing the property to index. + An IEnumerable{Expression} contaning the arguments to be used to index the property. + The created . + + + + Creates an to access an array. + + An expression representing the array to index. + An array containing expressions used to index the array. + The expression representing the array can be obtained by using the MakeMemberAccess method, + or through NewArrayBounds or NewArrayInit. + The created . + + + + Creates an to access an array. + + An expression representing the array to index. + An containing expressions used to index the array. + The expression representing the array can be obtained by using the MakeMemberAccess method, + or through NewArrayBounds or NewArrayInit. + The created . + + + + Creates an representing the access to an indexed property. + + The object to which the property belongs. If the property is static/shared, it must be null. + The name of the indexer. + An array of objects that are used to index the property. + The created . + + + + The method finds the instance property with the specified name in a type. The property's type signature needs to be compatible with + the arguments if it is a indexer. If the arguments is null or empty, we get a normal property. + + + + + Creates an representing the access to an indexed property. + + The object to which the property belongs. If the property is static/shared, it must be null. + The that represents the property to index. + An array of objects that are used to index the property. + The created . + + + + Creates an representing the access to an indexed property. + + The object to which the property belongs. If the property is static/shared, it must be null. + The that represents the property to index. + An of objects that are used to index the property. + The created . + + + + Creates an that + applies a delegate or lambda expression to a list of argument expressions. + + + An that + applies the specified delegate or lambda expression to the provided arguments. + + + An that represents the delegate + or lambda expression to be applied. + + + An array of objects + that represent the arguments that the delegate or lambda expression is applied to. + + + is null. + + .Type does not represent a delegate type or an .-or-The property of an element of is not assignable to the type of the corresponding parameter of the delegate represented by . + + does not contain the same number of elements as the list of parameters for the delegate represented by . + + + + Creates an that + applies a delegate or lambda expression to a list of argument expressions. + + + An that + applies the specified delegate or lambda expression to the provided arguments. + + + An that represents the delegate + or lambda expression to be applied. + + + An of objects + that represent the arguments that the delegate or lambda expression is applied to. + + + is null. + + .Type does not represent a delegate type or an .-or-The property of an element of is not assignable to the type of the corresponding parameter of the delegate represented by . + + does not contain the same number of elements as the list of parameters for the delegate represented by . + + + + Gets the delegate's Invoke method; used by InvocationExpression. + + The expression to be invoked. + + + + Creates a representing a label with void type and no name. + + The new . + + + + Creates a representing a label with void type and the given name. + + The name of the label. + The new . + + + + Creates a representing a label with the given type. + + The type of value that is passed when jumping to the label. + The new . + + + + Creates a representing a label with the given type and name. + + The type of value that is passed when jumping to the label. + The name of the label. + The new . + + + + Creates a representing a label with no default value. + + The which this will be associated with. + A with no default value. + + + + Creates a representing a label with the given default value. + + The which this will be associated with. + The value of this when the label is reached through normal control flow. + A with the given default value. + + + + Creates an Expression{T} given the delegate type. Caches the + factory method to speed up repeated creations for the same T. + + + + + Creates an where the delegate type is known at compile time. + + The delegate type. + An to set the property equal to. + An array that contains objects to use to populate the collection. + An that has the property equal to and the and properties set to the specified values. + + + + Creates an where the delegate type is known at compile time. + + The delegate type. + An to set the property equal to. + A that indicates if tail call optimization will be applied when compiling the created expression. + An array that contains objects to use to populate the collection. + An that has the property equal to and the and properties set to the specified values. + + + + Creates an where the delegate type is known at compile time. + + The delegate type. + An to set the property equal to. + An that contains objects to use to populate the collection. + An that has the property equal to and the and properties set to the specified values. + + + + Creates an where the delegate type is known at compile time. + + The delegate type. + An to set the property equal to. + A that indicates if tail call optimization will be applied when compiling the created expression. + An that contains objects to use to populate the collection. + An that has the property equal to and the and properties set to the specified values. + + + + Creates an where the delegate type is known at compile time. + + The delegate type. + An to set the property equal to. + An that contains objects to use to populate the collection. + The name of the lambda. Used for generating debugging info. + An that has the property equal to and the and properties set to the specified values. + + + + Creates an where the delegate type is known at compile time. + + The delegate type. + An to set the property equal to. + The name of the lambda. Used for generating debugging info. + An that contains objects to use to populate the collection. + A that indicates if tail call optimization will be applied when compiling the created expression. + An that has the property equal to and the and properties set to the specified values. + + + + Creates a LambdaExpression by first constructing a delegate type. + + An to set the property equal to. + An array that contains objects to use to populate the collection. + A that has the property equal to Lambda and the and properties set to the specified values. + + + + Creates a LambdaExpression by first constructing a delegate type. + + An to set the property equal to. + A that indicates if tail call optimization will be applied when compiling the created expression. + An array that contains objects to use to populate the collection. + A that has the property equal to Lambda and the and properties set to the specified values. + + + + Creates a LambdaExpression by first constructing a delegate type. + + An to set the property equal to. + An that contains objects to use to populate the collection. + A that has the property equal to Lambda and the and properties set to the specified values. + + + + Creates a LambdaExpression by first constructing a delegate type. + + An to set the property equal to. + A that indicates if tail call optimization will be applied when compiling the created expression. + An that contains objects to use to populate the collection. + A that has the property equal to Lambda and the and properties set to the specified values. + + + + Creates a LambdaExpression by first constructing a delegate type. + + An to set the property equal to. + An array that contains objects to use to populate the collection. + A representing the delegate signature for the lambda. + A that has the property equal to Lambda and the and properties set to the specified values. + + + + Creates a LambdaExpression by first constructing a delegate type. + + An to set the property equal to. + A that indicates if tail call optimization will be applied when compiling the created expression. + An array that contains objects to use to populate the collection. + A representing the delegate signature for the lambda. + A that has the property equal to Lambda and the and properties set to the specified values. + + + + Creates a LambdaExpression by first constructing a delegate type. + + An to set the property equal to. + An that contains objects to use to populate the collection. + A representing the delegate signature for the lambda. + A that has the property equal to Lambda and the and properties set to the specified values. + + + + Creates a LambdaExpression by first constructing a delegate type. + + An to set the property equal to. + A that indicates if tail call optimization will be applied when compiling the created expression. + An that contains objects to use to populate the collection. + A representing the delegate signature for the lambda. + A that has the property equal to Lambda and the and properties set to the specified values. + + + + Creates a LambdaExpression by first constructing a delegate type. + + An to set the property equal to. + An that contains objects to use to populate the collection. + The name for the lambda. Used for emitting debug information. + A that has the property equal to Lambda and the and properties set to the specified values. + + + + Creates a LambdaExpression by first constructing a delegate type. + + An to set the property equal to. + The name for the lambda. Used for emitting debug information. + A that indicates if tail call optimization will be applied when compiling the created expression. + An that contains objects to use to populate the collection. + A that has the property equal to Lambda and the and properties set to the specified values. + + + + Creates a LambdaExpression by first constructing a delegate type. + + An to set the property equal to. + An that contains objects to use to populate the collection. + The name for the lambda. Used for emitting debug information. + A representing the delegate signature for the lambda. + A that has the property equal to Lambda and the and properties set to the specified values. + + + + Creates a LambdaExpression by first constructing a delegate type. + + A representing the delegate signature for the lambda. + An to set the property equal to. + The name for the lambda. Used for emitting debug information. + A that indicates if tail call optimization will be applied when compiling the created expression. + An that contains objects to use to populate the collection. + A that has the property equal to Lambda and the and properties set to the specified values. + + + + Creates a object that represents a generic System.Func delegate type that has specific type arguments. + The last type argument specifies the return type of the created delegate. + + An array of Type objects that specify the type arguments for the System.Func delegate type. + The type of a System.Func delegate that has the specified type arguments. + + + + Creates a object that represents a generic System.Func delegate type that has specific type arguments. + The last type argument specifies the return type of the created delegate. + + An array of Type objects that specify the type arguments for the System.Func delegate type. + When this method returns, contains the generic System.Func delegate type that has specific type arguments. Contains null if there is no generic System.Func delegate that matches the .This parameter is passed uninitialized. + true if generic System.Func delegate type was created for specific ; false otherwise. + + + + Creates a object that represents a generic System.Action delegate type that has specific type arguments. + + An array of Type objects that specify the type arguments for the System.Action delegate type. + The type of a System.Action delegate that has the specified type arguments. + + + + Creates a object that represents a generic System.Action delegate type that has specific type arguments. + + An array of Type objects that specify the type arguments for the System.Action delegate type. + When this method returns, contains the generic System.Action delegate type that has specific type arguments. Contains null if there is no generic System.Action delegate that matches the .This parameter is passed uninitialized. + true if generic System.Action delegate type was created for specific ; false otherwise. + + + + Gets a object that represents a generic System.Func or System.Action delegate type that has specific type arguments. + The last type argument determines the return type of the delegate. If no Func or Action is large enough, it will generate a custom + delegate type. + + The type arguments of the delegate. + The delegate type. + + As with Func, the last argument is the return type. It can be set + to System.Void to produce an Action. + + + + Creates a that uses a method named "Add" to add elements to a collection. + + A to set the property equal to. + An array of objects to use to populate the collection. + A that has the property equal to ListInit and the property set to the specified value. + + + + Creates a that uses a method named "Add" to add elements to a collection. + + A to set the property equal to. + An that contains objects to use to populate the collection. + A that has the property equal to ListInit and the property set to the specified value. + + + + Creates a that uses a specified method to add elements to a collection. + + A to set the property equal to. + A that represents an instance method named "Add" (case insensitive), that adds an element to a collection. + An array of objects to use to populate the collection. + A that has the property equal to ListInit and the property set to the specified value. + + + + Creates a that uses a specified method to add elements to a collection. + + A to set the property equal to. + A that represents an instance method named "Add" (case insensitive), that adds an element to a collection. + An that contains objects to use to populate the Initializers collection. + A that has the property equal to ListInit and the property set to the specified value. + + + + Creates a that uses specified objects to initialize a collection. + + A to set the property equal to. + An array that contains objects to use to populate the collection. + + A that has the property equal to ListInit + and the and properties set to the specified values. + + + The property of must represent a type that implements . + The property of the resulting is equal to newExpression.Type. + + + + + Creates a that uses specified objects to initialize a collection. + + A to set the property equal to. + An that contains objects to use to populate the collection. + An that contains objects to use to populate the collection. + + The property of must represent a type that implements . + The property of the resulting is equal to newExpression.Type. + + + + + Creates an instance of . + + An array of objects to use to populate the collection. + An instance of that has the property equal to and the property set to the specified value. + + + + Creates an instance of . + + A collection of objects to use to populate the collection. + An instance of that has the property equal to and the property set to the specified value. + + + + Creates a with the given body. + + The body of the loop. + The created . + + + + Creates a with the given body and break target. + + The body of the loop. + The break target used by the loop body. + The created . + + + + Creates a with the given body. + + The body of the loop. + The break target used by the loop body. + The continue target used by the loop body. + The created . + + + + Creates a binding the specified value to the given member. + + The for the member which is being assigned to. + The value to be assigned to . + The created . + + + + Creates a binding the specified value to the given property. + + The for the property which is being assigned to. + The value to be assigned to . + The created . + + + + Creates a accessing a field. + + The containing object of the field. This can be null for static fields. + The field to be accessed. + The created . + + + + Creates a accessing a field. + + The containing object of the field. This can be null for static fields. + The field to be accessed. + The created . + + + + Creates a accessing a field. + + The containing object of the field. This can be null for static fields. + The containing the field. + The field to be accessed. + The created . + + + + Creates a accessing a property. + + The containing object of the property. This can be null for static properties. + The property to be accessed. + The created . + + + + Creates a accessing a property. + + The containing object of the property. This can be null for static properties. + The containing the property. + The property to be accessed. + The created . + + + + Creates a accessing a property. + + The containing object of the property. This can be null for static properties. + The property to be accessed. + The created . + + + + Creates a accessing a property. + + The containing object of the property. This can be null for static properties. + An accessor method of the property to be accessed. + The created . + + + + Creates a accessing a property or field. + + The containing object of the member. This can be null for static members. + The member to be accessed. + The created . + + + + Creates a accessing a property or field. + + The containing object of the member. This can be null for static members. + The member to be accessed. + The created . + + + Creates a . + A that has the property equal to and the and properties set to the specified values. + A to set the property equal to. + An array of objects to use to populate the collection. + + or is null. + The property of an element of does not represent a member of the type that .Type represents. + + + Creates a . + A that has the property equal to and the and properties set to the specified values. + A to set the property equal to. + An that contains objects to use to populate the collection. + + or is null. + The property of an element of does not represent a member of the type that .Type represents. + + + Creates a where the member is a field or property. + A that has the property equal to and the and properties set to the specified values. + A that represents a field or property to set the property equal to. + An array of objects to use to populate the collection. + + is null. -or-One or more elements of is null. + + does not represent a field or property.-or-The or of the field or property that represents does not implement . + + + Creates a where the member is a field or property. + A that has the property equal to and the and properties set to the specified values. + A that represents a field or property to set the property equal to. + An that contains objects to use to populate the collection. + + is null. -or-One or more elements of is null. + + does not represent a field or property.-or-The or of the field or property that represents does not implement . + + + Creates a object based on a specified property accessor method. + A that has the property equal to , the property set to the that represents the property accessed in , and populated with the elements of . + A that represents a property accessor method. + An array of objects to use to populate the collection. + + is null. -or-One or more elements of is null. + + does not represent a property accessor method.-or-The of the property that the method represented by accesses does not implement . + + + Creates a based on a specified property accessor method. + A that has the property equal to , the property set to the that represents the property accessed in , and populated with the elements of . + A that represents a property accessor method. + An that contains objects to use to populate the collection. + + is null. -or-One or more elements of are null. + + does not represent a property accessor method.-or-The of the property that the method represented by accesses does not implement . + + + + Creates a that represents the recursive initialization of members of a field or property. + + The to set the property equal to. + An array of objects to use to populate the collection. + A that has the property equal to and the and properties set to the specified values. + + + + Creates a that represents the recursive initialization of members of a field or property. + + The to set the property equal to. + An that contains objects to use to populate the collection. + A that has the property equal to and the and properties set to the specified values. + + + + Creates a that represents the recursive initialization of members of a member that is accessed by using a property accessor method. + + The that represents a property accessor method. + An that contains objects to use to populate the collection. + + A that has the property equal to , + the Member property set to the that represents the property accessed in , + and properties set to the specified values. + + + + + Creates a that represents the recursive initialization of members of a member that is accessed by using a property accessor method. + + The that represents a property accessor method. + An that contains objects to use to populate the collection. + + A that has the property equal to , + the Member property set to the that represents the property accessed in , + and properties set to the specified values. + + + + Creates a that represents a call to a static method that takes one argument. + A that has the property equal to and the and properties set to the specified values. + A to set the property equal to. + The that represents the first argument. + + is null. + + + Creates a that represents a call to a static method that takes two arguments. + A that has the property equal to and the and properties set to the specified values. + A to set the property equal to. + The that represents the first argument. + The that represents the second argument. + + is null. + + + Creates a that represents a call to a static method that takes three arguments. + A that has the property equal to and the and properties set to the specified values. + A to set the property equal to. + The that represents the first argument. + The that represents the second argument. + The that represents the third argument. + + is null. + + + Creates a that represents a call to a static method that takes four arguments. + A that has the property equal to and the and properties set to the specified values. + A to set the property equal to. + The that represents the first argument. + The that represents the second argument. + The that represents the third argument. + The that represents the fourth argument. + + is null. + + + Creates a that represents a call to a static method that takes five arguments. + A that has the property equal to and the and properties set to the specified values. + A to set the property equal to. + The that represents the first argument. + The that represents the second argument. + The that represents the third argument. + The that represents the fourth argument. + The that represents the fifth argument. + + is null. + A that has the property equal to and the and properties set to the specified values. + + + + Creates a that represents a call to a static (Shared in Visual Basic) method. + + The that represents the target method. + The array of one or more of that represents the call arguments. + A that has the property equal to and the and properties set to the specified values. + + + + Creates a that represents a call to a static (Shared in Visual Basic) method. + + The that represents the target method. + A collection of that represents the call arguments. + A that has the property equal to and the and properties set to the specified values. + + + + Creates a that represents a call to a method that takes no arguments. + + An that specifies the instance for an instance call. (pass null for a static (Shared in Visual Basic) method). + The that represents the target method. + A that has the property equal to and the and properties set to the specified values. + + + + Creates a that represents a method call. + + An that specifies the instance for an instance call. (pass null for a static (Shared in Visual Basic) method). + The that represents the target method. + An array of one or more of that represents the call arguments. + A that has the property equal to and the and properties set to the specified values. + + + + Creates a that represents a call to a method that takes two arguments. + + An that specifies the instance for an instance call. (pass null for a static (Shared in Visual Basic) method). + The that represents the target method. + The that represents the first argument. + The that represents the second argument. + A that has the property equal to and the and properties set to the specified values. + + + + Creates a that represents a call to a method that takes three arguments. + + An that specifies the instance for an instance call. (pass null for a static (Shared in Visual Basic) method). + The that represents the target method. + The that represents the first argument. + The that represents the second argument. + The that represents the third argument. + A that has the property equal to and the and properties set to the specified values. + + + Creates a that represents a call to an instance method by calling the appropriate factory method. + A that has the property equal to , the property equal to , set to the that represents the specified instance method, and set to the specified arguments. + An whose property value will be searched for a specific method. + The name of the method. + + An array of objects that specify the type parameters of the generic method. + This argument should be null when specifies a non-generic method. + + An array of objects that represents the arguments to the method. + + or is null. + No method whose name is , whose type parameters match , and whose parameter types match is found in .Type or its base types.-or-More than one method whose name is , whose type parameters match , and whose parameter types match is found in .Type or its base types. + + + Creates a that represents a call to a static (Shared in Visual Basic) method by calling the appropriate factory method. + A that has the property equal to , the property set to the that represents the specified static (Shared in Visual Basic) method, and the property set to the specified arguments. + The that specifies the type that contains the specified static (Shared in Visual Basic) method. + The name of the method. + + An array of objects that specify the type parameters of the generic method. + This argument should be null when specifies a non-generic method. + + An array of objects that represent the arguments to the method. + + or is null. + No method whose name is , whose type parameters match , and whose parameter types match is found in or its base types.-or-More than one method whose name is , whose type parameters match , and whose parameter types match is found in or its base types. + + + Creates a that represents a method call. + A that has the property equal to and the , , and properties set to the specified values. + An to set the property equal to (pass null for a static (Shared in Visual Basic) method). + A to set the property equal to. + An that contains objects to use to populate the collection. + + is null.-or- is null and represents an instance method. + + .Type is not assignable to the declaring type of the method represented by .-or-The number of elements in does not equal the number of parameters for the method represented by .-or-One or more of the elements of is not assignable to the corresponding parameter for the method represented by . + + + Creates a that represents applying an array index operator to a multi-dimensional array. + A that has the property equal to and the and properties set to the specified values. + An array of instances - indexes for the array index operation. + An array that contains objects to use to populate the collection. + + + Creates a that represents applying an array index operator to an array of rank more than one. + A that has the property equal to and the and properties set to the specified values. + An to set the property equal to. + An that contains objects to use to populate the collection. + + or is null. + + .Type does not represent an array type.-or-The rank of .Type does not match the number of elements in .-or-The property of one or more elements of does not represent the type. + + + + Creates a new array expression of the specified type from the provided initializers. + + A Type that represents the element type of the array. + The expressions used to create the array elements. + An instance of the . + + + + Creates a new array expression of the specified type from the provided initializers. + + A Type that represents the element type of the array. + The expressions used to create the array elements. + An instance of the . + + + + Creates a that represents creating an array that has a specified rank. + + A that represents the element type of the array. + An array that contains Expression objects to use to populate the Expressions collection. + A that has the property equal to type and the property set to the specified value. + + + + Creates a that represents creating an array that has a specified rank. + + A that represents the element type of the array. + An IEnumerable{T} that contains Expression objects to use to populate the Expressions collection. + A that has the property equal to type and the property set to the specified value. + + + + Creates a new that represents calling the specified constructor that takes no arguments. + + The to set the property equal to. + A that has the property equal to and the property set to the specified value. + + + + Creates a new that represents calling the specified constructor that takes no arguments. + + The to set the property equal to. + An array of objects to use to populate the Arguments collection. + A that has the property equal to and the and properties set to the specified value. + + + + Creates a new that represents calling the specified constructor that takes no arguments. + + The to set the property equal to. + An of objects to use to populate the Arguments collection. + A that has the property equal to and the and properties set to the specified value. + + + + Creates a new that represents calling the specified constructor with the specified arguments. The members that access the constructor initialized fields are specified. + + The to set the property equal to. + An of objects to use to populate the Arguments collection. + An of objects to use to populate the Members collection. + A that has the property equal to and the , and properties set to the specified value. + + + + Creates a new that represents calling the specified constructor with the specified arguments. The members that access the constructor initialized fields are specified. + + The to set the property equal to. + An of objects to use to populate the Arguments collection. + An Array of objects to use to populate the Members collection. + A that has the property equal to and the , and properties set to the specified value. + + + + Creates a that represents calling the parameterless constructor of the specified type. + + A that has a constructor that takes no arguments. + A that has the property equal to New and the Constructor property set to the ConstructorInfo that represents the parameterless constructor of the specified type. + + + + Creates a node that can be used to identify a parameter or a variable in an expression tree. + + The type of the parameter or variable. + A node with the specified name and type. + + + + Creates a node that can be used to identify a parameter or a variable in an expression tree. + + The type of the parameter or variable. + A node with the specified name and type. + + + + Creates a node that can be used to identify a parameter or a variable in an expression tree. + + The type of the parameter or variable. + The name of the parameter or variable, used for debugging or pretty printing purpose only. + A node with the specified name and type. + + + + Creates a node that can be used to identify a parameter or a variable in an expression tree. + + The type of the parameter or variable. + The name of the parameter or variable, used for debugging or pretty printing purpose only. + A node with the specified name and type. + + + + Creates a SwitchCase for use in a . + + The body of the case. + The test values of the case. + The created SwitchCase. + + + + Creates a SwitchCase for use in a . + + The body of the case. + The test values of the case. + The created SwitchCase. + + + + Creates a . + + The value to be tested against each case. + The valid cases for this switch. + The created . + + + + Creates a . + + The value to be tested against each case. + The result of the switch if no cases are matched. + The valid cases for this switch. + The created . + + + + Creates a . + + The value to be tested against each case. + The result of the switch if no cases are matched. + The equality comparison method to use. + The valid cases for this switch. + The created . + + + + Creates a . + + The result type of the switch. + The value to be tested against each case. + The result of the switch if no cases are matched. + The equality comparison method to use. + The valid cases for this switch. + The created . + + + + Creates a . + + The value to be tested against each case. + The result of the switch if no cases are matched. + The equality comparison method to use. + The valid cases for this switch. + The created . + + + + Creates a . + + The result type of the switch. + The value to be tested against each case. + The result of the switch if no cases are matched. + The equality comparison method to use. + The valid cases for this switch. + The created . + + + + If custom type is provided, all branches must be reference assignable to the result type. + If no custom type is provided, all branches must have the same type - resultType. + + + + + Creates a representing a try block with a fault block and no catch statements. + + The body of the try block. + The body of the fault block. + The created . + + + + Creates a representing a try block with a finally block and no catch statements. + + The body of the try block. + The body of the finally block. + The created . + + + + Creates a representing a try block with any number of catch statements and neither a fault nor finally block. + + The body of the try block. + The array of zero or more s representing the catch statements to be associated with the try block. + The created . + + + + Creates a representing a try block with any number of catch statements and a finally block. + + The body of the try block. + The body of the finally block. + The array of zero or more s representing the catch statements to be associated with the try block. + The created . + + + + Creates a representing a try block with the specified elements. + + The result type of the try expression. If null, bodh and all handlers must have identical type. + The body of the try block. + The body of the finally block. Pass null if the try block has no finally block associated with it. + The body of the t block. Pass null if the try block has no fault block associated with it. + A collection of s representing the catch statements to be associated with the try block. + The created . + + + + Creates a . + + An to set the property equal to. + A to set the property equal to. + A for which the property is equal to and for which the and properties are set to the specified values. + + + + Creates a that compares run-time type identity. + + An to set the property equal to. + A to set the property equal to. + A for which the property is equal to and for which the and properties are set to the specified values. + + + + Creates a , given an operand, by calling the appropriate factory method. + + The that specifies the type of unary operation. + An that represents the operand. + The that specifies the type to be converted to (pass null if not applicable). + The that results from calling the appropriate factory method. + Thrown when does not correspond to a unary expression. + Thrown when is null. + + + + Creates a , given an operand and implementing method, by calling the appropriate factory method. + + The that specifies the type of unary operation. + An that represents the operand. + The that specifies the type to be converted to (pass null if not applicable). + The that represents the implementing method. + The that results from calling the appropriate factory method. + Thrown when does not correspond to a unary expression. + Thrown when is null. + + + + Creates a that represents an arithmetic negation operation. + + An to set the property equal to. + A that has the property equal to and the properties set to the specified value. + Thrown when is null. + Thrown when the unary minus operator is not defined for + + + + Creates a that represents an arithmetic negation operation. + + An to set the property equal to. + A to set the property equal to. + A that has the property equal to and the and properties set to the specified value. + Thrown when is null. + Thrown when is not null and the method it represents returns void, is not static (Shared in Visual Basic), or does not take exactly one argument. + Thown when is null and the unary minus operator is not defined for expression.Type or expression.Type (or its corresponding non-nullable type if it is a nullable value type) is not assignable to the argument type of the method represented by method. + + + + Creates a that represents a unary plus operation. + + An to set the property equal to. + A that has the property equal to and the property set to the specified value. + Thrown when is null. + Thown when the unary minus operator is not defined for expression.Type. + + + + Creates a that represents a unary plus operation. + + An to set the property equal to. + A to set the property equal to. + A that has the property equal to and the and property set to the specified value. + Thrown when is null. + Thrown when is not null and the method it represents returns void, is not static (Shared in Visual Basic), or does not take exactly one argument. + Thown when is null and the unary minus operator is not defined for expression.Type or expression.Type (or its corresponding non-nullable type if it is a nullable value type) is not assignable to the argument type of the method represented by method. + + + Creates a that represents an arithmetic negation operation that has overflow checking. + A that has the property equal to and the property set to the specified value. + An to set the property equal to. + + Thrown when is null. + Thrown when the unary minus operator is not defined for .Type. + + + Creates a that represents an arithmetic negation operation that has overflow checking. The implementing method can be specified. + A that has the property equal to and the and properties set to the specified values. + An to set the property equal to. + A to set the property equal to. + + is null. + + is not null and the method it represents returns void, is not static (Shared in Visual Basic), or does not take exactly one argument. + + is null and the unary minus operator is not defined for .Type.-or-.Type (or its corresponding non-nullable type if it is a nullable value type) is not assignable to the argument type of the method represented by . + + + Creates a that represents a bitwise complement operation. + A that has the property equal to and the property set to the specified value. + An to set the property equal to. + + is null. + The unary not operator is not defined for .Type. + + + Creates a that represents a bitwise complement operation. The implementing method can be specified. + A that has the property equal to and the and properties set to the specified values. + An to set the property equal to. + A to set the property equal to. + + is null. + + is not null and the method it represents returns void, is not static (Shared in Visual Basic), or does not take exactly one argument. + + is null and the unary not operator is not defined for .Type.-or-.Type (or its corresponding non-nullable type if it is a nullable value type) is not assignable to the argument type of the method represented by . + + + + Returns whether the expression evaluates to false. + + An to evaluate. + An instance of . + + + + Returns whether the expression evaluates to false. + + An to evaluate. + A that represents the implementing method. + An instance of . + + + + Returns whether the expression evaluates to true. + + An to evaluate. + An instance of . + + + + Returns whether the expression evaluates to true. + + An to evaluate. + A that represents the implementing method. + An instance of . + + + + Returns the expression representing the ones complement. + + An . + An instance of . + + + + Returns the expression representing the ones complement. + + An . + A that represents the implementing method. + An instance of . + + + Creates a that represents an explicit reference or boxing conversion where null is supplied if the conversion fails. + A that has the property equal to and the and properties set to the specified values. + An to set the property equal to. + A to set the property equal to. + + or is null. + + + + Creates a that represents an explicit unboxing. + + An to unbox. + The new of the expression. + An instance of . + + + Creates a that represents a conversion operation. + A that has the property equal to and the and properties set to the specified values. + An to set the property equal to. + A to set the property equal to. + + or is null. + No conversion operator is defined between .Type and . + + + Creates a that represents a conversion operation for which the implementing method is specified. + A that has the property equal to and the , , and properties set to the specified values. + An to set the property equal to. + A to set the property equal to. + A to set the property equal to. + + or is null. + + is not null and the method it represents returns void, is not static (Shared in Visual Basic), or does not take exactly one argument. + More than one method that matches the description was found. + No conversion operator is defined between .Type and .-or-.Type is not assignable to the argument type of the method represented by .-or-The return type of the method represented by is not assignable to .-or-.Type or is a nullable value type and the corresponding non-nullable value type does not equal the argument type or the return type, respectively, of the method represented by . + + + Creates a that represents a conversion operation that throws an exception if the target type is overflowed. + A that has the property equal to and the and properties set to the specified values. + An to set the property equal to. + A to set the property equal to. + + or is null. + No conversion operator is defined between .Type and . + + + Creates a that represents a conversion operation that throws an exception if the target type is overflowed and for which the implementing method is specified. + A that has the property equal to and the , , and properties set to the specified values. + An to set the property equal to. + A to set the property equal to. + A to set the property equal to. + + or is null. + + is not null and the method it represents returns void, is not static (Shared in Visual Basic), or does not take exactly one argument. + More than one method that matches the description was found. + No conversion operator is defined between .Type and .-or-.Type is not assignable to the argument type of the method represented by .-or-The return type of the method represented by is not assignable to .-or-.Type or is a nullable value type and the corresponding non-nullable value type does not equal the argument type or the return type, respectively, of the method represented by . + + + Creates a that represents getting the length of a one-dimensional array. + A that has the property equal to and the property equal to . + An to set the property equal to. + + is null. + + .Type does not represent an array type. + + + Creates a that represents an expression that has a constant value of type . + A that has the property equal to and the property set to the specified value. + An to set the property equal to. + + is null. + + + + Creates a that represents a rethrowing of an exception. + + A that represents a rethrowing of an exception. + + + + Creates a that represents a rethrowing of an exception with a given type. + + The new of the expression. + A that represents a rethrowing of an exception. + + + + Creates a that represents a throwing of an exception. + + An . + A that represents the exception. + + + + Creates a that represents a throwing of a value with a given type. + + An . + The new of the expression. + A that represents the exception. + + + + Creates a that represents the incrementing of the expression by 1. + + An to increment. + A that represents the incremented expression. + + + + Creates a that represents the incrementing of the expression by 1. + + An to increment. + A that represents the implementing method. + A that represents the incremented expression. + + + + Creates a that represents the decrementing of the expression by 1. + + An to decrement. + A that represents the decremented expression. + + + + Creates a that represents the decrementing of the expression by 1. + + An to decrement. + A that represents the implementing method. + A that represents the decremented expression. + + + + Creates a that increments the expression by 1 + and assigns the result back to the expression. + + An to apply the operations on. + A that represents the resultant expression. + + + + Creates a that increments the expression by 1 + and assigns the result back to the expression. + + An to apply the operations on. + A that represents the implementing method. + A that represents the resultant expression. + + + + Creates a that decrements the expression by 1 + and assigns the result back to the expression. + + An to apply the operations on. + A that represents the resultant expression. + + + + Creates a that decrements the expression by 1 + and assigns the result back to the expression. + + An to apply the operations on. + A that represents the implementing method. + A that represents the resultant expression. + + + + Creates a that represents the assignment of the expression + followed by a subsequent increment by 1 of the original expression. + + An to apply the operations on. + A that represents the resultant expression. + + + + Creates a that represents the assignment of the expression + followed by a subsequent increment by 1 of the original expression. + + An to apply the operations on. + A that represents the implementing method. + A that represents the resultant expression. + + + + Creates a that represents the assignment of the expression + followed by a subsequent decrement by 1 of the original expression. + + An to apply the operations on. + A that represents the resultant expression. + + + + Creates a that represents the assignment of the expression + followed by a subsequent decrement by 1 of the original expression. + + An to apply the operations on. + A that represents the implementing method. + A that represents the resultant expression. + + + + The of the . + + + + + The of the value represented by this . + + + + + Indicates that the node can be reduced to a simpler node. If this + returns true, Reduce() can be called to produce the reduced form. + + + + + Creates a representation of the Expression. + + A representation of the Expression. + + + + Provides an internal interface for accessing the arguments that multiple tree + nodes (DynamicExpression, ElementInit, MethodCallExpression, InvocationExpression, NewExpression, + and InexExpression). + + This enables two optimizations which reduce the size of the trees. The first is it enables + the nodes to hold onto an IList of T instead of a ReadOnlyCollection. This saves the cost + of allocating the ReadOnlyCollection for each node. The second is that it enables specialized + subclasses to be created which hold onto a specific number of arguments. For example Block2, + Block3, Block4. These nodes can therefore avoid allocating both a ReadOnlyCollection and an + array for storing their elements saving 32 bytes per node. + + Meanwhile the nodes can continue to expose the original LINQ properties of ReadOnlyCollections. They + do this by re-using 1 field for storing both the array or an element that would normally be stored + in the array. + + For the array case the collection is typed to IList of T instead of ReadOnlyCollection of T. + When the node is initially constructed it is an array. When the compiler accesses the members it + uses this interface. If a user accesses the members the array is promoted to a ReadOnlyCollection. + + For the object case we store the 1st argument in a field typed to object and when the node is initially + constructed this holds directly onto the Expression. When the compiler accesses the members + it again uses this interface and the accessor for the 1st argument uses Expression.ReturnObject to + return the object which handles the Expression or ReadOnlyCollection case. When the user accesses + the ReadOnlyCollection then the object field is updated to hold directly onto the ReadOnlyCollection. + + It is important that the Expressions consistently return the same ReadOnlyCollection otherwise the + re-writer will be broken and it would be a breaking change from LINQ v1. The problem is that currently + users can rely on object identity to tell if the node has changed. Storing the readonly collection in + an overloaded field enables us to both reduce memory usage as well as maintain compatibility and an + easy to use external API. + + + + + Provides a wrapper around an IArgumentProvider which exposes the argument providers + members out as an IList of Expression. This is used to avoid allocating an array + which needs to be stored inside of a ReadOnlyCollection. Instead this type has + the same amount of overhead as an array without duplicating the storage of the + elements. This ensures that internally we can avoid creating and copying arrays + while users of the Expression trees also don't pay a size penalty for this internal + optimization. See IArgumentProvider for more general information on the Expression + tree optimizations being used here. + + + + + Represents the unary dynamic operation at the call site, providing the binding semantic and the details about the operation. + + + + + Initializes a new instance of the class. + + The unary operation kind. + + + + Performs the binding of the unary dynamic operation if the target dynamic object cannot bind. + + The target of the dynamic unary operation. + The representing the result of the binding. + + + + Performs the binding of the unary dynamic operation if the target dynamic object cannot bind. + + The target of the dynamic unary operation. + The binding result in case the binding fails, or null. + The representing the result of the binding. + + + + Performs the binding of the dynamic unary operation. + + The target of the dynamic operation. + An array of arguments of the dynamic operation. + The representing the result of the binding. + + + + The result type of the operation. + + + + + The unary operation kind. + + + + + Output a given expression tree to a string. + + + + + Output a given member binding to a string. + + + + + Output a given ElementInit to a string. + + + + + This type tracks "runtime" constants--live objects that appear in + ConstantExpression nodes and must be bound to the delegate. + + + + + The list of constants in the order they appear in the constant array + + + + + The index of each constant in the constant array + + + + + Each constant referenced within this lambda, and how often it was referenced + + + + + IL locals for storing frequently used constants + + + + + Called by VariableBinder. Adds the constant to the list (if needed) + and increases the reference count by one + + + + + Emits a live object as a constant + + + + + Emit code to cache frequently used constants into IL locals, + instead of pulling them out of the array each time + + + + + Constants can emit themselves as different types + For caching purposes, we need to treat each distinct Type as a + seperate thing to cache. (If we have to cast it on the way out, it + ends up using a JIT temp and defeats the purpose of caching the + value in a local) + + + + + Emits or clears a sequence point for debug information. + + This allows the debugger to highlight the correct source code when + debugging. + + + + + Dispatches to the specific visit method for this node type. + + + + + Gets the static type of the expression that this represents. (Inherited from .) + + The that represents the static type of the expression. + + + + Returns the node type of this . (Inherited from .) + + The that represents this expression. + + + + Gets the start line of this . + + + + + Gets the start column of this . + + + + + Gets the end line of this . + + + + + Gets the end column of this . + + + + + Gets the that represents the source file. + + + + + Gets the value to indicate if the is for clearing a sequence point. + + + + + Stores information needed to emit debugging symbol information for a + source file, in particular the file name and unique language identifier. + + + + + The source file name. + + + + + Returns the language's unique identifier, if any. + + + + + Returns the language vendor's unique identifier, if any. + + + + + Returns the document type's unique identifier, if any. + Defaults to the guid for a text file. + + + + + Finds a delegate type using the types in the array. + We use the cache to avoid copying the array, and to cache the + created delegate type + + + + + Finds a delegate type for a CallSite using the types in the ReadOnlyCollection of Expression. + + We take the readonly collection of Expression explicitly to avoid allocating memory (an array + of types) on lookup of delegate types. + + + + + Finds a delegate type for a CallSite using the MetaObject array. + + We take the array of MetaObject explicitly to avoid allocating memory (an array of types) on + lookup of delegate types. + + + + + Creates a new delegate, or uses a func/action + Note: this method does not cache + + + + + Specifies what kind of jump this represents. + + + + + A that represents a jump to some location. + + + + + A that represents a return statement. + + + + + A that represents a break statement. + + + + + A that represents a continue statement. + + + + + Represents an unconditional jump. This includes return statements, break and continue statements, and other jumps. + + + + + Dispatches to the specific visit method for this node type. + + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Gets the static type of the expression that this represents. (Inherited from .) + + The that represents the static type of the expression. + + + + Returns the node type of this . (Inherited from .) + + The that represents this expression. + + + + The value passed to the target, or null if the target is of type + System.Void. + + + + + The target label where this node jumps to. + + + + + The kind of the goto. For information purposes only. + + + + + Contains compiler state corresponding to a LabelTarget + See also LabelScopeInfo. + + + + + Indicates if it is legal to emit a "branch" instruction based on + currently available information. Call the Reference method before + using this property. + + + + + Returns true if we can jump into this node + + + + + Wraps ILGenerator with code that tracks the current IL offset as instructions are emitted into the IL stream. + + + + + Represents a dynamic operation. + + + + + Dispatches to the specific visit method for this node type. + + + + + Makes a copy of this node replacing the args with the provided values. The + number of the args needs to match the number of the current block. + + This helper is provided to allow re-writing of nodes to not depend on the specific optimized + subclass of DynamicExpression which is being used. + + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Gets the static type of the expression that this represents. + + The that represents the static type of the expression. + + + + Returns the node type of this Expression. Extension nodes should return + ExpressionType.Extension when overriding this method. + + The of the expression. + + + + Gets the , which determines the runtime behavior of the + dynamic site. + + + + + Gets the type of the delegate used by the . + + + + + Gets the arguments to the dynamic operation. + + + + + Represents an expression that has a binary operator. + + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + The property of the result. + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Reduces the binary expression node to a simpler expression. + If CanReduce returns true, this should return a valid expression. + This method is allowed to return another node which itself + must be reduced. + + The reduced expression. + + + + Dispatches to the specific visit method for this node type. + + + + + Gets a value that indicates whether the expression tree node can be reduced. + + + + + Gets the right operand of the binary operation. + + + + + Gets the left operand of the binary operation. + + + + + Gets the implementing method for the binary operation. + + + + + Gets the type conversion function that is used by a coalescing or compound assignment operation. + + + + + Gets a value that indicates whether the expression tree node represents a lifted call to an operator. + + + + + Gets a value that indicates whether the expression tree node represents a lifted call to an operator whose return type is lifted to a nullable type. + + + + + Represents a block that contains a sequence of expressions where variables can be defined. + + + + + Dispatches to the specific visit method for this node type. + + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Makes a copy of this node replacing the parameters/args with the provided values. The + shape of the parameters/args needs to match the shape of the current block - in other + words there should be the same # of parameters and args. + + parameters can be null in which case the existing parameters are used. + + This helper is provided to allow re-writing of nodes to not depend on the specific optimized + subclass of BlockExpression which is being used. + + + + + Helper used for ensuring we only return 1 instance of a ReadOnlyCollection of T. + + This is similar to the ReturnReadOnly which only takes a single argument. This version + supports nodes which hold onto 5 Expressions and puts all of the arguments into the + ReadOnlyCollection. + + Ultimately this means if we create the readonly collection we will be slightly more wasteful as we'll + have a readonly collection + some fields in the type. The DLR internally avoids accessing anything + which would force the readonly collection to be created. + + This is used by BlockExpression5 and MethodCallExpression5. + + + + + Gets the expressions in this block. + + + + + Gets the variables defined in this block. + + + + + Gets the last expression in this block. + + + + + Returns the node type of this Expression. Extension nodes should return + ExpressionType.Extension when overriding this method. + + The of the expression. + + + + Gets the static type of the expression that this represents. + + The that represents the static type of the expression. + + + + Provides a wrapper around an IArgumentProvider which exposes the argument providers + members out as an IList of Expression. This is used to avoid allocating an array + which needs to be stored inside of a ReadOnlyCollection. Instead this type has + the same amount of overhead as an array without duplicating the storage of the + elements. This ensures that internally we can avoid creating and copying arrays + while users of the Expression trees also don't pay a size penalty for this internal + optimization. See IArgumentProvider for more general information on the Expression + tree optimizations being used here. + + + + + Represents a catch statement in a try block. + This must have the same return type (i.e., the type of ) as the try block it is associated with. + + + + + Returns a that represents the current . + + A that represents the current . + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + The property of the result. + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Gets a reference to the object caught by this handler. + + + + + Gets the type of this handler catches. + + + + + Gets the body of the catch block. + + + + + Gets the body of the 's filter. + + + + + Represents an expression that has a conditional operator. + + + + + Dispatches to the specific visit method for this node type. + + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + The property of the result. + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Returns the node type of this Expression. Extension nodes should return + ExpressionType.Extension when overriding this method. + + The of the expression. + + + + Gets the static type of the expression that this represents. + + The that represents the static type of the expression. + + + + Gets the test of the conditional operation. + + + + + Gets the expression to execute if the test evaluates to true. + + + + + Gets the expression to execute if the test evaluates to false. + + + + + Represents an expression that has a constant value. + + + + + Dispatches to the specific visit method for this node type. + + + + + Gets the static type of the expression that this represents. + + The that represents the static type of the expression. + + + + Returns the node type of this Expression. Extension nodes should return + ExpressionType.Extension when overriding this method. + + The of the expression. + + + + Gets the value of the constant expression. + + + + + Represents the default value of a type or an empty expression. + + + + + Dispatches to the specific visit method for this node type. + + + + + Gets the static type of the expression that this represents. + + The that represents the static type of the expression. + + + + Returns the node type of this Expression. Extension nodes should return + ExpressionType.Extension when overriding this method. + + The of the expression. + + + + Represents the initialization of a list. + + + + + Creates a representation of the node. + + A representation of the node. + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Gets the used to add elements to the object. + + + + + Gets the list of elements to be added to the object. + + + + + Describes the node types for the nodes of an expression tree. + + + + + A node that represents arithmetic addition without overflow checking. + + + + + A node that represents arithmetic addition with overflow checking. + + + + + A node that represents a bitwise AND operation. + + + + + A node that represents a short-circuiting conditional AND operation. + + + + + A node that represents getting the length of a one-dimensional array. + + + + + A node that represents indexing into a one-dimensional array. + + + + + A node that represents represents a method call. + + + + + A node that represents a null coalescing operation. + + + + + A node that represents a conditional operation. + + + + + A node that represents an expression that has a constant value. + + + + + A node that represents a cast or conversion operation. If the operation is a numeric conversion, it overflows silently if the converted value does not fit the target type. + + + + + A node that represents a cast or conversion operation. If the operation is a numeric conversion, an exception is thrown if the converted value does not fit the target type. + + + + + A node that represents arithmetic division. + + + + + A node that represents an equality comparison. + + + + + A node that represents a bitwise XOR operation. + + + + + A node that represents a "greater than" numeric comparison. + + + + + A node that represents a "greater than or equal" numeric comparison. + + + + + A node that represents applying a delegate or lambda expression to a list of argument expressions. + + + + + A node that represents a lambda expression. + + + + + A node that represents a bitwise left-shift operation. + + + + + A node that represents a "less than" numeric comparison. + + + + + A node that represents a "less than or equal" numeric comparison. + + + + + A node that represents creating a new IEnumerable object and initializing it from a list of elements. + + + + + A node that represents reading from a field or property. + + + + + A node that represents creating a new object and initializing one or more of its members. + + + + + A node that represents an arithmetic remainder operation. + + + + + A node that represents arithmetic multiplication without overflow checking. + + + + + A node that represents arithmetic multiplication with overflow checking. + + + + + A node that represents an arithmetic negation operation. + + + + + A node that represents a unary plus operation. The result of a predefined unary plus operation is simply the value of the operand, but user-defined implementations may have non-trivial results. + + + + + A node that represents an arithmetic negation operation that has overflow checking. + + + + + A node that represents calling a constructor to create a new object. + + + + + A node that represents creating a new one-dimensional array and initializing it from a list of elements. + + + + + A node that represents creating a new array where the bounds for each dimension are specified. + + + + + A node that represents a bitwise complement operation. + + + + + A node that represents an inequality comparison. + + + + + A node that represents a bitwise OR operation. + + + + + A node that represents a short-circuiting conditional OR operation. + + + + + A node that represents a reference to a parameter or variable defined in the context of the expression. + + + + + A node that represents raising a number to a power. + + + + + A node that represents an expression that has a constant value of type Expression. A Quote node can contain references to parameters defined in the context of the expression it represents. + + + + + A node that represents a bitwise right-shift operation. + + + + + A node that represents arithmetic subtraction without overflow checking. + + + + + A node that represents arithmetic subtraction with overflow checking. + + + + + A node that represents an explicit reference or boxing conversion where null reference (Nothing in Visual Basic) is supplied if the conversion fails. + + + + + A node that represents a type test. + + + + + A node that represents an assignment. + + + + + A node that represents a block of expressions. + + + + + A node that represents a debugging information. + + + + + A node that represents a unary decrement. + + + + + A node that represents a dynamic operation. + + + + + A node that represents a default value. + + + + + A node that represents an extension expression. + + + + + A node that represents a goto. + + + + + A node that represents a unary increment. + + + + + A node that represents an index operation. + + + + + A node that represents a label. + + + + + A node that represents a list of runtime variables. + + + + + A node that represents a loop. + + + + + A node that represents a switch operation. + + + + + A node that represents a throwing of an exception. + + + + + A node that represents a try-catch expression. + + + + + A node that represents an unbox value type operation. + + + + + A node that represents an arithmetic addition compound assignment without overflow checking. + + + + + A node that represents a bitwise AND compound assignment. + + + + + A node that represents an arithmetic division compound assignment . + + + + + A node that represents a bitwise XOR compound assignment. + + + + + A node that represents a bitwise left-shift compound assignment. + + + + + A node that represents an arithmetic remainder compound assignment. + + + + + A node that represents arithmetic multiplication compound assignment without overflow checking. + + + + + A node that represents a bitwise OR compound assignment. + + + + + A node that represents raising a number to a power compound assignment. + + + + + A node that represents a bitwise right-shift compound assignment. + + + + + A node that represents arithmetic subtraction compound assignment without overflow checking. + + + + + A node that represents an arithmetic addition compound assignment with overflow checking. + + + + + A node that represents arithmetic multiplication compound assignment with overflow checking. + + + + + A node that represents arithmetic subtraction compound assignment with overflow checking. + + + + + A node that represents an unary prefix increment. + + + + + A node that represents an unary prefix decrement. + + + + + A node that represents an unary postfix increment. + + + + + A node that represents an unary postfix decrement. + + + + + A node that represents a exact type test. + + + + + A node that represents a ones complement. + + + + + A node that represents a true condition value. + + + + + A node that represents a false condition value. + + + + + Represents indexing a property or array. + + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Dispatches to the specific visit method for this node type. + + + + + Returns the node type of this . (Inherited from .) + + The that represents this expression. + + + + Gets the static type of the expression that this represents. (Inherited from .) + + The that represents the static type of the expression. + + + + An object to index. + + + + + Gets the for the property if the expression represents an indexed property, returns null otherwise. + + + + + Gets the arguments to be used to index the property or array. + + + + + Represents an expression that applies a delegate or lambda expression to a list of argument expressions. + + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Dispatches to the specific visit method for this node type. + + + + + Gets the static type of the expression that this represents. + + The that represents the static type of the expression. + + + + Returns the node type of this Expression. Extension nodes should return + ExpressionType.Extension when overriding this method. + + The of the expression. + + + + Gets the delegate or lambda expression to be applied. + + + + + Gets the arguments that the delegate or lambda expression is applied to. + + + + + Used to denote the target of a . + + + + + Returns a that represents the current . + + A that represents the current . + + + + Gets the name of the label. + + The label's name is provided for information purposes only. + + + + The type of value that is passed when jumping to the label + (or System.Void if no value should be passed). + + + + + Represents a label, which can be placed in any context. If + it is jumped to, it will get the value provided by the corresponding + . Otherwise, it gets the value in . If the + equals System.Void, no value should be provided. + + + + + Dispatches to the specific visit method for this node type. + + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Gets the static type of the expression that this represents. (Inherited from .) + + The that represents the static type of the expression. + + + + Returns the node type of this . (Inherited from .) + + The that represents this expression. + + + + The which this label is associated with. + + + + + The value of the when the label is reached through + normal control flow (e.g. is not jumped to). + + + + + Creates a node. + This captures a block of code that is similar to a .NET method body. + + + Lambda expressions take input through parameters and are expected to be fully bound. + + + + + Produces a delegate that represents the lambda expression. + + A delegate containing the compiled version of the lambda. + + + + Produces a delegate that represents the lambda expression. + + Debugging information generator used by the compiler to mark sequence points and annotate local variables. + A delegate containing the compiled version of the lambda. + + + + Compiles the lambda into a method definition. + + A which will be used to hold the lambda's IL. + + + + Compiles the lambda into a method definition and custom debug information. + + A which will be used to hold the lambda's IL. + Debugging information generator used by the compiler to mark sequence points and annotate local variables. + + + + Gets the static type of the expression that this represents. (Inherited from .) + + The that represents the static type of the expression. + + + + Returns the node type of this . (Inherited from .) + + The that represents this expression. + + + + Gets the parameters of the lambda expression. + + + + + Gets the name of the lambda expression. + + Used for debugging purposes. + + + + Gets the body of the lambda expression. + + + + + Gets the return type of the lambda expression. + + + + + Gets the value that indicates if the lambda expression will be compiled with + tail call optimization. + + + + + Defines a node. + This captures a block of code that is similar to a .NET method body. + + The type of the delegate. + + Lambda expressions take input through parameters and are expected to be fully bound. + + + + + Produces a delegate that represents the lambda expression. + + A delegate containing the compiled version of the lambda. + + + + Produces a delegate that represents the lambda expression. + + Debugging information generator used by the compiler to mark sequence points and annotate local variables. + A delegate containing the compiled version of the lambda. + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The Body property of the result. + The Parameters property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Dispatches to the specific visit method for this node type. + + + + + Represents a constructor call that has a collection initializer. + + + Use the factory methods to create a ListInitExpression. + The value of the NodeType property of a ListInitExpression is ListInit. + + + + + Dispatches to the specific visit method for this node type. + + + + + Reduces the binary expression node to a simpler expression. + If CanReduce returns true, this should return a valid expression. + This method is allowed to return another node which itself + must be reduced. + + The reduced expression. + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Returns the node type of this . (Inherited from .) + + The that represents this expression. + + + + Gets the static type of the expression that this represents. (Inherited from .) + + The that represents the static type of the expression. + + + + Gets a value that indicates whether the expression tree node can be reduced. + + + + + Gets the expression that contains a call to the constructor of a collection type. + + + + + Gets the element initializers that are used to initialize a collection. + + + + + An expression that provides runtime read/write access to variables. + Needed to implement "eval" in some dynamic languages. + Evaluates to an instance of when executed. + + + + + Dispatches to the specific visit method for this node type. + + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Gets the static type of the expression that this represents. + + The that represents the static type of the expression. + + + + Returns the node type of this Expression. Extension nodes should return + ExpressionType.Extension when overriding this method. + + The of the expression. + + + + The variables or parameters to which to provide runtime access. + + + + + Represents an infinite loop. It can be exited with "break". + + + + + Dispatches to the specific visit method for this node type. + + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + The property of the result. + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Gets the static type of the expression that this represents. + + The that represents the static type of the expression. + + + + Returns the node type of this Expression. Extension nodes should return + ExpressionType.Extension when overriding this method. + + The of the expression. + + + + Gets the that is the body of the loop. + + + + + Gets the that is used by the loop body as a break statement target. + + + + + Gets the that is used by the loop body as a continue statement target. + + + + + Represents assignment to a member of an object. + + + + + Provides the base class from which the classes that represent bindings that are used to initialize members of a newly created object derive. + + + + + Initializes an instance of class. + + The type of member binding. + The field or property to be initialized. + + + + Returns a that represents the current . + + A that represents the current . + + + + Gets the type of binding that is represented. + + + + + Gets the field or property to be initialized. + + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Gets the which represents the object whose member is being assigned to. + + + + + Describes the binding types that are used in MemberInitExpression objects. + + + + + A binding that represents initializing a member with the value of an expression. + + + + + A binding that represents recursively initializing members of a member. + + + + + A binding that represents initializing a member of type or from a list of elements. + + + + + Represents accessing a field or property. + + + + + Dispatches to the specific visit method for this node type. + + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Gets the field or property to be accessed. + + + + + Gets the containing object of the field or property. + + + + + Returns the node type of this . (Inherited from .) + + The that represents this expression. + + + + Represents calling a constructor and initializing one or more members of the new object. + + + + + Dispatches to the specific visit method for this node type. + + + + + Reduces the to a simpler expression. + If CanReduce returns true, this should return a valid expression. + This method is allowed to return another node which itself + must be reduced. + + The reduced expression. + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Gets the static type of the expression that this represents. + + The that represents the static type of the expression. + + + + Gets a value that indicates whether the expression tree node can be reduced. + + + + + Returns the node type of this Expression. Extension nodes should return + ExpressionType.Extension when overriding this method. + + The of the expression. + + + Gets the expression that represents the constructor call. + A that represents the constructor call. + + + Gets the bindings that describe how to initialize the members of the newly created object. + A of objects which describe how to initialize the members. + + + + Represents initializing the elements of a collection member of a newly created object. + + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Gets the element initializers for initializing a collection member of a newly created object. + + + + + Represents initializing members of a member of a newly created object. + + + Use the factory methods to create a . + The value of the property of a object is . + + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Gets the bindings that describe how to initialize the members of a member. + + + + + Represents a call to either static or an instance method. + + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Dispatches to the specific visit method for this node type. + + + + + Returns a new MethodCallExpression replacing the existing instance/args with the + newly provided instance and args. Arguments can be null to use the existing + arguments. + + This helper is provided to allow re-writing of nodes to not depend on the specific optimized + subclass of MethodCallExpression which is being used. + + + + + Returns the node type of this . (Inherited from .) + + The that represents this expression. + + + + Gets the static type of the expression that this represents. (Inherited from .) + + The that represents the static type of the expression. + + + + Gets the for the method to be called. + + + + + Gets the that represents the instance + for instance method calls or null for static method cals. + + + + + Gets a collection of expressions that represent arguments to the method call. + + + + + Represents creating a new array and possibly initializing the elements of the new array. + + + + + Dispatches to the specific visit method for this node type. + + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Gets the static type of the expression that this represents. (Inherited from .) + + The that represents the static type of the expression. + + + + Gets the bounds of the array if the value of the property is NewArrayBounds, or the values to initialize the elements of the new array if the value of the property is NewArrayInit. + + + + + Returns the node type of this . (Inherited from .) + + The that represents this expression. + + + + Returns the node type of this . (Inherited from .) + + The that represents this expression. + + + + Represents a constructor call. + + + + + Dispatches to the specific visit method for this node type. + + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Gets the static type of the expression that this represents. (Inherited from .) + + The that represents the static type of the expression. + + + + Returns the node type of this . (Inherited from .) + + The that represents this expression. + + + + Gets the called constructor. + + + + + Gets the arguments to the constructor. + + + + + Gets the members that can retrieve the values of the fields that were initialized with constructor arguments. + + + + + Represents a named parameter expression. + + + + + Dispatches to the specific visit method for this node type. + + + + + Gets the static type of the expression that this represents. (Inherited from .) + + The that represents the static type of the expression. + + + + Returns the node type of this . (Inherited from .) + + The that represents this expression. + + + + The Name of the parameter or variable. + + + + + Indicates that this ParameterExpression is to be treated as a ByRef parameter. + + + + + Specialized subclass to avoid holding onto the byref flag in a + parameter expression. This version always holds onto the expression + type explicitly and therefore derives from TypedParameterExpression. + + + + + Specialized subclass which holds onto the type of the expression for + uncommon types. + + + + + Generic type to avoid needing explicit storage for primitive data types + which are commonly used. + + + + + Represents one case of a . + + + + + Returns a that represents the current . + + A that represents the current . + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Gets the values of this case. This case is selected for execution when the matches any of these values. + + + + + Gets the body of this case. + + + + + Represents a control expression that handles multiple selections by passing control to a . + + + + + Dispatches to the specific visit method for this node type. + + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + The property of the result. + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Gets the static type of the expression that this represents. + + The that represents the static type of the expression. + + + + Returns the node type of this Expression. Extension nodes should return + ExpressionType.Extension when overriding this method. + + The of the expression. + + + + Gets the test for the switch. + + + + + Gets the collection of objects for the switch. + + + + + Gets the test for the switch. + + + + + Gets the equality comparison method, if any. + + + + + Represents a try/catch/finally/fault block. + + The body is protected by the try block. + The handlers consist of a set of s that can either be catch or filters. + The fault runs if an exception is thrown. + The finally runs regardless of how control exits the body. + Only one of fault or finally can be supplied. + The return type of the try block must match the return type of any associated catch statements. + + + + + Dispatches to the specific visit method for this node type. + + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + The property of the result. + The property of the result. + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Gets the static type of the expression that this represents. (Inherited from .) + + The that represents the static type of the expression. + + + + Returns the node type of this . (Inherited from .) + + The that represents this expression. + + + + Gets the representing the body of the try block. + + + + + Gets the collection of s associated with the try block. + + + + + Gets the representing the finally block. + + + + + Gets the representing the fault block. + + + + + Represents an operation between an expression and a type. + + + + + Dispatches to the specific visit method for this node type. + + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Gets the static type of the expression that this represents. + + The that represents the static type of the expression. + + + + Returns the node type of this Expression. Extension nodes should return + ExpressionType.Extension when overriding this method. + + The of the expression. + + + + Gets the expression operand of a type test operation. + + + + + Gets the type operand of a type test operation. + + + + + Searches for an operator method on the type. The method must have + the specified signature, no generic arguments, and have the + SpecialName bit set. Also searches inherited operator methods. + + NOTE: This was designed to satisfy the needs of op_True and + op_False, because we have to do runtime lookup for those. It may + not work right for unary operators in general. + + + + + We can cache references to types, as long as they aren't in + collectable assemblies. Unfortunately, we can't really distinguish + between different flavors of assemblies. But, we can at least + create a whitelist for types in mscorlib (so we get the primitives) + and System.Core (so we find Func/Action overloads, etc). + + + + + Represents an expression that has a unary operator. + + + + + Dispatches to the specific visit method for this node type. + + + + + Reduces the expression node to a simpler expression. + If CanReduce returns true, this should return a valid expression. + This method is allowed to return another node which itself + must be reduced. + + The reduced expression. + + + + Creates a new expression that is like this one, but using the + supplied children. If all of the children are the same, it will + return this expression. + + The property of the result. + This expression if no children changed, or an expression with the updated children. + + + + Gets the static type of the expression that this represents. (Inherited from .) + + The that represents the static type of the expression. + + + + Returns the node type of this . (Inherited from .) + + The that represents this expression. + + + + Gets the operand of the unary operation. + + An that represents the operand of the unary operation. + + + + Gets the implementing method for the unary operation. + + The that represents the implementing method. + + + + Gets a value that indicates whether the expression tree node represents a lifted call to an operator. + + true if the node represents a lifted call; otherwise, false. + + + + Gets a value that indicates whether the expression tree node represents a lifted call to an operator whose return type is lifted to a nullable type. + + true if the operator's return type is lifted to a nullable type; otherwise, false. + + + + Gets a value that indicates whether the expression tree node can be reduced. + + + + + This API supports the .NET Framework infrastructure and is not intended to be used directly from your code. + Represents the runtime state of a dynamically generated method. + + + + + Represents the non-trivial constants and locally executable expressions that are referenced by a dynamically generated method. + + + + + Represents the hoisted local variables from the parent context. + + + + + Creates an object to hold state of a dynamically generated method. + + The constant values used by the method. + The hoisted local variables from the parent context. + + + + CompilerScope is the data structure which the Compiler keeps information + related to compiling scopes. It stores the following information: + 1. Parent relationship (for resolving variables) + 2. Information about hoisted variables + 3. Information for resolving closures + + Instances are produced by VariableBinder, which does a tree walk + looking for scope nodes: LambdaExpression and BlockExpression. + + + + + parent scope, if any + + + + + The expression node for this scope + Can be LambdaExpression, BlockExpression, or CatchBlock + + + + + True if this node corresponds to an IL method. + Can only be true if the Node is a LambdaExpression. + But inlined lambdas will have it set to false. + + + + + Does this scope (or any inner scope) close over variables from any + parent scope? + Populated by VariableBinder + + + + + Variables defined in this scope, and whether they're hoisted or not + Populated by VariableBinder + + + + + Each variable referenced within this scope, and how often it was referenced + Populated by VariableBinder + + + + + Scopes whose variables were merged into this one + + Created lazily as we create hundreds of compiler scopes w/o merging scopes when compiling rules. + + + + + The scope's hoisted locals, if any. + Provides storage for variables that are referenced from nested lambdas + + + + + The closed over hoisted locals + + + + + Mutable dictionary that maps non-hoisted variables to either local + slots or argument slots + + + + + Called when entering a lambda/block. Performs all variable allocation + needed, including creating hoisted locals and IL locals for accessing + parent locals + + + + + Frees unnamed locals, clears state associated with this compiler + + + + + Adds a new virtual variable corresponding to an IL local + + + + + Resolve a local variable in this scope or a closed over scope + Throws if the variable is defined + + + + + This scope's hoisted locals, or the closed over locals, if any + Equivalent to: _hoistedLocals ?? _closureHoistedLocals + + + + + If the result of a TypeBinaryExpression is known statically, this + returns the result, otherwise it returns null, meaning we'll need + to perform the IsInst instruction at runtime. + + The result of this function must be equivalent to IsInst, or + null. + + + + + If the result of an isinst opcode is known statically, this + returns the result, otherwise it returns null, meaning we'll need + to perform the IsInst instruction at runtime. + + The result of this function must be equivalent to IsInst, or + null. + + + + + Write out the given AST + + + + + Return true if the input string contains any whitespace character. + Otherwise false. + + + + + Stores information about locals and arguments that are hoisted into + the closure array because they're referenced in an inner lambda. + + This class is sometimes emitted as a runtime constant for internal + use to hoist variables/parameters in quoted expressions + + Invariant: this class stores no mutable state + + + + + A simple dictionary of queues, keyed off a particular type + This is useful for storing free lists of variables + + + + + Dynamic Language Runtime Compiler. + This part compiles lambdas. + + + LambdaCompiler is responsible for compiling individual lambda (LambdaExpression). The complete tree may + contain multiple lambdas, the Compiler class is reponsible for compiling the whole tree, individual + lambdas are then compiled by the LambdaCompiler. + + + + + Update the flag with a new EmitAsTailCall flag + + + + + Update the flag with a new EmitExpressionStart flag + + + + + Update the flag with a new EmitAsType flag + + + + + Generates code for this expression in a value position. + This method will leave the value of the expression + on the top of the stack typed as Type. + + + + + Emits an expression and discards the result. For some nodes this emits + more optimial code then EmitExpression/Pop + + + + + Emits arguments to a call, and returns an array of writebacks that + should happen after the call. + + + + + Emits arguments to a call, and returns an array of writebacks that + should happen after the call. For emitting dynamic expressions, we + need to skip the first parameter of the method (the call site). + + + + + Emits code which creates new instance of the delegateType delegate. + + Since the delegate is getting closed over the "Closure" argument, this + cannot be used with virtual/instance methods (inner must be static method) + + + + + Emits a delegate to the method generated for the LambdaExpression. + May end up creating a wrapper to match the requested delegate type. + + Lambda for which to generate a delegate + + + + + Emits the lambda body. If inlined, the parameters should already be + pushed onto the IL stack. + + The parent scope. + true if the lambda is inlined; false otherwise. + + The emum to specify if the lambda is compiled with the tail call optimization. + + + + + returns true if the expression is not empty, otherwise false. + + + + + returns true if the expression is NOT empty and is not debug info, + or a block that contains only insignificant expressions. + + + + + Emits the expression and then either brtrue/brfalse to the label. + + True for brtrue, false for brfalse. + The expression to emit. + The label to conditionally branch to. + + This function optimizes equality and short circuiting logical + operators to avoid double-branching, minimize instruction count, + and generate similar IL to the C# compiler. This is important for + the JIT to optimize patterns like: + x != null AndAlso x.GetType() == typeof(SomeType) + + One optimization we don't do: we always emits at least one + conditional branch to the label, and always possibly falls through, + even if we know if the branch will always succeed or always fail. + We do this to avoid generating unreachable code, which is fine for + the CLR JIT, but doesn't verify with peverify. + + This kind of optimization could be implemented safely, by doing + constant folding over conditionals and logical expressions at the + tree level. + + + + + Gets the common test test value type of the SwitchExpression. + + + + + Creates the label for this case. + Optimization: if the body is just a goto, and we can branch + to it, put the goto target directly in the jump table. + + + + + Emits the start of a catch block. The exception value that is provided by the + CLR is stored in the variable specified by the catch block or popped if no + variable is provided. + + + + + The value is true if a clearance was emitted and no new sequence point + has been emitted since that. + + + + + Creates a lambda compiler that will compile to a dynamic method + + + + + Creates a lambda compiler that will compile into the provided Methodbuilder + + + + + Creates a lambda compiler for an inlined lambda + + + + + Compiler entry point + + LambdaExpression to compile. + Debug info generator. + The compiled delegate. + + + + Mutates the MethodBuilder parameter, filling in IL, parameters, + and return type. + + (probably shouldn't be modifying parameters/return type...) + + + + + Gets the argument slot corresponding to the parameter at the given + index. Assumes that the method takes a certain number of prefix + arguments, followed by the real parameters stored in Parameters + + + + + Returns the index-th argument. This method provides access to the actual arguments + defined on the lambda itself, and excludes the possible 0-th closure argument. + + + + + Creates an unitialized field suitible for private implementation details + Works with DynamicMethods or TypeBuilders. + + + + + Generates debug information for lambdas in an expression tree. + + + + + Creates PDB symbol generator. + + PDB symbol generator. + + + + Marks a sequence point. + + The lambda being generated. + IL offset where to mark the sequence point. + Debug informaton corresponding to the sequence point. + + + + A simple hashset, built on Dictionary{K, V} + + + + + Expression rewriting to spill the CLR stack into temporary variables + in order to guarantee some properties of code generation, for + example that we always enter try block on empty stack. + + + + + Rewrite the expression + + + Expression to rewrite + State of the stack before the expression is emitted. + Rewritten expression. + + + + Will perform: + save: temp = expression + return value: temp + + + + + Creates a special block that is marked as not allowing jumps in. + This should not be used for rewriting BlockExpression itself, or + anything else that supports jumping. + + + + + Creates a special block that is marked as not allowing jumps in. + This should not be used for rewriting BlockExpression itself, or + anything else that supports jumping. + + + + + The source of temporary variables + + + + + Initial stack state. Normally empty, but when inlining the lambda + we might have a non-empty starting stack state. + + + + + Lambda rewrite result. We need this for inlined lambdas to figure + out whether we need to guarentee it an empty stack. + + + + + Analyzes a lambda, producing a new one that has correct invariants + for codegen. In particular, it spills the IL stack to temps in + places where it's invalid to have a non-empty stack (for example, + entering a try statement). + + + + + Will clone an IList into an array of the same size, and copy + all vaues up to (and NOT including) the max index + + The cloned array. + + + + If we are spilling, requires that there are no byref arguments to + the method call. + + Used for: + NewExpression, + MethodCallExpression, + InvocationExpression, + DynamicExpression, + UnaryExpression, + BinaryExpression. + + + We could support this if spilling happened later in the compiler. + Other expressions that can emit calls with arguments (such as + ListInitExpression and IndexExpression) don't allow byref arguments. + + + + + Requires that the instance is not a value type (primitive types are + okay because they're immutable). + + Used for: + MethodCallExpression, + MemberExpression (for properties), + IndexExpression, + ListInitExpression, + MemberInitExpression, + assign to MemberExpression, + assign to IndexExpression. + + + We could support this if spilling happened later in the compiler. + + + + + Current temporary variable + + + + + List of free temporary variables. These can be recycled for new temps. + + + + + Stack of currently active temporary variables. + + + + + List of all temps created by stackspiller for this rule/lambda + + + + + Rewrites child expressions, spilling them into temps if needed. The + stack starts in the inital state, and after the first subexpression + is added it is change to non-empty. This behavior can be overridden + by setting the stack manually between adds. + + When all children have been added, the caller should rewrite the + node if Rewrite is true. Then, it should call Finish with etiher + the orignal expression or the rewritten expression. Finish will call + Expression.Comma if necessary and return a new Result. + + + + + A special subtype of BlockExpression that indicates to the compiler + that this block is a spilled expression and should not allow jumps in. + + + + + Generator of PDB debugging information for expression trees. + + + + + Determines if variables are closed over in nested lambdas and need to + be hoisted. + + + + + Emits a Ldind* instruction for the appropriate type + + + + + Emits a Stind* instruction for the appropriate type. + + + + + Emits a Stelem* instruction for the appropriate type. + + + + + Emits an array of constant values provided in the given list. + The array is strongly typed. + + + + + Emits an array of values of count size. The items are emitted via the callback + which is provided with the current item index to emit. + + + + + Emits an array construction code. + The code assumes that bounds for all dimensions + are already emitted. + + + + + Emits default(T) + Semantics match C# compiler behavior + + + + + Encapsulates a method that takes five parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that takes six parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that takes seven parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that takes eight parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that takes nine parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the ninth parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The ninth parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that takes ten parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the ninth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The ninth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that takes eleven parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the ninth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the eleventh parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The ninth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The eleventh parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that takes twelve parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the ninth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the eleventh parameter of the method that this delegate encapsulates. + The type of the twelfth parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The ninth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The eleventh parameter of the method that this delegate encapsulates. + The twelfth parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that takes thirteen parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the ninth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the eleventh parameter of the method that this delegate encapsulates. + The type of the twelfth parameter of the method that this delegate encapsulates. + The type of the thirteenth parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The ninth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The eleventh parameter of the method that this delegate encapsulates. + The twelfth parameter of the method that this delegate encapsulates. + The thirteenth parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that takes fourteen parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the ninth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the eleventh parameter of the method that this delegate encapsulates. + The type of the twelfth parameter of the method that this delegate encapsulates. + The type of the thirteenth parameter of the method that this delegate encapsulates. + The type of the fourteenth parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The ninth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The eleventh parameter of the method that this delegate encapsulates. + The twelfth parameter of the method that this delegate encapsulates. + The thirteenth parameter of the method that this delegate encapsulates. + The fourteenth parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that takes fifteen parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the ninth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the eleventh parameter of the method that this delegate encapsulates. + The type of the twelfth parameter of the method that this delegate encapsulates. + The type of the thirteenth parameter of the method that this delegate encapsulates. + The type of the fourteenth parameter of the method that this delegate encapsulates. + The type of the fifteenth parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The ninth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The eleventh parameter of the method that this delegate encapsulates. + The twelfth parameter of the method that this delegate encapsulates. + The thirteenth parameter of the method that this delegate encapsulates. + The fourteenth parameter of the method that this delegate encapsulates. + The fifteenth parameter of the method that this delegate encapsulates. + + + + Encapsulates a method that takes sixteen parameters and does not return a value. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the ninth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the eleventh parameter of the method that this delegate encapsulates. + The type of the twelfth parameter of the method that this delegate encapsulates. + The type of the thirteenth parameter of the method that this delegate encapsulates. + The type of the fourteenth parameter of the method that this delegate encapsulates. + The type of the fifteenth parameter of the method that this delegate encapsulates. + The type of the sixteenth parameter of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The ninth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The eleventh parameter of the method that this delegate encapsulates. + The twelfth parameter of the method that this delegate encapsulates. + The thirteenth parameter of the method that this delegate encapsulates. + The fourteenth parameter of the method that this delegate encapsulates. + The fifteenth parameter of the method that this delegate encapsulates. + The sixteenth parameter of the method that this delegate encapsulates. + + + + Provides a dictionary-like object used for caches which holds onto a maximum + number of elements specified at construction time. + + This class is not thread safe. + + + + + Creates a dictionary-like object used for caches. + + The maximum number of elements to store. + + + + Tries to get the value associated with 'key', returning true if it's found and + false if it's not present. + + + + + Adds a new element to the cache, replacing and moving it to the front if the + element is already present. + + + + + Returns the value associated with the given key, or throws KeyNotFoundException + if the key is not present. + + + + + Wraps the provided enumerable into a ReadOnlyCollection{T} + + Copies all of the data into a new array, so the data can't be + changed after creation. The exception is if the enumerable is + already a ReadOnlyCollection{T}, in which case we just return it. + + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + Array is null. + Offset or count are out of range. + + + + Requires the array and all its items to be non-null. + + + + + Strongly-typed and parameterized string factory. + + + + + A string like "Variable '{0}' uses unsupported type '{1}'. Reference types are not supported for variables." + + + + + A string like "Found duplicate parameter '{0}'. Each ParameterExpression in the list must be a unique object." + + + + + A string like "Extension node must override the property {0}." + + + + + A string like "User-defined operator method '{0}' must be static." + + + + + A string like "User-defined operator method '{0}' must not be void." + + + + + A string like "No coercion operator is defined between types '{0}' and '{1}'." + + + + + A string like "The result type '{0}' of the dynamic binding produced by binder '{1}' is not compatible with the result type '{2}' expected by the call site." + + + + + A string like "The result type '{0}' of the dynamic binding produced by the object with type '{1}' for the binder '{2}' is not compatible with the result type '{3}' expected by the call site." + + + + + A string like "The result of the dynamic binding produced by the object with type '{0}' for the binder '{1}' needs at least one restriction." + + + + + A string like "The result type '{0}' of the binder '{1}' is not compatible with the result type '{2}' expected by the call site." + + + + + A string like "The unary operator {0} is not defined for the type '{1}'." + + + + + A string like "The binary operator {0} is not defined for the types '{1}' and '{2}'." + + + + + A string like "Reference equality is not defined for the types '{0}' and '{1}'." + + + + + A string like "The operands for operator '{0}' do not match the parameters of method '{1}'." + + + + + A string like "The return type of overload method for operator '{0}' does not match the parameter type of conversion method '{1}'." + + + + + A string like "The user-defined equality method '{0}' must return a boolean value." + + + + + A string like "Cannot auto initialize elements of value type through property '{0}', use assignment instead" + + + + + A string like "Cannot auto initialize members of value type through property '{0}', use assignment instead" + + + + + A string like "The type used in TypeAs Expression must be of reference or nullable type, {0} is neither" + + + + + A string like "An expression of type '{0}' cannot be used to initialize an array of type '{1}'" + + + + + A string like "Expression of type '{0}' cannot be used for constructor parameter of type '{1}'" + + + + + A string like " Argument type '{0}' does not match the corresponding member type '{1}'" + + + + + A string like " The member '{0}' is not declared on type '{1}' being created" + + + + + A string like "Expression of type '{0}' cannot be used for parameter of type '{1}' of method '{2}'" + + + + + A string like "Expression of type '{0}' cannot be used for parameter of type '{1}'" + + + + + A string like "Expression of type '{0}' cannot be used for return type '{1}'" + + + + + A string like "Expression of type '{0}' cannot be used for assignment to type '{1}'" + + + + + A string like "Expression of type '{0}' cannot be used for label of type '{1}'" + + + + + A string like "Expression of type '{0}' cannot be invoked" + + + + + A string like "Field '{0}' is not defined for type '{1}'" + + + + + A string like "Instance field '{0}' is not defined for type '{1}'" + + + + + A string like "Field '{0}.{1}' is not defined for type '{2}'" + + + + + A string like "Incorrect number of arguments supplied for call to method '{0}'" + + + + + A string like "Member '{0}' not field or property" + + + + + A string like "Method {0} contains generic parameters" + + + + + A string like "Method {0} is a generic method definition" + + + + + A string like "The method '{0}.{1}' is not a property accessor" + + + + + A string like "The property '{0}' has no 'get' accessor" + + + + + A string like "The property '{0}' has no 'set' accessor" + + + + + A string like "The property '{0}' has no 'get' or 'set' accessors" + + + + + A string like "'{0}' is not a member of type '{1}'" + + + + + A string like "The operator '{0}' is not implemented for type '{1}'" + + + + + A string like "ParameterExpression of type '{0}' cannot be used for delegate parameter of type '{1}'" + + + + + A string like "Property '{0}' is not defined for type '{1}'" + + + + + A string like "Instance property '{0}' is not defined for type '{1}'" + + + + + A string like "Instance property '{0}' that takes no argument is not defined for type '{1}'" + + + + + A string like "Instance property '{0}{1}' is not defined for type '{2}'" + + + + + A string like "Method '{0}' declared on type '{1}' cannot be called with instance of type '{2}'" + + + + + A string like "Type {0} contains generic parameters" + + + + + A string like "Type {0} is a generic type definition" + + + + + A string like "Type '{0}' does not have a default constructor" + + + + + A string like "Parameter '{0}' of element initializer method '{1}' must not be a pass by reference parameter" + + + + + A string like "Type '{0}' is not IEnumerable" + + + + + A string like "Type parameter is {0}. Expected a delegate." + + + + + A string like "Cannot cast from type '{0}' to type '{1}" + + + + + A string like "Unhandled binary: {0}" + + + + + A string like "Unhandled Binding Type: {0}" + + + + + A string like "Unhandled convert: {0}" + + + + + A string like "Unhandled Expression Type: {0}" + + + + + A string like "Unhandled unary: {0}" + + + + + A string like "The user-defined operator method '{1}' for operator '{0}' must have identical parameter and return types." + + + + + A string like "The user-defined operator method '{1}' for operator '{0}' must return the same type as its parameter or a derived type." + + + + + A string like "The user-defined operator method '{1}' for operator '{0}' must have associated boolean True and False operators." + + + + + A string like "No method '{0}' exists on type '{1}'." + + + + + A string like "No method '{0}' on type '{1}' is compatible with the supplied arguments." + + + + + A string like "No generic method '{0}' on type '{1}' is compatible with the supplied type arguments and arguments. No type arguments should be provided if the method is non-generic. " + + + + + A string like "More than one method '{0}' on type '{1}' is compatible with the supplied arguments." + + + + + A string like "More than one property '{0}' on type '{1}' is compatible with the supplied arguments." + + + + + A string like "More than one key matching '{0}' was found in the ExpandoObject." + + + + + A string like "An element with the same key '{0}' already exists in the ExpandoObject." + + + + + A string like "The specified key '{0}' does not exist in the ExpandoObject." + + + + + A string like "Invalid operation: '{0}'" + + + + + A string like "{0} must be greater than or equal to {1}" + + + + + A string like "Cannot redefine label '{0}' in an inner block." + + + + + A string like "Cannot jump to undefined label '{0}'." + + + + + A string like "Cannot jump to ambiguous label '{0}'." + + + + + A string like "Cannot jump to non-local label '{0}' with a value. Only jumps to labels defined in outer blocks can pass values." + + + + + A string like "CompileToMethod cannot compile constant '{0}' because it is a non-trivial value, such as a live object. Instead, create an expression tree that can construct this value." + + + + + A string like "Invalid lvalue for assignment: {0}." + + + + + A string like "Invalid member type: {0}." + + + + + A string like "unknown lift type: '{0}'." + + + + + A string like "Cannot create instance of {0} because it contains generic parameters" + + + + + A string like "variable '{0}' of type '{1}' referenced from scope '{2}', but it is not defined" + + + + + A string like "Cannot close over byref parameter '{0}' referenced in lambda '{1}'" + + + + + A string like "Unexpected VarArgs call to method '{0}'" + + + + + A string like "When called from '{0}', rewriting a node of type '{1}' must return a non-null value of the same type. Alternatively, override '{2}' and change it to not visit children of this type." + + + + + A string like "Rewriting child expression from type '{0}' to type '{1}' is not allowed, because it would change the meaning of the operation. If this is intentional, override '{2}' and change it to allow this rewrite." + + + + + A string like "Rewritten expression calls operator method '{0}', but the original node had no operator method. If this is is intentional, override '{1}' and change it to allow this rewrite." + + + + + A string like "The value null is not of type '{0}' and cannot be used in this collection." + + + + + A string like "The value '{0}' is not of type '{1}' and cannot be used in this collection." + + + + + A string 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." + + + + + A string like "TryExpression is not supported as a child expression when accessing a member on type '{0}' because it is a value type. Construct the tree so the TryExpression is not nested inside of this expression." + + + + + A string like "Test value of type '{0}' cannot be used for the comparison method parameter of type '{1}'" + + + + + A string like "Switch value of type '{0}' cannot be used for the comparison method parameter of type '{1}'" + + + + + A string like "An IDynamicMetaObjectProvider {0} created an invalid DynamicMetaObject instance." + + + + + A string like "Method precondition violated" + + + + + A string like "Invalid argument value" + + + + + A string like "Non-empty collection required" + + + + + A string like "Argument count must be greater than number of named arguments." + + + + + A string like "reducible nodes must override Expression.Reduce()" + + + + + A string like "node cannot reduce to itself or null" + + + + + A string like "cannot assign from the reduced node type to the original node type" + + + + + A string like "Setter must have parameters." + + + + + A string like "Property cannot have a managed pointer type." + + + + + A string like "Indexing parameters of getter and setter must match." + + + + + A string like "Accessor method should not have VarArgs." + + + + + A string like "Accessor indexes cannot be passed ByRef." + + + + + A string like "Bounds count cannot be less than 1" + + + + + A string like "type must not be ByRef" + + + + + A string like "Type doesn't have constructor with a given signature" + + + + + A string like "Count must be non-negative." + + + + + A string like "arrayType must be an array type" + + + + + A string like "Setter should have void type." + + + + + A string like "Property type must match the value type of setter" + + + + + A string like "Both accessors must be static." + + + + + A string like "Static field requires null instance, non-static field requires non-null instance." + + + + + A string like "Static property requires null instance, non-static property requires non-null instance." + + + + + A string like "Static method requires null instance, non-static method requires non-null instance." + + + + + A string like "Property cannot have a void type." + + + + + A string like "Can only unbox from an object or interface type to a value type." + + + + + A string like "Expression must be readable" + + + + + A string like "Expression must be writeable" + + + + + A string like "Argument must not have a value type." + + + + + A string like "must be reducible node" + + + + + A string like "All test values must have the same type." + + + + + A string like "All case bodies and the default body must have the same type." + + + + + A string like "Default body must be supplied if case bodies are not System.Void." + + + + + A string like "MethodBuilder does not have a valid TypeBuilder" + + + + + A string like "Type must be derived from System.Delegate" + + + + + A string like "Argument type cannot be void" + + + + + A string like "Label type must be System.Void if an expression is not supplied" + + + + + A string like "Type must be System.Void for this label argument" + + + + + A string like "Quoted expression must be a lambda" + + + + + A string like "Start and End must be well ordered" + + + + + A string like "fault cannot be used with catch or finally clauses" + + + + + A string like "try must have at least one catch, finally, or fault clause" + + + + + A string like "Body of catch must have the same type as body of try." + + + + + A string like "Conversion is not supported for arithmetic types without operator overloading." + + + + + A string like "Argument must be array" + + + + + A string like "Argument must be boolean" + + + + + A string like "Argument must be either a FieldInfo or PropertyInfo" + + + + + A string like "Argument must be either a FieldInfo, PropertyInfo or MethodInfo" + + + + + A string like "Argument must be an instance member" + + + + + A string like "Argument must be of an integer type" + + + + + A string like "Argument for array index must be of type Int32" + + + + + A string like "Argument must be single dimensional array type" + + + + + A string like "Argument types do not match" + + + + + A string like "Coalesce used with type that cannot be null" + + + + + A string like "Incorrect number of indexes" + + + + + A string like "Incorrect number of arguments supplied for lambda invocation" + + + + + A string like "Incorrect number of parameters supplied for lambda declaration" + + + + + A string like "Incorrect number of arguments for constructor" + + + + + A string like " Incorrect number of members for constructor" + + + + + A string like "Incorrect number of arguments for the given members " + + + + + A string like "Lambda type parameter must be derived from System.Delegate" + + + + + A string like "List initializers must contain at least one initializer" + + + + + A string like "Element initializer method must be named 'Add'" + + + + + A string like "Element initializer method must have at least 1 parameter" + + + + + A string like "Element initializer method must be an instance method" + + + + + A string like "Unexpected coalesce operator." + + + + + A string like "Unhandled binding " + + + + + A string like "Unknown binding type" + + + + + A string like "An incorrect number of type args were specified for the declaration of a Func type." + + + + + A string like "An incorrect number of type args were specified for the declaration of an Action type." + + + + + A string like "Argument type cannot be System.Void." + + + + + A string like "No or Invalid rule produced" + + + + + A string like "First argument of delegate must be CallSite" + + + + + A string like "Bind cannot return null." + + + + + A string like "Queue empty." + + + + + A string like "Control cannot leave a finally block." + + + + + A string like "Control cannot leave a filter test." + + + + + A string like "Control cannot enter a try block." + + + + + A string like "Control cannot enter an expression--only statements can be jumped into." + + + + + A string like "Extension should have been reduced." + + + + + A string like "Dynamic expressions are not supported by CompileToMethod. Instead, create an expression tree that uses System.Runtime.CompilerServices.CallSite." + + + + + A string like "Invalid output directory." + + + + + A string like "Invalid assembly name or file extension." + + + + + A string like "Collection is read-only." + + + + + A string like "Rethrow statement is valid only inside a Catch block." + + + + + A string like "Try expression is not allowed inside a filter body." + + + + + A string like "Collection was modified; enumeration operation may not execute." + + + + + A string like "Enumeration has either not started or has already finished." + + + + + A string like "Dynamic operations can only be performed in homogenous AppDomain." + + + + + A string like "DebugInfoGenerator created by CreatePdbGenerator can only be used with LambdaExpression.CompileToMethod." + + + + + Strongly-typed and parameterized exception factory. + + + + + ArgumentException with message like "Argument count must be greater than number of named arguments." + + + + + ArgumentException with message like "reducible nodes must override Expression.Reduce()" + + + + + ArgumentException with message like "node cannot reduce to itself or null" + + + + + ArgumentException with message like "cannot assign from the reduced node type to the original node type" + + + + + ArgumentException with message like "Setter must have parameters." + + + + + ArgumentException with message like "Property cannot have a managed pointer type." + + + + + ArgumentException with message like "Indexing parameters of getter and setter must match." + + + + + ArgumentException with message like "Accessor method should not have VarArgs." + + + + + ArgumentException with message like "Accessor indexes cannot be passed ByRef." + + + + + ArgumentException with message like "Bounds count cannot be less than 1" + + + + + ArgumentException with message like "type must not be ByRef" + + + + + ArgumentException with message like "Type doesn't have constructor with a given signature" + + + + + ArgumentException with message like "Count must be non-negative." + + + + + ArgumentException with message like "arrayType must be an array type" + + + + + ArgumentException with message like "Setter should have void type." + + + + + ArgumentException with message like "Property type must match the value type of setter" + + + + + ArgumentException with message like "Both accessors must be static." + + + + + ArgumentException with message like "Static method requires null instance, non-static method requires non-null instance." + + + + + ArgumentException with message like "Property cannot have a void type." + + + + + ArgumentException with message like "Can only unbox from an object or interface type to a value type." + + + + + ArgumentException with message like "Argument must not have a value type." + + + + + ArgumentException with message like "must be reducible node" + + + + + ArgumentException with message like "Default body must be supplied if case bodies are not System.Void." + + + + + ArgumentException with message like "MethodBuilder does not have a valid TypeBuilder" + + + + + ArgumentException with message like "Type must be derived from System.Delegate" + + + + + ArgumentException with message like "Argument type cannot be void" + + + + + ArgumentException with message like "Label type must be System.Void if an expression is not supplied" + + + + + ArgumentException with message like "Type must be System.Void for this label argument" + + + + + ArgumentException with message like "Quoted expression must be a lambda" + + + + + ArgumentException with message like "Variable '{0}' uses unsupported type '{1}'. Reference types are not supported for variables." + + + + + ArgumentException with message like "Found duplicate parameter '{0}'. Each ParameterExpression in the list must be a unique object." + + + + + ArgumentException with message like "Start and End must be well ordered" + + + + + ArgumentException with message like "fault cannot be used with catch or finally clauses" + + + + + ArgumentException with message like "try must have at least one catch, finally, or fault clause" + + + + + ArgumentException with message like "Body of catch must have the same type as body of try." + + + + + InvalidOperationException with message like "Extension node must override the property {0}." + + + + + ArgumentException with message like "User-defined operator method '{0}' must be static." + + + + + ArgumentException with message like "User-defined operator method '{0}' must not be void." + + + + + InvalidOperationException with message like "No coercion operator is defined between types '{0}' and '{1}'." + + + + + InvalidCastException with message like "The result type '{0}' of the dynamic binding produced by binder '{1}' is not compatible with the result type '{2}' expected by the call site." + + + + + InvalidCastException with message like "The result type '{0}' of the dynamic binding produced by the object with type '{1}' for the binder '{2}' is not compatible with the result type '{3}' expected by the call site." + + + + + InvalidOperationException with message like "The result of the dynamic binding produced by the object with type '{0}' for the binder '{1}' needs at least one restriction." + + + + + InvalidOperationException with message like "The result type '{0}' of the binder '{1}' is not compatible with the result type '{2}' expected by the call site." + + + + + InvalidOperationException with message like "The unary operator {0} is not defined for the type '{1}'." + + + + + InvalidOperationException with message like "The binary operator {0} is not defined for the types '{1}' and '{2}'." + + + + + InvalidOperationException with message like "Reference equality is not defined for the types '{0}' and '{1}'." + + + + + InvalidOperationException with message like "The operands for operator '{0}' do not match the parameters of method '{1}'." + + + + + InvalidOperationException with message like "The return type of overload method for operator '{0}' does not match the parameter type of conversion method '{1}'." + + + + + InvalidOperationException with message like "Conversion is not supported for arithmetic types without operator overloading." + + + + + ArgumentException with message like "Argument must be array" + + + + + ArgumentException with message like "Argument must be boolean" + + + + + ArgumentException with message like "The user-defined equality method '{0}' must return a boolean value." + + + + + ArgumentException with message like "Argument must be either a FieldInfo or PropertyInfo" + + + + + ArgumentException with message like "Argument must be either a FieldInfo, PropertyInfo or MethodInfo" + + + + + ArgumentException with message like "Argument must be an instance member" + + + + + ArgumentException with message like "Argument must be of an integer type" + + + + + ArgumentException with message like "Argument for array index must be of type Int32" + + + + + ArgumentException with message like "Argument must be single dimensional array type" + + + + + ArgumentException with message like "Argument types do not match" + + + + + InvalidOperationException with message like "Cannot auto initialize elements of value type through property '{0}', use assignment instead" + + + + + InvalidOperationException with message like "Cannot auto initialize members of value type through property '{0}', use assignment instead" + + + + + ArgumentException with message like "The type used in TypeAs Expression must be of reference or nullable type, {0} is neither" + + + + + InvalidOperationException with message like "Coalesce used with type that cannot be null" + + + + + InvalidOperationException with message like "An expression of type '{0}' cannot be used to initialize an array of type '{1}'" + + + + + ArgumentException with message like "Expression of type '{0}' cannot be used for constructor parameter of type '{1}'" + + + + + ArgumentException with message like " Argument type '{0}' does not match the corresponding member type '{1}'" + + + + + ArgumentException with message like " The member '{0}' is not declared on type '{1}' being created" + + + + + ArgumentException with message like "Expression of type '{0}' cannot be used for parameter of type '{1}' of method '{2}'" + + + + + ArgumentException with message like "Expression of type '{0}' cannot be used for parameter of type '{1}'" + + + + + ArgumentException with message like "Expression of type '{0}' cannot be used for return type '{1}'" + + + + + ArgumentException with message like "Expression of type '{0}' cannot be used for assignment to type '{1}'" + + + + + ArgumentException with message like "Expression of type '{0}' cannot be used for label of type '{1}'" + + + + + ArgumentException with message like "Expression of type '{0}' cannot be invoked" + + + + + ArgumentException with message like "Field '{0}' is not defined for type '{1}'" + + + + + ArgumentException with message like "Instance field '{0}' is not defined for type '{1}'" + + + + + ArgumentException with message like "Field '{0}.{1}' is not defined for type '{2}'" + + + + + ArgumentException with message like "Incorrect number of indexes" + + + + + InvalidOperationException with message like "Incorrect number of arguments supplied for lambda invocation" + + + + + ArgumentException with message like "Incorrect number of parameters supplied for lambda declaration" + + + + + ArgumentException with message like "Incorrect number of arguments supplied for call to method '{0}'" + + + + + ArgumentException with message like "Incorrect number of arguments for constructor" + + + + + ArgumentException with message like " Incorrect number of members for constructor" + + + + + ArgumentException with message like "Incorrect number of arguments for the given members " + + + + + ArgumentException with message like "Lambda type parameter must be derived from System.Delegate" + + + + + ArgumentException with message like "Member '{0}' not field or property" + + + + + ArgumentException with message like "Method {0} contains generic parameters" + + + + + ArgumentException with message like "Method {0} is a generic method definition" + + + + + ArgumentException with message like "The method '{0}.{1}' is not a property accessor" + + + + + ArgumentException with message like "The property '{0}' has no 'get' accessor" + + + + + ArgumentException with message like "The property '{0}' has no 'set' accessor" + + + + + ArgumentException with message like "The property '{0}' has no 'get' or 'set' accessors" + + + + + ArgumentException with message like "'{0}' is not a member of type '{1}'" + + + + + NotImplementedException with message like "The operator '{0}' is not implemented for type '{1}'" + + + + + ArgumentException with message like "ParameterExpression of type '{0}' cannot be used for delegate parameter of type '{1}'" + + + + + ArgumentException with message like "Property '{0}' is not defined for type '{1}'" + + + + + ArgumentException with message like "Instance property '{0}' is not defined for type '{1}'" + + + + + ArgumentException with message like "Instance property '{0}' that takes no argument is not defined for type '{1}'" + + + + + ArgumentException with message like "Instance property '{0}{1}' is not defined for type '{2}'" + + + + + ArgumentException with message like "Method '{0}' declared on type '{1}' cannot be called with instance of type '{2}'" + + + + + ArgumentException with message like "Type {0} contains generic parameters" + + + + + ArgumentException with message like "Type {0} is a generic type definition" + + + + + ArgumentException with message like "Type '{0}' does not have a default constructor" + + + + + ArgumentException with message like "List initializers must contain at least one initializer" + + + + + ArgumentException with message like "Element initializer method must be named 'Add'" + + + + + ArgumentException with message like "Parameter '{0}' of element initializer method '{1}' must not be a pass by reference parameter" + + + + + ArgumentException with message like "Element initializer method must have at least 1 parameter" + + + + + ArgumentException with message like "Element initializer method must be an instance method" + + + + + ArgumentException with message like "Type '{0}' is not IEnumerable" + + + + + InvalidOperationException with message like "Type parameter is {0}. Expected a delegate." + + + + + InvalidOperationException with message like "Unexpected coalesce operator." + + + + + InvalidOperationException with message like "Cannot cast from type '{0}' to type '{1}" + + + + + ArgumentException with message like "Unhandled binary: {0}" + + + + + ArgumentException with message like "Unhandled binding " + + + + + ArgumentException with message like "Unhandled Binding Type: {0}" + + + + + ArgumentException with message like "Unhandled convert: {0}" + + + + + ArgumentException with message like "Unhandled Expression Type: {0}" + + + + + ArgumentException with message like "Unhandled unary: {0}" + + + + + ArgumentException with message like "Unknown binding type" + + + + + ArgumentException with message like "The user-defined operator method '{1}' for operator '{0}' must have identical parameter and return types." + + + + + ArgumentException with message like "The user-defined operator method '{1}' for operator '{0}' must return the same type as its parameter or a derived type." + + + + + ArgumentException with message like "The user-defined operator method '{1}' for operator '{0}' must have associated boolean True and False operators." + + + + + InvalidOperationException with message like "No method '{0}' exists on type '{1}'." + + + + + InvalidOperationException with message like "No method '{0}' on type '{1}' is compatible with the supplied arguments." + + + + + InvalidOperationException with message like "No generic method '{0}' on type '{1}' is compatible with the supplied type arguments and arguments. No type arguments should be provided if the method is non-generic. " + + + + + InvalidOperationException with message like "More than one method '{0}' on type '{1}' is compatible with the supplied arguments." + + + + + InvalidOperationException with message like "More than one property '{0}' on type '{1}' is compatible with the supplied arguments." + + + + + ArgumentException with message like "An incorrect number of type args were specified for the declaration of a Func type." + + + + + ArgumentException with message like "An incorrect number of type args were specified for the declaration of an Action type." + + + + + ArgumentException with message like "Argument type cannot be System.Void." + + + + + System.Reflection.AmbiguousMatchException with message like "More than one key matching '{0}' was found in the ExpandoObject." + + + + + ArgumentException with message like "An element with the same key '{0}' already exists in the ExpandoObject." + + + + + System.Collections.Generic.KeyNotFoundException with message like "The specified key '{0}' does not exist in the ExpandoObject." + + + + + InvalidOperationException with message like "No or Invalid rule produced" + + + + + ArgumentException with message like "First argument of delegate must be CallSite" + + + + + InvalidOperationException with message like "Bind cannot return null." + + + + + ArgumentException with message like "Invalid operation: '{0}'" + + + + + ArgumentOutOfRangeException with message like "{0} must be greater than or equal to {1}" + + + + + InvalidOperationException with message like "Queue empty." + + + + + InvalidOperationException with message like "Cannot redefine label '{0}' in an inner block." + + + + + InvalidOperationException with message like "Cannot jump to undefined label '{0}'." + + + + + InvalidOperationException with message like "Control cannot leave a finally block." + + + + + InvalidOperationException with message like "Control cannot leave a filter test." + + + + + InvalidOperationException with message like "Cannot jump to ambiguous label '{0}'." + + + + + InvalidOperationException with message like "Control cannot enter a try block." + + + + + InvalidOperationException with message like "Control cannot enter an expression--only statements can be jumped into." + + + + + InvalidOperationException with message like "Cannot jump to non-local label '{0}' with a value. Only jumps to labels defined in outer blocks can pass values." + + + + + InvalidOperationException with message like "Extension should have been reduced." + + + + + InvalidOperationException with message like "CompileToMethod cannot compile constant '{0}' because it is a non-trivial value, such as a live object. Instead, create an expression tree that can construct this value." + + + + + NotSupportedException with message like "Dynamic expressions are not supported by CompileToMethod. Instead, create an expression tree that uses System.Runtime.CompilerServices.CallSite." + + + + + InvalidOperationException with message like "Invalid lvalue for assignment: {0}." + + + + + InvalidOperationException with message like "Invalid member type: {0}." + + + + + InvalidOperationException with message like "unknown lift type: '{0}'." + + + + + ArgumentException with message like "Invalid output directory." + + + + + ArgumentException with message like "Invalid assembly name or file extension." + + + + + NotSupportedException with message like "Collection is read-only." + + + + + ArgumentException with message like "Cannot create instance of {0} because it contains generic parameters" + + + + + InvalidOperationException with message like "variable '{0}' of type '{1}' referenced from scope '{2}', but it is not defined" + + + + + InvalidOperationException with message like "Cannot close over byref parameter '{0}' referenced in lambda '{1}'" + + + + + InvalidOperationException with message like "Unexpected VarArgs call to method '{0}'" + + + + + InvalidOperationException with message like "Rethrow statement is valid only inside a Catch block." + + + + + InvalidOperationException with message like "Try expression is not allowed inside a filter body." + + + + + InvalidOperationException with message like "When called from '{0}', rewriting a node of type '{1}' must return a non-null value of the same type. Alternatively, override '{2}' and change it to not visit children of this type." + + + + + InvalidOperationException with message like "Rewriting child expression from type '{0}' to type '{1}' is not allowed, because it would change the meaning of the operation. If this is intentional, override '{2}' and change it to allow this rewrite." + + + + + InvalidOperationException with message like "Rewritten expression calls operator method '{0}', but the original node had no operator method. If this is is intentional, override '{1}' and change it to allow this rewrite." + + + + + 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." + + + + + NotSupportedException with message like "TryExpression is not supported as a child expression when accessing a member on type '{0}' because it is a value type. Construct the tree so the TryExpression is not nested inside of this expression." + + + + + InvalidOperationException with message like "Collection was modified; enumeration operation may not execute." + + + + + InvalidOperationException with message like "Enumeration has either not started or has already finished." + + + + + InvalidOperationException with message like "Dynamic operations can only be performed in homogenous AppDomain." + + + + + ArgumentException with message like "Test value of type '{0}' cannot be used for the comparison method parameter of type '{1}'" + + + + + ArgumentException with message like "Switch value of type '{0}' cannot be used for the comparison method parameter of type '{1}'" + + + + + InvalidOperationException with message like "An IDynamicMetaObjectProvider {0} created an invalid DynamicMetaObject instance." + + + + + NotSupportedException with message like "DebugInfoGenerator created by CreatePdbGenerator can only be used with LambdaExpression.CompileToMethod." + + + + + Encapsulates a method that has five parameters and returns a value of the type specified by the TResult parameter. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the return value of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The return value of the method that this delegate encapsulates. + + + + Encapsulates a method that has six parameters and returns a value of the type specified by the TResult parameter. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the return value of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The return value of the method that this delegate encapsulates. + + + + Encapsulates a method that has seven parameters and returns a value of the type specified by the TResult parameter. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the return value of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The return value of the method that this delegate encapsulates. + + + + Encapsulates a method that has eight parameters and returns a value of the type specified by the TResult parameter. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the return value of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The return value of the method that this delegate encapsulates. + + + + Encapsulates a method that has nine parameters and returns a value of the type specified by the TResult parameter. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the ninth parameter of the method that this delegate encapsulates. + The type of the return value of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The ninth parameter of the method that this delegate encapsulates. + The return value of the method that this delegate encapsulates. + + + + Encapsulates a method that has ten parameters and returns a value of the type specified by the TResult parameter. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the ninth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the return value of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The ninth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The return value of the method that this delegate encapsulates. + + + + Encapsulates a method that has eleven parameters and returns a value of the type specified by the TResult parameter. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the ninth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the eleventh parameter of the method that this delegate encapsulates. + The type of the return value of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The ninth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The eleventh parameter of the method that this delegate encapsulates. + The return value of the method that this delegate encapsulates. + + + + Encapsulates a method that has twelve parameters and returns a value of the type specified by the TResult parameter. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the ninth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the eleventh parameter of the method that this delegate encapsulates. + The type of the twelfth parameter of the method that this delegate encapsulates. + The type of the return value of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The ninth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The eleventh parameter of the method that this delegate encapsulates. + The twelfth parameter of the method that this delegate encapsulates. + The return value of the method that this delegate encapsulates. + + + + Encapsulates a method that has thirteen parameters and returns a value of the type specified by the TResult parameter. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the ninth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the eleventh parameter of the method that this delegate encapsulates. + The type of the twelfth parameter of the method that this delegate encapsulates. + The type of the thirteenth parameter of the method that this delegate encapsulates. + The type of the return value of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The ninth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The eleventh parameter of the method that this delegate encapsulates. + The twelfth parameter of the method that this delegate encapsulates. + The thirteenth parameter of the method that this delegate encapsulates. + The return value of the method that this delegate encapsulates. + + + + Encapsulates a method that has fourteen parameters and returns a value of the type specified by the TResult parameter. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the ninth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the eleventh parameter of the method that this delegate encapsulates. + The type of the twelfth parameter of the method that this delegate encapsulates. + The type of the thirteenth parameter of the method that this delegate encapsulates. + The type of the fourteenth parameter of the method that this delegate encapsulates. + The type of the return value of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The ninth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The eleventh parameter of the method that this delegate encapsulates. + The twelfth parameter of the method that this delegate encapsulates. + The thirteenth parameter of the method that this delegate encapsulates. + The fourteenth parameter of the method that this delegate encapsulates. + The return value of the method that this delegate encapsulates. + + + + Encapsulates a method that has fifteen parameters and returns a value of the type specified by the TResult parameter. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the ninth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the eleventh parameter of the method that this delegate encapsulates. + The type of the twelfth parameter of the method that this delegate encapsulates. + The type of the thirteenth parameter of the method that this delegate encapsulates. + The type of the fourteenth parameter of the method that this delegate encapsulates. + The type of the fifteenth parameter of the method that this delegate encapsulates. + The type of the return value of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The ninth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The eleventh parameter of the method that this delegate encapsulates. + The twelfth parameter of the method that this delegate encapsulates. + The thirteenth parameter of the method that this delegate encapsulates. + The fourteenth parameter of the method that this delegate encapsulates. + The fifteenth parameter of the method that this delegate encapsulates. + The return value of the method that this delegate encapsulates. + + + + Encapsulates a method that has sixteen parameters and returns a value of the type specified by the TResult parameter. + + The type of the first parameter of the method that this delegate encapsulates. + The type of the second parameter of the method that this delegate encapsulates. + The type of the third parameter of the method that this delegate encapsulates. + The type of the fourth parameter of the method that this delegate encapsulates. + The type of the fifth parameter of the method that this delegate encapsulates. + The type of the sixth parameter of the method that this delegate encapsulates. + The type of the seventh parameter of the method that this delegate encapsulates. + The type of the eighth parameter of the method that this delegate encapsulates. + The type of the ninth parameter of the method that this delegate encapsulates. + The type of the tenth parameter of the method that this delegate encapsulates. + The type of the eleventh parameter of the method that this delegate encapsulates. + The type of the twelfth parameter of the method that this delegate encapsulates. + The type of the thirteenth parameter of the method that this delegate encapsulates. + The type of the fourteenth parameter of the method that this delegate encapsulates. + The type of the fifteenth parameter of the method that this delegate encapsulates. + The type of the sixteenth parameter of the method that this delegate encapsulates. + The type of the return value of the method that this delegate encapsulates. + The first parameter of the method that this delegate encapsulates. + The second parameter of the method that this delegate encapsulates. + The third parameter of the method that this delegate encapsulates. + The fourth parameter of the method that this delegate encapsulates. + The fifth parameter of the method that this delegate encapsulates. + The sixth parameter of the method that this delegate encapsulates. + The seventh parameter of the method that this delegate encapsulates. + The eighth parameter of the method that this delegate encapsulates. + The ninth parameter of the method that this delegate encapsulates. + The tenth parameter of the method that this delegate encapsulates. + The eleventh parameter of the method that this delegate encapsulates. + The twelfth parameter of the method that this delegate encapsulates. + The thirteenth parameter of the method that this delegate encapsulates. + The fourteenth parameter of the method that this delegate encapsulates. + The fifteenth parameter of the method that this delegate encapsulates. + The sixteenth parameter of the method that this delegate encapsulates. + The return value of the method that this delegate encapsulates. + + + + The builder for read only collection. + + The type of the collection element. + + + + Constructs a ReadOnlyCollectionBuilder. + + + + + Constructs a ReadOnlyCollectionBuilder with a given initial capacity. + The contents are empty but builder will have reserved room for the given + number of elements before any reallocations are required. + + + + + Constructs a ReadOnlyCollectionBuilder, copying contents of the given collection. + + + + + + Returns the index of the first occurrence of a given value in the builder. + + An item to search for. + The index of the first occurrence of an item. + + + + Inserts an item to the at the specified index. + + The zero-based index at which item should be inserted. + The object to insert into the . + + + + Removes the item at the specified index. + + The zero-based index of the item to remove. + + + + Adds an item to the . + + The object to add to the . + + + + Removes all items from the . + + + + + Determines whether the contains a specific value + + the object to locate in the . + true if item is found in the ; otherwise, false. + + + + Copies the elements of the to an , + starting at particular index. + + The one-dimensional that is the destination of the elements copied from . + The zero-based index in array at which copying begins. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + true if item was successfully removed from the ; + otherwise, false. This method also returns false if item is not found in the original . + + + + + Returns an enumerator that iterates through the collection. + + A that can be used to iterate through the collection. + + + + Reverses the order of the elements in the entire . + + + + + Reverses the order of the elements in the specified range. + + The zero-based starting index of the range to reverse. + The number of elements in the range to reverse. + + + + Copies the elements of the to a new array. + + An array containing copies of the elements of the . + + + + Creates a containing all of the the elements of the , + avoiding copying the elements to the new array if possible. Resets the after the + has been created. + + A new instance of . + + + + Gets and sets the capacity of this ReadOnlyCollectionBuilder + + + + + Returns number of elements in the ReadOnlyCollectionBuilder. + + + + + Gets or sets the element at the specified index. + + The zero-based index of the element to get or set. + The element at the specified index. + + + + Creates instnace of TrueReadOnlyCollection, wrapping passed in array. + !!! DOES NOT COPY THE ARRAY !!! + + + + + Creates a closed delegate for the given (dynamic)method. + + + + + Returns true if the method's parameter types are reference assignable from + the argument types, otherwise false. + + An example that can make the method return false is that + typeof(double).GetMethod("op_Equality", ..., new[] { typeof(double), typeof(int) }) + returns a method with two double parameters, which doesn't match the provided + argument types. + + + + + diff --git a/packages/IronPython.2.7.4/lib/Net35/Microsoft.Scripting.Metadata.dll b/packages/IronPython.2.7.4/lib/Net35/Microsoft.Scripting.Metadata.dll new file mode 100644 index 0000000000..90cfedcb24 Binary files /dev/null and b/packages/IronPython.2.7.4/lib/Net35/Microsoft.Scripting.Metadata.dll differ diff --git a/packages/IronPython.2.7.4/lib/Net35/Microsoft.Scripting.Metadata.xml b/packages/IronPython.2.7.4/lib/Net35/Microsoft.Scripting.Metadata.xml new file mode 100644 index 0000000000..e0fa925945 --- /dev/null +++ b/packages/IronPython.2.7.4/lib/Net35/Microsoft.Scripting.Metadata.xml @@ -0,0 +1,383 @@ + + + + Microsoft.Scripting.Metadata + + + + + Represents a block in memory. + + + + + Represents a memory mapped file. Can only be used by trusted code. + + + + + Creates an empty mapping for given file. Only first 2GB the file are mapped if the file is greater. + + + + + Reads data from a memory block. Maintains a position. + + + + + Reads zero terminated sequence of bytes of given maximal length and converts it into an ASCII string. + + + + + Zero terminated, UTF8 encoded sequence of bytes representing a name in metadata (a type name, a member name, etc). + The name is bound to the module it was retrieved from. The module is kept alive until all its metadata names are collected. + Doesn't cache hashcode, byte or character count. + + + + + Gets the module whose metadata tables this instance represents. + Null if the tables reflect unloaded module file. + + + + + Gets the path of the module whose metadata tables this instance represents. + Null for in-memory modules that are not backed by a file. + + The path is not accessible in partial trust. + + + + Returns AssemblyDef for manifest modules, null token otherwise. + + + + + Token is null or represents a row in a metadata table. + + + + + Gets the number of records in the view. + If the view is over an entire table this operation is O(1), + otherwise it might take up to O(log(#records in the table)). + + + + + Module table entry (0x00 tokens). + + + + + TypeRef table entry (0x01 tokens). + + + + + AssemblyRef: + If the target type is defined in a different Assembly from the current module. + TypeRef: + Target type is nested in TypeRef. + ModuleRef: + Target type is defined in another module within the same Assembly as this one. + ModuleDef: + If the target type is defined in the current module (this should not occur in a CLI "compressed metadata" module). + Null token: + There shall be a row in the ExportedType table for this Type - its Implementation field shall contain + a File token or an AssemblyRef token that says where the type is defined. + + + + + TypeDef table entry (0x02 tokens). + + + + + Finds a nesting type-def. The search time is logarithmic in the number of nested types defined in the owning module. + Returns a null token if this is not a nested type-def. + + + + + O(log(#generic parameters in module)) + + + + + Flags field in TypeDef table. + + + + + This typedef represents a container of global functions and fields (manufactured <Module> type). + + + + + Combines Field (0x04 tokens), FieldRVA (0x1d tokens) and Constant (0x0B) table entries. + + + + + O(log(#fields, parameters and properties with default value)). + Returns if the field doesn't have a default value. + + + + + Returns null reference iff the field has no RVA. + If size is 0 the memory block will span over the rest of the data section. + O(log(#fields with RVAs)). + + + + + Finds type-def that declares this field. The search time is logarithmic in the number of types defined in the owning module. + + + + + Flags field in the Field table. + + + + + MethodDef table entry (0x06 tokens). + + + + + Returns a null reference iff the method has no body. + If size is 0 the memory block will span over the rest of the data section. + + + + + Finds type-def that declares this method. The search time is logarithmic in the number of types defined in the owning module. + + + + + O(log(#generic parameters in module)) + + + + + ImplFlags field in the MethodDef table. + + + + + Flags field in the MethodDef table. + + + + + Param table entry (0x08 tokens). + + + + + O(log(#fields, parameters and properties with default value)). + Returns if the field doesn't have a default value. + + + + + Binary searches MethodDef table for a method that declares this parameter. + + + + + Value greater or equal to zero and less than or equal to the number of parameters in owner method. + A value of 0 refers to the owner method's return type; its parameters are then numbered from 1 onwards. + Not all parameters need to have a corresponding ParamDef entry. + + + + + InterfaceImpl table entry (0x09 tokens). + TODO: we might not need this - TypeDef.ImplementedInterfaces might be a special enumerator that directly returns InterfaceType tokens. + + + + + Could be a null token in EnC scenarios. + + + + + TypeDef, TypeRef, or TypeSpec. + + + + + MemberRef table entry (0x0A tokens). + Stores MethodRefs and FieldRefs. + + + + + TypeRef or TypeDef: + If the class that defines the member is defined in another module. + Note that it is unusual, but valid, to use a TypeRef token when the member is defined in this same module, + in which case, its TypeDef token can be used instead. + ModuleRef: + If the member is defined, in another module of the same assembly, as a global function or variable. + MethodDef: + When used to supply a call-site signature for a vararg method that is defined in this module. + The Name shall match the Name in the corresponding MethodDef row. + The Signature shall match the Signature in the target method definition + TypeSpec: + If the member is a member of a generic type + + + + + CustomAttribute table entry (0x0C tokens). + + + + + Any token except the CustomAttribute. + + + + + Returns the value of Type column in the CustomAttribute table. + MethodDef or MemberRef. + + + + + Value blob. + + + + + StandAloneSig table entry (0x11 token). + + + + + Combines information from PropertyMap (0x15), MethodSemantics (0x18) and Property (0x17) tables. + + + + + O(log(#fields, parameters and properties with default value)). + Returns if the field doesn't have a default value. + + + + + Finds type-def that declares this property. The search time is logarithmic in the number of types with properties defined in the owning module. + + + + + Combines information from EventMap (0x15), MethodSemantics (0x18) and Event (0x17) tables. + + + + + Finds type-def that declares this event. The search time is logarithmic in the number of types with events defined in the owning module. + + + + + ModuleRef table entry (0x1A tokens). + + + + + TypeSpec table entry (0x1B tokens). + + + + + Assembly table entry (0x20 tokens). + + + + + Assembly table entry (0x23 tokens). + + + + + File table entry (0x26 tokens). + + + + + ExportedType table entry (0x27 tokens). + + + + + Forwarded type: AssemblyRef + Nested types: ExportedType + Type in another module of this assembly: FileDef + + + + + ManifestResource table entry (0x28 tokens). + + + + + NestedClass table entry (0x29 tokens). + TODO: Don't need if we exposed nested types enumeration on type-def directly and build TypeNesting mapping lazily. + + + + + GenericParam table entry (0x2A tokens). + + + + + Value greater or equal to zero and less than or equal to the number of parameters in owner method/type. + All generic parameters are listed in the table. + + + + + TypeDef or MethodDef. + + + + + GenericParamConstraint table entry (0x2C tokens). + + + + + TypeDef, TypeRef, or TypeSpec. + + + + + MethodSpec table entry (0x2B tokens). + Used when decoding IL instructions. + + + + + MethodDef or MethodRef. + + + + + We need to be able to construct tokens out of byte-code. + + + + diff --git a/packages/IronPython.2.7.4/lib/Net35/Microsoft.Scripting.dll b/packages/IronPython.2.7.4/lib/Net35/Microsoft.Scripting.dll new file mode 100644 index 0000000000..eab1253f14 Binary files /dev/null and b/packages/IronPython.2.7.4/lib/Net35/Microsoft.Scripting.dll differ diff --git a/packages/IronPython.2.7.4/lib/Net35/Microsoft.Scripting.xml b/packages/IronPython.2.7.4/lib/Net35/Microsoft.Scripting.xml new file mode 100644 index 0000000000..c094a6cdca --- /dev/null +++ b/packages/IronPython.2.7.4/lib/Net35/Microsoft.Scripting.xml @@ -0,0 +1,3812 @@ + + + + Microsoft.Scripting + + + + + Provides documentation against live objects for use in a REPL window. + + + + + Gets the available members defined on the provided object. + + + + + Gets the overloads available for the provided object if it is invokable. + + + + + Gets the available members on the provided remote object. + + + + + Gets the overloads available for the provided remote object if it is invokable. + + + + + Provides documentation about a member in a live object. + + + + + The name of the member + + + + + The kind of the member if it's known. + + + + + Specifies the type of member. + + + + + Provides documentation for a single overload of an invokable object. + + + + + The name of the invokable object. + + + + + The documentation for the overload or null if no documentation is available. + + + + + The parameters for the invokable object. + + + + + Information about the return value. + + + + + Provides documentation for a single parameter. + + + + + The name of the parameter + + + + + The type name of the parameter or null if no type information is available. + + + + + Provides addition information about the parameter such as if it's a parameter array. + + + + + Gets the documentation string for this parameter or null if no documentation is available. + + + + + Indications extra information about a parameter such as if it's a parameter array. + + + + + This structure represents an immutable integer interval that describes a range of values, from Start to End. + + It is closed on the left and open on the right: [Start .. End). + + + + + Wraps a an IDictionary[object, object] and exposes it as an IDynamicMetaObjectProvider so that + users can access string attributes using member accesses. + + + + + Provides language specific documentation for live objects. + + + + + Helper for storing information about stack frames. + + + + + Exposes a IDictionary[string, object] as a dynamic object. Gets/sets/deletes turn + into accesses on the underlying dictionary. + + + + + Class that represents compiler options. + Note that this class is likely to change when hosting API becomes part of .Net + + + + + This overload will be called when a SourceUnit is not available. This can happen if the code is being executed remotely, + since SourceUnit cannot be marshaled across AppDomains. + + + + + Hosting API counterpart for . + + + + + Executes code in a default scope. + + + + + Execute code within a given scope and returns the result. + + + + + Executes code in in a default scope and converts to a given type. + + + + + Execute code within a given scope and converts result to a given type. + + + + + Executes the code in an empty scope. + Returns an ObjectHandle wrapping the resulting value of running the code. + + + + + Executes the code in the specified scope. + Returns an ObjectHandle wrapping the resulting value of running the code. + + + + + Executes the code in an empty scope. + Returns an ObjectHandle wrapping the resulting value of running the code. + + If an exception is thrown the exception is caught and an ObjectHandle to + the exception is provided. + + + Use this API to handle non-serializable exceptions (exceptions might not be serializable due to security restrictions) + or if an exception serialization loses information. + + + + + Executes the expression in the specified scope and return a result. + Returns an ObjectHandle wrapping the resulting value of running the code. + + If an exception is thrown the exception is caught and an ObjectHandle to + the exception is provided. + + + Use this API to handle non-serializable exceptions (exceptions might not be serializable due to security restrictions) + or if an exception serialization loses information. + + + + + Engine that compiled this code. + + + + + Default scope for this code. + + + + + The host can use this class to track for errors reported during script parsing and compilation. + Hosting API counterpart for . + + + + + Bridges ErrorSink and ErrorListener. + Errors reported by language compilers to ErrorSink are forwarded to the ErrorListener provided by the host. + + + This proxy is created in the scenario when the compiler is processing a single SourceUnit. + Therefore it could maintain one to one mapping from SourceUnit to ScriptSource. + In a case, which shouldn't happen, that the compiler reports an error in a different SourceUnit we just create + a new instance of the ScriptSource each time. + + TODO: Consider compilation of multiple source units and creating a hashtable mapping SourceUnits to ScriptSources + within the context of compilation unit. + + + + + Bridges ErrorListener and ErrorSink. It provides the reverse functionality as ErrorSinkProxyListener + + + + + Stores information needed to setup a language + + + + + Creates a new LanguageSetup + + assembly qualified type name of the language + provider + + + + Creates a new LanguageSetup with the provided options + TODO: remove this overload? + + + + + Creates a new LanguageSetup with the provided options + + + + + Gets an option as a strongly typed value. + + + + + The assembly qualified type name of the language provider + + + + + Display name of the language. If empty, it will be set to the first + name in the Names list. + + + + + Case-insensitive language names. + + + + + Case-insensitive file extension, optionally starts with a dot. + + + + + Option names are case-sensitive. + + + + + ObjectOperations provide a large catalogue of object operations such as member access, conversions, + indexing, and things like addition. There are several introspection and tool support services available + for more advanced hosts. + + You get ObjectOperation instances from ScriptEngine, and they are bound to their engines for the semantics + of the operations. There is a default instance of ObjectOperations you can share across all uses of the + engine. However, very advanced hosts can create new instances. + + + + + Returns true if the object can be called, false if it cannot. + + Even if an object is callable Call may still fail if an incorrect number of arguments or type of arguments are provided. + + + + + Invokes the provided object with the given parameters and returns the result. + + The prefered way of calling objects is to convert the object to a strongly typed delegate + using the ConvertTo methods and then invoking that delegate. + + + + + Invokes a member on the provided object with the given parameters and returns the result. + + + + + Creates a new instance from the provided object using the given parameters, and returns the result. + + + + + Gets the member name from the object obj. Throws an exception if the member does not exist or is write-only. + + + + + Gets the member name from the object obj and converts it to the type T. Throws an exception if the + member does not exist, is write-only, or cannot be converted. + + + + + Gets the member name from the object obj. Returns true if the member is successfully retrieved and + stores the value in the value out param. + + + + + Returns true if the object has a member named name, false if the member does not exist. + + + + + Removes the member name from the object obj. + + + + + Sets the member name on object obj to value. + + + + + Sets the member name on object obj to value. This overload can be used to avoid + boxing and casting of strongly typed members. + + + + + Gets the member name from the object obj. Throws an exception if the member does not exist or is write-only. + + + + + Gets the member name from the object obj and converts it to the type T. Throws an exception if the + member does not exist, is write-only, or cannot be converted. + + + + + Gets the member name from the object obj. Returns true if the member is successfully retrieved and + stores the value in the value out param. + + + + + Returns true if the object has a member named name, false if the member does not exist. + + + + + Removes the member name from the object obj. + + + + + Sets the member name on object obj to value. + + + + + Sets the member name on object obj to value. This overload can be used to avoid + boxing and casting of strongly typed members. + + + + + Converts the object obj to the type T. The conversion will be explicit or implicit depending on + what the langauge prefers. + + + + + Converts the object obj to the type type. The conversion will be explicit or implicit depending on + what the langauge prefers. + + + + + Converts the object obj to the type T. Returns true if the value can be converted, false if it cannot. + + The conversion will be explicit or implicit depending on what the langauge prefers. + + + + + Converts the object obj to the type type. Returns true if the value can be converted, false if it cannot. + + The conversion will be explicit or implicit depending on what the langauge prefers. + + + + + Converts the object obj to the type T including explicit conversions which may lose information. + + + + + Converts the object obj to the type type including explicit conversions which may lose information. + + + + + Converts the object obj to the type T including explicit conversions which may lose information. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type type including explicit conversions which may lose information. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type T including implicit conversions. + + + + + Converts the object obj to the type type including implicit conversions. + + + + + Converts the object obj to the type T including implicit conversions. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type type including implicit conversions. + + Returns true if the value can be converted, false if it cannot. + + + + + Performs a generic unary operation on the specified target and returns the result. + + + + + Performs a generic unary operation on the strongly typed target and returns the value as the specified type + + + + + Performs the generic binary operation on the specified targets and returns the result. + + + + + Peforms the generic binary operation on the specified strongly typed targets and returns + the strongly typed result. + + + + + Performs addition on the specified targets and returns the result. Throws an exception + if the operation cannot be performed. + + + + + Performs subtraction on the specified targets and returns the result. Throws an exception + if the operation cannot be performed. + + + + + Raises the first object to the power of the second object. Throws an exception + if the operation cannot be performed. + + + + + Multiplies the two objects. Throws an exception + if the operation cannot be performed. + + + + + Divides the first object by the second object. Throws an exception + if the operation cannot be performed. + + + + + Performs modulus of the 1st object by the second object. Throws an exception + if the operation cannot be performed. + + + + + Shifts the left object left by the right object. Throws an exception if the + operation cannot be performed. + + + + + Shifts the left object right by the right object. Throws an exception if the + operation cannot be performed. + + + + + Performs a bitwise-and of the two operands. Throws an exception if the operation + cannot be performed. + + + + + Performs a bitwise-or of the two operands. Throws an exception if the operation + cannot be performed. + + + + + Performs a exclusive-or of the two operands. Throws an exception if the operation + cannot be performed. + + + + + Compares the two objects and returns true if the left object is less than the right object. + Throws an exception if hte comparison cannot be performed. + + + + + Compares the two objects and returns true if the left object is greater than the right object. + Throws an exception if hte comparison cannot be performed. + + + + + Compares the two objects and returns true if the left object is less than or equal to the right object. + Throws an exception if hte comparison cannot be performed. + + + + + Compares the two objects and returns true if the left object is greater than or equal to the right object. + Throws an exception if hte comparison cannot be performed. + + + + + Compares the two objects and returns true if the left object is equal to the right object. + Throws an exception if the comparison cannot be performed. + + + + + Compares the two objects and returns true if the left object is not equal to the right object. + Throws an exception if hte comparison cannot be performed. + + + + + Returns a string which describes the object as it appears in source code + + + + + Returns a string representation of the object in a language specific object display format. + + + + + Returns a list of strings which contain the known members of the object. + + + + + Returns a string providing documentation for the specified object. + + + + + Returns a list of signatures applicable for calling the specified object in a form displayable to the user. + + + + + Returns true if the remote object is callable. + + + + + Invokes the specified remote object with the specified remote parameters. + + Though delegates are preferable for calls they may not always be usable for remote objects. + + + + + Invokes the specified remote object with the local parameters which will be serialized + to the remote app domain. + + + + + Creates a new remote instance from the provided remote object using the given parameters, and returns the result. + + + + + Creates a new remote instance from the provided remote object using the given parameters, and returns the result. + + + + + Sets the remote object as a member on the provided remote object. + + + + + Sets the member name on the remote object obj to value. This overload can be used to avoid + boxing and casting of strongly typed members. + + + + + Gets the member name on the remote object. Throws an exception if the member is not defined or + is write-only. + + + + + Gets the member name on the remote object. Throws an exception if the member is not defined or + is write-only. + + + + + Gets the member name on the remote object. Returns false if the member is not defined or + is write-only. + + + + + Tests to see if the member name is defined on the remote object. + + + + + Removes the member from the remote object + + + + + Converts the remote object into the specified type returning a handle to + the new remote object. The conversion will be explicit or implicit depending on + what the langauge prefers. + + + + + Converts the remote object into the specified type returning a handle to + the new remote object. The conversion will be explicit or implicit depending on + what the langauge prefers. + + + + + Converts the remote object into the specified type returning a handle to + the new remote object. Returns true if the value can be converted, + false if it cannot. The conversion will be explicit or implicit depending on + what the langauge prefers. + + + + + Converts the remote object into the specified type returning a handle to + the new remote object. Returns true if the value can be converted, + false if it cannot. The conversion will be explicit or implicit depending on + what the langauge prefers. + + + + + Converts the object obj to the type T including explicit conversions which may lose information. + + + + + Converts the object obj to the type type including explicit conversions which may lose information. + + + + + Converts the object obj to the type T including explicit conversions which may lose information. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type type including explicit conversions which may lose information. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type T including implicit conversions. + + + + + Converts the object obj to the type type including implicit conversions. + + + + + Converts the object obj to the type T including implicit conversions. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type type including implicit conversions. + + Returns true if the value can be converted, false if it cannot. + + + + + Unwraps the remote object and converts it into the specified type before + returning it. + + + + + Performs the specified unary operator on the remote object. + + + + + Performs the specified binary operator on the remote object. + + + + + Adds the two remote objects. Throws an exception if the operation cannot be performed. + + + + + Subtracts the 1st remote object from the second. Throws an exception if the operation cannot be performed. + + + + + Raises the 1st remote object to the power of the 2nd. Throws an exception if the operation cannot be performed. + + + + + Multiplies the two remote objects. Throws an exception if the operation cannot be performed. + + + + + Divides the 1st remote object by the 2nd. Throws an exception if the operation cannot be performed. + + + + + Performs modulus on the 1st remote object by the 2nd. Throws an exception if the operation cannot be performed. + + + + + Shifts the 1st remote object left by the 2nd remote object. Throws an exception if the operation cannot be performed. + + + + + Shifts the 1st remote object right by the 2nd remote object. Throws an exception if the operation cannot be performed. + + + + + Performs bitwise-and on the two remote objects. Throws an exception if the operation cannot be performed. + + + + + Performs bitwise-or on the two remote objects. Throws an exception if the operation cannot be performed. + + + + + Performs exclusive-or on the two remote objects. Throws an exception if the operation cannot be performed. + + + + + Compares the two remote objects and returns true if the 1st is less than the 2nd. Throws an exception if the operation cannot be performed. + + + + + Compares the two remote objects and returns true if the 1st is greater than the 2nd. Throws an exception if the operation cannot be performed. + + + + + Compares the two remote objects and returns true if the 1st is less than or equal to the 2nd. Throws an exception if the operation cannot be performed. + + + + + Compares the two remote objects and returns true if the 1st is greater than or equal to than the 2nd. Throws an exception if the operation cannot be performed. + + + + + Compares the two remote objects and returns true if the 1st is equal to the 2nd. Throws an exception if the operation cannot be performed. + + + + + Compares the two remote objects and returns true if the 1st is not equal to the 2nd. Throws an exception if the operation cannot be performed. + + + + + Returns a string representation of the object in a langauge specific object display format. + + + + + Returns a list of strings which contain the known members of the remote object. + + + + + Returns a string providing documentation for the specified remote object. + + + + + Returns a list of signatures applicable for calling the specified object in a form displayable to the user. + + + + + Helper to unwrap an object - in the future maybe we should validate the current app domain. + + + + + Helper to unwrap multiple objects + + + + + Reads an option whose value is expected to be a collection of non-null strings. + Reaturns a read-only copy of the option's value. + + + + + Dynamically choose between interpreting, simple compilation and compilation + that takes advantage of runtime history. + + + + + The number of iterations before the interpreter starts compiling.s + + + + + Display exception detail (callstack) when exception gets caught + + + + + Whether to gather performance statistics. + + + + + Initial file search paths provided by the host. + + + + + Abstracts system operations that are used by DLR and could potentially be platform specific. + The host can implement its PAL to adapt DLR to the platform it is running on. + For example, the Silverlight host adapts some file operations to work against files on the server. + + + + Invalid path. + + + Invalid path. + + + + Advanced APIs for HAPI providers. These methods should not be used by hosts. + They are provided for other hosting API implementers that would like to leverage existing HAPI and + extend it with language specific functionality, for example. + + + + is a null reference. + is remote. + + + e is a null reference. + is remote. + + + is a null reference. + is remote. + + + is a null reference. + is remote. + + + is a null reference. + is remote. + + + is a null reference. + is remote. + + + is a null reference. + is a null reference. + is a transparent proxy. + + + + Performs a callback in the ScriptEngine's app domain and returns the result. + + + + + Creates a new DocumentationOperations object from the given DocumentationProvider. + + + + + Represents a language in Hosting API. + Hosting API counterpart for . + + + + + Returns a new ObjectOperations object. See the Operations property for why you might want to call this. + + + + + Returns a new ObjectOperations object that inherits any semantics particular to the provided ScriptScope. + + See the Operations property for why you might want to call this. + + + + + Executes an expression. The execution is not bound to any particular scope. + + The engine doesn't support code execution. + is a null reference. + + + + Executes an expression within the specified scope. + + The engine doesn't support code execution. + is a null reference. + is a null reference. + + + + Executes an expression within a new scope and converts result to the given type. + + The engine doesn't support code execution. + is a null reference. + + + + Executes an expression within the specified scope and converts result to the given type. + + The engine doesn't support code execution. + is a null reference. + is a null reference. + + + + Executes content of the specified file in a new scope and returns that scope. + + The engine doesn't support code execution. + is a null reference. + + + + Executes content of the specified file against the given scope. + + The . + The engine doesn't support code execution. + is a null reference. + is a null reference. + + + + Executes the expression in the specified scope and return a result. + Returns an ObjectHandle wrapping the resulting value of running the code. + + + + + Executes the code in an empty scope. + Returns an ObjectHandle wrapping the resulting value of running the code. + + + + + Executes the expression in the specified scope and return a result. + Returns an ObjectHandle wrapping the resulting value of running the code. + + If an exception is thrown the exception is caught and an ObjectHandle to + the exception is provided. + + + Use this API in case the exception is not serializable (for example, due to security restrictions) or its serialization + loses information that you need to access. + + + + + Executes the code in an empty scope. + Returns an ObjectHandle wrapping the resulting value of running the code. + + If an exception is thrown the exception is caught and an ObjectHandle to + the exception is provided. + + + Use this API in case the exception is not serializable (for example, due to security restrictions) or its serialization + loses information that you need to access. + + + + + Creates a new ScriptScope whose storage is an arbitrary object. + + Accesses to the ScriptScope will turn into get, set, and delete members against the object. + + + + + This method returns the ScriptScope in which a ScriptSource of given path was executed. + + The ScriptSource.Path property is the key to finding the ScriptScope. Hosts need + to make sure they create a ScriptSource and set its Path property appropriately. + + GetScope is primarily useful for tools that need to map files to their execution scopes. For example, + an editor and interpreter tool might run a file Foo that imports or requires a file Bar. + + The editor's user might later open the file Bar and want to execute expressions in its context. + The tool would need to find Bar's ScriptScope for setting the appropriate context in its interpreter window. + This method helps with this scenario. + + + + + Return a ScriptSource object from string contents with the current engine as the language binding. + + The default SourceCodeKind is AutoDetect. + + The ScriptSource's Path property defaults to null. + + + + + Return a ScriptSource object from string contents with the current engine as the language binding. + + The ScriptSource's Path property defaults to null. + + + + + Return a ScriptSource object from string contents with the current engine as the language binding. + + The default SourceCodeKind is AutoDetect. + + + + + Return a ScriptSource object from string contents. These are helpers for creating ScriptSources' with the right language binding. + + + + + Return a ScriptSource object from file contents with the current engine as the language binding. + + The path's extension does NOT have to be in ScriptRuntime.GetRegisteredFileExtensions + or map to this language engine with ScriptRuntime.GetEngineByFileExtension. + + The default SourceCodeKind is File. + + The ScriptSource's Path property will be the path argument. + + The encoding defaults to System.Text.Encoding.Default. + + + + + Return a ScriptSource object from file contents with the current engine as the language binding. + + The path's extension does NOT have to be in ScriptRuntime.GetRegisteredFileExtensions + or map to this language engine with ScriptRuntime.GetEngineByFileExtension. + + The default SourceCodeKind is File. + + The ScriptSource's Path property will be the path argument. + + + + + Return a ScriptSource object from file contents with the current engine as the language binding. + + The path's extension does NOT have to be in ScriptRuntime.GetRegisteredFileExtensions + or map to this language engine with ScriptRuntime.GetEngineByFileExtension. + + The ScriptSource's Path property will be the path argument. + + + + + This method returns a ScriptSource object from a System.CodeDom.CodeObject. + This is a factory method for creating a ScriptSources with this language binding. + + The expected CodeDom support is extremely minimal for syntax-independent expression of semantics. + + Languages may do more, but hosts should only expect CodeMemberMethod support, + and only sub nodes consisting of the following: + CodeSnippetStatement + CodeSnippetExpression + CodePrimitiveExpression + CodeMethodInvokeExpression + CodeExpressionStatement (for holding MethodInvoke) + + + + + This method returns a ScriptSource object from a System.CodeDom.CodeObject. + This is a factory method for creating a ScriptSources with this language binding. + + The expected CodeDom support is extremely minimal for syntax-independent expression of semantics. + + Languages may do more, but hosts should only expect CodeMemberMethod support, + and only sub nodes consisting of the following: + CodeSnippetStatement + CodeSnippetExpression + CodePrimitiveExpression + CodeMethodInvokeExpression + CodeExpressionStatement (for holding MethodInvoke) + + + + + This method returns a ScriptSource object from a System.CodeDom.CodeObject. + This is a factory method for creating a ScriptSources with this language binding. + + The expected CodeDom support is extremely minimal for syntax-independent expression of semantics. + + Languages may do more, but hosts should only expect CodeMemberMethod support, + and only sub nodes consisting of the following: + CodeSnippetStatement + CodeSnippetExpression + CodePrimitiveExpression + CodeMethodInvokeExpression + CodeExpressionStatement (for holding MethodInvoke) + + + + + This method returns a ScriptSource object from a System.CodeDom.CodeObject. + This is a factory method for creating a ScriptSources with this language binding. + + The expected CodeDom support is extremely minimal for syntax-independent expression of semantics. + + Languages may do more, but hosts should only expect CodeMemberMethod support, + and only sub nodes consisting of the following: + CodeSnippetStatement + CodeSnippetExpression + CodePrimitiveExpression + CodeMethodInvokeExpression + CodeExpressionStatement (for holding MethodInvoke) + + + + + These methods return ScriptSource objects from stream contents with the current engine as the language binding. + + The default SourceCodeKind is File. + + The encoding defaults to Encoding.Default. + + + + + These methods return ScriptSource objects from stream contents with the current engine as the language binding. + + The default SourceCodeKind is File. + + + + + These methods return ScriptSource objects from stream contents with the current engine as the language binding. + + The encoding defaults to Encoding.Default. + + + + + This method returns a ScriptSource with the content provider supplied with the current engine as the language binding. + + This helper lets you own the content provider so that you can implement a stream over internal host data structures, such as an editor's text representation. + + + + + This method returns a language-specific service. + + It provides a point of extensibility for a language implementation + to offer more functionality than the standard engine members discussed here. + + Commonly available services include: + TokenCategorizer + Provides standardized tokenization of source code + ExceptionOperations + Provides formatting of exception objects. + DocumentationProvidera + Provides documentation for live object. + + + + + Sets the search paths used by the engine for loading files when a script wants + to import or require another file of code. + + The language doesn't allow to set search paths. + + + + Gets the search paths used by the engine for loading files when a script wants + to import or require another file of code. + + + + + Returns a default ObjectOperations for the engine. + + Because an ObjectOperations object caches rules for the types of + objects and operations it processes, using the default ObjectOperations for + many objects could degrade the caching benefits. Eventually the cache for + some operations could degrade to a point where ObjectOperations stops caching and + does a full search for an implementation of the requested operation for the given objects. + + Another reason to create a new ObjectOperations instance is to have it bound + to the specific view of a ScriptScope. Languages may attach per-language + behavior to a ScriptScope which would alter how the operations are performed. + + For simple hosting situations, this is sufficient behavior. + + + + + + + This property returns readon-only LanguageOptions this engine is using. + + + The values are determined during runtime initialization and read-only afterwards. + You can change the settings via a configuration file or explicitly using ScriptRuntimeSetup class. + + + + + This property returns the ScriptRuntime for the context in which this engine executes. + + + + + This property returns the engine's version as a string. The format is language-dependent. + + + + + ScriptHost is collocated with ScriptRuntime in the same app-domain. + The host can implement a derived class to consume some notifications and/or + customize operations like TryGetSourceUnit,ResolveSourceUnit, etc. + + The areguments to the the constructor of the derived class are specified in ScriptRuntimeSetup + instance that enters ScriptRuntime initialization. + + If the host is remote with respect to DLR (i.e. also with respect to ScriptHost) + and needs to access objects living in its app-domain it can pass MarshalByRefObject + as an argument to its ScriptHost subclass constructor. + + + + + The runtime the host is attached to. + + + + + Invoked after the initialization of the associated Runtime is finished. + The host can override this method to perform additional initialization of runtime (like loading assemblies etc.). + + + + + Invoked after a new language is loaded into the Runtime. + The host can override this method to perform additional initialization of language engines. + + + + + Provides hosting to DLR. Forwards DLR requests to the ScriptHost. + + + + + DLR requires any Hosting API provider to implement this class and provide its instance upon Runtime initialization. + DLR calls on it to perform basic host/system dependent operations. + + + + + Abstracts system operations that are used by DLR and could potentially be platform specific. + + + + + Provides host-redirectable IO streams used by DLR languages for default IO. + + + + + Used if the host stores the output as binary data. + + Binary stream to write data to. + Encoding used to convert textual data written to the output by the script. + + + + Used if the host handles both kinds of data (textual and binary) by itself. + + + + + Represents a Dynamic Language Runtime in Hosting API. + Hosting API counterpart for . + + + + + Creates ScriptRuntime in the current app-domain and initialized according to the the specified settings. + Creates an instance of host class specified in the setup and associates it with the created runtime. + Both Runtime and ScriptHost are collocated in the current app-domain. + + + + + Creates a new runtime with languages set up according to the current application configuration + (using System.Configuration). + + + + + Creates ScriptRuntime in the current app-domain and initialized according to the the specified settings. + Creates an instance of host class specified in the setup and associates it with the created runtime. + Both Runtime and ScriptHost are collocated in the specified app-domain. + + + + + + + + + Gets engine for the specified language. + + + + + Looks up the engine for the specified language. If the engine hasn't been created in this Runtime, it is instantiated here. + The method doesn't lock nor send notifications to the host. + + + + + path is empty, contains one or more of the invalid characters defined in GetInvalidPathChars or doesn't have an extension. + + + + path is null + file extension does not map to language engine + language does not have any search paths + file does exist in language's search path + + + + This method walks the assembly's namespaces and name bindings to ScriptRuntime.Globals + to represent the types available in the assembly. Each top-level namespace name gets + bound in Globals to a dynamic object representing the namespace. Within each top-level + namespace object, nested namespace names are bound to dynamic objects representing each + tier of nested namespaces. When this method encounters the same namespace-qualified name, + it merges names together objects representing the namespaces. + + + + + + This property returns the "global object" or name bindings of the ScriptRuntime as a ScriptScope. + + You can set the globals scope, which you might do if you created a ScriptScope with an + IAttributesCollection so that your host could late bind names. + + + + + Stores information needed to setup a ScriptRuntime + + + + + Reads setup from .NET configuration system (.config files). + If there is no configuration available returns an empty setup. + + + + + Reads setup from a specified XML stream. + + + + + Reads setup from a specified XML file. + + + + + The list of language setup information for languages to load into + the runtime + + + + + Indicates that the script runtime is in debug mode. + This means: + + 1) Symbols are emitted for debuggable methods (methods associated with SourceUnit). + 2) Debuggable methods are emitted to non-collectable types (this is due to CLR limitations on dynamic method debugging). + 3) JIT optimization is disabled for all methods + 4) Languages may disable optimizations based on this value. + + + + + Ignore CLR visibility checks + + + + + Can be any derived class of ScriptHost. When set, it allows the + host to override certain methods to control behavior of the runtime + + + + + Option names are case-sensitive. + + + + + Arguments passed to the host type when it is constructed + + + + + A ScriptScope is a unit of execution for code. It consists of a global Scope which + all code executes in. A ScriptScope can have an arbitrary initializer and arbitrary + reloader. + + ScriptScope is not thread safe. Host should either lock when multiple threads could + access the same module or should make a copy for each thread. + + Hosting API counterpart for . + + + + + Gets a value stored in the scope under the given name. + + The specified name is not defined in the scope. + is a null reference. + + + + Gets a value stored in the scope under the given name. + Converts the result to the specified type using the conversion that the language associated with the scope defines. + If no language is associated with the scope, the default CLR conversion is attempted. + + The specified name is not defined in the scope. + is a null reference. + + + + Tries to get a value stored in the scope under the given name. + + is a null reference. + + + + Tries to get a value stored in the scope under the given name. + Converts the result to the specified type using the conversion that the language associated with the scope defines. + If no language is associated with the scope, the default CLR conversion is attempted. + + is a null reference. + + + + Sets the name to the specified value. + + is a null reference. + + + + Gets a handle for a value stored in the scope under the given name. + + The specified name is not defined in the scope. + is a null reference. + + + + Tries to get a handle for a value stored in the scope under the given name. + Returns true if there is such name, false otherwise. + + is a null reference. + + + + Sets the name to the specified value. + + + The value held by the handle isn't from the scope's app-domain and isn't serializable or MarshalByRefObject. + + or is a null reference. + + + + Determines if this context or any outer scope contains the defined name. + + is a null reference. + + + + Removes the variable of the given name from this scope. + + true if the value existed in the scope before it has been removed. + is a null reference. + + + + Gets a list of variable names stored in the scope. + + + + + Gets an array of variable names and their values stored in the scope. + + + + + Gets an engine for the language associated with this scope. + Returns invariant engine if the scope is language agnostic. + + + + + Hosting counterpart for . + + + + + Compile the ScriptSource into CompileCode object that can be executed + repeatedly in its default scope or in other scopes without having to recompile the code. + + Code cannot be compiled. + + + + Errors are reported to the specified listener. + Returns null if the parser cannot compile the code due to errors. + + + + + Errors are reported to the specified listener. + Returns null if the parser cannot compile the code due to error(s). + + + + + Errors are reported to the specified listener. + Returns null if the parser cannot compile the code due to error(s). + + + + + Executes the code in the specified scope. + Returns an object that is the resulting value of running the code. + + When the ScriptSource is a file or statement, the engine decides what is + an appropriate value to return. Some languages return the value produced + by the last expression or statement, but languages that are not expression + based may return null. + + Code cannot be compiled. + + + + Executes the source code. The execution is not bound to any particular scope. + + + + + Executes the code in a specified scope and converts the result to the specified type. + The conversion is language specific. + + + + + Executes the code in an empty scope and converts the result to the specified type. + The conversion is language specific. + + + + + Executes the code in an empty scope. + Returns an ObjectHandle wrapping the resulting value of running the code. + + + + + Executes the code in the specified scope. + Returns an ObjectHandle wrapping the resulting value of running the code. + + + + + Executes the code in an empty scope. + Returns an ObjectHandle wrapping the resulting value of running the code. + + If an exception is thrown the exception is caught and an ObjectHandle to + the exception is provided. + + + Use this API to handle non-serializable exceptions (exceptions might not be serializable due to security restrictions) + or if an exception serialization loses information. + + + + + Executes the expression in the specified scope and return a result. + Returns an ObjectHandle wrapping the resulting value of running the code. + + If an exception is thrown the exception is caught and an ObjectHandle to + the exception is provided. + + + Use this API to handle non-serializable exceptions (exceptions might not be serializable due to security restrictions) + or if an exception serialization loses information. + + + + + Runs a specified code as if it was a program launched from OS command shell. + and returns a process exit code indicating the success or error condition + of executing the code. + + Exact behavior depends on the language. Some languages have a dedicated "exit" exception that + carries the exit code, in which case the exception is cought and the exit code is returned. + The default behavior returns the result of program's execution converted to an integer + using a language specific conversion. + + Code cannot be compiled. + + + + Detects the encoding of the content. + + + An encoding that is used by the reader of the script source to transcode its content to Unicode text. + Null if the content is already textual and no transcoding is performed. + + + Note that the default encoding specified when the script source is created could be overridden by + an encoding that is found in the content preamble (Unicode BOM or a language specific encoding preamble). + In that case the preamble encoding is returned. Otherwise, the default encoding is returned. + + An I/O error occurs. + + + + Reads specified range of lines (or less) from the source unit. + + 1-based number of the first line to fetch. + The number of lines to fetch. + + Which character sequences are considered line separators is language specific. + If language doesn't specify otherwise "\r", "\n", "\r\n" are recognized line separators. + + An I/O error occurs. + + + + Reads a specified line. + + 1-based line number. + Line content. Line separator is not included. + An I/O error occurs. + + Which character sequences are considered line separators is language specific. + If language doesn't specify otherwise "\r", "\n", "\r\n" are recognized line separators. + + + + + Gets script source content. + + Entire content. + An I/O error occurs. + + The result includes language specific preambles (e.g. "#coding:UTF-8" encoding preamble recognized by Ruby), + but not the preamble defined by the content encoding (e.g. BOM). + The entire content of the source unit is encoded by single encoding (if it is read from binary stream). + + + + + Identification of the source unit. Assigned by the host. + The format and semantics is host dependent (could be a path on file system or URL). + null for anonymous script source. + Cannot be an empty string. + + + + + Move the tokenizer past the next token and return its category. + + The token information associated with the token just scanned. + + + + Move the tokenizer past the next token. + + False if the end of stream has been reached, true otherwise. + + + + Get all tokens over a block of the stream. + + + + The scanner should return full tokens. If startLocation + length lands in the middle of a token, the full token + should be returned. + + s + Tokens are read until at least given amount of characters is read or the stream ends. + A enumeration of tokens. + + + + Scan from startLocation to at least startLocation + length. + + Tokens are read until at least given amount of characters is read or the stream ends. + + This method is used to determine state at arbitrary startLocation. + + False if the end of stream has been reached, true otherwise. + + + + The current internal state of the scanner. + + + + + The current startLocation of the scanner. + + + + + Represents a language context. Typically there is at most 1 context + associated with each language, but some languages may use more than one context + to identify code that should be treated differently. Contexts are used during + member and operator lookup. + + + + + Registers a language within the system with the specified name. + + + + + Looks up the context ID for the specified context identifier + + + + + Singleton for each language. + + + + + Must not be called under a lock as it can potentially call a user code. + + The language context's implementation failed to instantiate. + + + + Whether the application is in debug mode. + This means: + + 1) Symbols are emitted for debuggable methods (methods associated with SourceUnit). + 2) Debuggable methods are emitted to non-collectable types (this is due to CLR limitations on dynamic method debugging). + 3) JIT optimization is disabled for all methods + 4) Languages may disable optimizations based on this value. + + + + + Ignore CLR visibility checks. + + + + + ObjectOperations provide a large catalogue of object operations such as member access, conversions, + indexing, and things like addition. There are several introspection and tool support services available + for more advanced hosts. + + You get ObjectOperation instances from ScriptEngine, and they are bound to their engines for the semantics + of the operations. There is a default instance of ObjectOperations you can share across all uses of the + engine. However, very advanced hosts can create new instances. + + + + the number of sites required before we'll try cleaning up the cache... + + + the minimum difference between the average that is required to remove + + + the maximum number we'll remove on a single cache cleanup + + + the number of sites we should clear after if we can't make progress cleaning up otherwise + + + a dictionary of SiteKey's which are used to cache frequently used operations, logically a set + + + the # of sites we had created at the last cleanup + + + the total number of sites we've ever created + + + + Calls the provided object with the given parameters and returns the result. + + The prefered way of calling objects is to convert the object to a strongly typed delegate + using the ConvertTo methods and then invoking that delegate. + + + + + Invokes a member on the provided object with the given parameters and returns the result. + + + + + Invokes a member on the provided object with the given parameters and returns the result. + + + + + Creates a new instance from the provided object using the given parameters, and returns the result. + + + + + Gets the member name from the object obj. Throws an exception if the member does not exist or is write-only. + + + + + Gets the member name from the object obj and converts it to the type T. Throws an exception if the + member does not exist, is write-only, or cannot be converted. + + + + + Gets the member name from the object obj. Returns true if the member is successfully retrieved and + stores the value in the value out param. + + + + + Returns true if the object has a member named name, false if the member does not exist. + + + + + Removes the member name from the object obj. + + + + + Sets the member name on object obj to value. + + + + + Sets the member name on object obj to value. This overload can be used to avoid + boxing and casting of strongly typed members. + + + + + Gets the member name from the object obj. Throws an exception if the member does not exist or is write-only. + + + + + Gets the member name from the object obj and converts it to the type T. The conversion will be explicit or implicit + depending on what the langauge prefers. Throws an exception if the member does not exist, is write-only, or cannot be converted. + + + + + Gets the member name from the object obj. Returns true if the member is successfully retrieved and + stores the value in the value out param. + + + + + Returns true if the object has a member named name, false if the member does not exist. + + + + + Removes the member name from the object obj. Returns true if the member was successfully removed + or false if the member does not exist. + + + + + Sets the member name on object obj to value. + + + + + Sets the member name on object obj to value. This overload can be used to avoid + boxing and casting of strongly typed members. + + + + + Converts the object obj to the type T. The conversion will be explicit or implicit + depending on what the langauge prefers. + + + + + Converts the object obj to the type type. The conversion will be explicit or implicit + depending on what the langauge prefers. + + + + + Converts the object obj to the type T. Returns true if the value can be converted, false if it cannot. + + The conversion will be explicit or implicit depending on what the langauge prefers. + + + + + Converts the object obj to the type type. Returns true if the value can be converted, false if it cannot. + + The conversion will be explicit or implicit depending on what the langauge prefers. + + + + + Convers the object obj to the type T including explicit conversions which may lose information. + + + + + Converts the object obj to the type type including explicit conversions which may lose information. + + + + + Converts the object obj to the type type including explicit conversions which may lose information. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type T. Returns true if the value can be converted, false if it cannot. + + + + + Convers the object obj to the type T including implicit conversions. + + + + + Converts the object obj to the type type including implicit conversions. + + + + + Converts the object obj to the type type including implicit conversions. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type T. Returns true if the value can be converted, false if it cannot. + + + + + Performs a generic unary operation on the strongly typed target and returns the value as the specified type + + + + + Peforms the generic binary operation on the specified strongly typed targets and returns + the strongly typed result. + + + + + Returns a list of strings which contain the known members of the object. + + + + + Returns a string representation of the object in a language specific object display format. + + + + + Gets or creates a dynamic site w/ the specified type parameters for the provided binder. + + + This will either get the site from the cache or create a new site and return it. The cache + may be cleaned if it's gotten too big since the last usage. + + + + + Gets or creates a dynamic site w/ the specified type parameters for the provided binder. + + + This will either get the site from the cache or create a new site and return it. The cache + may be cleaned if it's gotten too big since the last usage. + + + + + Gets or creates a dynamic site w/ the specified type parameters for the provided binder. + + + This will either get the site from the cache or create a new site and return it. The cache + may be cleaned if it's gotten too big since the last usage. + + + + + Gets or creates a dynamic site w/ the specified type parameters for the provided binder. + + + This will either get the site from the cache or create a new site and return it. The cache + may be cleaned if it's gotten too big since the last usage. + + + + + Gets or creates a dynamic site w/ the specified type parameters for the provided binder. + + + This will either get the site from the cache or create a new site and return it. The cache + may be cleaned if it's gotten too big since the last usage. + + + + + Helper to create to get or create the dynamic site - called by the GetSite methods. + + + + + Removes items from the cache that have the lowest usage... + + + + + Helper class for tracking all of our unique dynamic sites and their + usage patterns. We hash on the combination of the binder and site type. + + We also track the hit count and the key holds the site associated w/ the + key. Logically this is a set based upon the binder and site-type but we + store it in a dictionary. + + + + + Singleton LanguageContext which represents a language-neutral LanguageContext + + + + + Provides language specific facilities which are typically called by the runtime. + + + + + Provides access to setting variables in scopes. + + By default this goes through ObjectOperations which can be rather slow. + Languages can override this to provide fast customized access which avoids + ObjectOperations. Languages can provide fast access to commonly used scope + types for that language. Typically this includes ScopeStorage and any other + classes which the language themselves uses for backing of a Scope. + + + + + Provides access to try getting variables in scopes. + + By default this goes through ObjectOperations which can be rather slow. + Languages can override this to provide fast customized access which avoids + ObjectOperations. Languages can provide fast access to commonly used scope + types for that language. Typically this includes ScopeStorage and any other + classes which the language themselves uses for backing of a Scope. + + + + + Provides access to getting variables in scopes and converting the result. + + By default this goes through ObjectOperations which can be rather slow. + Languages can override this to provide fast customized access which avoids + ObjectOperations. Languages can provide fast access to commonly used scope + types for that language. Typically this includes ScopeStorage and any other + classes which the language themselves uses for backing of a Scope. + + + + + Provides access to getting variables in scopes. + + By default this goes through ObjectOperations which can be rather slow. + Languages can override this to provide fast customized access which avoids + ObjectOperations. Languages can provide fast access to commonly used scope + types for that language. Typically this includes ScopeStorage and any other + classes which the language themselves uses for backing of a Scope. + + + + + Provides a text reader for source code that is to be read from a given stream. + + The stream open for reading. The stream must also allow seeking. + An encoding that should be used if the stream doesn't have Unicode or language specific preamble. + the path of the source unit if available + The reader. + An I/O error occurs. + + + + Creates the language specific CompilerOptions object for compilation of code not bound to any particular scope. + The language should flow any relevant options from LanguageContext to the newly created options instance. + + + + + Creates the language specific CompilerOptions object for compilation of code bound to a given scope. + + + + + Parses the source code within a specified compiler context. + The source unit to parse is held on by the context. + + null on failure. + Could also set the code properties and line/file mappings on the source unit. + + + + Creates a conversion binder. + + If explicitCast is true then the binder should do explicit conversions. + If explicitCast is false then the binder should do implicit conversions. + + If explicitCast is null it is up to the language to select the conversions + which closest match their normal behavior. + + + + + Gets the member names associated with the object + By default, only returns IDO names + + + + + Returns a string representation of the object in a language specific object display format. + + Dynamic sites container that could be used for any dynamic dispatches necessary for formatting. + Object to format. + A string representation of object. + + + + Provides the ContextId which includes members that should only be shown for this LanguageContext. + + ContextId's are used for filtering by Scope's. + + + + + Gets the ScriptDomainManager that this LanguageContext is running within. + + + + + Whether the language can parse code and create source units. + + + + + Internal class which binds a LanguageContext, StreamContentProvider, and Encoding together to produce + a TextContentProvider which reads binary data with the correct language semantics. + + + + + Provides a factory to create TextReader's over one source of textual content. + + TextContentProvider's are used when reading from a source which is already decoded + or has a known specific decoding. + + For example a text editor might provide a TextContentProvider whose backing is + an in-memory text buffer that the user can actively edit. + + + + + Creates a new TextReader which is backed by the content the TextContentProvider was created for. + + This method may be called multiple times. For example once to compile the code and again to get + the source code to display error messages. + + + + + This attribute marks a parameter that is not allowed to be null. + It is used by the method binding infrastructure to generate better error + messages and method selection. + + + + + This attribute marks a parameter whose type is an array that is not allowed to have null items. + It is used by the method binding infrastructure to generate better error + messages and method selection. + + + + + This attribute is used to mark a parameter that can accept any keyword parameters that + are not bound to normal arguments. The extra keyword parameters will be + passed in a dictionary which is created for the call. + + Most languages which support params dictionaries will support the following types: + IDictionary<string, anything> + IDictionary<object, anything> + Dictionary<string, anything> + Dictionary<object, anything> + IDictionary + IAttributesCollection (deprecated) + + For languages which don't have language level support the user will be required to + create and populate the dictionary by hand. + + This attribute is the dictionary equivalent of the System.ParamArrayAttribute. + + + public static void KeywordArgFunction([ParamsDictionary]IDictionary<string, object> dict) { + foreach (var v in dict) { + Console.WriteLine("Key: {0} Value: {1}", v.Key, v.Value); + } + } + + Called from Python: + + KeywordArgFunction(a = 2, b = "abc") + + will print: + Key: a Value = 2 + Key: b Value = abc + + + + + Represents a host-provided variables for executable code. The variables are + typically backed by a host-provided dictionary. Languages can also associate per-language + information with the context by using scope extensions. This can be used for tracking + state which is used across multiple executions, for providing custom forms of + storage (for example object keyed access), or other language specific semantics. + + Scope objects are thread-safe as long as their underlying storage is thread safe. + + Script hosts can choose to use thread safe or thread unsafe modules but must be sure + to constrain the code they right to be single-threaded if using thread unsafe + storage. + + + + + Creates a new scope with a new empty thread-safe dictionary. + + + + + Creates a new scope which is backed by an arbitrary object for it's storage. + + + + + + Gets the ScopeExtension associated with the provided ContextId. + + + + + Sets the ScopeExtension to the provided value for the given ContextId. + + The extension can only be set once. The returned value is either the new ScopeExtension + if no value was previously set or the previous value. + + + + + Provides optimized and cacheable support for scope storage. + + This is the default object used for storing values in a scope. + + + + The implementation uses a case-insensitive dictionary which holds + onto ScopeVariableIgnoreCase objects. The SVIC's hold onto ScopeVariable + objects for each possible casing. + + + + + Gets the named value from the scope optionally ignoring case. + + If the named value is not present an InvalidOperationException is raised. + + + + + Attempts to get the named value from the scope optionally ignoring the case. + + Returns true if the value is present, false if it is not. + + + + + Sets the named value in the scope optionally ignoring the case. + + + + + Deletes the named value from the scope optionally ignoring the case. + + + + + Checks if the named value is present in the scope optionally ignoring the case. + + + + + Gets the IScopeVariable for the scope optionally ignoring case. + + The IScopeVariable can be held onto and get/set/deleted without performing + a dictionary lookup on subsequent accesses. + + + + + Gets the ScopeVariable for the scope in a case-sensitive manner. + + The ScopeVariable can be held onto and get/set/deleted without performing + a dictionary lookup on subsequent accesses. + + + + + Gets the ScopeVariableIgnoreCase for the scope in a case-insensitive manner. + + The ScopeVariable can be held onto and get/set/deleted without performing + a dictionary lookup on subsequent accesses. + + + + + Returns all of the member names which currently have values in the scope. + + The list contains all available casings. + + + + + Returns all of the member names and their associated values from the scope. + + The list contains all available casings. + + + + + Provides convenient case-sensitive value access. + + + + + Provides a common interface for accessing both case sensitive and + case insensitive variable storage. + + + + + Atempts to get the value. If a value is assigned it returns true otherwise + it returns false. + + + + + Sets the current value in the scope. + + + + + Removes the current value from the scope. + + + + + True if the scope has a value, false if it does not. + + + + + Boxes the value for storage in a scope. Languages or consumers of the scope + can save this value and use it to get/set the current value in the scope for + commonly accessed values. + + ScopeVariables are case sensitive and will only refer to a single value. + + + + + Atempts to get the value. If a value is assigned it returns true otherwise + it returns false. + + + + + Sets the current value in the scope. + + + + + Removes the current value from the scope. + + + + + True if the scope has a value, false if it does not. + + + + + Boxes the value for storage in a scope. Languages or consumers of the scope + can save this value and use it to get/set the current value in the scope for + commonly accessed values. + + ScopeVariablesIgnoreCase are case insensitive and may access different casings + depending on how other gets/sets occur in the scope. + + + + + Atempts to get the value. If a value is assigned it returns true otherwise + it returns false. + + + + + Sets the current value in the scope. + + + + + Removes the current value from the scope. + + + + + True if the scope has a value, false if it does not. + + + + + ScriptCode is an instance of compiled code that is bound to a specific LanguageContext + but not a specific ScriptScope. The code can be re-executed multiple times in different + scopes. Hosting API counterpart for this class is CompiledCode. + + + + + A collection of environment variables. + + + + + Event for when a host calls LoadAssembly. After hooking this + event languages will need to call GetLoadedAssemblyList to + get any assemblies which were loaded before the language was + loaded. + + + + + Only host should redirect I/O. + + + + + Provides a factory to create streams over one source of binary content. + + StreamContentProvider's are used when opening a file of an unknown encoding. The + StreamContentProvider will be wrapped in a TextContentProvider provided by the language + which can support a language specific way of interpreting the binary data into text. + + For example some languages allow a marker at the beginning of the file which specifies + the encoding of the rest of the file. + + + + + Creates a new Stream which is backed by the content the StreamContentProvider was created for. + + For example if the StreamContentProvider was backing a file then GetStream re-opens the file and returns + the new stream. + + This method may be called multiple times. For example once to compile the code and again to get + the source code to display error messages. + + + + + Move the tokenizer past the next token and return its category. + + The token information associated with the token just scanned. + + + + Move the tokenizer past the next token. + + False if the end of stream has been reached, true otherwise. + + + + Get all tokens over a block of the stream. + + + + The scanner should return full tokens. If startLocation + length lands in the middle of a token, the full token + should be returned. + + + Tokens are read until at least given amount of characters is read or the stream ends. + A enumeration of tokens. + + + + Scan from startLocation to at least startLocation + length. + + The mininum number of characters to process while getting tokens. + + This method is used to determine state at arbitrary startLocation. + + False if the end of stream has been reached, true otherwise. + + + + The current internal state of the scanner. + + + + + The current startLocation of the scanner. + + + + + See also Microsoft.VisualStudio.Package.TokenTriggers. + + + + + Source code is a syntactically correct. + + + + + Source code represents an empty statement/expression. + + + + + Source code is already invalid and no suffix can make it syntactically correct. + + + + + Last token is incomplete. Source code can still be completed correctly. + + + + + Last statement is incomplete. Source code can still be completed correctly. + + + + + Defines a kind of the source code. The parser sets its initial state accordingly. + + + + + The code is an expression. + + + + + The code is a sequence of statements. + + + + + The code is a single statement. + + + + + The code is a content of a file. + + + + + The code is an interactive command. + + + + + The language parser auto-detects the kind. A syntax error is reported if it is not able to do so. + + + + + Source code reader. + + + + + Seeks the first character of a specified line in the text stream. + + Line number. The current position is assumed to be line #1. + + Returns true if the line is found, false otherwise. + + + + + Encoding that is used by the reader to convert binary data read from an underlying binary stream. + Null if the reader is reading from a textual source (not performing any byte to character transcoding). + + + + + Provides a StreamContentProvider for a stream of content backed by a file on disk. + + + + + Represents a location in source code. + + + + + Creates a new source location. + + The index in the source stream the location represents (0-based). + The line in the source stream the location represents (1-based). + The column in the source stream the location represents (1-based). + + + + Compares two specified location values to see if they are equal. + + One location to compare. + The other location to compare. + True if the locations are the same, False otherwise. + + + + Compares two specified location values to see if they are not equal. + + One location to compare. + The other location to compare. + True if the locations are not the same, False otherwise. + + + + Compares two specified location values to see if one is before the other. + + One location to compare. + The other location to compare. + True if the first location is before the other location, False otherwise. + + + + Compares two specified location values to see if one is after the other. + + One location to compare. + The other location to compare. + True if the first location is after the other location, False otherwise. + + + + Compares two specified location values to see if one is before or the same as the other. + + One location to compare. + The other location to compare. + True if the first location is before or the same as the other location, False otherwise. + + + + Compares two specified location values to see if one is after or the same as the other. + + One location to compare. + The other location to compare. + True if the first location is after or the same as the other location, False otherwise. + + + + Compares two specified location values. + + One location to compare. + The other location to compare. + 0 if the locations are equal, -1 if the left one is less than the right one, 1 otherwise. + + + + A location that is valid but represents no location at all. + + + + + An invalid location. + + + + + A minimal valid location. + + + + + The index in the source stream the location represents (0-based). + + + + + The line in the source stream the location represents (1-based). + + + + + The column in the source stream the location represents (1-based). + + + + + Whether the location is a valid location. + + True if the location is valid, False otherwise. + + + + Stores the location of a span of text in a source file. + + + + + Constructs a new span with a specific start and end location. + + The beginning of the span. + The end of the span. + + + + A valid span that represents no location. + + + + + An invalid span. + + + + + Compares two specified Span values to see if they are equal. + + One span to compare. + The other span to compare. + True if the spans are the same, False otherwise. + + + + Compares two specified Span values to see if they are not equal. + + One span to compare. + The other span to compare. + True if the spans are not the same, False otherwise. + + + + The start location of the span. + + + + + The end location of the span. Location of the first character behind the span. + + + + + Length of the span (number of characters inside the span). + + + + + Whether the locations in the span are valid. + + + + + Reads specified range of lines (or less) from the source unit. + Line numbers starts with 1. + + + + + Errors are reported to the specified sink. + Returns null if the parser cannot compile the code due to error(s). + + + + + Executes against a specified scope. + + + + + Executes against a specified scope and reports errors to the given error sink. + + + + + Executes in a new scope created by the language. + + + + + Executes in a new scope created by the language. + + + + + Executes in a new scope created by the language. + + + + + Identification of the source unit. Assigned by the host. + The format and semantics is host dependent (could be a path on file system or URL). + Empty string for anonymous source units. + + + + + LanguageContext of the language of the unit. + + + + + Unmapped span. + + + + + A token marking an end of stream. + + + + + A space, tab, or newline. + + + + + A block comment. + + + + + A single line comment. + + + + + A documentation comment. + + + + + A numeric literal. + + + + + A character literal. + + + + + A string literal. + + + + + A regular expression literal. + + + + + A keyword. + + + + + A directive (e.g. #line). + + + + + A punctuation character that has a specific meaning in a language. + + + + + A token that operates as a separator between two language elements. + + + + + An identifier (variable, $variable, @variable, @@variable, $variable$, function!, function?, [variable], i'variable', ...) + + + + + Braces, parenthesis, brackets. + + + + + Errors. + + + + + Converts a generic ICollection of T into an array of T. + + If the collection is already an array of T the original collection is returned. + + + + + Not all .NET enumerators throw exceptions if accessed in an invalid state. This type + can be used to throw exceptions from enumerators implemented in IronPython. + + + + + Wraps the provided enumerable into a ReadOnlyCollection{T} + + Copies all of the data into a new array, so the data can't be + changed after creation. The exception is if the enumerable is + already a ReadOnlyCollection{T}, in which case we just return it. + + + + + Console input stream (Console.OpenStandardInput) has a bug that manifests itself if reading small amounts of data. + This class wraps the standard input stream with a buffer that ensures that enough data are read from the underlying stream. + + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + Offset or count are out of range. + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + Offset or count are out of range. + + + + Requires the array and all its items to be non-null. + + + + + Requires the enumerable collection and all its items to be non-null. + + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + Array is null. + Offset or count are out of range. + + + + Presents a flat enumerable view of multiple dictionaries + + + + + Strongly-typed and parameterized string factory. + + + + + A string like "Cannot access member {1} declared on type {0} because the type contains generic parameters." + + + + + A string like "Type '{0}' is missing or cannot be loaded." + + + + + A string like "static property "{0}" of "{1}" can only be read through a type, not an instance" + + + + + A string like "static property "{0}" of "{1}" can only be assigned to through a type, not an instance" + + + + + A string like "Type parameter is {0}. Expected a delegate." + + + + + A string like "Cannot cast from type '{0}' to type '{1}" + + + + + A string like "unknown member type: '{0}'. " + + + + + A string like "The operation requires a non-generic type for {0}, but this represents generic types only" + + + + + A string like "Invalid operation: '{0}'" + + + + + A string like "Cannot create default value for type {0}." + + + + + A string like "Unhandled convert: {0}" + + + + + A string like "{0}.{1} has no publiclly visible method." + + + + + A string like "Extension type {0} must be public." + + + + + A string like "Invalid type of argument {0}; expecting {1}." + + + + + A string like "Field {0} is read-only" + + + + + A string like "Property {0} is read-only" + + + + + A string like "Expected event from {0}.{1}, got event from {2}.{3}." + + + + + A string like "expected bound event, got {0}." + + + + + A string like "Expected type {0}, got {1}." + + + + + A string like "can only write to member {0}." + + + + + A string like "Invalid stream type: {0}." + + + + + A string like "can't add another casing for identifier {0}" + + + + + A string like "can't add new identifier {0}" + + + + + A string like "Type '{0}' doesn't provide a suitable public constructor or its implementation is faulty: {1}" + + + + + A string like "Cannot emit constant {0} ({1})" + + + + + A string like "No implicit cast from {0} to {1}" + + + + + A string like "No explicit cast from {0} to {1}" + + + + + A string like "name '{0}' not defined" + + + + + A string like "Cannot create instance of {0} because it contains generic parameters" + + + + + A string like "Non-verifiable assembly generated: {0}:\nAssembly preserved as {1}\nError text:\n{2}\n" + + + + + A string like "Method precondition violated" + + + + + A string like "Invalid argument value" + + + + + A string like "Non-empty string required" + + + + + A string like "Non-empty collection required" + + + + + A string like "must by an Exception instance" + + + + + A string like "Type of test must be bool" + + + + + A string like "Type of the expression must be bool" + + + + + A string like "Empty string is not a valid path." + + + + + A string like "Invalid delegate type (Invoke method not found)." + + + + + A string like "expected only static property" + + + + + A string like "Property doesn't exist on the provided type" + + + + + A string like "Field doesn't exist on provided type" + + + + + A string like "Type doesn't have constructor with a given signature" + + + + + A string like "Type doesn't have a method with a given name." + + + + + A string like "Type doesn't have a method with a given name and signature." + + + + + A string like "Count must be non-negative." + + + + + A string like "arrayType must be an array type" + + + + + A string like "Either code or target must be specified." + + + + + A string like "RuleBuilder can only be used with delegates whose first argument is CallSite." + + + + + A string like "no instance for call." + + + + + A string like "Missing Test." + + + + + A string like "Missing Target." + + + + + A string like "Finally already defined." + + + + + A string like "Can not have fault and finally." + + + + + A string like "Fault already defined." + + + + + A string like "Global/top-level local variable names must be unique." + + + + + A string like "Generating code from non-serializable CallSiteBinder." + + + + + A string like "Specified path is invalid." + + + + + A string like "Dictionaries are not hashable." + + + + + A string like "language already registered." + + + + + A string like "The method or operation is not implemented." + + + + + A string like "No exception." + + + + + A string like "Already initialized." + + + + + A string like "CreateScopeExtension must return a scope extension." + + + + + A string like "Invalid number of parameters for the service." + + + + + A string like "Cannot change non-caching value." + + + + + A string like "No code to compile." + + + + + A string like "Queue empty." + + + + + A string like "Enumeration has not started. Call MoveNext." + + + + + A string like "Enumeration already finished." + + + + + A string like "Invalid output directory." + + + + + A string like "Invalid assembly name or file extension." + + + + + A string like "No default value for a given type." + + + + + A string like "Specified language provider type is not registered." + + + + + A string like "can't read from property" + + + + + A string like "can't write to property" + + + + + Strongly-typed and parameterized exception factory. + + + + + ArgumentException with message like "Either code or target must be specified." + + + + + InvalidOperationException with message like "Type parameter is {0}. Expected a delegate." + + + + + InvalidOperationException with message like "Cannot cast from type '{0}' to type '{1}" + + + + + InvalidOperationException with message like "unknown member type: '{0}'. " + + + + + InvalidOperationException with message like "RuleBuilder can only be used with delegates whose first argument is CallSite." + + + + + InvalidOperationException with message like "no instance for call." + + + + + InvalidOperationException with message like "Missing Test." + + + + + InvalidOperationException with message like "Missing Target." + + + + + TypeLoadException with message like "The operation requires a non-generic type for {0}, but this represents generic types only" + + + + + ArgumentException with message like "Invalid operation: '{0}'" + + + + + InvalidOperationException with message like "Finally already defined." + + + + + InvalidOperationException with message like "Can not have fault and finally." + + + + + InvalidOperationException with message like "Fault already defined." + + + + + ArgumentException with message like "Cannot create default value for type {0}." + + + + + ArgumentException with message like "Unhandled convert: {0}" + + + + + InvalidOperationException with message like "{0}.{1} has no publiclly visible method." + + + + + ArgumentException with message like "Global/top-level local variable names must be unique." + + + + + ArgumentException with message like "Generating code from non-serializable CallSiteBinder." + + + + + ArgumentException with message like "Specified path is invalid." + + + + + ArgumentTypeException with message like "Dictionaries are not hashable." + + + + + InvalidOperationException with message like "language already registered." + + + + + NotImplementedException with message like "The method or operation is not implemented." + + + + + InvalidOperationException with message like "No exception." + + + + + ArgumentException with message like "Extension type {0} must be public." + + + + + InvalidOperationException with message like "Already initialized." + + + + + InvalidImplementationException with message like "CreateScopeExtension must return a scope extension." + + + + + ArgumentException with message like "Invalid number of parameters for the service." + + + + + ArgumentException with message like "Invalid type of argument {0}; expecting {1}." + + + + + ArgumentException with message like "Cannot change non-caching value." + + + + + MissingMemberException with message like "Field {0} is read-only" + + + + + MissingMemberException with message like "Property {0} is read-only" + + + + + ArgumentException with message like "Expected event from {0}.{1}, got event from {2}.{3}." + + + + + ArgumentTypeException with message like "expected bound event, got {0}." + + + + + ArgumentTypeException with message like "Expected type {0}, got {1}." + + + + + MemberAccessException with message like "can only write to member {0}." + + + + + InvalidOperationException with message like "No code to compile." + + + + + ArgumentException with message like "Invalid stream type: {0}." + + + + + InvalidOperationException with message like "Queue empty." + + + + + InvalidOperationException with message like "Enumeration has not started. Call MoveNext." + + + + + InvalidOperationException with message like "Enumeration already finished." + + + + + InvalidOperationException with message like "can't add another casing for identifier {0}" + + + + + InvalidOperationException with message like "can't add new identifier {0}" + + + + + ArgumentException with message like "Invalid output directory." + + + + + ArgumentException with message like "Invalid assembly name or file extension." + + + + + ArgumentException with message like "Cannot emit constant {0} ({1})" + + + + + ArgumentException with message like "No implicit cast from {0} to {1}" + + + + + ArgumentException with message like "No explicit cast from {0} to {1}" + + + + + MissingMemberException with message like "name '{0}' not defined" + + + + + ArgumentException with message like "No default value for a given type." + + + + + ArgumentException with message like "Specified language provider type is not registered." + + + + + InvalidOperationException with message like "can't read from property" + + + + + InvalidOperationException with message like "can't write to property" + + + + + ArgumentException with message like "Cannot create instance of {0} because it contains generic parameters" + + + + + System.Security.VerificationException with message like "Non-verifiable assembly generated: {0}:\nAssembly preserved as {1}\nError text:\n{2}\n" + + + + + Gets a Func of CallSite, object * paramCnt, object delegate type + that's suitable for use in a non-strongly typed call site. + + + + diff --git a/packages/IronPython.2.7.4/lib/Net40/IronPython.Modules.dll b/packages/IronPython.2.7.4/lib/Net40/IronPython.Modules.dll new file mode 100644 index 0000000000..6277cbfcea Binary files /dev/null and b/packages/IronPython.2.7.4/lib/Net40/IronPython.Modules.dll differ diff --git a/packages/IronPython.2.7.4/lib/Net40/IronPython.Modules.xml b/packages/IronPython.2.7.4/lib/Net40/IronPython.Modules.xml new file mode 100644 index 0000000000..c930b5f680 --- /dev/null +++ b/packages/IronPython.2.7.4/lib/Net40/IronPython.Modules.xml @@ -0,0 +1,4510 @@ + + + + IronPython.Modules + + + + + Try to convert IList(Of byte) to byte[] without copying, if possible. + + + + + + + Copy the latest data from the memory buffer. + + This won't always contain data, because comrpessed data is only written after a block is filled. + + + + + + Add data to the input buffer. This manipulates the position of the stream + to make it appear to the BZip2 stream that nothing has actually changed. + + The data to append to the buffer. + + + + Reset the BitWriter. + + + + This is useful when the BitWriter writes into a MemoryStream, and + is used by a BZip2Compressor, which itself is re-used for multiple + distinct data blocks. + + + + + + Write some number of bits from the given value, into the output. + + + + The nbits value should be a max of 25, for safety. For performance + reasons, this method does not check! + + + + + + Write a full 8-bit byte into the output. + + + + + Write four 8-bit bytes into the output. + + + + + Write all available byte-aligned bytes. + + + + This method writes no new output, but flushes any accumulated + bits. At completion, the accumulator may contain up to 7 + bits. + + + This is necessary when re-assembling output from N independent + compressors, one for each of N blocks. The output of any + particular compressor will in general have some fragment of a byte + remaining. This fragment needs to be accumulated into the + parent BZip2OutputStream. + + + + + + Writes all available bytes, and emits padding for the final byte as + necessary. This must be the last method invoked on an instance of + BitWriter. + + + + + Delivers the remaining bits, left-aligned, in a byte. + + + + This is valid only if NumRemainingBits is less than 8; + in other words it is valid only after a call to Flush(). + + + + + Knuth's increments seem to work better than Incerpi-Sedgewick here. + Possibly because the number of elems to sort is usually small, typically + <= 20. + + + + BZip2Compressor writes its compressed data out via a BitWriter. This + is necessary because BZip2 does byte shredding. + + + + + Accept new bytes into the compressor data buffer + + + + This method does the first-level (cheap) run-length encoding, and + stores the encoded data into the rle block. + + + + + + Process one input byte into the block. + + + + + To "process" the byte means to do the run-length encoding. + There are 3 possible return values: + + 0 - the byte was not written, in other words, not + encoded into the block. This happens when the + byte b would require the start of a new run, and + the block has no more room for new runs. + + 1 - the byte was written, and the block is not full. + + 2 - the byte was written, and the block is full. + + + + 0 if the byte was not written, non-zero if written. + + + + Append one run to the output block. + + + + + This compressor does run-length-encoding before BWT and etc. This + method simply appends a run to the output block. The append always + succeeds. The return value indicates whether the block is full: + false (not full) implies that at least one additional run could be + processed. + + + true if the block is now full; otherwise false. + + + + Compress the data that has been placed (Run-length-encoded) into the + block. The compressed data goes into the CompressedBytes array. + + + + Side effects: 1. fills the CompressedBytes array. 2. sets the + AvailableBytesOut property. + + + + + This is the most hammered method of this class. + +

+ This is the version using unrolled loops. +

+
+ + Method "mainQSort3", file "blocksort.c", BZip2 1.0.2 + + + + The number of uncompressed bytes being held in the buffer. + + + + I am thinking this may be useful in a Stream that uses this + compressor class. In the Close() method on the stream it could + check this value to see if anything has been written at all. You + may think the stream could easily track the number of bytes it + wrote, which would eliminate the need for this. But, there is the + case where the stream writes a complete block, and it is full, and + then writes no more. In that case the stream may want to check. + + + + + Array instance identical to sfmap, both are used only + temporarily and independently, so we do not need to allocate + additional memory. + + + + A read-only decorator stream that performs BZip2 decompression on Read. + + + + + Create a BZip2InputStream, wrapping it around the given input Stream. + + + + The input stream will be closed when the BZip2InputStream is closed. + + + The stream from which to read compressed data + + + + Create a BZip2InputStream with the given stream, and + specifying whether to leave the wrapped stream open when + the BZip2InputStream is closed. + + The stream from which to read compressed data + + Whether to leave the input stream open, when the BZip2InputStream closes. + + + + + This example reads a bzip2-compressed file, decompresses it, + and writes the decompressed data into a newly created file. + + + var fname = "logfile.log.bz2"; + using (var fs = File.OpenRead(fname)) + { + using (var decompressor = new Ionic.BZip2.BZip2InputStream(fs)) + { + var outFname = fname + ".decompressed"; + using (var output = File.Create(outFname)) + { + byte[] buffer = new byte[2048]; + int n; + while ((n = decompressor.Read(buffer, 0, buffer.Length)) > 0) + { + output.Write(buffer, 0, n); + } + } + } + } + + + + + + Read data from the stream. + + + + + To decompress a BZip2 data stream, create a BZip2InputStream, + providing a stream that reads compressed data. Then call Read() on + that BZip2InputStream, and the data read will be decompressed + as you read. + + + + A BZip2InputStream can be used only for Read(), not for Write(). + + + + The buffer into which the read data should be placed. + the offset within that data array to put the first byte read. + the number of bytes to read. + the number of bytes actually read + + + + Read a single byte from the stream. + + the byte read from the stream, or -1 if EOF + + + + Flush the stream. + + + + + Calling this method always throws a . + + this is irrelevant, since it will always throw! + this is irrelevant, since it will always throw! + irrelevant! + + + + Calling this method always throws a . + + this is irrelevant, since it will always throw! + + + + Calling this method always throws a . + + this parameter is never used + this parameter is never used + this parameter is never used + + + + Dispose the stream. + + + indicates whether the Dispose method was invoked by user code. + + + + + Close the stream. + + + + + Read n bits from input, right justifying the result. + + + + For example, if you read 1 bit, the result is either 0 + or 1. + + + + The number of bits to read, always between 1 and 32. + + + + Called by createHuffmanDecodingTables() exclusively. + + + Called by recvDecodingTables() exclusively. + + + + Dump the current state of the decompressor, to restore it in case of an error. + This allows the decompressor to be essentially "rewound" and retried when more + data arrives. + + This is only used by IronPython. + + The current state. + + + + Restore the internal compressor state if an error occurred. + + The old state. + + + + Indicates whether the stream can be read. + + + The return value depends on whether the captive stream supports reading. + + + + + Indicates whether the stream supports Seek operations. + + + Always returns false. + + + + + Indicates whether the stream can be written. + + + The return value depends on whether the captive stream supports writing. + + + + + Reading this property always throws a . + + + + + The position of the stream pointer. + + + + Setting this property always throws a . Reading will return the + total number of uncompressed bytes read in. + + + + + Compressor State + + + + Freq table collected to save a pass over the data during + decompression. + + + Initializes the tt array. + + This method is called when the required length of the array is known. + I don't initialize it at construction time to avoid unneccessary + memory allocation when compressing small files. + + + + A write-only decorator stream that compresses data as it is + written using the BZip2 algorithm. + + + + + Constructs a new BZip2OutputStream, that sends its + compressed output to the given output stream. + + + + The destination stream, to which compressed output will be sent. + + + + + This example reads a file, then compresses it with bzip2 file, + and writes the compressed data into a newly created file. + + + var fname = "logfile.log"; + using (var fs = File.OpenRead(fname)) + { + var outFname = fname + ".bz2"; + using (var output = File.Create(outFname)) + { + using (var compressor = new Ionic.BZip2.BZip2OutputStream(output)) + { + byte[] buffer = new byte[2048]; + int n; + while ((n = fs.Read(buffer, 0, buffer.Length)) > 0) + { + compressor.Write(buffer, 0, n); + } + } + } + } + + + + + + Constructs a new BZip2OutputStream with specified blocksize. + + the destination stream. + + The blockSize in units of 100000 bytes. + The valid range is 1..9. + + + + + Constructs a new BZip2OutputStream. + + the destination stream. + + whether to leave the captive stream open upon closing this stream. + + + + + Constructs a new BZip2OutputStream with specified blocksize, + and explicitly specifies whether to leave the wrapped stream open. + + + the destination stream. + + The blockSize in units of 100000 bytes. + The valid range is 1..9. + + + whether to leave the captive stream open upon closing this stream. + + + + + Close the stream. + + + + This may or may not close the underlying stream. Check the + constructors that accept a bool value. + + + + + + Flush the stream. + + + + + Write data to the stream. + + + + + Use the BZip2OutputStream to compress data while writing: + create a BZip2OutputStream with a writable output stream. + Then call Write() on that BZip2OutputStream, providing + uncompressed data as input. The data sent to the output stream will + be the compressed form of the input data. + + + + A BZip2OutputStream can be used only for Write() not for Read(). + + + + + The buffer holding data to write to the stream. + the offset within that data array to find the first byte to write. + the number of bytes to write. + + + + Calling this method always throws a . + + this is irrelevant, since it will always throw! + this is irrelevant, since it will always throw! + irrelevant! + + + + Calling this method always throws a . + + this is irrelevant, since it will always throw! + + + + Calling this method always throws a . + + this parameter is never used + this parameter is never used + this parameter is never used + never returns anything; always throws + + + + The blocksize parameter specified at construction time. + + + + + Indicates whether the stream can be read. + + + The return value is always false. + + + + + Indicates whether the stream supports Seek operations. + + + Always returns false. + + + + + Indicates whether the stream can be written. + + + The return value should always be true, unless and until the + object is disposed and closed. + + + + + Reading this property always throws a . + + + + + The position of the stream pointer. + + + + Setting this property always throws a . Reading will return the + total number of uncompressed bytes written through. + + + + + Computes a CRC-32. The CRC-32 algorithm is parameterized - you + can set the polynomial and enable or disable bit + reversal. This can be used for GZIP, BZip2, or ZIP. + + + This type is used internally by DotNetZip; it is generally not used + directly by applications wishing to create, read, or manipulate zip + archive files. + + + + + Returns the CRC32 for the specified stream. + + The stream over which to calculate the CRC32 + the CRC32 calculation + + + + Returns the CRC32 for the specified stream, and writes the input into the + output stream. + + The stream over which to calculate the CRC32 + The stream into which to deflate the input + the CRC32 calculation + + + + Get the CRC32 for the given (word,byte) combo. This is a + computation defined by PKzip for PKZIP 2.0 (weak) encryption. + + The word to start with. + The byte to combine it with. + The CRC-ized result. + + + + Update the value for the running CRC32 using the given block of bytes. + This is useful when using the CRC32() class in a Stream. + + block of bytes to slurp + starting point in the block + how many bytes within the block to slurp + + + + Process one byte in the CRC. + + the byte to include into the CRC . + + + + Process a run of N identical bytes into the CRC. + + + + This method serves as an optimization for updating the CRC when a + run of identical bytes is found. Rather than passing in a buffer of + length n, containing all identical bytes b, this method accepts the + byte value and the length of the (virtual) buffer - the length of + the run. + + + the byte to include into the CRC. + the number of times that byte should be repeated. + + + + Combines the given CRC32 value with the current running total. + + + This is useful when using a divide-and-conquer approach to + calculating a CRC. Multiple threads can each calculate a + CRC32 on a segment of the data, and then combine the + individual CRC32 values at the end. + + the crc value to be combined with this one + the length of data the CRC value was calculated on + + + + Create an instance of the CRC32 class using the default settings: no + bit reversal, and a polynomial of 0xEDB88320. + + + + + Create an instance of the CRC32 class, specifying whether to reverse + data bits or not. + + + specify true if the instance should reverse data bits. + + + + In the CRC-32 used by BZip2, the bits are reversed. Therefore if you + want a CRC32 with compatibility with BZip2, you should pass true + here. In the CRC-32 used by GZIP and PKZIP, the bits are not + reversed; Therefore if you want a CRC32 with compatibility with + those, you should pass false. + + + + + + Create an instance of the CRC32 class, specifying the polynomial and + whether to reverse data bits or not. + + + The polynomial to use for the CRC, expressed in the reversed (LSB) + format: the highest ordered bit in the polynomial value is the + coefficient of the 0th power; the second-highest order bit is the + coefficient of the 1 power, and so on. Expressed this way, the + polynomial for the CRC-32C used in IEEE 802.3, is 0xEDB88320. + + + specify true if the instance should reverse data bits. + + + + + In the CRC-32 used by BZip2, the bits are reversed. Therefore if you + want a CRC32 with compatibility with BZip2, you should pass true + here for the reverseBits parameter. In the CRC-32 used by + GZIP and PKZIP, the bits are not reversed; Therefore if you want a + CRC32 with compatibility with those, you should pass false for the + reverseBits parameter. + + + + + + Reset the CRC-32 class - clear the CRC "remainder register." + + + + Use this when employing a single instance of this class to compute + multiple, distinct CRCs on multiple, distinct data blocks. + + + + + + Indicates the total number of bytes applied to the CRC. + + + + + Indicates the current CRC for all blocks slurped in. + + + + + A Stream that calculates a CRC32 (a checksum) on all bytes read, + or on all bytes written. + + + + + This class can be used to verify the CRC of a ZipEntry when + reading from a stream, or to calculate a CRC when writing to a + stream. The stream should be used to either read, or write, but + not both. If you intermix reads and writes, the results are not + defined. + + + + This class is intended primarily for use internally by the + DotNetZip library. + + + + + + The default constructor. + + + + Instances returned from this constructor will leave the underlying + stream open upon Close(). The stream uses the default CRC32 + algorithm, which implies a polynomial of 0xEDB88320. + + + The underlying stream + + + + The constructor allows the caller to specify how to handle the + underlying stream at close. + + + + The stream uses the default CRC32 algorithm, which implies a + polynomial of 0xEDB88320. + + + The underlying stream + true to leave the underlying stream + open upon close of the CrcCalculatorStream; false otherwise. + + + + A constructor allowing the specification of the length of the stream + to read. + + + + The stream uses the default CRC32 algorithm, which implies a + polynomial of 0xEDB88320. + + + Instances returned from this constructor will leave the underlying + stream open upon Close(). + + + The underlying stream + The length of the stream to slurp + + + + A constructor allowing the specification of the length of the stream + to read, as well as whether to keep the underlying stream open upon + Close(). + + + + The stream uses the default CRC32 algorithm, which implies a + polynomial of 0xEDB88320. + + + The underlying stream + The length of the stream to slurp + true to leave the underlying stream + open upon close of the CrcCalculatorStream; false otherwise. + + + + A constructor allowing the specification of the length of the stream + to read, as well as whether to keep the underlying stream open upon + Close(), and the CRC32 instance to use. + + + + The stream uses the specified CRC32 instance, which allows the + application to specify how the CRC gets calculated. + + + The underlying stream + The length of the stream to slurp + true to leave the underlying stream + open upon close of the CrcCalculatorStream; false otherwise. + the CRC32 instance to use to calculate the CRC32 + + + + Read from the stream + + the buffer to read + the offset at which to start + the number of bytes to read + the number of bytes actually read + + + + Write to the stream. + + the buffer from which to write + the offset at which to start writing + the number of bytes to write + + + + Flush the stream. + + + + + Seeking is not supported on this stream. This method always throws + + + N/A + N/A + N/A + + + + This method always throws + + + N/A + + + + Closes the stream. + + + + + Gets the total number of bytes run through the CRC32 calculator. + + + + This is either the total number of bytes read, or the total number of + bytes written, depending on the direction of this stream. + + + + + Provides the current CRC for all blocks slurped in. + + + + The running total of the CRC is kept as data is written or read + through the stream. read this property after all reads or writes to + get an accurate CRC for the entire stream. + + + + + + Indicates whether the underlying stream will be left open when the + CrcCalculatorStream is Closed. + + + + Set this at any point before calling . + + + + + + Indicates whether the stream supports reading. + + + + + Indicates whether the stream supports seeking. + + + + Always returns false. + + + + + + Indicates whether the stream supports writing. + + + + + Returns the length of the underlying stream. + + + + + The getter for this property returns the total bytes read. + If you use the setter, it will throw + . + + + + + A write-only decorator stream that compresses data as it is + written using the BZip2 algorithm. This stream compresses by + block using multiple threads. + + + This class performs BZIP2 compression through writing. For + more information on the BZIP2 algorithm, see + . + + + + This class is similar to , + except that this implementation uses an approach that employs multiple + worker threads to perform the compression. On a multi-cpu or multi-core + computer, the performance of this class can be significantly higher than + the single-threaded BZip2OutputStream, particularly for larger streams. + How large? Anything over 10mb is a good candidate for parallel + compression. + + + + The tradeoff is that this class uses more memory and more CPU than the + vanilla BZip2OutputStream. Also, for small files, the + ParallelBZip2OutputStream can be much slower than the vanilla + BZip2OutputStream, because of the overhead associated to using the + thread pool. + + + + + + + Constructs a new ParallelBZip2OutputStream, that sends its + compressed output to the given output stream. + + + + The destination stream, to which compressed output will be sent. + + + + + This example reads a file, then compresses it with bzip2 file, + and writes the compressed data into a newly created file. + + + var fname = "logfile.log"; + using (var fs = File.OpenRead(fname)) + { + var outFname = fname + ".bz2"; + using (var output = File.Create(outFname)) + { + using (var compressor = new Ionic.BZip2.ParallelBZip2OutputStream(output)) + { + byte[] buffer = new byte[2048]; + int n; + while ((n = fs.Read(buffer, 0, buffer.Length)) > 0) + { + compressor.Write(buffer, 0, n); + } + } + } + } + + + + + + Constructs a new ParallelBZip2OutputStream with specified blocksize. + + the destination stream. + + The blockSize in units of 100000 bytes. + The valid range is 1..9. + + + + + Constructs a new ParallelBZip2OutputStream. + + the destination stream. + + whether to leave the captive stream open upon closing this stream. + + + + + Constructs a new ParallelBZip2OutputStream with specified blocksize, + and explicitly specifies whether to leave the wrapped stream open. + + + the destination stream. + + The blockSize in units of 100000 bytes. + The valid range is 1..9. + + + whether to leave the captive stream open upon closing this stream. + + + + + Close the stream. + + + + This may or may not close the underlying stream. Check the + constructors that accept a bool value. + + + + + + Flush the stream. + + + + + Write data to the stream. + + + + + Use the ParallelBZip2OutputStream to compress data while + writing: create a ParallelBZip2OutputStream with a writable + output stream. Then call Write() on that + ParallelBZip2OutputStream, providing uncompressed data as + input. The data sent to the output stream will be the compressed + form of the input data. + + + + A ParallelBZip2OutputStream can be used only for + Write() not for Read(). + + + + + The buffer holding data to write to the stream. + the offset within that data array to find the first byte to write. + the number of bytes to write. + + + + Calling this method always throws a . + + this is irrelevant, since it will always throw! + this is irrelevant, since it will always throw! + irrelevant! + + + + Calling this method always throws a . + + this is irrelevant, since it will always throw! + + + + Calling this method always throws a . + + this parameter is never used + this parameter is never used + this parameter is never used + never returns anything; always throws + + + + The maximum number of concurrent compression worker threads to use. + + + + + This property sets an upper limit on the number of concurrent worker + threads to employ for compression. The implementation of this stream + employs multiple threads from the .NET thread pool, via + ThreadPool.QueueUserWorkItem(), to compress the incoming data by + block. As each block of data is compressed, this stream re-orders the + compressed blocks and writes them to the output stream. + + + + A higher number of workers enables a higher degree of + parallelism, which tends to increase the speed of compression on + multi-cpu computers. On the other hand, a higher number of buffer + pairs also implies a larger memory consumption, more active worker + threads, and a higher cpu utilization for any compression. This + property enables the application to limit its memory consumption and + CPU utilization behavior depending on requirements. + + + + By default, DotNetZip allocates 4 workers per CPU core, subject to the + upper limit specified in this property. For example, suppose the + application sets this property to 16. Then, on a machine with 2 + cores, DotNetZip will use 8 workers; that number does not exceed the + upper limit specified by this property, so the actual number of + workers used will be 4 * 2 = 8. On a machine with 4 cores, DotNetZip + will use 16 workers; again, the limit does not apply. On a machine + with 8 cores, DotNetZip will use 16 workers, because of the limit. + + + + For each compression "worker thread" that occurs in parallel, there is + up to 2mb of memory allocated, for buffering and processing. The + actual number depends on the property. + + + + CPU utilization will also go up with additional workers, because a + larger number of buffer pairs allows a larger number of background + threads to compress in parallel. If you find that parallel + compression is consuming too much memory or CPU, you can adjust this + value downward. + + + + The default value is 16. Different values may deliver better or + worse results, depending on your priorities and the dynamic + performance characteristics of your storage and compute resources. + + + + The application can set this value at any time, but it is effective + only before the first call to Write(), which is when the buffers are + allocated. + + + + + + The blocksize parameter specified at construction time. + + + + + Indicates whether the stream can be read. + + + The return value is always false. + + + + + Indicates whether the stream supports Seek operations. + + + Always returns false. + + + + + Indicates whether the stream can be written. + + + The return value depends on whether the captive stream supports writing. + + + + + Reading this property always throws a . + + + + + The position of the stream pointer. + + + + Setting this property always throws a . Reading will return the + total number of uncompressed bytes written through. + + + + + The total number of bytes written out by the stream. + + + This value is meaningful only after a call to Close(). + + + + + Returns the "random" number at a specific index. + + the index + the random number + + + + Implementes a resource-based meta_path importer as described in PEP 302. + + + + + Instantiates a new meta_path importer using an embedded ZIP resource file. + + + + + + + zip_searchorder defines how we search for a module in the Zip + archive: we first search for a package __init__, then for + non-package .pyc, .pyo and .py entries. The .pyc and .pyo entries + are swapped by initzipimport() if we run in optimized mode. Also, + '/' is replaced by SEP there. + + + + + Given a path to a Zip file and a toc_entry, return the (uncompressed) + data as a new reference. + + + + + + + + Return the code object for the module named by 'fullname' from the + Zip archive as a new reference. + + + + + + + + + + + Given a path to a Zip archive, build a dict, mapping file names + (local to the archive, using SEP as a separator) to toc entries. + + A toc_entry is a tuple: + (__file__, # value to use for __file__, available for all files + compress, # compression kind; 0 for uncompressed + data_size, # size of compressed data on disk + file_size, # size of decompressed data + file_offset, # offset of file header from start of archive + time, # mod time of file (in dos format) + date, # mod data of file (in dos format) + crc, # crc checksum of the data + ) + Directories can be recognized by the trailing SEP in the name, + data_size and file_offset are 0. + + + + + + + Given a (sub)modulename, write the potential file path in the + archive (without extension) to the path buffer. + + + + + + + + Determines the type of module we have (package or module, or not found). + + + + + + + + Provides a StreamContentProvider for a stream of content backed by a file on disk. + + + + + This class represents adler32 checksum algorithm + + + + + This static method returns adler32 checksum of the buffer data + + + + + Implementation of the Deflate compression algorithm. + + + + + Maximum memory level + + + + + Defalult compression method + + + + + Default memory level + + + + + block not completed, need more input or more output + + + + + Block internalFlush performed + + + + + Finish started, need only more output at next deflate + + + + + finish done, accept no more input or output + + + + + preset dictionary flag in zlib header + + + + + The deflate compression method + + + + + The size of the buffer + + + + + repeat previous bit length 3-6 times (2 bits of repeat count) + + + + + repeat a zero length 3-10 times (3 bits of repeat count) + + + + + repeat a zero length 11-138 times (7 bits of repeat count) + + + + + Deflate class congiration table + + + + + Pointer back to this zlib stream + + + + + As the name implies + + + + + Output still pending + + + + + Size of Pending_buf + + + + + Next pending byte to output to the stream + + + + + Number of bytes in the pending buffer + + + + + suppress zlib header and adler32 + + + + + UNKNOWN, BINARY or ASCII + + + + + STORED (for zip only) or DEFLATED + + + + + Value of internalFlush parameter for previous deflate call + + + + + LZ77 Window size (32K by default) + + + + + log2(w_size) (8..16) + + + + + w_size - 1 + + + + + Sliding Window. Input bytes are ReadPos into the second half of the Window, + and move to the first half later to keep a dictionary of at least wSize + bytes. With this organization, matches are limited to a distance of + wSize-MAX_MATCH bytes, but this ensures that IO is always + performed with a length multiple of the block size. Also, it limits + the Window size to 64K, which is quite useful on MSDOS. + To do: use the user input buffer as sliding Window. + + + + + Actual size of Window: 2*wSize, except when the user input buffer is directly used as sliding Window. + + + + + Link to older string with same hash index. To limit the size of this + array to 64K, this link is maintained only for the last 32K strings. + An index in this array is thus a Window index modulo 32K. + + + + + Heads of the hash chains or NIL. + + + + + hash index of string to be inserted + + + + + number of elements in hash table + + + + + log2(hash_size) + + + + + hash_size-1 + + + + + Number of bits by which ins_h must be shifted at each input + step. It must be such that after MIN_MATCH steps, the oldest + byte no longer takes part in the hash key, that is: + hash_shift * MIN_MATCH >= hash_bits + + + + + Window position at the beginning of the current output block. Gets negative when the Window is moved backwards. + + + + + length of best match + + + + + previous match + + + + + set if previous match exists + + + + + start of string to insert + + + + + start of matching string + + + + + number of valid bytes ahead in Window + + + + + Length of the best match at previous step. Matches not greater than this + are discarded. This is used in the lazy match evaluation. + + + + + To speed up deflation, hash chains are never searched beyond this + length. A higher limit improves compression ratio but degrades the speed. + + + + + Attempt to find a better match only when the current match is strictly + smaller than this value. This mechanism is used only for compression + levels >= 4. + + + + + compression level (1..9) + + + + + favor or force Huffman coding + + + + + Use a faster search when the previous match is longer than this + + + + + Stop searching when current match exceeds this + + + + + literal and length tree + + + + + distance tree + + + + + Huffman tree for bit lengths + + + + + Desc for literal tree + + + + + desc for distance tree + + + + + desc for bit length tree + + + + + number of codes at each bit length for an optimal tree + + + + + heap used to build the Huffman trees + + + + + number of elements in the heap + + + + + element of largest frequency + + + + + Depth of each subtree used as tie breaker for trees of equal frequency + + + + + index for literals or lengths + + + + + Size of match buffer for literals/lengths. There are 4 reasons for + limiting lit_bufsize to 64K: + - frequencies can be kept in 16 bit counters + - if compression is not successful for the first block, all input + data is still in the Window so we can still emit a stored block even + when input comes from standard input. (This can also be done for + all blocks if lit_bufsize is not greater than 32K.) + - if compression is not successful for a file smaller than 64K, we can + even emit a stored file instead of a stored block (saving 5 bytes). + This is applicable only for zip (not gzip or zlib). + - creating new Huffman trees less frequently may not provide fast + adaptation to changes in the input data statistics. (Take for + example a binary file with poorly compressible code followed by + a highly compressible string table.) Smaller buffer sizes give + fast adaptation but have of course the overhead of transmitting + trees more frequently. + - I can't count above 4 + + + + + running index in l_buf + + + + + index of pendig_buf + + + + + bit length of current block with optimal trees + + + + + bit length of current block with static trees + + + + + number of string matches in current block + + + + + bit length of EOB code for last block + + + + + Output buffer. bits are inserted starting at the bottom (least + significant bits). + + + + + Number of valid bits in bi_buf. All bits above the last valid bit + are always zero. + + + + + Default constructor + + + + + Initialization + + + + + Initialize the tree data structures for a new zlib stream. + + + + + Initializes block + + + + + Restore the heap property by moving down the tree starting at node k, + exchanging a node with the smallest of its two sons if necessary, stopping + when the heap property is re-established (each father smaller than its + two sons). + + + + + Scan a literal or distance tree to determine the frequencies of the codes + in the bit length tree. + + + + + Construct the Huffman tree for the bit lengths and return the index in + bl_order of the last bit length code to send. + + + + + Send the header for a block using dynamic Huffman trees: the counts, the + lengths of the bit length codes, the literal tree and the distance tree. + IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. + + + + + Send a literal or distance tree in compressed form, using the codes in + bl_tree. + + + + + Output a byte on the stream. + IN assertion: there is enough room in Pending_buf. + + + + + Adds a byte to the buffer + + + + + Send one empty static block to give enough lookahead for inflate. + This takes 10 bits, of which 7 may remain in the bit buffer. + The current inflate code requires 9 bits of lookahead. If the + last two codes for the previous block (real code plus EOB) were coded + on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode + the last real code. In this case we send two empty static blocks instead + of one. (There are no problems if the previous block is stored or fixed.) + To simplify the code, we assume the worst case of last real code encoded + on one bit only. + + + + + Save the match info and tally the frequency counts. Return true if + the current block must be flushed. + + + + + Send the block data compressed using the given Huffman trees + + + + + Set the data type to ASCII or BINARY, using a crude approximation: + binary if more than 20% of the bytes are <= 6 or >= 128, ascii otherwise. + IN assertion: the fields freq of dyn_ltree are set and the total of all + frequencies does not exceed 64K (to fit in an int on 16 bit machines). + + + + + Flush the bit buffer, keeping at most 7 bits in it. + + + + + Flush the bit buffer and align the output on a byte boundary + + + + + Copy a stored block, storing first the length and its + one's complement if requested. + + + + + Flushes block + + + + + Copy without compression as much as possible from the input stream, return + the current block state. + This function does not insert new strings in the dictionary since + uncompressible data is probably not useful. This function is used + only for the level=0 compression option. + NOTE: this function should be optimized to avoid extra copying from + Window to Pending_buf. + + + + + Send a stored block + + + + + Determine the best encoding for the current block: dynamic trees, static + trees or store, and output the encoded block to the zip file. + + + + + Fill the Window when the lookahead becomes insufficient. + Updates strstart and lookahead. + + IN assertion: lookahead less than MIN_LOOKAHEAD + OUT assertions: strstart less than or equal to window_size-MIN_LOOKAHEAD + At least one byte has been ReadPos, or _avail_in == 0; reads are + performed for at least two bytes (required for the zip translate_eol + option -- not supported here). + + + + + Compress as much as possible from the input stream, return the current + block state. + This function does not perform lazy evaluation of matches and inserts + new strings in the dictionary only for unmatched strings or for short + matches. It is used only for the fast compression options. + + + + + Same as above, but achieves better compression. We use a lazy + evaluation for matches: a match is finally adopted only if there is + no better match at the next Window position. + + + + + Finds the longest matching data part + + + + + Deflate algorithm initialization + + ZStream object + Compression level + Window bits + A result code + + + + Initializes deflate algorithm + + ZStream object + Compression level + Operation result result code + + + + Deflate algorithm initialization + + ZStream object + Compression level + Compression method + Window bits + Memory level + Compression strategy + Operation result code + + + + Resets the current state of deflate object + + + + + Finish compression with deflate algorithm + + + + + Sets deflate algorithm parameters + + + + + Sets deflate dictionary + + + + + Performs data compression with the deflate algorithm + + + + + Static constructor initializes config_table + + + + + Compression level + + + + + Number of bytes in the pending buffer + + + + + Output still pending + + + + + Next pending byte to output to the stream + + + + + suppress zlib header and adler32 + + + + + Deflate algorithm configuration parameters class + + + + + reduce lazy search above this match length + + + + + do not perform lazy search above this match length + + + + + quit search above this match length + + + + + Constructor which initializes class inner fields + + + + + current inflate_block mode + + + + + if STORED, bytes left to copy + + + + + table lengths (14 bits) + + + + + index into blens (or border) + + + + + bit lengths of codes + + + + + bit length tree depth + + + + + bit length decoding tree + + + + + if CODES, current state + + + + + true if this block is the last block + + + + + bits in bit buffer + + + + + bit buffer + + + + + single malloc for tree space + + + + + sliding Window + + + + + one byte after sliding Window + + + + + Window ReadPos pointer + + + + + Window WritePos pointer + + + + + need check + + + + + check on output + + + + + Resets this InfBlocks class instance + + + + + Block processing functions + + + + + Frees inner buffers + + + + + Sets dictionary + + + + + Returns true if inflate is currently at the End of a block generated + by Z_SYNC_FLUSH or Z_FULL_FLUSH. + + + + + copy as much as possible from the sliding Window to the output area + + + + + sliding window + + + + + one byte after sliding Window + + + + + Window ReadPos pointer + + + + + Window WritePos pointer + + + + + bits in bit buffer + + + + + bit buffer + + + + + Inflate codes mode + + + + + This class is used by the InfBlocks class + + + + + current inflate_codes mode + + + + + length + + + + + pointer into tree + + + + + current index of the tree + + + + + + + + + + ltree bits decoded per branch + + + + + dtree bits decoded per branch + + + + + literal/length/eob tree + + + + + literal/length/eob tree index + + + + + distance tree + + + + + distance tree index + + + + + Constructor which takes literal, distance trees, corresponding bites decoded for branches, corresponding indexes and a ZStream object + + + + + Constructor which takes literal, distance trees, corresponding bites decoded for branches and a ZStream object + + + + + Block processing method + + An instance of the InfBlocks class + A ZStream object + A result code + + + + Frees allocated resources + + + + + Fast inflate procedure. Called with number of bytes left to WritePos in Window at least 258 + (the maximum string length) and number of input bytes available + at least ten. The ten bytes are six bytes for the longest length/ + distance pair plus four bytes for overloading the bit buffer. + + + + + This enumeration contains modes of inflate processing + + + + + waiting for method byte + + + + + waiting for flag byte + + + + + four dictionary check bytes to go + + + + + three dictionary check bytes to go + + + + + two dictionary check bytes to go + + + + + one dictionary check byte to go + + + + + waiting for inflateSetDictionary + + + + + decompressing blocks + + + + + four check bytes to go + + + + + three check bytes to go + + + + + two check bytes to go + + + + + one check byte to go + + + + + finished check, done + + + + + got an error--stay here + + + + + current inflate mode + + + + + if FLAGS, method byte + + + + + computed check value + + + + + stream check value + + + + + if BAD, inflateSync's marker bytes count + + + + + flag for no wrapper + + + + + log2(Window size) (8..15, defaults to 15) + + + + + current inflate_blocks state + + + + + Resets the Inflate algorithm + + A ZStream object + A result code + + + + Finishes the inflate algorithm processing + + A ZStream object + Operation result code + + + + Initializes the inflate algorithm + + A ZStream object + Window size + Operation result code + + + + Runs inflate algorithm + + A ZStream object + Flush strategy + Operation result code + + + + Sets dictionary for the inflate operation + + A ZStream object + An array of byte - dictionary + Dictionary length + Operation result code + + + + Inflate synchronization + + A ZStream object + Operation result code + + + + Returns true if inflate is currently at the End of a block generated + by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP + implementation to provide an additional safety check. PPP uses Z_SYNC_FLUSH + but removes the length bytes of the resulting empty stored block. When + decompressing, PPP checks that at the End of input packet, inflate is + waiting for these length bytes. + + + + + Contains utility information for the InfTree class + + + + + Given a list of code lengths and a maximum table size, make a set of + tables to decode that set of codes. + + Return (int)ZLibResultCode.Z_OK on success, (int)ZLibResultCode.Z_DATA_ERROR if the given code set is incomplete (the tables are still built in this case), (int)ZLibResultCode.Z_DATA_ERROR if the input is invalid (an over-subscribed set of lengths), or (int)ZLibResultCode.Z_DATA_ERROR if not enough memory. + + + + + Build trees + + + + + Builds dynamic trees + + + + + Build fixed trees + + + + + Bit length codes must not exceed MAX_BL_BITS bits + + + + + This class represents a tree and is used in the Deflate class + + + + + The dynamic tree + + + + + Largest code with non zero frequency + + + + + the corresponding static tree + + + + + Mapping from a distance to a distance code. dist is the distance - 1 and + must not have side effects. _dist_code[256] and _dist_code[257] are never + used. + + + + + Compute the optimal bit lengths for a tree and update the total bit length + for the current block. + IN assertion: the fields freq and dad are set, heap[heap_max] and + above are the tree nodes sorted by increasing frequency. + OUT assertions: the field count is set to the optimal bit length, the + array bl_count contains the frequencies for each bit length. + The length opt_len is updated; static_len is also updated if stree is + not null. + + + + + Construct one Huffman tree and assigns the code bit strings and lengths. + Update the total bit length for the current block. + IN assertion: the field freq is set for all tree elements. + OUT assertions: the fields count and code are set to the optimal bit length + and corresponding code. The length opt_len is updated; static_len is + also updated if stree is not null. The field max_code is set. + + + + + Generate the codes for a given tree and bit counts (which need not be + optimal). + IN assertion: the array bl_count contains the bit length statistics for + the given tree and the field count is set for all tree elements. + OUT assertion: the field code is set for all tree elements of non + zero code length. + + + + + Reverse the first count bits of a code, using straightforward code (a faster + method would use a table) + + + + + The dynamic tree + + + + + Largest code with non zero frequency + + + + + the corresponding static tree + + + + + Some constants for specifying compression levels. Methods which takes a compression level as a parameter expects an integer value from 0 to 9. You can either specify an integer value or use constants for some most widely used compression levels. + + + + + No compression should be used at all. + + + + + Minimal compression, but greatest speed. + + + + + Maximum compression, but slowest. + + + + + Select default compression level (good compression, good speed). + + + + + Compression strategies. The strategy parameter is used to tune the compression algorithm. The strategy parameter only affects the compression ratio but not the correctness of the compressed output even if it is not set appropriately. + + + + + This strategy is designed for filtered data. Data which consists of mostly small values, with random distribution should use Z_FILTERED. With this strategy, less string matching is performed. + + + + + Z_HUFFMAN_ONLY forces Huffman encoding only (no string match) + + + + + The default strategy is the most commonly used. With this strategy, string matching and huffman compression are balanced. + + + + + Flush strategies + + + + + Do not internalFlush data, but just write data as normal to the output buffer. This is the normal way in which data is written to the output buffer. + + + + + Obsolete. You should use Z_SYNC_FLUSH instead. + + + + + All pending output is flushed to the output buffer and the output is aligned on a byte boundary, so that the decompressor can get all input data available so far. + + + + + All output is flushed as with Z_SYNC_FLUSH, and the compression state is reset so that decompression can restart from this point if previous compressed data has been damaged or if random access is desired. Using Z_FULL_FLUSH too often can seriously degrade the compression. ZLib_InflateSync will locate points in the compression string where a full has been performed. + + + + + Notifies the module that the input has now been exhausted. Pending input is processed, pending output is flushed and calls return with Z_STREAM_END if there was enough output space. + + + + + Results of operations in ZLib library + + + + + No failure was encountered, the operation completed without problem. + + + + + No failure was encountered, and the input has been exhausted. + + + + + A preset dictionary is required for decompression of the data. + + + + + An internal error occurred + + + + + The stream structure was inconsistent + + + + + Input data has been corrupted (for decompression). + + + + + Memory allocation failed. + + + + + There was not enough space in the output buffer. + + + + + The version supplied does not match that supported by the ZLib module. + + + + + States of deflate operation + + + + + Data block types, i.e. binary or ascii text + + + + + Helper class + + + + + Max Window size + + + + + preset dictionary flag in zlib header + + + + + The size of the buffer + + + + + Deflate compression method index + + + + + see definition of array dist_code below + + + + + This method returns the literal value received + + The literal to return + The received value + + + + This method returns the literal value received + + The literal to return + The received value + + + + This method returns the literal value received + + The literal to return + The received value + + + + This method returns the literal value received + + The literal to return + The received value + + + + Performs an unsigned bitwise right shift with the specified number + + Number to operate on + Ammount of bits to shift + The resulting number from the shift operation + + + + Performs an unsigned bitwise right shift with the specified number + + Number to operate on + Ammount of bits to shift + The resulting number from the shift operation + + + + Performs an unsigned bitwise right shift with the specified number + + Number to operate on + Ammount of bits to shift + The resulting number from the shift operation + + + + Performs an unsigned bitwise right shift with the specified number + + Number to operate on + Ammount of bits to shift + The resulting number from the shift operation + + + Reads a number of characters from the current source Stream and writes the data to the target array at the specified index. + The source Stream to ReadPos from. + Contains the array of characters ReadPos from the source Stream. + The starting index of the target array. + The maximum number of characters to ReadPos from the source Stream. + The number of characters ReadPos. The number will be less than or equal to count depending on the data available in the source Stream. Returns -1 if the End of the stream is reached. + + + Reads a number of characters from the current source TextReader and writes the data to the target array at the specified index. + The source TextReader to ReadPos from + Contains the array of characteres ReadPos from the source TextReader. + The starting index of the target array. + The maximum number of characters to ReadPos from the source TextReader. + The number of characters ReadPos. The number will be less than or equal to count depending on the data available in the source TextReader. Returns -1 if the End of the stream is reached. + + + + Converts a string to an array of bytes + + The string to be converted + The new array of bytes + + + + Converts an array of bytes to an array of chars + + The array of bytes to convert + The new array of chars + + + + Copies large array which was passed as srcBuf to the Initialize method into the destination array which were passes as destBuff + + The number of bytes copied + + + + ZStream is used to store user data to compress/decompress. + + + + + Maximum memory level + + + + + Next input byte array + + + + + Index of the first byte in the input array. + + + + + Number of bytes available at _next_in + + + + + total nb of input bytes ReadPos so far + + + + + Byte array for the next output block + + + + + Index of the first byte in the _next_out array + + + + + Remaining free space at _next_out + + + + + Total number of bytes in output array + + + + + A string to store operation result message (corresponding to result codes) + + + + + A deflate object to perform data compression + + + + + Inflate object to perform data decompression + + + + + Best guess about the data type: ascii or binary + + + + + A checksum computed with Adler algorithm + + + + + Initializes the internal stream state for decompression. The fields , must be + initialized before by the caller. If is not null and is large + enough (the exact value depends on the compression method), determines the compression + method from the ZLib header and allocates all data structures accordingly; otherwise the allocation will be deferred + to the first call of . + + + inflateInit returns if success, if there was not enough memory, + if the ZLib library version is incompatible with the version assumed by the caller. + is set to null if there is no error message. does not perform any decompression + apart from reading the ZLib header if present: this will be done by . (So and + may be modified, but and are unchanged.) + + + + + This is another version of with an extra parameter. The fields , must be + initialized before by the caller. If is not null and is large enough + (the exact value depends on the compression method), determines the compression method from + the ZLib header and allocates all data structures accordingly; otherwise the allocation will be deferred to the first + call of . + + The windowBits parameter is the base two logarithm of the maximum window size (the size of the history buffer). + It should be in the range 8..15 for this version of the library. The default value is 15 if is used instead. + If a compressed stream with a larger window size is given as input, will return with the error code + instead of trying to allocate a larger window. + + inflateInit returns if success, if there was not enough memory, + if a parameter is invalid (such as a negative memLevel). is set to null + if there is no error message. does not perform any decompression apart from reading the ZLib header + if present: this will be done by . (So and may be modified, + but and are unchanged.) + + + + + This method decompresses as much data as possible, and stops when the input buffer () becomes empty or + the output buffer () becomes full. It may some introduce some output latency (reading input without producing any output) + except when forced to flush. + The detailed semantics are as follows. performs one or both of the following actions: + + + Decompress more input starting at and update and + accordingly. If not all input can be processed (because there is not enough room in the output buffer), is updated and + processing will resume at this point for the next call of . + Provide more output starting at and update and + accordingly. provides as much output as possible, until there is no more input data or no more space in + the output buffer (see below about the parameter). + + + + Flush strategy to use. + + Before the call of , the application should ensure that at least one of the actions is possible, by providing + more input and/or consuming more output, and updating the next_* and avail_* values accordingly. The application can consume the uncompressed + output when it wants, for example when the output buffer is full (avail_out == 0), or after each call of . + If returns and with zero , it must be called again + after making room in the output buffer because there might be more output pending. + If the parameter is set to , flushes + as much output as possible to the output buffer. The flushing behavior of is not specified for values of + the parameter other than and , + but the current implementation actually flushes as much output as possible anyway. + should normally be called until it returns or an error. + However if all decompression is to be performed in a single step (a single call of inflate), the parameter + should be set to . In this case all pending input is processed and all pending output is flushed; + must be large enough to hold all the uncompressed data. (The size of the uncompressed data may have been + saved by the compressor for this purpose.) The next operation on this stream must be to deallocate the decompression + state. The use of is never required, but can be used to inform that a faster + routine may be used for the single call. + If a preset dictionary is needed at this point (see ), sets strm-adler + to the adler32 checksum of the dictionary chosen by the compressor and returns ; otherwise it + sets strm->adler to the adler32 checksum of all output produced so far (that is, bytes) and returns + , or an error code as described below. At the end of the stream, + ) checks that its computed adler32 checksum is equal to that saved by the compressor and returns + only if the checksum is correct. + + + returns if some progress has been made (more input processed or more output produced), + if the end of the compressed data has been reached and all uncompressed output has been produced, + if a preset dictionary is needed at this point, if + the input data was corrupted (input stream not conforming to the ZLib format or incorrect adler32 checksum), + if the stream structure was inconsistent (for example if or + was null), if there was not enough memory, + if no progress is possible or if there was not enough room in the output buffer + when is used. In the case, the application + may then call to look for a good compression block. + + + + + All dynamically allocated data structures for this stream are freed. This function discards any unprocessed input and does not flush any + pending output. + + + inflateEnd returns if success, + if the stream state was inconsistent. In the error case, msg may be set but then points to a static string (which must not be deallocated). + + + + + Skips invalid compressed data until a full flush point (see the description of deflate with Z_FULL_FLUSH) can be found, + or until all available input is skipped. No output is provided. + + + returns if a full flush point has been found, + if no more input was provided, if no flush point has been found, or + if the stream structure was inconsistent. In the success case, the application may save the current + current value of which indicates where valid compressed data was found. In the error case, the application may repeatedly + call , providing more input each time, until success or end of the input data. + + + + + Initializes the decompression dictionary from the given uncompressed byte sequence. This function must be called immediately after a call of if this call returned . The dictionary chosen by the compressor can be determined from the Adler32 value returned by this call of . The compressor and decompresser must use exactly the same dictionary. + + A byte array - a dictionary. + The length of the dictionary. + + inflateSetDictionary returns if success, if a parameter is invalid (such as null dictionary) or the stream state is inconsistent, if the given dictionary doesn't match the expected one (incorrect Adler32 value). inflateSetDictionary does not perform any decompression: this will be done by subsequent calls of . + + + + + Initializes the internal stream state for compression. + + An integer value from 0 to 9 indicating the desired compression level. + + deflateInit returns if success, if there was not enough memory, + if level is not a valid compression level. is set to null if there is + no error message. does not perform any compression: this will be done by . + + + + + Initializes the internal stream state for compression. + + An integer value from 0 to 9 indicating the desired compression level. + The windowBits parameter is the base two logarithm of the window size (the size of the history buffer). It should be in the + range 8..15 for this version of the library. Larger values of this parameter result in better compression at the expense of memory usage. + The default value is 15 if deflateInit is used instead. + + deflateInit returns if success, if there was not enough memory, + if level is not a valid compression level. is set to null if there + is no error message. does not perform any compression: this will be done by . + + + + + Deflate compresses as much data as possible, and stops when the input buffer becomes empty or the + output buffer becomes full. It may introduce some output latency (reading input without producing any output) + except when forced to flush. + The detailed semantics are as follows. deflate performs one or both of the following actions: + + Compress more input starting at and update and accordingly. + If not all input can be processed (because there is not enough room in the output buffer), and + are updated and processing will resume at this point for the next call of . + Provide more output starting at and update and accordingly. + This action is forced if the parameter flush is non zero. Forcing flush frequently degrades the compression ratio, so this parameter should + be set only when necessary (in interactive applications). Some output may be provided even if flush is not set. + + + + The flush strategy to use. + + + Before the call of , the application should ensure that at least one of the actions is possible, by providing + more input and/or consuming more output, and updating or accordingly ; + should never be zero before the call. The application can consume the compressed output when it wants, for example when the output buffer is full + (avail_out == 0), or after each call of . If returns + and with zero , it must be called again after making room in the output buffer because there might be more output pending. + + + If the parameter is set to , all pending output is flushed to the + output buffer and the output is aligned on a byte boundary, so that the decompressor can get all input + data available so far. (In particular is zero after the call if enough output space has been provided before the call.) + Flushing may degrade compression for some compression algorithms and so it should be used only when necessary. + + + If flush is set to , all output is flushed as with , + and the compression state is reset so that decompression can restart from this point if previous compressed data has been damaged or if + random access is desired. Using too often can seriously degrade the compression. + + + + + If deflate returns with == 0, this function must be called again with the same value of the flush + parameter and more output space (updated ), until the flush is complete ( returns with + non-zero ). + + + If the parameter is set to , pending input is processed, pending + output is flushed and deflate returns with if there was enough output space ; + if deflate returns with , this function must be called again with + and more output space (updated ) but no more input data, until it returns with + or an error. After deflate has returned , the only possible operation on the stream is + . + + can be used immediately after if all the compression is to be + done in a single step. In this case, avail_out must be at least 0.1% larger than avail_in plus 12 bytes. If deflate does not return + Z_STREAM_END, then it must be called again as described above. + + + sets strm-> adler to the adler32 checksum of all input read so far (that is, bytes). + + + may update data_type if it can make a good guess about the input data type (Z_ASCII or Z_BINARY). + In doubt, the data is considered binary. This field is only for information purposes and does not affect the compression algorithm in any manner. + + + returns if some progress has been made (more input processed or more output produced), + if all input has been consumed and all output has been produced (only when flush is set to + ), if the stream state was inconsistent (for example if + or was null), if no progress is possible + (for example or was zero). + + + + + + All dynamically allocated data structures for this stream are freed. This function discards any unprocessed input and does not flush any pending + output. + + + deflateEnd returns if success, if the stream state was inconsistent, + if the stream was freed prematurely (some input or output was discarded). In the error case, + may be set but then points to a static string (which must not be deallocated). + + + + + Dynamically update the compression level and compression strategy. The interpretation of level is as in . + This can be used to switch between compression and straight copy of the input data, or to switch to a different kind of input data + requiring a different strategy. If the compression level is changed, the input available so far is compressed with the old level + (and may be flushed); the new level will take effect only at the next call of + + An integer value indicating the desired compression level. + A flush strategy to use. + + Before the call of , the stream state must be set as for a call of , since the + currently available input may have to be compressed and flushed. In particular, must be non-zero. + + + deflateParams returns if success, if the source stream + state was inconsistent or if a parameter was invalid, if was zero. + + + + + Initializes the compression dictionary from the given byte sequence without producing any compressed output. This function must be called + immediately after , before any call of . The compressor and decompressor must use + exactly the same dictionary (see ). + + A byte array - a dictionary. + The length of the dictionary byte array + + + The dictionary should consist of strings (byte sequences) that are likely to be encountered later in the data to be compressed, + with the most commonly used strings preferably put towards the end of the dictionary. Using a dictionary is most useful when the data + to be compressed is short and can be predicted with good accuracy; the data can then be compressed better than with the default empty dictionary. + + Depending on the size of the compression data structures selected by , a part of the dictionary may + in effect be discarded, for example if the dictionary is larger than the window size in . Thus the strings most likely + to be useful should be put at the end of the dictionary, not at the front. + Upon return of this function, adler is set to the Adler32 value of the dictionary; the decompresser may later use this value to determine + which dictionary has been used by the compressor. (The Adler32 value applies to the whole dictionary even if only a subset of the dictionary + is actually used by the compressor.) + + + deflateSetDictionary returns if success, or if a parameter + is invalid (such as null dictionary) or the stream state is inconsistent (for example if has already been + called for this stream or if the compression method is bsort). does not perform any compression: + this will be done by . + + + + + Flush as much pending output as possible. All output goes through this function so some applications may wish to + modify it to avoid allocating a large buffer and copying into it. + + + + + + Read a new buffer from the current input stream, update the adler32 and total number of bytes read. All input goes + through this function so some applications may wish to modify it to avoid allocating a large buffer and copying from it. + + + + + + Frees all inner buffers. + + + + + Adler-32 value for uncompressed data processed so far. + + + + + Best guess about the data type: ascii or binary + + + + + Gets/Sets the next input byte array. + + + + + Index of the first byte in the input array. + + + + + Gets/Sets the number of bytes available in the input buffer. + + + + + Gets/Sets the total number of bytes in the input buffer. + + + + + Gets/Sets the buffer for the next output data. + + + + + Gets/Sets the index of the first byte in the byte array to write to. + + + + + Gets/Sets the remaining free space in the buffer. + + + + + Gets/Sets the total number of bytes in the output array. + + + + + Gets sets the last error message occurred during class operations. + + + + + A deflate object to perform data compression + + + + + Inflate object to perform data decompression + + + + + Exceptions that occur in ZStream + + + + + Default constructor. + + + + + Constructor which takes one parameter - an error message + + + + + Creates an optimized encoding mapping that can be consumed by an optimized version of charmap_encode. + + + + + Decodes the input string using the provided string mapping. + + + + + Encodes the input string with the specified optimized encoding map. + + + + + Optimied encoding mapping that can be consumed by charmap_encode. + + + + + Provides helper functions which need to be called from generated code to implement various + portions of modules. + + + + + Convert string or bytes into bytes + + + + + Convert most bytearray-like objects into IList of byte + + + + + BytesIO([initializer]) -> object + + Create a buffered I/O implementation using an in-memory bytes + buffer, ready for reading and writing. + + + + + close() -> None. Disable all I/O operations. + + + + + getvalue() -> bytes. + + Retrieve the entire contents of the BytesIO object. + + + + + True if the file is closed. + + + + + Read and decode the next chunk from the buffered reader. Returns true if EOF was + not reached. Places decoded string in _decodedChars. + + + + + Remove all 'b's from mode string to simplify parsing + + + + + Walks the queue calling back to the specified delegate for + each populated index in the queue. + + + + + Throw TypeError with a specified message if object isn't callable. + + + + + Convert object to ushort, throwing ValueError on overflow. + + + + + Interface for "file-like objects" that implement the protocol needed by load() and friends. + This enables the creation of thin wrappers that make fast .NET types and slow Python types look the same. + + + + + Interface for "file-like objects" that implement the protocol needed by dump() and friends. + This enables the creation of thin wrappers that make fast .NET types and slow Python types look the same. + + + + + Call the appropriate reduce method for obj and pickle the object using + the resulting data. Use the first available of + copy_reg.dispatch_table[type(obj)], obj.__reduce_ex__, and obj.__reduce__. + + + + + Pickle the result of a reduce function. + + Only context, obj, func, and reduceCallable are required; all other arguments may be null. + + + + + Write value in pickle decimalnl_short format. + + + + + Write value in pickle float8 format. + + + + + Write value in pickle uint1 format. + + + + + Write value in pickle uint2 format. + + + + + Write value in pickle int4 format. + + + + + Write value in pickle decimalnl_short format. + + + + + Write value in pickle decimalnl_short format. + + + + + Write value in pickle decimalnl_long format. + + + + + Write value in pickle unicodestringnl format. + + + + + Write value in pickle unicodestring4 format. + + + + + Write value in pickle stringnl_noescape_pair format. + + + + + Return true if value is appropriate for formatting in pickle uint1 format. + + + + + Return true if value is appropriate for formatting in pickle uint2 format. + + + + + Return true if value is appropriate for formatting in pickle int4 format. + + + + + Emit a series of opcodes that will set append all items indexed by iter + to the object at the top of the stack. Use APPENDS if possible, but + append no more than BatchSize items at a time. + + + + + Emit a series of opcodes that will set all (key, value) pairs indexed by + iter in the object at the top of the stack. Use SETITEMS if possible, + but append no more than BatchSize items at a time. + + + + + Emit a series of opcodes that will set all (key, value) pairs indexed by + iter in the object at the top of the stack. Use SETITEMS if possible, + but append no more than BatchSize items at a time. + + + + + Find the module for obj and ensure that obj is reachable in that module by the given name. + + Throw PicklingError if any of the following are true: + - The module couldn't be determined. + - The module couldn't be loaded. + - The given name doesn't exist in the module. + - The given name is a different object than obj. + + Otherwise, return the name of the module. + + To determine which module obj lives in, obj.__module__ is used if available. The + module named by obj.__module__ is loaded if needed. If obj has no __module__ + attribute, then each loaded module is searched. If a loaded module has an + attribute with the given name, and that attribute is the same object as obj, + then that module is used. + + + + + Interpret everything from markIndex to the top of the stack as a sequence + of key, value, key, value, etc. Set dict[key] = value for each. Pop + everything from markIndex up when done. + + + + + Used to check the type to see if we can do a comparison. Returns true if we can + or false if we should return NotImplemented. May throw if the type's really wrong. + + + + + Helper function for doing the comparisons. time has no __cmp__ method + + + + + Base class used for iterator wrappers. + + + + + Returns the dialects from the code context. + + + + + + + Populates the given directory w/ the locale information from the given + CultureInfo. + + + + + Error function on real values + + + + + Complementary error function on real values: erfc(x) = 1 - erf(x) + + + + + Gamma function on real values + + + + + Natural log of absolute value of Gamma function + + + + + Checks for the specific permissions, provided by the mode parameter, are available for the provided path. Permissions can be: + + F_OK: Check to see if the file exists + R_OK | W_OK | X_OK: Check for the specific permissions. Only W_OK is respected. + + + + + single instance of environment dictionary is shared between multiple runtimes because the environment + is shared by multiple runtimes. + + + + + lstat(path) -> stat result + Like stat(path), but do not follow symbolic links. + + + + + spawns a new process. + + If mode is nt.P_WAIT then then the call blocks until the process exits and the return value + is the exit code. + + Otherwise the call returns a handle to the process. The caller must then call nt.waitpid(pid, options) + to free the handle and get the exit code of the process. Failure to call nt.waitpid will result + in a handle leak. + + + + + spawns a new process. + + If mode is nt.P_WAIT then then the call blocks until the process exits and the return value + is the exit code. + + Otherwise the call returns a handle to the process. The caller must then call nt.waitpid(pid, options) + to free the handle and get the exit code of the process. Failure to call nt.waitpid will result + in a handle leak. + + + + + spawns a new process. + + If mode is nt.P_WAIT then then the call blocks until the process exits and the return value + is the exit code. + + Otherwise the call returns a handle to the process. The caller must then call nt.waitpid(pid, options) + to free the handle and get the exit code of the process. Failure to call nt.waitpid will result + in a handle leak. + + + + + spawns a new process. + + If mode is nt.P_WAIT then then the call blocks until the process exits and the return value + is the exit code. + + Otherwise the call returns a handle to the process. The caller must then call nt.waitpid(pid, options) + to free the handle and get the exit code of the process. Failure to call nt.waitpid will result + in a handle leak. + + + + + Copy elements from a Python mapping of dict environment variables to a StringDictionary. + + + + + Convert a sequence of args to a string suitable for using to spawn a process. + + + + + Python regular expression module. + + + + + Preparses a regular expression text returning a ParsedRegex class + that can be used for further regular expressions. + + + + + Compiled reg-ex pattern + + + + + Process a sequence of objects that are compatible with ObjectToSocket(). Return two + things as out params: an in-order List of sockets that correspond to the original + objects in the passed-in sequence, and a mapping of these socket objects to their + original objects. + + The socketToOriginal mapping is generated because the CPython select module supports + passing to select either file descriptor numbers or an object with a fileno() method. + We try to be faithful to what was originally requested when we return. + + + + + Return the System.Net.Sockets.Socket object that corresponds to the passed-in + object. obj can be a System.Net.Sockets.Socket, a PythonSocket.SocketObj, a + long integer (representing a socket handle), or a Python object with a fileno() + method (whose result is used to look up an existing PythonSocket.SocketObj, + which is in turn converted to a Socket. + + + + + Convert an object to a 32-bit integer. This adds two features to Converter.ToInt32: + 1. Sign is ignored. For example, 0xffff0000 converts to 4294901760, where Convert.ToInt32 + would throw because 0xffff0000 is less than zero. + 2. Overflow exceptions are thrown. Converter.ToInt32 throws TypeError if x is + an integer, but is bigger than 32 bits. Instead, we throw OverflowException. + + + + + Convert an object to a 16-bit integer. This adds two features to Converter.ToInt16: + 1. Sign is ignored. For example, 0xff00 converts to 65280, where Convert.ToInt16 + would throw because signed 0xff00 is -256. + 2. Overflow exceptions are thrown. Converter.ToInt16 throws TypeError if x is + an integer, but is bigger than 16 bits. Instead, we throw OverflowException. + + + + + Return a standard socket exception (socket.error) whose message and error code come from a SocketException + This will eventually be enhanced to generate the correct error type (error, herror, gaierror) based on the error code. + + + + + Convert an IPv6 address byte array to a string in standard colon-hex notation. + The .NET IPAddress.ToString() method uses dotted-quad for the last 32 bits, + which differs from the normal Python implementation (but is allowed by the IETF); + this method returns the standard (no dotted-quad) colon-hex form. + + + + + Handle conversion of "" to INADDR_ANY and "<broadcast>" to INADDR_BROADCAST. + Otherwise returns host unchanged. + + + + + Return the IP address associated with host, with optional address family checking. + host may be either a name or an IP address (in string form). + + If family is non-null, a gaierror will be thrown if the host's address family is + not the same as the specified family. gaierror is also raised if the hostname cannot be + converted to an IP address (e.g. through a name lookup failure). + + + + + Return the IP address associated with host, with optional address family checking. + host may be either a name or an IP address (in string form). + + If family is non-null, a gaierror will be thrown if the host's address family is + not the same as the specified family. gaierror is also raised if the hostname cannot be + converted to an IP address (e.g. through a name lookup failure). + + + + + Return fqdn, but with its domain removed if it's on the same domain as the local machine. + + + + + Convert a (host, port) tuple [IPv4] (host, port, flowinfo, scopeid) tuple [IPv6] + to its corresponding IPEndPoint. + + Throws gaierror if host is not a valid address. + Throws ArgumentTypeException if any of the following are true: + - address does not have exactly two elements + - address[0] is not a string + - address[1] is not an int + + + + + Convert an IPEndPoint to its corresponding (host, port) [IPv4] or (host, port, flowinfo, scopeid) [IPv6] tuple. + Throws SocketException if the address family is other than IPv4 or IPv6. + + + + + handleToSocket allows us to translate from Python's idea of a socket resource (file + descriptor numbers) to .NET's idea of a socket resource (System.Net.Socket objects). + In particular, this allows the select module to convert file numbers (as returned by + fileno()) and convert them to Socket objects so that it can do something useful with them. + + + + + Return the internal System.Net.Sockets.Socket socket object associated with the given + handle (as returned by GetHandle()), or null if no corresponding socket exists. This is + primarily intended to be used by other modules (such as select) that implement + networking primitives. User code should not normally need to call this function. + + + + + Create a Python socket object from an existing .NET socket object + (like one returned from Socket.Accept()) + + + + + Perform initialization common to all constructors + + + + + Wrapper class for emitting locals/variables during marshalling code gen. + + + + + A wrapper around allocated memory to ensure it gets released and isn't accessed + when it could be finalized. + + + + + Creates a new MemoryHolder and allocates a buffer of the specified size. + + + + + Creates a new MemoryHolder at the specified address which is not tracked + by us and we will never free. + + + + + Creates a new MemoryHolder at the specified address which will keep alive the + parent memory holder. + + + + + Used to track the lifetime of objects when one memory region depends upon + another memory region. For example if you have an array of objects that + each have an element which has it's own lifetime the array needs to keep + the individual elements alive. + + The keys used here match CPython's keys as tested by CPython's test_ctypes. + Typically they are a string which is the array index, "ffffffff" when + from_buffer is used, or when it's a simple type there's just a string + instead of the full dictionary - we store that under the key "str". + + + + + Copies the data in data into this MemoryHolder. + + + + + Copies memory from one location to another keeping the associated memory holders alive during the + operation. + + + + + Gets the address of the held memory. The caller should ensure the MemoryHolder + is always alive as long as the address will continue to be accessed. + + + + + Gets a list of objects which need to be kept alive for this MemoryHolder to be + remain valid. + + + + + Native functions used for exposing ctypes functionality. + + + + + Allocates memory that's zero-filled + + + + + Helper function for implementing memset. Could be more efficient if we + could P/Invoke or call some otherwise native code to do this. + + + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + + + Implementation of our cast function. data is marshalled as a void* + so it ends up as an address. obj and type are marshalled as an object + so we need to unmarshal them. + + + + + Returns a new type which represents a pointer given the existing type. + + + + + Converts an address acquired from PyObj_FromPtr or that has been + marshaled as type 'O' back into an object. + + + + + Converts an object into an opaque address which can be handed out to + managed code. + + + + + Decreases the ref count on an object which has been increased with + Py_INCREF. + + + + + Increases the ref count on an object ensuring that it will not be collected. + + + + + returns address of C instance internal buffer. + + It is the callers responsibility to ensure that the provided instance will + stay alive if memory in the resulting address is to be used later. + + + + + Gets the required alignment of the given type. + + + + + Gets the required alignment of an object. + + + + + Returns a pointer instance for the given CData + + + + + Given a specific size returns a .NET type of the equivalent size that + we can use when marshalling these values across calls. + + + + + Shared helper between struct and union for getting field info and validating it. + + + + + Verifies that the provided bit field settings are valid for this type. + + + + + Shared helper to get the _fields_ list for struct/union and validate it. + + + + + Helper function for translating from memset to NT's FillMemory API. + + + + + Helper function for translating from memset to NT's FillMemory API. + + + + + Emits the marshalling code to create a CData object for reverse marshalling. + + + + + Gets a function which casts the specified memory. Because this is used only + w/ Python API we use a delegate as the return type instead of an actual address. + + + + + Gets the ModuleBuilder used to generate our unsafe call stubs into. + + + + + The enum used for tracking the various ctypes primitive types. + + + + 'c' + + + 'b' + + + 'B' + + + 'h' + + + 'H' + + + 'i' + + + 'I' + + + 'l' + + + 'L' + + + 'f' + + + 'd', 'g' + + + 'q' + + + 'Q' + + + 'O' + + + 'P' + + + 'z' + + + 'Z' + + + 'u' + + + '?' + + + 'v' + + + 'X' + + + + Base class for all ctypes interop types. + + + + + The meta class for ctypes array instances. + + + + + Common functionality that all of the meta classes provide which is part of + our implementation. This is used to implement the serialization/deserialization + of values into/out of memory, emit the marshalling logic for call stubs, and + provide common information (size/alignment) for the types. + + + + + Deserialized the value of this type from the given address at the given + offset. Any new objects which are created will keep the provided + MemoryHolder alive. + + raw determines if the cdata is returned or if the primitive value is + returned. This is only applicable for subtypes of simple cdata types. + + + + + Serializes the provided value into the specified address at the given + offset. + + + + + Gets the .NET type which is used when calling or returning the value + from native code. + + + + + Gets the .NET type which the native type is converted into when going to Python + code. This is usually int, BigInt, double, object, or a CData type. + + + + + Emits marshalling of an object from Python to native code. This produces the + native type from the Python type. + + + + + Emits marshalling from native code to Python code This produces the python type + from the native type. This is used for return values and parameters + to Python callable objects that are passed back out to native code. + + + + + Gets the native size of the type + + + + + Gets the required alignment for the type + + + + + Returns a string which describes the type. Used for _buffer_info implementation which + only exists for testing purposes. + + + + + Converts an object into a function call parameter. + + + + + Creates a new CFuncPtr object from a tuple. The 1st element of the + tuple is the ordinal or function name. The second is an object with + a _handle property. The _handle property is the handle of the module + from which the function will be loaded. + + + + + Creates a new CFuncPtr which calls a COM method. + + + + + Creates a new CFuncPtr with the specfied address. + + + + + Creates a new CFuncPtr with the specfied address. + + + + + we need to keep alive any methods which have arguments for the duration of the + call. Otherwise they could be collected on the finalizer thread before we come back. + + + + + Creates a method for calling with the specified signature. The returned method has a signature + of the form: + + (IntPtr funcAddress, arg0, arg1, ..., object[] constantPool) + + where IntPtr is the address of the function to be called. The arguments types are based upon + the types that the ArgumentMarshaller requires. + + + + + Base class for marshalling arguments from the user provided value to the + call stub. This class provides the logic for creating the call stub and + calling it. + + + + + Emits the IL to get the argument for the call stub generated into + a dynamic method. + + + + + Gets an expression which keeps alive the argument for the duration of the call. + + Returns null if a keep alive is not necessary. + + + + + Gets the expression used to provide the argument. This is the expression + from an incoming DynamicMetaObject. + + + + + Provides marshalling of primitive values when the function type + has no type information or when the user has provided us with + an explicit cdata instance. + + + + + Provides marshalling for when the function type provide argument information. + + + + + Provides marshalling for when the user provides a native argument object + (usually gotten by byref or pointer) and the function type has no type information. + + + + + The meta class for ctypes function pointer instances. + + + + + Converts an object into a function call parameter. + + + + + Fields are created when a Structure is defined and provide + introspection of the structure. + + + + + Called for fields which have been limited to a range of bits. Given the + value for the full type this extracts the individual bits. + + + + + Called for fields which have been limited to a range of bits. Sets the + specified value into the bits for the field. + + + + + The meta class for ctypes pointers. + + + + + Converts an object into a function call parameter. + + + + + Access an instance at the specified address + + + + + The meta class for ctypes simple data types. These include primitives like ints, + floats, etc... char/wchar pointers, and untyped pointers. + + + + + Converts an object into a function call parameter. + + + + + Helper function for reading char/wchar's. This is used for reading from + arrays and pointers to avoid creating lots of 1-char strings. + + + + + Meta class for structures. Validates _fields_ on creation, provides factory + methods for creating instances from addresses and translating to parameters. + + + + + Converts an object into a function call parameter. + + Structures just return themselves. + + + + + If our size/alignment hasn't been initialized then grabs the size/alignment + from all of our base classes. If later new _fields_ are added we'll be + initialized and these values will be replaced. + + + + + Base class for data structures. Subclasses can define _fields_ which + specifies the in memory layout of the values. Instances can then + be created with the initial values provided as the array. The values + can then be accessed from the instance by field name. The value can also + be passed to a foreign C API and the type can be used in other structures. + + class MyStructure(Structure): + _fields_ = [('a', c_int), ('b', c_int)] + + MyStructure(1, 2).a + MyStructure() + + class MyOtherStructure(Structure): + _fields_ = [('c', MyStructure), ('b', c_int)] + + MyOtherStructure((1, 2), 3) + MyOtherStructure(MyStructure(1, 2), 3) + + + + + The meta class for ctypes unions. + + + + + Converts an object into a function call parameter. + + + + + Enum which specifies the format type for a compiled struct + + + + + Struct used to store the format and the number of times it should be repeated. + + + + + Stops execution of Python or other .NET code on the main thread. If the thread is + blocked in native code the thread will be interrupted after it returns back to Python + or other .NET code. + + + + + Provides a dictionary storage implementation whose storage is local to + the thread. + + + + + Represents the date components that we found while parsing the date. Used for zeroing out values + which have different defaults from CPython. Currently we only know that we need to do this for + the year. + + + + + Samples on how to subtype built-in types from C# + + + + + an int variable for demonstration purposes + + + + + an int variable for demonstration purposes + + + + + Returns a new callable object with the provided initial set of arguments + bound to it. Calling the new function then appends to the additional + user provided arguments. + + + + + Creates a new partial object with the provided positional arguments. + + + + + Creates a new partial object with the provided positional and keyword arguments. + + + + + Calls func with the previously provided arguments and more positional arguments. + + + + + Calls func with the previously provided arguments and more positional arguments and keyword arguments. + + + + + Operator method to set arbitrary members on the partial object. + + + + + Operator method to get additional arbitrary members defined on the partial object. + + + + + Operator method to delete arbitrary members defined in the partial object. + + + + + Gets the function which will be called + + + + + Gets the initially provided positional arguments. + + + + + Gets the initially provided keyword arguments or None. + + + + + Gets or sets the dictionary used for storing extra attributes on the partial object. + + + + + BER encoding of an integer value is the number of bytes + required to represent the integer followed by the bytes + + + + + Duplicates a subprocess handle which was created for piping. + + This is only called when we're duplicating the handle to make it inheritable to the child process. In CPython + the parent handle is always reliably garbage collected. Because we know this handle is not going to be + used we close the handle being duplicated. + + + + + Special hash function because IStructuralEquatable.GetHashCode is not allowed to throw. + + + + + Special equals because none of the special cases in Ops.Equals + are applicable here, and the reference equality check breaks some tests. + + + + + gets the object or throws a reference exception + + + + + Special equality function because IStructuralEquatable.Equals is not allowed to throw. + + + + + gets the object or throws a reference exception + + + + + Special equality function because IStructuralEquatable.Equals is not allowed to throw. + + + + + Returns the underlying .NET RegistryKey + + + +
+
diff --git a/packages/IronPython.2.7.4/lib/Net40/IronPython.SQLite.dll b/packages/IronPython.2.7.4/lib/Net40/IronPython.SQLite.dll new file mode 100644 index 0000000000..a1a73bada4 Binary files /dev/null and b/packages/IronPython.2.7.4/lib/Net40/IronPython.SQLite.dll differ diff --git a/packages/IronPython.2.7.4/lib/Net40/IronPython.SQLite.xml b/packages/IronPython.2.7.4/lib/Net40/IronPython.SQLite.xml new file mode 100644 index 0000000000..a58a149621 --- /dev/null +++ b/packages/IronPython.2.7.4/lib/Net40/IronPython.SQLite.xml @@ -0,0 +1,34 @@ + + + + IronPython.SQLite + + + + * The rest are extensions, not normally found in printf() */ + + + * beginning-of-error-codes */ + + + * previously SQLITE_CONFIG_CHUNKALLOC 12 which is now unused. */ + + + * x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE xF */ + + + + Basic locking strategy for Console/Winform applications + + + + + Locking strategy for Medium Trust. It uses the same trick used in the native code for WIN_CE + which doesn't support LockFileEx as well. + + + + * The methods above are in version 1 of the sqlite_module object. Those + + + diff --git a/packages/IronPython.2.7.4/lib/Net40/IronPython.Wpf.dll b/packages/IronPython.2.7.4/lib/Net40/IronPython.Wpf.dll new file mode 100644 index 0000000000..b8353c0a22 Binary files /dev/null and b/packages/IronPython.2.7.4/lib/Net40/IronPython.Wpf.dll differ diff --git a/packages/IronPython.2.7.4/lib/Net40/IronPython.Wpf.xml b/packages/IronPython.2.7.4/lib/Net40/IronPython.Wpf.xml new file mode 100644 index 0000000000..660557fde3 --- /dev/null +++ b/packages/IronPython.2.7.4/lib/Net40/IronPython.Wpf.xml @@ -0,0 +1,53 @@ + + + + IronPython.Wpf + + + + + Provides helpers for interacting with Windows Presentation Foundation applications. + + + + + Loads XAML from the specified XmlReader and returns the deserialized object. Any event handlers + are bound to methods defined in the provided module. Any named objects are assigned to the object. + + The provided object is expected to be the same type as the root of the XAML element. + + + + + Loads XAML from the specified XmlReader and returns the deserialized object. Any event handlers + are bound to methods defined in the provided module. Any named objects are assigned to the object. + + The provided object is expected to be the same type as the root of the XAML element. + + + + + Loads XAML from the specified XmlReader and returns the deserialized object. Any event handlers + are bound to methods defined in the provided module. Any named objects are assigned to the object. + + The provided object is expected to be the same type as the root of the XAML element. + + + + + Loads XAML from the specified XmlReader and returns the deserialized object. Any event handlers + are bound to methods defined in the provided module. Any named objects are assigned to the object. + + The provided object is expected to be the same type as the root of the XAML element. + + + + + Loads XAML from the specified XmlReader and returns the deserialized object. Any event handlers + are bound to methods defined in the provided module. Any named objects are assigned to the object. + + The provided object is expected to be the same type as the root of the XAML element. + + + + diff --git a/packages/IronPython.2.7.4/lib/Net40/IronPython.dll b/packages/IronPython.2.7.4/lib/Net40/IronPython.dll new file mode 100644 index 0000000000..35a05a81d1 Binary files /dev/null and b/packages/IronPython.2.7.4/lib/Net40/IronPython.dll differ diff --git a/packages/IronPython.2.7.4/lib/Net40/IronPython.xml b/packages/IronPython.2.7.4/lib/Net40/IronPython.xml new file mode 100644 index 0000000000..c22da1cbbf --- /dev/null +++ b/packages/IronPython.2.7.4/lib/Net40/IronPython.xml @@ -0,0 +1,7569 @@ + + + + IronPython + + + + + Creates a method frame for tracking purposes and enforces recursion + + + + + Removes the frames from generated code for when we're compiling the tracing delegate + which will track the frames it's self. + + + + + Returns true if the node can throw, false otherwise. Used to determine + whether or not we need to update the current dynamic stack info. + + + + + A temporary variable to track if the current line number has been emitted via the fault update block. + + For example consider: + + try: + raise Exception() + except Exception, e: + # do something here + raise + + At "do something here" we need to have already emitted the line number, when we re-raise we shouldn't add it + again. If we handled the exception then we should have set the bool back to false. + + We also sometimes directly check _lineNoUpdated to avoid creating this unless we have nested exceptions. + + + + + A temporary variable to track the current line number + + + + + Fake ScopeStatement for FunctionCode's to hold on to after we have deserialized pre-compiled code. + + + + + Gets or creates the FunctionCode object for this FunctionDefinition. + + + + + Gets the expression for updating the dynamic stack trace at runtime when an + exception is thrown. + + + + + Gets the expression for the actual updating of the line number for stack traces to be available + + + + + Wraps the body of a statement which should result in a frame being available during + exception handling. This ensures the line number is updated as the stack is unwound. + + + + + The variable used to hold out parents closure tuple in our local scope. + + + + + Gets the expression associated with the local CodeContext. If the function + doesn't have a local CodeContext then this is the global context. + + + + + True if this scope accesses a variable from an outer scope. + + + + + True if an inner scope is accessing a variable defined in this scope. + + + + + True if we are forcing the creation of a dictionary for storing locals. + + This occurs for calls to locals(), dir(), vars(), unqualified exec, and + from ... import *. + + + + + True if variables can be set in a late bound fashion that we don't + know about at code gen time - for example via from foo import *. + + This is tracked independently of the ContainsUnqualifiedExec/NeedsLocalsDictionary + + + + + Variables that are bound in an outer scope - but not a global scope + + + + + Variables that are bound to the global scope + + + + + Variables that are referred to from a nested scope and need to be + promoted to cells. + + + + + Provides a place holder for the expression which represents + a FunctionCode. For functions/classes this gets updated after + the AST has been generated because the FunctionCode needs to + know about the tree which gets generated. For modules we + immediately have the value because it always comes in as a parameter. + + + + + Reducible node so that re-writing for profiling does not occur until + after the script code has been completed and is ready to be compiled. + + Without this extra node profiling would force reduction of the node + and we wouldn't have setup our constant access correctly yet. + + + + + A global allocator that puts all of the globals into an array access. The array is an + array of PythonGlobal objects. We then just close over the array for any inner functions. + + Once compiled a RuntimeScriptCode is produced which is closed over the entire execution + environment. + + + + + Specifies the compilation mode which will be used during the AST transformation + + + + + Compilation will proceed in a manner in which the resulting AST can be serialized to disk. + + + + + Compilation will use a type and declare static fields for globals. The resulting type + is uncollectible and therefore extended use of this will cause memory leaks. + + + + + Compilation will use an array for globals. The resulting code will be fully collectible + and once all references are released will be collected. + + + + + Compilation will force all global accesses to do a full lookup. This will also happen for + any unbound local references. This is the slowest form of code generation and is only + used for exec/eval code where we can run against an arbitrary dictionary. + + + + + Implements globals which are backed by a static type, followed by an array if the static types' slots become full. The global + variables are stored in static fields on a type for fast access. The type also includes fields for constants and call sites + so they can be accessed much fasetr. + + We don't generate any code into the type though - DynamicMethod's are much faster for code gen then normal ref emit. + + + Implements globals which are backed by a static type, followed by an array if the static types' slots become full. The global + variables are stored in static fields on a type for fast access. The type also includes fields for constants and call sites + so they can be accessed much fasetr. + + We don't generate any code into the type though - DynamicMethod's are much faster for code gen then normal ref emit. + + + + Ensures the underlying array is long enough to accomodate the given index + The context storage type corresponding to the given index + + + Ensures the underlying array is long enough to accomodate the given index + The constant storage type corresponding to the given index + + + Ensures the underlying array is long enough to accomodate the given index + The global storage type corresponding to the given index + + + Ensures the underlying array is long enough to accomodate the given index + The site storage type corresponding to the given index + + + + Not used. + + + + + Not used. + + + + + PythonWalker class - The Python AST Walker (default result is true) + + + + + Not an actual node. We don't create this, but it's here for compatibility. + + + + + Interface used to mark objects which contain a dictionary of custom attributes that shadow + their existing attributes in a dynamic fashion. + + + + + Ensures that a non-null IDictionary instance is created for CustomAttributes and + returns it. + + + + + Meta-object which allows IPythonExpandable objects to behave like Python objects in their + ability to dynamically add and remove new or existing custom attributes, generally shadowing + existing built-in members. + + Getting: Member accesses first consult the object's CustomAttributes dictionary, then fall + through to the underlying object. + + Setting: Values can be bound to any member name, shadowing any existing attributes except + public non-PythonHidden fields and properties, which will bypass the dictionary. Thus, + it is possible for SetMember to fail, for example if the property is read-only or of + the wrong type. + + Deleting: Any member represented in the dictionary can be deleted, re-exposing the + underlying member if it exists. Any other deletions will fail. + + + + + Provides a way for the binder to provide a custom error message when lookup fails. Just + doing this for the time being until we get a more robust error return mechanism. + + + + + Provides a way for the binder to provide a custom error message when lookup fails. Just + doing this for the time being until we get a more robust error return mechanism. + + + + + Gets the PythonBinder associated with tihs CodeContext + + + + + Performs .NET member resolution. This looks within the given type and also + includes any extension members. Base classes and their extension members are + not searched. + + + + + Performs .NET member resolution. This looks within the given type and also + includes any extension members. Base classes and their extension members are + not searched. + + This version allows PythonType's for protected member resolution. It shouldn't + be called externally for other purposes. + + + + + Performs .NET member resolution. This looks the type and any base types + for members. It also searches for extension members in the type and any base types. + + + + + Gets the member names which are defined in this type and any extension members. + + This search does not include members in any subtypes or their extension members. + + + + + Gets the member names which are defined in the type and any subtypes. + + This search includes members in the type and any subtypes as well as extension + types of the type and its subtypes. + + + + + Creates the initial table of extension types. These are standard extension that we apply + to well known .NET types to make working with them better. Being added to this table does + not make a type a Python type though so that it's members are generally accessible w/o an + import clr and their type is not re-named. + + + + + Creates a table of standard .NET types which are also standard Python types. These types have a standard + set of extension types which are shared between all runtimes. + + + + + Event handler for when our domain manager has an assembly loaded by the user hosting the script + runtime. Here we can gather any information regarding extension methods. + + Currently DLR-style extension methods become immediately available w/o an explicit import step. + + + + + Provides a cache from Type/name -> PythonTypeSlot and also allows access to + all members (and remembering whether all members are cached). + + + + + Writes to a cache the result of a type lookup. Null values are allowed for the slots and they indicate that + the value does not exist. + + + + + Looks up a cached type slot for the specified member and type. This may return true and return a null slot - that indicates + that a cached result for a member which doesn't exist has been stored. Otherwise it returns true if a slot is found or + false if it is not. + + + + + Looks up a cached member group for the specified member and type. This may return true and return a null group - that indicates + that a cached result for a member which doesn't exist has been stored. Otherwise it returns true if a group is found or + false if it is not. + + + + + Checks to see if all members have been populated for the provided type. + + + + + Populates the type with all the provided members and marks the type + as being fully cached. + + The dictionary is used for the internal storage and should not be modified after + providing it to the cache. + + + + + Returns an enumerable object which provides access to all the members of the provided type. + + The caller must check that the type is fully cached and populate the cache if it isn't before + calling this method. + + + + + Implements a built-in module which is instanced per PythonContext. + + Implementers can subclass this type and then have a module which has efficient access + to internal state (this doesn't need to go through PythonContext.GetModuleState). These + modules can also declare module level globals which they'd like to provide efficient + access to by overloading GetGlobalVariableNames. When Initialize is called these + globals are provided and can be cached in the instance for fast global access. + + Just like normal static modules these modules are registered with the PythonModuleAttribute. + + + + + Initializes the module for it's first usage. By default this calls PerformModuleReload with the + the dictionary. + + The CodeContext for the module. + A list of globals which have optimize access. Contains at least all of the global variables reutrned by GetGlobalVariableNames. + + + + Gets a list of variable names which should have optimized storage (instances of PythonGlobal objects). + The module receives the global objects during the Initialize call and can hold onto them for + direct access to global members. + + + + + Called when the user attempts to reload() on your module and by the base class Initialize method. + + This provides an opportunity to allocate any per-module data which is not simply function definitions. + + A common usage here is to create exception objects which are allocated by the module using PythonExceptions.CreateSubType. + + + + + Provides access to the PythonContext which this module was created for. + + + + + Provides access to the CodeContext for the module. Returns null before Initialize() is called. + + + + + Copy on write constant dictionary storage used for dictionaries created with constant items. + + + + + Abstract base class for all PythonDictionary storage. + + Defined as a class instead of an interface for performance reasons. Also not + using IDictionary* for keeping a simple interface. + + Full locking is defined as being on the DictionaryStorage object it's self, + not an internal member. This enables subclasses to provide their own locking + aruond large operations and call lock free functions. + + + + + Adds items from this dictionary into the other dictionary + + + + + Provides fast access to the __path__ attribute if the dictionary storage supports caching it. + + + + + Provides fast access to the __package__ attribute if the dictionary storage supports caching it. + + + + + Provides fast access to the __builtins__ attribute if the dictionary storage supports caching it. + + + + + Provides fast access to the __name__ attribute if the dictionary storage supports caching it. + + + + + Provides fast access to the __import__ attribute if the dictionary storage supports caching it. + + + + + Provides more specific type information for Python dictionaries which are not strongly typed. + + This attribute can be applied to fields, parameters, proeprties, and return values. It can be + inspected to get type information about the types of the keys and values of the expected + dictionary or the returned dictionary. + + + + + Adapts an IDictionary[object, object] for use as a PythonDictionary used for + our debug frames. Also hides the special locals which start with $. + + + + + An interface that is implemented on DynamicMetaObjects. + + This allows objects to opt-into custom conversions when calling + COM APIs. The IronPython binders all call this interface before + doing any COM binding. + + + + + Captures and flows the state of executing code from the generated + Python code into the IronPython runtime. + + + + + Creates a new CodeContext which is backed by the specified Python dictionary. + + + + + Attempts to lookup the provided name in this scope or any outer scope. + + + + + Looks up a global variable. If the variable is not defined in the + global scope then built-ins is consulted. + + + + + Attempts to lookup the variable in the local scope. + + + + + Removes a variable from the local scope. + + + + + Sets a variable in the local scope. + + + + + Gets a variable from the global scope. + + + + + Sets a variable in the global scope. + + + + + Removes a variable from the global scope. + + + + + Returns the dictionary associated with __builtins__ if one is + set or null if it's not available. If __builtins__ is a module + the module's dictionary is returned. + + + + + Gets the module state for top-level code. + + + + + Gets the DLR scope object that corresponds to the global variables of this context. + + + + + Gets the PythonContext which created the CodeContext. + + + + + Gets the dictionary for the global variables from the ModuleContext. + + + + + True if this global context should display CLR members on shared types (for example .ToString on int/bool/etc...) + + False if these attributes should be hidden. + + + + + Gets the dictionary used for storage of local variables. + + + + + Marks a type so that IronPython will not expose the IEnumerable interface out as + __iter__ + + + + + ArgBuilder which provides the CodeContext parameter to a method. + + + + + Small reducable node which just fetches the value from a ClosureCell + object. Like w/ global variables the compiler recognizes these on + sets and turns them into assignments on the python global object. + + + + + Creates the storage for the closure cell. If this is a closure over a parameter it + captures the initial incoming parameter value. + + + + + Reduces the closure cell to a read of the value stored in the cell. + + + + + Assigns a value to the closure cell. + + + + + Removes the current value from the closure cell. + + + + + Gets the expression which points at the closure cell. + + + + + The original expression for the incoming parameter if this is a parameter closure. Otherwise + the value is null. + + + + + Gets the PythonVariable for which this closure expression was created. + + + + + Tracking for variables lifted into closure objects. Used to store information in a function + about the outer variables it accesses. + + + + + When finding a yield return or yield break, this rewriter flattens out + containing blocks, scopes, and expressions with stack state. All + scopes encountered have their variables promoted to the generator's + closure, so they survive yields. + + + + + Spills the right side into a temp, and replaces it with its temp. + Returns the expression that initializes the temp. + + + + + Makes an assignment to this variable. Pushes the assignment as far + into the right side as possible, to allow jumps into it. + + + + + Accesses the property of a tuple. The node can be created first and then the tuple and index + type can be filled in before the tree is actually generated. This enables creation of these + nodes before the tuple type is actually known. + + + + + Represents code which can be lazily compiled. + + The code is created in an AST which provides the Expression of T and + whether or not the code should be interpreted. For non-pre compiled + scenarios the code will not be compiled until the 1st time it is run. + + For pre-compiled scenarios the code is IExpressionSerializable and will + turn into a normal pre-compiled method. + + + + + Marks a type so that IronPython will not expose types which have GetMemberNames + as having a __dir__ method. + + Also suppresses __dir__ on something which implements IDynamicMetaObjectProvider + but is not an IPythonObject. + + + + + Marks a type so that IronPython will not expose the ICollection interface out as + __len__. + + + + + Marks a type so that IronPython will not expose the IDisposable interface out as + __enter__ and __exit__ methods of a context manager. + + + + + Marks a type so that IronPython will not expose the IEnumerable interface out as + __contains__ + + + + + Singleton used for dictionaries which contain no items. + + + + + Represents the set of extension methods which are loaded into a module. + + This set is immutable (as far the external viewer is considered). When a + new extension method set is loaded into a module we create a new ExtensionMethodsSet object. + + Multiple modules which have the same set of extension methods use the same set. + + + + + Returns all of the extension methods with the given name. + + + + + Returns all of the extension methods which are applicable for the given type. + + + + + Tracks the extension types that are loaded for a given assembly. + + We can have either types, namespaces, or a full assembly added as a reference. + + When the user just adds types we just add them to the type hash set. + + When the user adds namespaces we add them to the namespaces hashset. On the + next lookup we'll lazily load the types from that namespace and put them in Types. + + When the user adds assemblies we set the value to the NotYetLoadedButFullAssembly + value. The next load request will load the types from that namespace and put them + in Types. When we do that we'll mark the assembly as FullyLoaded so we don't + have to go through that again if the user adds a namespace. + + + + + Return a copy of this tuple's data array. + + + + + ModuleDictionaryStorage for a built-in module which is bound to a specific instance. + + These modules don't need to use PythonContext.GetModuleState() for storage and therefore + can provide efficient access to internal variables. They can also cache PythonGlobal + objects and provide efficient access to module globals. + + To the end user these modules appear just like any other module. These modules are + implemented by subclassing the BuiltinPythonModule class. + + + + + Enables lazy initialization of module dictionaries. + + + + + Gets all of the extra names and values stored in the dictionary. + + + + + Attemps to sets a value in the extra keys. Returns true if the value is set, false if + the value is not an extra key. + + + + + Attempts to get a value from the extra keys. Returns true if the value is an extra + key and has a value. False if it is not an extra key or doesn't have a value. + + + + + Attempts to remove the key. Returns true if the key is removed, false + if the key was not removed, or null if the key is not an extra key. + + + + + A TypeSlot is an item that gets stored in a type's dictionary. Slots provide an + opportunity to customize access at runtime when a value is get or set from a dictionary. + + + + + Gets the value stored in the slot for the given instance binding it to an instance if one is provided and + the slot binds to instances. + + + + + Sets the value of the slot for the given instance. + + true if the value was set, false if it can't be set + + + + Deletes the value stored in the slot from the instance. + + true if the value was deleted, false if it can't be deleted + + + + Gets an expression which is used for accessing this slot. If the slot lookup fails the error expression + is used again. + + The default implementation just calls the TryGetValue method. Subtypes of PythonTypeSlot can override + this and provide a more optimal implementation. + + + + + True if generating code for gets can result in more optimal accesses. + + + + + True if TryGetValue will always succeed, false if it may fail. + + This is used to optimize away error generation code. + + + + + Defines the internal interface used for accessing weak references and adding finalizers + to user-defined types. + + + + + Gets the current WeakRefTracker for an object that can be used to + append additional weak references. + + + + + Attempts to set the WeakRefTracker for an object. Used on the first + addition of a weak ref tracker to an object. If the object doesn't + support adding weak references then it returns false. + + + + + Sets a WeakRefTracker on an object for the purposes of supporting finalization. + All user types (new-style and old-style) support finalization even if they don't + support weak-references, and therefore this function always succeeds. Note the + slot used to store the WeakRefTracker is still shared between SetWeakRef and + SetFinalizer if a type supports both. + + + + + + Provides a list of all the members of an instance. ie. all the keys in the + dictionary of the object. Note that it can contain objects that are not strings. + + Such keys can be added in IronPython using syntax like: + obj.__dict__[100] = someOtherObject + + This Python specific version also supports filtering based upon the show cls + flag by flowing in the code context. + + + + + Validates that the current self object is usable for this method. + + + + + Marks a class as being hidden from the Python hierarchy. This is applied to the base class + and then all derived types will not see the base class in their hierarchy and will not be + able to access members declaredo on the base class. + + + + + Provides more specific type information for Python lists which are not strongly typed. + + This attribute can be applied to fields, parameters, proeprties, and return values. It can be + inspected to get type information about the types of the values of the expected + list or the returned list. + + + + + Captures the globals and other state of module code. + + + + + Creates a new ModuleContext which is backed by the specified dictionary. + + + + + Creates a new ModuleContext for the specified module. + + + + + Initializes __builtins__ for the module scope. + + + + + Gets the dictionary used for the global variables in the module + + + + + Gets the language context which created this module. + + + + + Gets the DLR Scope object which is associated with the modules dictionary. + + + + + Gets the global CodeContext object which is used for execution of top-level code. + + + + + Gets the module object which this code is executing in. + + This module may or may not be published in sys.modules. For user defined + code typically the module gets published at the start of execution. But if + this ModuleContext is attached to a Scope, or if we've just created a new + module context for executing code it will not be in sys.modules. + + + + + Gets the features that code has been compiled with in the module. + + + + + Gets or sets whether code running in this context should display + CLR members (for example .ToString on objects). + + + + + Cached global value. Created and maintained on a per-language basis. Default + implementation returns a singleton which indicates caching is not occuring. + + + + + Creates a new ModuleGlobalCache with the specified value. + + + + + Event handler for when the value has changed. Language implementors should call this when + the cached value is invalidated. + + + + + True if the ModuleGlobalCache is participating in a caching strategy. + + + + + True if there is currently a value associated with this global variable. False if + it is currently unassigned. + + + + + Gets or sets the current cached value + + + + + Enable true division (1/2 == .5) + + + + + Indicates that .NET methods such as .ToString should be available on Python objects. + + + + + Indicates that the module should be generated in an optimal form which will result + in it being uncollectable. + + + + + Indicates when the module should be executed immedatiately upon creation. + + + + + Enable usage of the with statement + + + + + Enable absolute imports + + + + + Indiciates that __builtins__ should not be set in the module + + + + + Indiciates that when the module is initialized it should set __builtins__ to the __builtin__ module + instead of the __builtin__ dictionary. + + + + + Marks code as being created for exec, eval. Code generated this way will + be capable of running against different scopes and will do lookups at runtime + for free global variables. + + + + + Indiciates that the first line of code should be skipped. + + + + + Enable usage of print as a function for better compatibility with Python 3.0. + + + + + Forces the code to be interpreted rather than compiled + + + + + String Literals should be parsed as Unicode strings + + + + + Include comments in the parse tree + + + + + Generated code should support light exceptions + + + + + Manages the acquisition of profiling data for a single ScriptRuntime + + + + + Get the unique Profiler instance for this ScriptRuntime + + + + + Given a MethodBase, return an index into the array of perf data. Treat each + CLR method as unique. + + + + + Given the unique name of something we're profiling, return an index into the array of perf data. + + + + + Add a new profiler entry. Not all names are unique. + + + + + Gets the current summary of profile data + + + + + Resets the current summary of profile data back to zero + + + + + Adds profiling calls to a Python method. + Calculates both the time spent only in this method + + + + + Wraps a call to a MethodInfo with profiling capture for that MethodInfo + + + + + Encapsulates profiler data to return to clients + + + + + Marks that this built-in method should be treated as external by the profiler. + When placed on a call emitted into a Python method, all the time spent in this + call will still show up in its parent's inclusive time, but will not be + part of its exclusive time. + + + + + Gets the closure tuple from our parent context. + + + + + PythonWalkerNonRecursive class - The Python AST Walker (default result is false) + + + + + Pulls the closure tuple from our function/generator which is flowed into each function call. + + + + + Returns an expression which creates the function object. + + + + + Creates the LambdaExpression which is the actual function body. + + + + + Creates the LambdaExpression which implements the body of the function. + + The functions signature is either "object Function(PythonFunction, ...)" + where there is one object parameter for each user defined parameter or + object Function(PythonFunction, object[]) for functions which take more + than PythonCallTargets.MaxArgs arguments. + + + + + Determines delegate type for the Python function + + + + + Scope for the comprehension. Because scopes are usually statements and comprehensions are expressions + this doesn't actually show up in the AST hierarchy and instead hangs off the comprehension expression. + + + + + Provides globals for when we need to lookup into a dictionary for each global access. + + This is the slowest form of globals and is only used when we need to run against an + arbitrary dictionary given to us by a user. + + + + + Provides a wrapper around "dynamic" expressions which we've opened coded (for optimized code generation). + + This lets us recognize both normal Dynamic and our own Dynamic expressions and apply the combo binder on them. + + + + + A ScriptCode which can be saved to disk. We only create this when called via + the clr.CompileModules API. This ScriptCode does not support running. + + + + + Parameter base class + + + + + Position of the parameter: 0-based index + + + + + Parameter name + + + + + Top-level ast for all Python code. Typically represents a module but could also + be exec or eval code. + + + + + Creates a new PythonAst without a body. ParsingFinished should be called afterwards to set + the body. + + + + + Called when parsing is complete, the body is built, the line mapping and language features are known. + + This is used in conjunction with the constructor which does not take a body. It enables creating + the outer most PythonAst first so that nodes can always have a global parent. This lets an un-bound + tree to still provide it's line information immediately after parsing. When we set the location + of each node during construction we also set the global parent. When we name bind the global + parent gets replaced with the real parent ScopeStatement. + + a mapping of where each line begins + The body of code + The language features which were set during parsing. + + + + Binds an AST and makes it capable of being reduced and compiled. Before calling Bind an AST cannot successfully + be reduced. + + + + + Creates a variable at the global level. Called for known globals (e.g. __name__), + for variables explicitly declared global by the user, and names accessed + but not defined in the lexical scope. + + + + + Reduces the PythonAst to a LambdaExpression of type Type. + + + + + Returns a ScriptCode object for this PythonAst. The ScriptCode object + can then be used to execute the code against it's closed over scope or + to execute it against a different scope. + + + + + Rewrites the tree for performing lookups against globals instead of being bound + against the optimized scope. This is used if the user compiles optimied code and then + runs it against a different scope. + + + + + True division is enabled in this AST. + + + + + True if the with statement is enabled in this AST. + + + + + True if absolute imports are enabled + + + + + True if this is on-disk code which we don't really have an AST for. + + + + + Represents a reference to a name. A PythonReference is created for each name + referred to in a scope (global, class, or function). + + + + + True if the user provided a step parameter (either providing an explicit parameter + or providing an empty step parameter) false if only start and stop were provided. + + + + + The statements under the try-block. + + + + + Array of except (catch) blocks associated with this try. NULL if there are no except blocks. + + + + + The body of the optional Else block for this try. NULL if there is no Else block. + + + + + The body of the optional finally associated with this try. NULL if there is no finally block. + + + + + Transform multiple python except handlers for a try block into a single catch body. + + The variable for the exception in the catch block. + Null if there are no except handlers. Else the statement to go inside the catch handler + + + + Surrounds the body of an except block w/ the appropriate code for maintaining the traceback. + + + + + True iff there is a path in control flow graph on which the variable is used before initialized (assigned or deleted). + + + + + True iff the variable is referred to from the inner scope. + + + + + Local variable. + + Local variables can be referenced from nested lambdas + + + + + Parameter to a LambdaExpression + + Like locals, they can be referenced from nested lambdas + + + + + Global variable + + Should only appear in global (top level) lambda. + + + + + WithStatement is translated to the DLR AST equivalent to + the following Python code snippet (from with statement spec): + + mgr = (EXPR) + exit = mgr.__exit__ # Not calling it yet + value = mgr.__enter__() + exc = True + try: + VAR = value # Only if "as VAR" is present + BLOCK + except: + # The exceptional case is handled here + exc = False + if not exit(*sys.exc_info()): + raise + # The exception is swallowed if exit() returns true + finally: + # The normal and non-local-goto cases are handled here + if exc: + exit(None, None, None) + + + + + + A ScriptCode which has been loaded from an assembly which is saved on disk. + + + + + Creates a fake PythonAst object which is represenative of the on-disk script code. + + + + + Base class for all of our fast get delegates. This holds onto the + delegate and provides the Update function. + + + + + Updates the call site when the current rule is no longer applicable. + + + + + Base class for all of our fast set delegates. This holds onto the + delegate and provides the Update and Optimize functions. + + + + + Updates the call site when the current rule is no longer applicable. + + + + + Provides cached global variable for modules to enable optimized access to + module globals. Both the module global value and the cached value can be held + onto and the cached value can be invalidated by the providing LanguageContext. + + The cached value is provided by the LanguageContext.GetModuleCache API. + + + + + Small reducable node which just fetches the value from a PythonGlobal + object. The compiler recognizes these on sets and turns them into + assignments on the python global object. + + + + + Represents a script code which can be dynamically bound to execute against + arbitrary Scope objects. This is used for code when the user runs against + a particular scope as well as for exec and eval code as well. It is also + used when tracing is enabled. + + + + + Represents a script code which can be consumed at runtime as-is. This code has + no external dependencies and is closed over its scope. + + + + + Helper class for implementing the Python class. + + This is exposed as a service through PythonEngine and the helper class + uses this service to get the correct remoting semantics. + + + + + Returns an ObjectHandle to a delegate of type Action[Action] which calls the current + command dispatcher. + + + + + Marks that the return value of a function might include NotImplemented. + + This is added to an operator method to ensure that all necessary methods are called + if one cannot guarantee that it can perform the comparison. + + + + + Provides support for emitting warnings when built in methods are invoked at runtime. + + + + + Backwards compatible Convert for the old sites that need to flow CodeContext + + + + + Creates a new InvokeBinder which will call with positional splatting. + + The signature of the target site should be object(function), object[], retType + + + + + + + Creates a new InvokeBinder which will call with positional and keyword splatting. + + The signature of the target site should be object(function), object[], dictionary, retType + + + + + Fallback action for performing an invoke from Python. We translate the + CallSignature which supports splatting position and keyword args into + their expanded form. + + + + + Gets the PythonContext which the CallSiteBinder is associated with. + + + + + Fallback action for performing a new() on a foreign IDynamicMetaObjectProvider. used + when call falls back. + + + + + Python's Invoke is a non-standard action. Here we first try to bind through a Python + internal interface (IPythonInvokable) which supports CallSigantures. If that fails + and we have an IDO then we translate to the DLR protocol through a nested dynamic site - + this includes unsplatting any keyword / position arguments. Finally if it's just a plain + old .NET type we use the default binder which supports CallSignatures. + + + + + Interface used to mark objects as being invokable from Python. These objects support + calling with splatted positional and keyword arguments. + + + + + Provides binding logic which is implemented to follow various Python protocols. This includes + things such as calling __call__ to perform calls, calling __nonzero__/__len__ to convert to + bool, calling __add__/__radd__ to do addition, etc... + + This logic gets shared between both the IDynamicMetaObjectProvider implementation for Python objects as well + as the Python sites. This ensures the logic we follow for our builtin types and user defined + types is identical and properly conforming to the various protocols. + + + + + Gets a MetaObject which converts the provided object to a bool using __nonzero__ or __len__ + protocol methods. This code is shared between both our fallback for a site and our MetaObject + for user defined objects. + + + + + Used for conversions to bool + + + + + Creates a rule for the contains operator. This is exposed via "x in y" in + IronPython. It is implemented by calling the __contains__ method on x and + passing in y. + + If a type doesn't define __contains__ but does define __getitem__ then __getitem__ is + called repeatedly in order to see if the object is there. + + For normal .NET enumerables we'll walk the iterator and see if it's present. + + + + + Helper to handle a comparison operator call. Checks to see if the call can + return NotImplemented and allows the caller to modify the expression that + is ultimately returned (e.g. to turn __cmp__ into a bool after a comparison) + + + + + calls __coerce__ for old-style classes and performs the operation if the coercion is successful. + + + + + Makes the comparison rule which returns an int (-1, 0, 1). TODO: Better name? + + + + + Python has three protocols for slicing: + Simple Slicing x[i:j] + Extended slicing x[i,j,k,...] + Long Slice x[start:stop:step] + + The first maps to __*slice__ (get, set, and del). + This takes indexes - i, j - which specify the range of elements to be + returned. In the slice variants both i, j must be numeric data types. + The 2nd and 3rd are both __*item__. + This receives a single index which is either a Tuple or a Slice object (which + encapsulates the start, stop, and step values) + + This is in addition to a simple indexing x[y]. + + For simple slicing and long slicing Python generates Operators.*Slice. For + the extended slicing and simple indexing Python generates a Operators.*Item + action. + + Extended slicing maps to the normal .NET multi-parameter input. + + So our job here is to first determine if we're to call a __*slice__ method or + a __*item__ method. + + + + + Helper to convert all of the arguments to their known types. + + + + + Gets the arguments that need to be provided to __*item__ when we need to pass a slice object. + + + + + Helper to get the symbols for __*item__ and __*slice__ based upon if we're doing + a get/set/delete and the minimum number of arguments required for each of those. + + + + + Checks if a coercion check should be performed. We perform coercion under the following + situations: + 1. Old instances performing a binary operator (excluding rich comparisons) + 2. User-defined new instances calling __cmp__ but only if we wouldn't dispatch to a built-in __coerce__ on the parent type + + This matches the behavior of CPython. + + + + + + Produces an error message for the provided message and type names. The error message should contain + string formatting characters ({0}, {1}, etc...) for each of the type names. + + + + + Delegate for finishing the comparison. This takes in a condition and a return value and needs to update the ConditionalBuilder + with the appropriate resulting body. The condition may be null. + + + + + Base class for calling indexers. We have two subclasses that target built-in functions and user defined callable objects. + + The Callable objects get handed off to ItemBuilder's which then call them with the appropriate arguments. + + + + + Creates a new CallableObject. If BuiltinFunction is available we'll create a BuiltinCallable otherwise + we create a SlotCallable. + + + + + Gets the arguments in a form that should be used for extended slicing. + + Python defines that multiple tuple arguments received (x[1,2,3]) get + packed into a Tuple. For most .NET methods we just want to expand + this into the multiple index arguments. For slots and old-instances + we want to pass in the tuple + + + + + Adds the target of the call to the rule. + + + + + Subclass of Callable for a built-in function. This calls a .NET method performing + the appropriate bindings. + + + + + Callable to a user-defined callable object. This could be a Python function, + a class defining __call__, etc... + + + + + Base class for building a __*item__ or __*slice__ call. + + + + + Derived IndexBuilder for calling __*slice__ methods + + + + + Derived IndexBuilder for calling __*item__ methods. + + + + + Common helpers used by the various binding logic. + + + + + Tries to get the BuiltinFunction for the given name on the type of the provided MetaObject. + + Succeeds if the MetaObject is a BuiltinFunction or BuiltinMethodDescriptor. + + + + + Gets the best CallSignature from a MetaAction. + + The MetaAction should be either a Python InvokeBinder, or a DLR InvokeAction or + CreateAction. For Python we can use a full-fidelity + + + + + + + Transforms an invoke member into a Python GetMember/Invoke. The caller should + verify that the given attribute is not resolved against a normal .NET class + before calling this. If it is a normal .NET member then a fallback InvokeMember + is preferred. + + + + + Determines if the type associated with the first MetaObject is a subclass of the + type associated with the second MetaObject. + + + + + Adds a try/finally which enforces recursion limits around the target method. + + + + + Helper to do fallback for Invoke's so we can handle both StandardAction and Python's + InvokeBinder. + + + + + Converts arguments into a form which can be used for COM interop. + + The argument is only converted if we have an IronPython specific + conversion when calling COM methods. + + + + + Converts a single argument into a form which can be used for COM + interop. + + The argument is only converted if we have an IronPython specific + conversion when calling COM methods. + + + + + Builds up a series of conditionals when the False clause isn't yet known. We can + keep appending conditions and if true's. Each subsequent true branch becomes the + false branch of the previous condition and body. Finally a non-conditional terminating + branch must be added. + + + + + Adds a new conditional and body. The first call this becomes the top-level + conditional, subsequent calls will have it added as false statement of the + previous conditional. + + + + + Adds a new condition to the last added body / condition. + + + + + Adds the non-conditional terminating node. + + + + + Gets the resulting meta object for the full body. FinishCondition + must have been called. + + + + + Adds a variable which will be scoped at the level of the final expression. + + + + + Returns true if no conditions have been added + + + + + Returns true if a final, non-conditional, body has been added. + + + + + Creates a target which creates a new dynamic method which contains a single + dynamic site that invokes the callable object. + + TODO: This should be specialized for each callable object + + + + + Various helpers related to calling Python __*__ conversion methods + + + + + Helper for falling back - if we have a base object fallback to it first (which can + then fallback to the calling site), otherwise fallback to the calling site. + + + + + Helper for falling back - if we have a base object fallback to it first (which can + then fallback to the calling site), otherwise fallback to the calling site. + + + + + Checks to see if this type has __getattribute__ that overrides all other attribute lookup. + + This is more complex then it needs to be. The problem is that when we have a + mixed new-style/old-style class we have a weird __getattribute__ defined. When + we always dispatch through rules instead of PythonTypes it should be easy to remove + this. + + + + + Looks up the associated PythonTypeSlot from the object. Indicates if the result + came from a standard .NET type in which case we will fallback to the sites binder. + + + + + Helper for falling back - if we have a base object fallback to it first (which can + then fallback to the calling site), otherwise fallback to the calling site. + + + + + Helper for falling back - if we have a base object fallback to it first (which can + then fallback to the calling site), otherwise fallback to the calling site. + + + + + Provides the lookup logic for resolving a Python object. Subclasses + provide the actual logic for producing the binding result. Currently + there are two forms of the binding result: one is the DynamicMetaObject + form used for non-optimized bindings. The other is the Func of CallSite, + object, CodeContext, object form which is used for fast binding and + pre-compiled rules. + + + + + GetBinder which produces a DynamicMetaObject. This binder always + successfully produces a DynamicMetaObject which can perform the requested get. + + + + + Makes a rule which calls a user-defined __getattribute__ function and falls back to __getattr__ if that + raises an AttributeError. + + slot is the __getattribute__ method to be called. + + + + + Checks a range of the MRO to perform old-style class lookups if any old-style classes + are present. We will call this twice to produce a search before a slot and after + a slot. + + + + + Helper for falling back - if we have a base object fallback to it first (which can + then fallback to the calling site), otherwise fallback to the calling site. + + + + + Custom dynamic site kinds for simple sites that just take a fixed set of parameters. + + + + + Unary operator. + + Gets various documentation about the object returned as a string + + + + + Unary operator. + + Gets information about the type of parameters, returned as a string. + + + + + Unary operator. + + Checks whether the object is callable or not, returns true if it is. + + + + + Binary operator. + + Checks to see if the instance contains another object. Returns true or false. + + + + + Unary operator. + + Returns the number of items stored in the object. + + + + + Binary operator. + + Compares two instances returning an integer indicating the relationship between them. May + throw if the object types are uncomparable. + + + + + Binary operator. + + Returns both the dividend and quotioent of x / y. + + + + + Unary operator. + + Get the absolute value of the instance. + + + + + Unary operator. + + Gets the positive value of the instance. + + + + + Unary operator. + + Negates the instance and return the new value. + + + + + Unary operator. + + Returns the ones complement of the instance. + + + + + Unary operator. + + Boolean negation + + + + + Unary operator. + + Negation, returns object + + + + + Get enumerator for iteration binder. Returns a KeyValuePair<IEnumerator, IDisposable> + + The IEnumerator is used for iteration. The IDisposable is provided if the object was an + IEnumerable or IEnumerable<T> and is a disposable object. + + + + Operator for performing add + + + Operator for performing sub + + + Operator for performing pow + + + Operator for performing mul + + + Operator for performing floordiv + + + Operator for performing div + + + Operator for performing truediv + + + Operator for performing mod + + + Operator for performing lshift + + + Operator for performing rshift + + + Operator for performing and + + + Operator for performing or + + + Operator for performing xor + + + Operator for performing lt + + + Operator for performing gt + + + Operator for performing le + + + Operator for performing ge + + + Operator for performing eq + + + Operator for performing ne + + + Operator for performing lg + + + Operator for performing in-place add + + + Operator for performing in-place sub + + + Operator for performing in-place pow + + + Operator for performing in-place mul + + + Operator for performing in-place floordiv + + + Operator for performing in-place div + + + Operator for performing in-place truediv + + + Operator for performing in-place mod + + + Operator for performing in-place lshift + + + Operator for performing in-place rshift + + + Operator for performing in-place and + + + Operator for performing in-place or + + + Operator for performing in-place xor + + + Operator for performing reverse add + + + Operator for performing reverse sub + + + Operator for performing reverse pow + + + Operator for performing reverse mul + + + Operator for performing reverse floordiv + + + Operator for performing reverse div + + + Operator for performing reverse truediv + + + Operator for performing reverse mod + + + Operator for performing reverse lshift + + + Operator for performing reverse rshift + + + Operator for performing reverse and + + + Operator for performing reverse or + + + Operator for performing reverse xor + + + Operator for performing reverse divmod + + + + Provides an abstraction for calling something which might be a builtin function or + might be some arbitrary user defined slot. If the object is a builtin function the + call will go directly to the underlying .NET method. If the object is an arbitrary + callable object we will setup a nested dynamic site for performing the additional + dispatch. + + TODO: We could probably do a specific binding to the object if it's another IDyanmicObject. + + + + + Combines two methods, which came from two different binary types, selecting the method which has the best + set of conversions (the conversions which result in the least narrowing). + + + + + Tries to get a MethodBinder associated with the slot for the specified type. + + If a method is found the binder is set and true is returned. + If nothing is found binder is null and true is returned. + If something other than a method is found false is returned. + + TODO: Remove rop + + + + + bytearray(string, encoding[, errors]) -> bytearray + bytearray(iterable) -> bytearray + + Construct a mutable bytearray object from: + - an iterable yielding values in range(256), including: + + a list of integer values + + a bytes, bytearray, buffer, or array object + - a text string encoded using the specified encoding + + bytearray([int]) -> bytearray + + Construct a zero-ititialized bytearray of the specified length. + (default=0) + + + + + return true if self is a titlecased string and there is at least one + character in self; also, uppercase characters may only follow uncased + characters (e.g. whitespace) and lowercase characters only cased ones. + return false otherwise. + + + + + Return a string which is the concatenation of the strings + in the sequence seq. The separator between elements is the + string providing this method + + + + + return true if self is a titlecased string and there is at least one + character in self; also, uppercase characters may only follow uncased + characters (e.g. whitespace) and lowercase characters only cased ones. + return false otherwise. + + + + + Return a string which is the concatenation of the strings + in the sequence seq. The separator between elements is the + string providing this method + + + + + Returns a copy of the internal byte array. + + + System.Byte[] + + + + + This method returns the underlying byte array directly. + It should be used sparingly! + + + System.Byte[] + + + + + Marks a method as being a class method. The PythonType which was used to access + the method will then be passed as the first argument. + + + + + this class contains objecs and static methods used for + .NET/CLS interop with Python. + + + + + Gets the current ScriptDomainManager that IronPython is loaded into. The + ScriptDomainManager can then be used to work with the language portion of the + DLR hosting APIs. + + + + + Use(name) -> module + + Attempts to load the specified module searching all languages in the loaded ScriptRuntime. + + + + + Use(path, language) -> module + + Attempts to load the specified module belonging to a specific language loaded into the + current ScriptRuntime. + + + + + SetCommandDispatcher(commandDispatcher) + + Sets the current command dispatcher for the Python command line. + + The command dispatcher will be called with a delegate to be executed. The command dispatcher + should invoke the target delegate in the desired context. + + A common use for this is to enable running all REPL commands on the UI thread while the REPL + continues to run on a non-UI thread. + + + + + LoadTypeLibrary(rcw) -> type lib desc + + Gets an ITypeLib object from OLE Automation compatible RCW , + reads definitions of CoClass'es and Enum's from this library + and creates an object that allows to instantiate coclasses + and get actual values for the enums. + + + + + LoadTypeLibrary(guid) -> type lib desc + + Reads the latest registered type library for the corresponding GUID, + reads definitions of CoClass'es and Enum's from this library + and creates a IDynamicMetaObjectProvider that allows to instantiate coclasses + and get actual values for the enums. + + + + + AddReferenceToTypeLibrary(rcw) -> None + + Makes the type lib desc available for importing. See also LoadTypeLibrary. + + + + + AddReferenceToTypeLibrary(guid) -> None + + Makes the type lib desc available for importing. See also LoadTypeLibrary. + + + + + Gets the CLR Type object from a given Python type object. + + + + + Gets the Python type object from a given CLR Type object. + + + + + OBSOLETE: Gets the Python type object from a given CLR Type object. + + Use clr.GetPythonType instead. + + + + + accepts(*types) -> ArgChecker + + Decorator that returns a new callable object which will validate the arguments are of the specified types. + + + + + + + returns(type) -> ReturnChecker + + Returns a new callable object which will validate the return type is of the specified type. + + + + + returns the result of dir(o) as-if "import clr" has not been performed. + + + + + Returns the result of dir(o) as-if "import clr" has been performed. + + + + + Attempts to convert the provided object to the specified type. Conversions that + will be attempted include standard Python conversions as well as .NET implicit + and explicit conversions. + + If the conversion cannot be performed a TypeError will be raised. + + + + + Provides a helper for compiling a group of modules into a single assembly. The assembly can later be + reloaded using the clr.AddReference API. + + + + + clr.CompileSubclassTypes(assemblyName, *typeDescription) + + Provides a helper for creating an assembly which contains pre-generated .NET + base types for new-style types. + + This assembly can then be AddReferenced or put sys.prefix\DLLs and the cached + types will be used instead of generating the types at runtime. + + This function takes the name of the assembly to save to and then an arbitrary + number of parameters describing the types to be created. Each of those + parameter can either be a plain type or a sequence of base types. + + clr.CompileSubclassTypes(object) -> create a base type for object + clr.CompileSubclassTypes(object, str, System.Collections.ArrayList) -> create + base types for both object and ArrayList. + + clr.CompileSubclassTypes(object, (object, IComparable)) -> create base types for + object and an object which implements IComparable. + + + + + + clr.GetSubclassedTypes() -> tuple + + Returns a tuple of information about the types which have been subclassed. + + This tuple can be passed to clr.CompileSubclassTypes to cache these + types on disk such as: + + clr.CompileSubclassTypes('assembly', *clr.GetSubclassedTypes()) + + + + + Goes through the list of files identifying the relationship between packages + and subpackages. Returns a dictionary with all of the package filenames (minus __init__.py) + mapping to their full name. For example given a structure: + + C:\ + someDir\ + package\ + __init__.py + a.py + b\ + __init.py + c.py + + Returns: + {r'C:\somedir\package' : 'package', r'C:\somedir\package\b', 'package.b'} + + This can then be used for calculating the full module name of individual files + and packages. For example a's full name is "package.a" and c's full name is + "package.b.c". + + + + + Returns a list of profile data. The values are tuples of Profiler.Data objects + + All times are expressed in the same unit of measure as DateTime.Ticks + + + + + Resets all profiler counters back to zero + + + + + Enable or disable profiling for the current ScriptEngine. This will only affect code + that is compiled after the setting is changed; previously-compiled code will retain + whatever setting was active when the code was originally compiled. + + The easiest way to recompile a module is to reload() it. + + + + + Serializes data using the .NET serialization formatter for complex + types. Returns a tuple identifying the serialization format and the serialized + data which can be fed back into clr.Deserialize. + + Current serialization formats include custom formats for primitive .NET + types which aren't already recognized as tuples. None is used to indicate + that the Binary .NET formatter is used. + + + + + Deserializes the result of a Serialize call. This can be used to perform serialization + for .NET types which are serializable. This method is the callable object provided + from __reduce_ex__ for .serializable .NET types. + + The first parameter indicates the serialization format and is the first tuple element + returned from the Serialize call. + + The second parameter is the serialized data. + + + + + Decorator for verifying the arguments to a function are of a specified type. + + + + + Returned value when using clr.accepts/ArgChecker. Validates the argument types and + then calls the original function. + + + + + Decorator for verifying the return type of functions. + + + + + Returned value when using clr.returns/ReturnChecker. Calls the original function and + validates the return type is of a specified type. + + + + + Provides a StreamContentProvider for a stream of content backed by a file on disk. + + + + + Wrapper class used when a user defined type (new-style or old-style) + defines __index__. We provide a conversion from all user defined + types to the Index type so they can be used for determing and method bind + time the most appropriate method to dispatch to. + + + + + New string formatter for 'str'.format(...) calls and support for the Formatter + library via the _formatter_parser / _formatter_field_name_split + methods. + + We parse this format: + + replacement_field = "{" field_name ["!" conversion] [":" format_spec] "}" + field_name = (identifier | integer) ("." attribute_name | "[" element_index "]")* + attribute_name = identifier + element_index = identifier + conversion = "r" | "s" + format_spec = any char, { must be balanced (for computed values), passed to __format__ method on object + + + + + Runs the formatting operation on the given format and keyword arguments + + + + + Gets the formatting information for the given format. This is a list of tuples. The tuples + include: + + text, field name, format spec, conversion + + + + + Parses a field name returning the argument name and an iterable + object which can be used to access the individual attribute + or element accesses. The iterator yields tuples of: + + bool (true if attribute, false if element index), attribute/index value + + + + + Parses the field name including attribute access or element indexing. + + + + + Parses the field name including attribute access or element indexing. + + + + + Converts accessors from our internal structure into a PythonTuple matching how CPython + exposes these + + + + + Parses an identifier and returns it + + + + + Base class used for parsing the format. Subclasss override Text/ReplacementField methods. Those + methods get called when they call Parse and then they can do the appropriate actions for the + format. + + + + + Gets an enumerable object for walking the parsed format. + + TODO: object array? struct? + + + + + Provides an enumerable of the parsed format. The elements of the tuple are: + the text preceding the format information + the field name + the format spec + the conversion + + + + + Handles {{ and }} within the string. Returns true if a double bracket + is found and yields the text + + + + + Parses the conversion character and returns it + + + + + Checks to see if we're at the end of the format. If there's no more characters left we report + the error, otherwise if we hit a } we return true to indicate parsing should stop. + + + + + Parses the format spec string and returns it. + + + + + Parses the field name and returns it. + + + + + Handles parsing the field name and the format spec and returns it. At the parse + level these are basically the same - field names just have more terminating characters. + + The most complex part of parsing them is they both allow nested braces and require + the braces are matched. Strangely though the braces need to be matched across the + combined field and format spec - not within each format. + + + + + Provides the built-in string formatter which is exposed to Python via the str.format API. + + + + + Inspects a format spec to see if it contains nested format specs which + we need to compute. If so runs another string formatter on the format + spec to compute those values. + + + + + Given the field name gets the object from our arguments running + any of the member/index accessors. + + + + + Applies the known built-in conversions to the object if a conversion is + specified. + + + + + Gets the initial object represented by the field name - e.g. the 0 or + keyword name. + + + + + Given the object value runs the accessors in the field name (if any) against the object. + + + + + Encodes all the information about the field name. + + + + + Encodes a single field accessor (.b or [number] or [str]) + + + + + For IList arguments: Marks that the argument is typed to accept a bytes or + bytearray object. This attribute disallows passing a Python list object and + auto-applying our generic conversion. It also enables conversion of a string to + a IList of byte in IronPython 2.6. + + For string arguments: Marks that the argument is typed to accept a bytes object + as well. (2.6 only) + + + + stored for copy_reg module, used for reduce protocol + + + stored for copy_reg module, used for reduce protocol + + + + Creates a new PythonContext not bound to Engine. + + + + + Checks to see if module state has the current value stored already. + + + + + Gets per-runtime state used by a module. The module should have a unique key for + each piece of state it needs to store. + + + + + Sets per-runtime state used by a module. The module should have a unique key for + each piece of state it needs to store. + + + + + Sets per-runtime state used by a module and returns the previous value. The module + should have a unique key for each piece of state it needs to store. + + + + + Sets per-runtime state used by a module and returns the previous value. The module + should have a unique key for each piece of state it needs to store. + + + + + Initializes the sys module on startup. Called both to load and reload sys + + + + + Reads one line keeping track of the # of bytes read + + + + + We use Assembly.LoadFile to load assemblies from a path specified by the script (in LoadAssemblyFromFileWithPath). + However, when the CLR loader tries to resolve any of assembly references, it will not be able to + find the dependencies, unless we can hook into the CLR loader. + + + + + Returns (and creates if necessary) the PythonService that is associated with this PythonContext. + + The PythonService is used for providing remoted convenience helpers for the DLR hosting APIs. + + + + + Gets the member names associated with the object + TODO: Move "GetMemberNames" functionality into MetaObject implementations + + + + + Gets a SiteLocalStorage when no call site is available. + + + + + Invokes the specified operation on the provided arguments and returns the new resulting value. + + operation is usually a value from StandardOperators (standard CLR/DLR operator) or + OperatorStrings (a Python specific operator) + + + + + Sets the current command dispatcher for the Python command line. The previous dispatcher + is returned. Null can be passed to remove the current command dispatcher. + + The command dispatcher will be called with a delegate to be executed. The command dispatcher + should invoke the target delegate in the desired context. + + A common use for this is to enable running all REPL commands on the UI thread while the REPL + continues to run on a non-UI thread. + + The ipy.exe REPL will call into PythonContext.DispatchCommand to dispatch each execution to + the correct thread. Other REPLs can do the same to support this functionality as well. + + + + + Dispatches the command to the current command dispatcher. If there is no current command + dispatcher the command is executed immediately on the current thread. + + + + + Gets a function which can be used for comparing two values. If cmp is not null + then the comparison will use the provided comparison function. Otherwise + it will use the normal Python semantics. + + If type is null then a generic comparison function is returned. If type is + not null a comparison function is returned that's used for just that type. + + + + + Performs a GC collection including the possibility of freeing weak data structures held onto by the Python runtime. + + + + + + Gets a PythonContext given a DynamicMetaObjectBinder. + + + + + Gets or sets the maximum depth of function calls. Equivalent to sys.getrecursionlimit + and sys.setrecursionlimit. + + + + + Gets or sets the main thread which should be interupted by thread.interrupt_main + + + + + Gets or sets the default encoding for this system state / engine. + + + + + Dictionary from name to type of all known built-in module names. + + + + + Dictionary from type to name of all built-in modules. + + + + + TODO: Remove me, or stop caching built-ins. This is broken if the user changes __builtin__ + + + + Dictionary of error handlers for string codecs. + + + Table of functions used for looking for additional codecs. + + + + Returns a shared code context for the current PythonContext. This shared + context can be used for performing general operations which usually + require a CodeContext. + + + + + Returns an overload resolver for the current PythonContext. The overload + resolver will flow the shared context through as it's CodeContext. + + + + + Returns a shared code context for the current PythonContext. This shared + context can be used for doing lookups which need to occur as if they + happened in a module which has done "import clr". + + + + + A DynamicStackFrame which has Python specific data. Currently this + includes the code context which may provide access to locals and the + function code object which is needed to build frame objects from. + + + + + Gets the code context of the function. + + If the function included a call to locals() or the FullFrames + option is enabled then the code context includes all local variables. + + Null if deserialized. + + + + + Gets the code object for this frame. This is used in creating + the trace back. Null if deserialized. + + + + + Created for a user-defined function. + + + + + Python ctor - maps to function.__new__ + + y = func(x.__code__, globals(), 'foo', None, (a, )) + + + + + Calculates the _compat value which is used for call-compatibility checks + for simple calls. Whenver any of the dependent values are updated this + must be called again. + + The dependent values include: + _nparams - this is readonly, and never requies an update + _defaults - the user can mutate this (func_defaults) and that forces + an update + expand dict/list - based on nparams and flags, both read-only + + Bits are allocated as: + 00003fff - Normal argument count + 0fffb000 - Default count + 10000000 - unused + 20000000 - expand list + 40000000 - expand dict + 80000000 - unused + + Enforce recursion is added at runtime. + + + + + The parent CodeContext in which this function was declared. + + + + + Captures the # of args and whether we have kw / arg lists. This + enables us to share sites for simple calls (calls that don't directly + provide named arguments or the list/dict params). + + + + + Generators w/ exception handling need to have some data stored + on them so that we appropriately set/restore the exception state. + + + + + Returns an ID for the function if one has been assigned, or zero if the + function has not yet required the use of an ID. + + + + + Gets the position for the expand list argument or -1 if the function doesn't have an expand list parameter. + + + + + Gets the position for the expand dictionary argument or -1 if the function doesn't have an expand dictionary parameter. + + + + + Gets the number of normal (not params or kw-params) parameters. + + + + + Gets the number of extra arguments (params or kw-params) + + + + + Gets the collection of command line arguments. + + + + + Should we strip out all doc strings (the -O command line option). + + + + + Should we strip out all doc strings (the -OO command line option). + + + + + List of -W (warning filter) options collected from the command line. + + + + + Enables warnings related to Python 3.0 features. + + + + + Enables 3.0 features that are implemented in IronPython. + + + + + Enables debugging support. When enabled a .NET debugger can be attached + to the process to step through Python code. + + + + + Enables inspect mode. After running the main module the REPL will be started + within that modules context. + + + + + Suppresses addition of the user site directory. This is ignored by IronPython + except for updating sys.flags. + + + + + Disables import site on startup. + + + + + Ignore environment variables that configure the IronPython context. + + + + + Enables the verbose option which traces import statements. This is ignored by IronPython + except for setting sys.flags. + + + + + Sets the maximum recursion depth. Setting to Int32.MaxValue will disable recursion + enforcement. + + + + + Makes available sys._getframe. Local variables will not be available in frames unless the + function calls locals(), dir(), vars(), etc... For ensuring locals are always available use + the FullFrames option. + + + + + Makes available sys._getframe. All locals variables will live on the heap (for a considerable + performance cost) enabling introspection of all code. + + + + + Tracing is always available. Without this option tracing is only enabled when sys.settrace + is called. This means code that was already running before sys.settrace will not be debuggable. + + With this option pdb.set_trace and pdb.post_mortem will always work properly. + + + + + Severity of a warning that indentation is formatted inconsistently. + + + + + The division options (old, new, warn, warnall) + + + + + Forces all code to be compiled in a mode in which the code can be reliably collected by the CLR. + + + + + Enable profiling code + + + + + Returns a regular expression of Python files which should not be emitted in debug mode. + + + + + Gets the CPython version which IronPython will emulate. Currently limited + to either 2.6 or 3.0. + + + + + Marks a member as being hidden from Python code. + + + + + This assembly-level attribute specifies which types in the engine represent built-in Python modules. + + Members of a built-in module type should all be static as an instance is never created. + + + + + Creates a new PythonModuleAttribute that can be used to specify a built-in module that exists + within an assembly. + + The built-in module name + The type that implements the built-in module. + + + + The built-in module name + + + + + The type that implements the built-in module + + + + + Marks a type as being a PythonType for purposes of member lookup, creating instances, etc... + + If defined a PythonType will use __new__ / __init__ when creating instances. This allows the + object to match the native Python behavior such as returning cached values from __new__ or + supporting initialization to run multiple times via __init__. + + The attribute also allows you to specify an alternate type name. This allows the .NET name to + be different from the Python name so they can follow .NET naming conventions. + + Types defining this attribute also don't show CLR methods such as Equals, GetHashCode, etc... until + the user has done an import clr. + + + + + General-purpose storage used for Python sets and frozensets. + + The set storage is thread-safe for multiple readers or writers. + + Mutations to the set involve a simple locking strategy of locking on the SetStorage object + itself to ensure mutual exclusion. + + Reads against the set happen lock-free. When the set is mutated, it adds or removes buckets + in an atomic manner so that the readers will see a consistent picture as if the read + occurred either before or after the mutation. + + + + + Creates a new set storage with no buckets + + + + + Creates a new set storage with no buckets + + + + + Adds a new item to the set, unless an equivalent item is already present + + + + + Static helper which adds the given non-null item with a precomputed hash code. Returns + true if the item was added, false if it was already present in the set. + + + + + Lock-free helper on a non-null item with a pre-calculated hash code. Removes the item + if it is present in the set, otherwise adds it. + + + + + Clears the contents of the set + + + + + Clones the set, returning a new SetStorage object + + + + + Checks to see if the given item exists in the set + + + + + Checks to see if the given item exists in the set, and tries to hash it even + if it is known not to be in the set. + + + + + + + Adds items from this set into the other set + + + + + Removes the first set element in the iteration order. + + true if an item was removed, false if the set was empty + + + + Removes an item from the set and returns true if it was present, otherwise returns + false + + + + + Removes an item from the set and returns true if it was removed. The item will always + be hashed, throwing if it is unhashable - even if the set has no buckets. + + + + + Lock-free helper to remove a non-null item + + + + + Determines whether the current set shares no elements with the given set + + + + + Determines whether the current set is a subset of the given set + + + + + Determines whether the current set is a strict subset of the given set + + + + + Mutates this set to contain its union with 'other'. The caller must lock the current + set if synchronization is desired. + + + + + Mutates this set to contain its intersection with 'other'. The caller must lock the + current set if synchronization is desired. + + + + + Mutates this set to contain its symmetric difference with 'other'. The caller must + lock the current set if synchronization is desired. + + + + + Mutates this set to contain its difference with 'other'. The caller must lock the + current set if synchronization is desired. + + + + + Computes the union of self and other, returning an entirely new set. This method is + thread-safe and makes no modifications to self or other. + + + + + Computes the intersection of self and other, returning an entirely new set. This + method is thread-safe and makes no modifications to self or other. + + + + + Computes the symmetric difference of self and other, returning an entirely new set. + This method is thread-safe and makes no modifications to self or other. + + + + + Computes the difference of self and other, returning an entirely new set. This + method is thread-safe and makes no modifications to self or other. + + + + + Helper to hash the given item w/ support for null + + + + + Helper which ensures that the first argument x requires the least work to enumerate + + + + + A factory which creates a SetStorage object from any Python iterable. It extracts + the underlying storage of a set or frozen set without copying, which is left to the + caller if necessary. + + + + + A factory which creates a SetStorage object from any Python iterable. It extracts + the underlying storage of a set or frozen set without copying, which is left to the + caller if necessary. + Returns true if the given object was a set or frozen set, false otherwise. + + + + + A factory which creates a SetStorage object from any Python iterable. It extracts + the underlying storage of a set or frozen set, copying in the former case, to return + a SetStorage object that is guaranteed not to receive any outside mutations. + + + + + Extracts the SetStorage object from o if it is a set or frozenset and returns true. + Otherwise returns false. + + + + + Creates a hashable set from the given set, or does nothing if the given object + is not a set. + + True if o is a set or frozenset, false otherwise + + + + Returns the number of items currently in the set + + + + + Used to store a single hashed item. + + Bucket is not serializable because it stores the computed hash code, which could change + between serialization and deserialization. + + + + + Provides storage which is flowed into a callers site. The same storage object is + flowed for multiple calls enabling the callee to cache data that can be re-used + across multiple calls. + + Data is a public field so that this works properly with DynamicSite's as the reference + type (and EnsureInitialize) + + + + + Provides a representation and parsing for the default formatting specification. This is used + by object.__format__, int.__format__, long.__format__, and float.__format__ to do the common + format spec parsing. + + The default specification is: + + format_spec = [[fill]align][sign][#][0][width][,][.precision][type] + fill = a character other than } + align = "<" | ">" | "=" | "^" + sign = "+" | "-" | " " + width = integer + precision = integer + type = "b" | "c" | "d" | "e" | "E" | "f" | "F" | "g" | "G" | "n" | "o" | "x" | "X" | "%" + + + + + Parses a format spec and returns a new StringFormatSpec object. + + + + + Optimized storage for setting exc_type, exc_value, and exc_traceback. + + This optimization can go away in Python 3.0 when these attributes are no longer used. + + + + + Marks a type as being a suitable type to be used for user-defined classes. + + The requirements for this are that a type has to follow the patterns + that NewTypeMaker derived types follow. This includes: + The type's constructors must all take PythonType as the 1st parameter + which sets the underlying type for the actual object + The type needs to implement IPythonObject + Dictionary-based storage needs to be provided for setting individual members + Virtual methods exposed to Python need to support checking the types dictionary for invocations + + + + + Base class for helper which creates instances. We have two derived types: One for user + defined types which prepends the type before calling, and one for .NET types which + doesn't prepend the type. + + + + + Contains helper methods for converting C# names into Python names. + + + + + TypeInfo captures the minimal CLI information required by NewTypeMaker for a Python object + that inherits from a CLI type. + + + + + "bases" contains a set of PythonTypes. These can include types defined in Python (say cpy1, cpy2), + CLI types (say cCLI1, cCLI2), and CLI interfaces (say iCLI1, iCLI2). Here are some + examples of how this works: + + (bases) => baseType, {interfaceTypes} + + (cpy1) => System.Object, {} + (cpy1, cpy2) => System.Object, {} + (cpy1, cCLI1, iCLI1, iCLI2) => cCLI1, {iCLI1, iCLI2} + [some type that satisfies the line above] => + cCLI1, {iCLI1, iCLI2} + (cCLI1, cCLI2) => error + + + + + Filters out old-classes and throws if any non-types are included, returning a + yielding the remaining PythonType objects. + + + + + Python class hierarchy is represented using the __class__ field in the object. It does not + use the CLI type system for pure Python types. However, Python types which inherit from a + CLI type, or from a builtin Python type which is implemented in the engine by a CLI type, + do have to use the CLI type system to interoperate with the CLI world. This means that + objects of different Python types, but with the same CLI base type, can use the same CLI type - + they will just have different values for the __class__ field. + + The easiest way to inspect the functionality implemented by NewTypeMaker is to persist the + generated IL using "ipy.exe -X:SaveAssemblies", and then inspect the + persisted IL using ildasm. + + + + + Loads any available new types from the provided assembly and makes them + available via the GetNewType API. + + + + + Is this a type used for instances Python types (and not for the types themselves)? + + + + + Gets the position for the parameter which we are overriding. + + + + + + + + + Defines an interface on the type that forwards all calls + to a helper method in UserType. The method names all will + have Helper appended to them to get the name for UserType. The + UserType version should take 1 extra parameter (self). + + + + + Overrides methods - this includes all accessible virtual methods as well as protected non-virtual members + including statics and non-statics. + + + + + Loads all the incoming arguments and forwards them to mi which + has the same signature and then returns the result + + + + + Emits code to check if the class has overridden this specific + function. For example: + + MyDerivedType.SomeVirtualFunction = ... + or + + class MyDerivedType(MyBaseType): + def SomeVirtualFunction(self, ...): + + + + + + Emit code to convert object to a given type. This code is semantically equivalent + to PythonBinder.EmitConvertFromObject, except this version accepts ILGen whereas + PythonBinder accepts Compiler. The Binder will chagne soon and the two will merge. + + + + + Emits code to check if the class has overridden this specific + function. For example: + + MyDerivedType.SomeVirtualFunction = ... + or + + class MyDerivedType(MyBaseType): + def SomeVirtualFunction(self, ...): + + + + + + Emits the call to lookup a member defined in the user's type. Returns + the local which stores the resulting value and leaves a value on the + stack indicating the success of the lookup. + + + + + Creates a method for doing a base method dispatch. This is used to support + super(type, obj) calls. + + + + + Generates stub to receive the CLR call and then call the dynamic language code. + This code is same as StubGenerator.cs in the Microsoft.Scripting, except it + accepts ILGen instead of Compiler. + + + + + Called from PythonTypeOps - the BuiltinFunction._function lock must be held. + + + + + Same as the DLR ReturnFixer, but accepts lower level constructs, + such as LocalBuilder, ParameterInfos and ILGen. + + + + + Creates a new PythonCompilerOptions with the default language features enabled. + + + + + Creates a new PythonCompilerOptions with the specified language features enabled. + + + + + Creates a new PythonCompilerOptions and enables or disables true division. + + This overload is obsolete, instead you should use the overload which takes a + ModuleOptions. + + + + + Gets or sets the initial indentation. This can be set to allow parsing + partial blocks of code that are already indented. + + For each element of the array there is an additional level of indentation. + Each integer value represents the number of spaces used for the indentation. + + If this value is null then no indentation level is specified. + + + + + Language features initialized on parser construction and possibly updated during parsing. + The code can set the language features (e.g. "from __future__ import division"). + + + + + Parse one or more lines of interactive input + + null if input is not yet valid but could be with more lines + + + + Given the interactive text input for a compound statement, calculate what the + indentation level of the next line should be + + + + + Peek if the next token is a 'yield' and parse a yield expression. Else return null. + + Called w/ yield already eaten. + + A yield expression if present, else null. + + + + Maybe eats a new line token returning true if the token was + eaten. + + Python always tokenizes to have only 1 new line character in a + row. But we also craete NLToken's and ignore them except for + error reporting purposes. This gives us the same errors as + CPython and also matches the behavior of the standard library + tokenize module. This function eats any present NL tokens and throws + them away. + + + + + Eats a new line token throwing if the next token isn't a new line. + + Python always tokenizes to have only 1 new line character in a + row. But we also craete NLToken's and ignore them except for + error reporting purposes. This gives us the same errors as + CPython and also matches the behavior of the standard library + tokenize module. This function eats any present NL tokens and throws + them away. + + + + + Summary description for Token. + + + + + IronPython tokenizer + + + + + Used to create tokenizer for hosting API. + + + + + Returns whether the + + + + + Resizes an array to a speficied new size and copies a portion of the original array into its beginning. + + + + + True if the last characters in the buffer are a backslash followed by a new line indicating + that their is an incompletement statement which needs further input to complete. + + + + + Equality comparer that can compare strings to our current token w/o creating a new string first. + + + + + A simple Python command-line should mimic the standard python.exe + + + + + Returns the display look for IronPython. + + The returned string uses This \n instead of Environment.NewLine for it's line seperator + because it is intended to be outputted through the Python I/O system. + + + + + Loads any extension DLLs present in sys.prefix\DLLs directory and adds references to them. + + This provides an easy drop-in location for .NET assemblies which should be automatically referenced + (exposed via import), COM libraries, and pre-compiled Python code. + + + + + Attempts to run a single interaction and handle any language-specific + exceptions. Base classes can override this and call the base implementation + surrounded with their own exception handling. + + Returns null if successful and execution should continue, or an exit code. + + + + + Parses a single interactive command and executes it. + + Returns null if successful and execution should continue, or the appropiate exit code. + + + + + Skip the first line of the code to execute. This is useful for executing Unix scripts which + have the command to execute specified in the first line. + This only apply to the script code executed by the ScriptEngine APIs, but not for other script code + that happens to get called as a result of the execution. + + + + On error. + + + + Provides helpers for interacting with IronPython. + + + + + Creates a new ScriptRuntime with the IronPython scipting engine pre-configured. + + + + + + Creates a new ScriptRuntime with the IronPython scipting engine pre-configured and + additional options. + + + + + Creates a new ScriptRuntime with the IronPython scripting engine pre-configured + in the specified AppDomain. The remote ScriptRuntime may be manipulated from + the local domain but all code will run in the remote domain. + + + + + Creates a new ScriptRuntime with the IronPython scripting engine pre-configured + in the specified AppDomain with additional options. The remote ScriptRuntime may + be manipulated from the local domain but all code will run in the remote domain. + + + + + Creates a new ScriptRuntime and returns the ScriptEngine for IronPython. If + the ScriptRuntime is required it can be acquired from the Runtime property + on the engine. + + + + + Creates a new ScriptRuntime with the specified options and returns the + ScriptEngine for IronPython. If the ScriptRuntime is required it can be + acquired from the Runtime property on the engine. + + + + + Creates a new ScriptRuntime and returns the ScriptEngine for IronPython. If + the ScriptRuntime is required it can be acquired from the Runtime property + on the engine. + + The remote ScriptRuntime may be manipulated from the local domain but + all code will run in the remote domain. + + + + + Creates a new ScriptRuntime with the specified options and returns the + ScriptEngine for IronPython. If the ScriptRuntime is required it can be + acquired from the Runtime property on the engine. + + The remote ScriptRuntime may be manipulated from the local domain but + all code will run in the remote domain. + + + + + Given a ScriptRuntime gets the ScriptEngine for IronPython. + + + + + Gets a ScriptScope which is the Python sys module for the provided ScriptRuntime. + + + + + Gets a ScriptScope which is the Python sys module for the provided ScriptEngine. + + + + + Gets a ScriptScope which is the Python __builtin__ module for the provided ScriptRuntime. + + + + + Gets a ScriptScope which is the Python __builtin__ module for the provided ScriptEngine. + + + + + Gets a ScriptScope which is the Python clr module for the provided ScriptRuntime. + + + + + Gets a ScriptScope which is the Python clr module for the provided ScriptEngine. + + + + + Imports the Python module by the given name and returns its ScriptSCope. If the + module does not exist an exception is raised. + + + + + Imports the Python module by the given name and returns its ScriptSCope. If the + module does not exist an exception is raised. + + + + + Imports the Python module by the given name and inserts it into the ScriptScope as that name. If the + module does not exist an exception is raised. + + + + + + + Sets sys.exec_prefix, sys.executable and sys.version and adds the prefix to sys.path + + + + + Sets sys.exec_prefix, sys.executable and sys.version and adds the prefix to sys.path + + + + + Enables call tracing for the current thread in this ScriptEngine. + + TracebackDelegate will be called back for each function entry, exit, exception, and line change. + + + + + Enables call tracing for the current thread for the Python engine in this ScriptRuntime. + + TracebackDelegate will be called back for each function entry, exit, exception, and line change. + + + + + Provides nested level debugging support when SetTrace or SetProfile are used. + + This saves the current tracing information and then calls the provided object. + + + + + Provides nested level debugging support when SetTrace or SetProfile are used. + + This saves the current tracing information and then calls the provided object. + + + + + Creates a ScriptRuntimeSetup object which includes the Python script engine with the specified options. + + The ScriptRuntimeSetup object can then be additional configured and used to create a ScriptRuntime. + + + + + Creates a LanguageSetup object which includes the Python script engine with the specified options. + + The LanguageSetup object can be used with other LanguageSetup objects from other languages to + configure a ScriptRuntimeSetup object. + + + + + Creates a new PythonModule with the specified name and published it in sys.modules. + + Returns the ScriptScope associated with the module. + + + + + Creates a new PythonModule with the specified name and filename published it + in sys.modules. + + Returns the ScriptScope associated with the module. + + + + + Creates a new PythonModule with the specified name, filename, and doc string and + published it in sys.modules. + + Returns the ScriptScope associated with the module. + + + + + Gets the list of loaded Python module files names which are available in the provided ScriptEngine. + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to couldn't find member {0}. + + + + + Looks up a localized string similar to default value must be specified here. + + + + + Looks up a localized string similar to duplicate argument '{0}' in function definition. + + + + + Looks up a localized string similar to duplicate keyword argument. + + + + + Looks up a localized string similar to <eof> while reading string. + + + + + Looks up a localized string similar to EOF while scanning triple-quoted string. + + + + + Looks up a localized string similar to EOL while scanning single-quoted string. + + + + + Looks up a localized string similar to expected an indented block. + + + + + Looks up a localized string similar to expected name. + + + + + Looks up a localized string similar to Expecting identifier:. + + + + + Looks up a localized string similar to inconsistent use of tabs and spaces in indentation. + + + + + Looks up a localized string similar to unindent does not match any outer indentation level. + + + + + Looks up a localized string similar to Invalid argument value.. + + + + + Looks up a localized string similar to MakeGenericType on non-generic type. + + + + + Looks up a localized string similar to Invalid parameter collection for the function.. + + + + + Looks up a localized string similar to invalid syntax. + + + + + Looks up a localized string similar to object ({0}) is not creatable w/ keyword arguments. + + + + + Looks up a localized string similar to keywords must come before * args. + + + + + Looks up a localized string similar to type does not have {0} field. + + + + + Looks up a localized string similar to from __future__ imports must occur at the beginning of the file. + + + + + Looks up a localized string similar to 'return' outside function. + + + + + Looks up a localized string similar to 'yield' outside function. + + + + + Looks up a localized string similar to NEWLINE in double-quoted string. + + + + + Looks up a localized string similar to NEWLINE in single-quoted string. + + + + + Looks up a localized string similar to future statement does not support import *. + + + + + Looks up a localized string similar to non-keyword arg after keyword arg. + + + + + Looks up a localized string similar to not a chance. + + + + + Looks up a localized string similar to The method or operation is not implemented.. + + + + + Looks up a localized string similar to only one ** allowed. + + + + + Looks up a localized string similar to only one * allowed. + + + + + Looks up a localized string similar to Context must be PythonCompilerContext. + + + + + Looks up a localized string similar to cannot delete slot. + + + + + Looks up a localized string similar to cannot get slot. + + + + + Looks up a localized string similar to cannot set slot. + + + + + Looks up a localized string similar to static property '{0}' of '{1}' can only be read through a type, not an instance. + + + + + Looks up a localized string similar to static property '{0}' of '{1}' can only be assigned to through a type, not an instance. + + + + + Looks up a localized string similar to no value for this token. + + + + + Looks up a localized string similar to too many versions. + + + + + Looks up a localized string similar to unexpected token '{0}'. + + + + + Looks up a localized string similar to future feature is not defined:. + + + + + The Action used for Python call sites. This supports both splatting of position and keyword arguments. + + When a foreign object is encountered the arguments are expanded into normal position/keyword arguments. + + + + + Python's Invoke is a non-standard action. Here we first try to bind through a Python + internal interface (IPythonInvokable) which supports CallSigantures. If that fails + and we have an IDO then we translate to the DLR protocol through a nested dynamic site - + this includes unsplatting any keyword / position arguments. Finally if it's just a plain + old .NET type we use the default binder which supports CallSignatures. + + + + + Fallback - performs the default binding operation if the object isn't recognized + as being invokable. + + + + + Creates a nested dynamic site which uses the unpacked arguments. + + + + + Translates our CallSignature into a DLR Argument list and gives the simple MetaObject's which are extracted + from the tuple or dictionary parameters being splatted. + + + + + Gets the CallSignature for this invocation which describes how the MetaObject array + is to be mapped. + + + + + General purpose storage used for most PythonDictionarys. + + This dictionary storage is thread safe for multiple readers or writers. + + Mutations to the dictionary involves a simple locking strategy of + locking on the DictionaryStorage object to ensure that only one + mutation happens at a time. + + Reads against the dictionary happen lock free. When the dictionary is mutated + it is either adding or removing buckets in a thread-safe manner so that the readers + will either see a consistent picture as if the read occured before or after the mutation. + + When resizing the dictionary the buckets are replaced atomically so that the reader + sees the new buckets or the old buckets. When reading the reader first reads + the buckets and then calls a static helper function to do the read from the bucket + array to ensure that readers are not seeing multiple bucket arrays. + + + + + Creates a new dictionary storage with no buckets + + + + + Creates a new dictionary storage with no buckets + + + + + Creates a new dictionary geting values/keys from the + items arary + + + + + Creates a new dictionary storage with the given set of buckets + and size. Used when cloning the dictionary storage. + + + + + Adds a new item to the dictionary, replacing an existing one if it already exists. + + + + + Initializes the buckets to their initial capacity, the caller + must check if the buckets are empty first. + + + + + Add helper that works over a single set of buckets. Used for + both the normal add case as well as the resize case. + + + + + Add helper which adds the given key/value (where the key is not null) with + a pre-computed hash code. + + + + + Removes an entry from the dictionary and returns true if the + entry was removed or false. + + + + + Removes an entry from the dictionary and returns true if the + entry was removed or false. The key will always be hashed + so if it is unhashable an exception will be thrown - even + if the dictionary has no buckets. + + + + + Checks to see if the key exists in the dictionary. + + + + + Trys to get the value associated with the given key and returns true + if it's found or false if it's not present. + + + + + Static helper to try and get the value from the dictionary. + + Used so the value lookup can run against a buckets while a writer + replaces the buckets. + + + + + Clears the contents of the dictionary. + + + + + Clones the storage returning a new DictionaryStorage object. + + + + + Helper to hash the given key w/ support for null. + + + + + Returns the number of key/value pairs currently in the dictionary. + + + + + Used to store a single hashed key/value. + + Bucket is not serializable because it stores the computed hash + code which could change between serialization and deserialization. + + + + + Special marker NullValue used during deserialization to not add + an extra field to the dictionary storage type. + + + + + The error involved an incomplete statement due to an unexpected EOF. + + + + + The error involved an incomplete token. + + + + + The mask for the actual error values + + + + + The error was a general syntax error + + + + + The error was an indentation error. + + + + + The error was a tab error. + + + + + syntax error shouldn't include a caret (no column offset should be included) + + + + + GeneratorExitException is a standard exception raised by Generator.Close() to allow a caller + to close out a generator. + + GeneratorExit is introduced in Pep342 for Python2.5. + + + + .NET exception thrown when a Python syntax error is related to incorrect indentation. + + + + + Implementation of the Python exceptions module and the IronPython/CLR exception mapping + mechanism. The exception module is the parent module for all Python exception classes + and therefore is built-in to IronPython.dll instead of IronPython.Modules.dll. + + The exception mapping mechanism is exposed as internal surface area available to only + IronPython / IronPython.Modules.dll. The actual exceptions themselves are all public. + + Because the oddity of the built-in exception types all sharing the same physical layout + (see also PythonExceptions.BaseException) some classes are defined as classes w/ their + proper name and some classes are defined as PythonType fields. When a class is defined + for convenience their's also an _TypeName version which is the PythonType. + + + + + Creates a new throwable exception of type type where the type is an new-style exception. + + Used at runtime when creating the exception from a user provided type via the raise statement. + + + + + Creates a throwable exception of type type where the type is an OldClass. + + Used at runtime when creating the exception form a user provided type that's an old class (via the raise statement). + + + + + Returns the CLR exception associated with a Python exception + creating a new exception if necessary + + + + + Given a CLR exception returns the Python exception which most closely maps to the CLR exception. + + + + + Creates a new style Python exception from the .NET exception + + + + + Internal helper to associate a .NET exception and a Python exception. + + + + + Internal helper to get the associated Python exception from a .NET exception. + + + + + Converts the DLR SyntaxErrorException into a Python new-style SyntaxError instance. + + + + + Creates a PythonType for a built-in module. These types are mutable like + normal user types. + + + + + Creates a PythonType for a built-in module. These types are mutable like + normal user types. + + + + + Creates a PythonType for a built-in module, where the type may inherit + from multiple bases. These types are mutable like normal user types. + + + + + Creates a new type for a built-in exception which derives from another Python + type. . These types are built-in and immutable like any other normal type. For + example StandardError.x = 3 is illegal. This isn't for module exceptions which + are like user defined types. thread.error.x = 3 is legal. + + + + + Creates a new type for a built-in exception which is the root concrete type. + + + + + Gets the list of DynamicStackFrames for the current exception. + + + + + Base class for all Python exception objects. + + When users throw exceptions they typically throw an exception which is + a subtype of this. A mapping is maintained between Python exceptions + and .NET exceptions and a corresponding .NET exception is thrown which + is associated with the Python exception. This class represents the + base class for the Python exception hierarchy. + + Users can catch exceptions rooted in either hierarchy. The hierarchy + determines whether the user catches the .NET exception object or the + Python exception object. + + Most built-in Python exception classes are actually instances of the BaseException + class here. This is important because in CPython the exceptions do not + add new members and therefore their layouts are compatible for multiple + inheritance. The exceptions to this rule are the classes which define + their own fields within their type, therefore altering their layout: + EnvironmentError + SyntaxError + IndentationError (same layout as SyntaxError) + TabError (same layout as SyntaxError) + SystemExit + UnicodeDecodeError + UnicodeEncodeError + UnicodeTranslateError + + These exceptions cannot be combined in multiple inheritance, e.g.: + class foo(EnvironmentError, IndentationError): pass + + fails but they can be combined with anything which is just a BaseException: + class foo(UnicodeDecodeError, SystemError): pass + + Therefore the majority of the classes are just BaseException instances with a + custom PythonType object. The specialized ones have their own .NET class + which inherits from BaseException. User defined exceptions likewise inherit + from this and have their own .NET class. + + + + + This interface is used for implementing parts of the IronPython type system. It + is not intended for consumption from user programs. + + + + + Thread-safe dictionary set. Returns the dictionary set or the previous value if already set or + null if the dictionary set isn't supported. + + + + + + + Dictionary replacement. Returns true if replaced, false if the dictionary set isn't supported. + + + + + + + Initializes the Exception object with an unlimited number of arguments + + + + + Returns a tuple of (type, (arg0, ..., argN)) for implementing pickling/copying + + + + + Returns a tuple of (type, (arg0, ..., argN)) for implementing pickling/copying + + + + + Updates the exception's state (dictionary) with the new values + + + + + Provides custom member lookup access that fallbacks to the dictionary + + + + + Provides custom member assignment which stores values in the dictionary + + + + + Provides custom member deletion which deletes values from the dictionary + or allows clearing 'message'. + + + + + Implements __repr__ which returns the type name + the args + tuple code formatted. + + + + + Initializes the Python exception from a .NET exception + + + + + + Helper to get the CLR exception associated w/ this Python exception + creating it if one has not already been created. + + + + + Returns the exception 'message' if only a single argument was provided + during creation or an empty string. + + + + + Gets or sets the arguments used for creating the exception + + + + + Gets the nth member of the args property + + + + + Gets or sets the dictionary which is used for storing members not declared to have space reserved + within the exception object. + + + + + Gets the CLR exception associated w/ this Python exception. Not visible + until a .NET namespace is imported. + + + + + .NET exception that is thrown to signal the end of iteration in Python + + + + + .NET exception that is thrown to shutdown the interpretter and exit the system. + + + + + Result of sys.exit(n) + + + null if the script exited using "sys.exit(int_value)" + null if the script exited using "sys.exit(None)" + x if the script exited using "sys.exit(x)" where isinstance(x, int) == False + + + int_value if the script exited using "sys.exit(int_value)" + 1 otherwise + + + + + .NET Exception thrown when a Python syntax error is related to incorrect tabs. + + + + + Represents a sequence which may have been provided as a set of parameters to an indexer. + + TODO: This should be removed, and all uses of this should go to [SpecialName]object GetItem(..., params object[] keys) + and [SpecialName]void SetItem(..., params object [] keys) or this[params object[]xyz] which is also legal. + + currently this exists for backwards compatibility w/ IronPython's "expandable tuples". + + + + + Provides a MetaObject for instances of Python's old-style classes. + + TODO: Lots of CodeConetxt references, need to move CodeContext onto OldClass and pull it from there. + + + + + Performs the actual work of binding to the function. + + Overall this works by going through the arguments and attempting to bind all the outstanding known + arguments - position arguments and named arguments which map to parameters are easy and handled + in the 1st pass for GetArgumentsForRule. We also pick up any extra named or position arguments which + will need to be passed off to a kw argument or a params array. + + After all the normal args have been assigned to do a 2nd pass in FinishArguments. Here we assign + a value to either a value from the params list, kw-dict, or defaults. If there is ambiguity between + this (e.g. we have a splatted params list, kw-dict, and defaults) we call a helper which extracts them + in the proper order (first try the list, then the dict, then the defaults). + + + + + Makes the test for our rule. + + + + + Makes the test when we just have simple positional arguments. + + + + + Makes the test when we have a keyword argument call or splatting. + + + + + + Gets the array of expressions which correspond to each argument for the function. These + correspond with the function as it's defined in Python and must be transformed for our + delegate type before being used. + + + + + Binds any missing arguments to values from params array, kw dictionary, or default values. + + + + + Creates the argument for the list expansion parameter. + + + + + Adds extra positional arguments to the start of the expanded list. + + + + + Creates the argument for the dictionary expansion parameter. + + + + + Adds an unbound keyword argument into the dictionary. + + + + + + Adds a check to the last parameter (so it's evaluated after we've extracted + all the parameters) to ensure that we don't have any extra params or kw-params + when we don't have a params array or params dict to expand them into. + + + + + Helper function to validate that a named arg isn't duplicated with by + a params list or the dictionary (or both). + + + + + Helper function to get a value (which has no default) from either the + params list or the dictionary (or both). + + + + + Helper function to get the specified variable from the dictionary. + + + + + Helper function to extract the variable from defaults, or to call a helper + to check params / kw-dict / defaults to see which one contains the actual value. + + + + + Helper function to extract from the params list or dictionary depending upon + which one has an available value. + + + + + Helper function to extract the next argument from the params list. + + + + + Fixes up the argument list for the appropriate target delegate type. + + + + + Helper function to get the function argument strongly typed. + + + + + Called when the user is expanding a dictionary - we copy the user + dictionary and verify that it contains only valid string names. + + + + + Called when the user is expanding a params argument + + + + + Called when the user hasn't supplied a dictionary to be expanded but the + function takes a dictionary to be expanded. + + + + + Helper function to create the expression for creating the actual tuple passed through. + + + + + Creates the code to invoke the target delegate function w/ the specified arguments. + + + + + Appends the initialization code for the call to the function if any exists. + + + + + Creating a standard .NET type is easy - we just call it's constructor with the provided + arguments. + + + + + Creating a Python type involves calling __new__ and __init__. We resolve them + and generate calls to either the builtin funcions directly or embed sites which + call the slots at runtime. + + + + + Checks if we have a default new and init - in this case if we have any + arguments we don't allow the call. + + + + + Creates a test which tests the specific version of the type. + + + + + Base class for performing member binding. Derived classes override Add methods + to produce the actual final result based upon what the GetBinderHelper resolves. + + + + + + Provides the normal meta binder binding. + + + + + Provides delegate based fast binding. + + + + + The result type of the operation. + + + + + Looks up __init__ avoiding calls to __getattribute__ and handling both + new-style and old-style classes in the MRO. + + + + + Gets a builtin function for the given declaring type and member infos. + + Given the same inputs this always returns the same object ensuring there's only 1 builtinfunction + for each .NET method. + + This method takes both a cacheName and a pythonName. The cache name is the real method name. The pythonName + is the name of the method as exposed to Python. + + + + + Checks to see if the provided members are always visible for the given type. + + This filters out methods such as GetHashCode and Equals on standard .NET + types that we expose directly as Python types (e.g. object, string, etc...). + + It also filters out the base helper overrides that are added for supporting + super calls on user defined types. + + + + + a function is static if it's a static .NET method and it's defined on the type or is an extension method + with StaticExtensionMethod decoration. + + + + + If we have only interfaces, we'll need to insert object's base + + + + + Simple implementation of ASCII encoding/decoding. The default instance (PythonAsciiEncoding.Instance) is + setup to always convert even values outside of the ASCII range. The EncoderFallback/DecoderFallbacks can + be replaced with versions that will throw exceptions instead though. + + + + + Specialized version because enumerating tuples by Python's definition + doesn't call __getitem__, but filter does! + + + + + Opens a file and returns a new file object. + + name -> the name of the file to open. + mode -> the mode to open the file (r for reading, w for writing, a for appending, default is r). + bufsize -> the size of the buffer to be used (<= 0 indicates to use the default size) + + + + + Creates a new Python file object from a .NET stream object. + + stream -> the stream to wrap in a file object. + + + + + object overload of range - attempts to convert via __int__, and __trunc__ if arg is + an OldInstance + + + + + object overload of range - attempts to convert via __int__, and __trunc__ if arg is + an OldInstance + + + + + Gets the appropriate LanguageContext to be used for code compiled with Python's compile, eval, execfile, etc... + + + + Returns true if we should inherit our callers context (true division, etc...), false otherwise + + + Returns the default compiler flags or the flags the user specified. + + + + Gets a scope used for executing new code in optionally replacing the globals and locals dictionaries. + + + + + Set if the function includes a *args argument list. + + + + + Set if the function includes a **kwargs argument dictionary. + + + + + Set if the function is a generator. + + + + + Set if the function was compiled with future division. + + + + + IronPython specific: Set if the function includes nested exception handling and therefore can alter + sys.exc_info(). + + + + + IronPython specific: Set if the function includes a try/finally block. + + + + + Represents a piece of code. This can reference either a CompiledCode + object or a Function. The user can explicitly call FunctionCode by + passing it into exec or eval. + + + + + This is both the lock that is held while enumerating the threads or updating the thread accounting + information. It's also a marker CodeList which is put in place when we are enumerating the thread + list and all additions need to block. + + This lock is also acquired whenever we need to calculate how a function's delegate should be created + so that we don't race against sys.settrace/sys.setprofile. + + + + + Constructor used to create a FunctionCode for code that's been serialized to disk. + + Code constructed this way cannot be interpreted or debugged using sys.settrace/sys.setprofile. + + Function codes created this way do support recursion enforcement and are therefore registered in the global function code registry. + + + + + Constructor to create a FunctionCode at runtime. + + Code constructed this way supports both being interpreted and debugged. When necessary the code will + be re-compiled or re-interpreted for that specific purpose. + + Function codes created this way do support recursion enforcement and are therefore registered in the global function code registry. + + the initial delegate provided here should NOT be the actual code. It should always be a delegate which updates our Target lazily. + + + + + Registers the current function code in our global weak list of all function codes. + + The weak list can be enumerated with GetAllCode(). + + Ultimately there are 3 types of threads we care about races with: + 1. Other threads which are registering function codes + 2. Threads calling sys.settrace which require the world to stop and get updated + 3. Threads running cleanup (thread pool thread, or call to gc.collect). + + The 1st two must have perfect synchronization. We cannot have a thread registering + a new function which another thread is trying to update all of the functions in the world. Doing + so would mean we could miss adding tracing to a thread. + + But the cleanup thread can run in parallel to either registrying or sys.settrace. The only + thing it needs to take a lock for is updating our accounting information about the + number of code objects are alive. + + + + + Enumerates all function codes for updating the current type of targets we generate. + + While enumerating we hold a lock so that users cannot change sys.settrace/sys.setprofile + until the lock is released. + + + + + Creates a FunctionCode object for exec/eval/execfile'd/compile'd code. + + The code is then executed in a specific CodeContext by calling the .Call method. + + If the code is being used for compile (vs. exec/eval/execfile) then it needs to be + registered incase our tracing mode changes. + + + + + Called the 1st time a function is invoked by our OriginalCallTarget* methods + over in PythonCallTargets. This computes the real delegate which needs to be + created for the function. Usually this means starting off interpretering. It + also involves adding the wrapper function for recursion enforcement. + + Because this can race against sys.settrace/setprofile we need to take our + _ThreadIsEnumeratingAndAccountingLock to ensure no one is actively changing all + of the live functions. + + + + + Updates the delegate based upon current Python context settings for recursion enforcement + and for tracing. + + + + + Called to set the initial target delegate when the user has passed -X:Debug to enable + .NET style debugging. + + + + + Gets the LambdaExpression for tracing. + + If this is a generator function code then the lambda gets tranformed into the correct generator code. + + + + + Gets the correct final LambdaExpression for this piece of code. + + This is either just _lambda or _lambda re-written to be a generator expression. + + + + + Returns a list of variable names which are accessed from nested functions. + + + + + Returns the byte code. IronPython does not implement this and always + returns an empty string for byte code. + + + + + Returns a list of constants used by the function. + + The first constant is the doc string, or None if no doc string is provided. + + IronPython currently does not include any other constants than the doc string. + + + + + Returns the filename that the code object was defined in. + + + + + Returns the 1st line number of the code object. + + + + + Returns a set of flags for the function. + + 0x04 is set if the function used *args + 0x08 is set if the function used **args + 0x20 is set if the function is a generator + + + + + Returns a list of free variables (variables accessed + from an outer scope). This does not include variables + accessed in the global scope. + + + + + Returns a mapping between byte code and line numbers. IronPython does + not implement this because byte code is not available. + + + + + Returns the name of the code (function name, class name, or <module>). + + + + + Returns a list of global variable names accessed by the code. + + + + + Returns the number of local varaibles defined in the function. + + + + + Returns the stack size. IronPython does not implement this + because byte code is not supported. + + + + + Extremely light weight linked list of weak references used for tracking + all of the FunctionCode objects which get created and need to be updated + for purposes of recursion enforcement or tracing. + + + + + General conversion routine TryConvert - tries to convert the object to the desired type. + Try to avoid using this method, the goal is to ultimately remove it! + + + + + This function tries to convert an object to IEnumerator, or wraps it into an adapter + Do not use this function directly. It is only meant to be used by Ops.GetEnumerator. + + + + + This function tries to convert an object to IEnumerator, or wraps it into an adapter + Do not use this function directly. It is only meant to be used by Ops.GetEnumerator. + + + + + Attempts to convert value into a index usable for slicing and return the integer + value. If the conversion fails false is returned. + + If throwOverflowError is true then BigInteger's outside the normal range of integers will + result in an OverflowError. + + + + + Attempts to convert value into a index usable for slicing and return the integer + value. If the conversion fails false is returned. + + If throwOverflowError is true then BigInteger's outside the normal range of integers will + result in an OverflowError. + + + + + Converts a value to int ignoring floats + + + + + Note: + IEnumerator innerEnum = Dictionary<K,V>.KeysCollections.GetEnumerator(); + innerEnum.MoveNext() will throw InvalidOperation even if the values get changed, + which is supported in python + + + + + Note: + IEnumerator innerEnum = Dictionary<K,V>.KeysCollections.GetEnumerator(); + innerEnum.MoveNext() will throw InvalidOperation even if the values get changed, + which is supported in python + + + + + Note: + IEnumerator innerEnum = Dictionary<K,V>.KeysCollections.GetEnumerator(); + innerEnum.MoveNext() will throw InvalidOperation even if the values get changed, + which is supported in python + + + + + Provides both helpers for implementing Python dictionaries as well + as providing public methods that should be exposed on all dictionary types. + + Currently these are published on IDictionary<object, object> + + + + + Creates a DLR OverloadDoc object which describes information about this overload. + + The method to document + The name of the method if it should override the name in the MethodBase + Parameters to skip at the end - used for removing the value on a setter method + true to include self on instance methods + + + + Converts a Type object into a string suitable for lookup in the help file. All generic types are + converted down to their generic type definition. + + + + + Gets the XPathDocument for the specified assembly, or null if one is not available. + + + + + Gets the Xml documentation for the specified MethodBase. + + + + + Gets the Xml documentation for the specified Type. + + + + + Gets the Xml documentation for the specified Field. + + + + + Gets the Xml documentation for the specified Field. + + + + + Converts the XML as stored in the config file into a human readable string. + + + + + True iff the thread is currently inside the generator (ie, invoking the _next delegate). + This can be used to enforce that a generator does not call back into itself. + Pep255 says that a generator should throw a ValueError if called reentrantly. + + + + + We cache the GeneratorFinalizer of generators that were closed on the user + thread, and did not get finalized on the finalizer thread. We can then reuse + the object. Reusing objects with a finalizer is good because it reduces + the load on the GC's finalizer queue. + + + + + Fields set by Throw() to communicate an exception to the yield point. + These are plumbed through the generator to become parameters to Raise(...) invoked + at the yield suspension point in the generator. + + + + + Value sent by generator.send(). + Since send() could send an exception, we need to keep this different from throwable's value. + + + + + See PEP 342 (http://python.org/dev/peps/pep-0342/) for details of new methods on Generator. + Full signature including default params for throw is: + throw(type, value=None, traceback=None) + Use multiple overloads to resolve the default parameters. + + + + + Throw(...) is like Raise(...) being called from the yield point within the generator. + Note it must come from inside the generator so that the traceback matches, and so that it can + properly cooperate with any try/catch/finallys inside the generator body. + + If the generator catches the exception and yields another value, that is the return value of g.throw(). + + + + + send() was added in Pep342. It sends a result back into the generator, and the expression becomes + the result of yield when used as an expression. + + + + + Close introduced in Pep 342. + + + + + Core implementation of IEnumerator.MoveNext() + + + + + Core implementation of Python's next() method. + + + + + Helper called from PythonOps after the yield statement + Keepin this in a helper method: + - reduces generated code size + - allows better coupling with PythonGenerator.Throw() + - avoids throws from emitted code (which can be harder to debug). + + + + + + Called to throw an exception set by Throw(). + + + + + Gets the name of the function that produced this generator object. + + + + + True if the generator has finished (is "closed"), else false. + Python language spec mandates that calling Next on a closed generator gracefully throws a StopIterationException. + This can never be reset. + + + + + True if the generator can set sys exc info and therefore needs exception save/restore. + + + + + Importer class - used for importing modules. Used by Ops and __builtin__ + Singleton living on Python engine. + + + + + Gateway into importing ... called from Ops. Performs the initial import of + a module and returns the module. + + + + + Gateway into importing ... called from Ops. Performs the initial import of + a module and returns the module. This version returns light exceptions instead of throwing. + + + + + Gateway into importing ... called from Ops. This is called after + importing the module and is used to return individual items from + the module. The outer modules dictionary is then updated with the + result. + + + + + Called by the __builtin__.__import__ functions (general importing) and ScriptEngine (for site.py) + + level indiciates whether to perform absolute or relative imports. + -1 indicates both should be performed + 0 indicates only absolute imports should be performed + Positive numbers indicate the # of parent directories to search relative to the calling module + + + + + Interrogates the importing module for __name__ and __path__, which determine + whether the imported module (whose name is 'name') is being imported as nested + module (__path__ is present) or as sibling. + + For sibling import, the full name of the imported module is parent.sibling + For nested import, the full name of the imported module is parent.module.nested + where parent.module is the mod.__name__ + + + the globals dictionary + Name of the module to be imported + Output - full name of the module being imported + Path to use to search for "full" + the import level for relaive imports + the parent module + the global __package__ value + + + + + Given the parent module name looks up the __path__ property. + + + + + Trys to get an existing module and if that fails fall backs to searching + + + + + Attempts to load a module from sys.meta_path as defined in PEP 302. + + The meta_path provides a list of importer objects which can be used to load modules before + searching sys.path but after searching built-in modules. + + + + + Given a user defined importer object as defined in PEP 302 tries to load a module. + + First the find_module(fullName, path) is invoked to get a loader, then load_module(fullName) is invoked + + + + + Finds a user defined importer for the given path or returns null if no importer + handles this path. + + + + + Creates a new list with the data in the array and a size + the same as the length of the array. The array is held + onto and may be mutated in the future by the list. + + params array to use for lists storage + + + + Gets a reasonable size for the addition of two arrays. We round + to a power of two so that we usually have some extra space if + the resulting array gets added to. + + + + + Non-thread safe adder, should only be used by internal callers that + haven't yet exposed their list. + + + + + Compares the two specified keys + + + + + Supports __index__ on arbitrary types, also prevents __float__ + + + + + we need to lock both objects (or copy all of one's data w/ it's lock held, and + then compare, which is bad). Therefore we have a strong order for locking on + the two objects based upon the hash code or object identity in case of a collision + + + + + Summary description for ConstantValue. + + + + + Multiply two object[] arrays - slow version, we need to get the type, etc... + + + + + Multiply two object[] arrays - internal version used for objects backed by arrays + + + + + Add two arrays - internal versions for objects backed by arrays + + + + + + + + + + We override the behavior of equals, compare and hashcode to make + chars seem as much like strings as possible. In Python there is no + difference between these types. + + + + + Helper class that all custom type descriptor implementations call for + the bulk of their implementation. + + + + + Returns the digits for the format spec, no sign is included. + + + + + InstanceOps contains methods that get added to CLS types depending on what + methods and constructors they define. These have not been added directly to + PythonType since they need to be added conditionally. + + Possibilities include: + + __new__, one of 3 __new__ sets can be added: + DefaultNew - This is the __new__ used for a PythonType (list, dict, object, etc...) that + has only 1 default public constructor that takes no parameters. These types are + mutable types, and __new__ returns a new instance of the type, and __init__ can be used + to re-initialize the types. This __new__ allows an unlimited number of arguments to + be passed if a non-default __init__ is also defined. + + NonDefaultNew - This is used when a type has more than one constructor, or only has one + that takes more than zero parameters. This __new__ does not allow an arbitrary # of + extra arguments. + + DefaultNewCls - This is the default new used for CLS types that have only a single ctor + w/ an arbitray number of arguments. This constructor allows setting of properties + based upon an extra set of kw-args, e.g.: System.Windows.Forms.Button(Text='abc'). It + is only used on non-Python types. + + __init__: + For types that do not define __init__ we have an __init__ function that takes an + unlimited number of arguments and does nothing. All types share the same reference + to 1 instance of this. + + next: Defined when a type is an enumerator to expose the Python iter protocol. + + + repr: Added for types that override ToString + + get: added for types that implement IDescriptor + + + + + __dir__(self) -> Returns the list of members defined on a foreign IDynamicMetaObjectProvider. + + + + + Provides the implementation of __enter__ for objects which implement IDisposable. + + + + + Provides the implementation of __exit__ for objects which implement IDisposable. + + + + + Determines if a type member can be imported. This is used to treat static types like modules. + + + + + Implements __contains__ for types implementing IEnumerable of T. + + + + + Implements __contains__ for types implementing IEnumerable + + + + + Implements __contains__ for types implementing IEnumerable of T. + + + + + Implements __contains__ for types implementing IEnumerable + + + + + 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. + + + + + Contains Python extension methods that are added to object + + + + Types for which the pickle module has built-in support (from PEP 307 case 2) + + + + __class__, a custom slot so that it works for both objects and types. + + + + + Removes an attribute from the provided member + + + + + Returns the hash code of the given object + + + + + Gets the specified attribute from the object without running any custom lookup behavior + (__getattr__ and __getattribute__) + + + + + Initializes the object. The base class does nothing. + + + + + Initializes the object. The base class does nothing. + + + + + Initializes the object. The base class does nothing. + + + + + Creates a new instance of the type + + + + + Creates a new instance of the type + + + + + Creates a new instance of the type + + + + + Runs the pickle protocol + + + + + Runs the pickle protocol + + + + + Runs the pickle protocol + + + + + Returns the code representation of the object. The default implementation returns + a string which consists of the type and a unique numerical identifier. + + + + + Sets an attribute on the object without running any custom object defined behavior. + + + + + Returns the number of bytes of memory required to allocate the object. + + + + + Returns a friendly string representation of the object. + + + + + Return a dict that maps slot names to slot values, but only include slots that have been assigned to. + Looks up slots in base types as well as the current type. + + Sort-of Python equivalent (doesn't look up base slots, while the real code does): + return dict([(slot, getattr(self, slot)) for slot in type(self).__slots__ if hasattr(self, slot)]) + + Return null if the object has no __slots__, or empty dict if it has __slots__ but none are initialized. + + + + + Implements the default __reduce_ex__ method as specified by PEP 307 case 2 (new-style instance, protocol 0 or 1) + + + + + Returns the closest base class (in terms of MRO) that isn't defined in Python code + + + + + Implements the default __reduce_ex__ method as specified by PEP 307 case 3 (new-style instance, protocol 2) + + + + + Contains functions that are called directly from + generated code to perform low-level runtime functionality. + + + + + Creates a new dictionary extracting the keys and values from the + provided data array. Keys/values are adjacent in the array with + the value coming first. + + + + + Creates a new dictionary extracting the keys and values from the + provided data array. Keys/values are adjacent in the array with + the value coming first. + + + + + Wraps up all the semantics of multiplying sequences so that all of our sequences + don't duplicate the same logic. When multiplying sequences we need to deal with + only multiplying by valid sequence types (ints, not floats), support coercion + to integers if the type supports it, not multiplying by None, and getting the + right semantics for multiplying by negative numbers and 1 (w/ and w/o subclasses). + + This function assumes that it is only called for case where count is not implicitly + coercible to int so that check is skipped. + + + + + Supports calling of functions that require an explicit 'this' + Currently, we check if the function object implements the interface + that supports calling with 'this'. If not, the 'this' object is dropped + and a normal call is made. + + + + + Called from generated code emitted by NewTypeMaker. + + + + + Handles the descriptor protocol for user-defined objects that may implement __get__ + + + + + Handles the descriptor protocol for user-defined objects that may implement __set__ + + + + + Handles the descriptor protocol for user-defined objects that may implement __delete__ + + + + + Python runtime helper for raising assertions. Used by AssertStatement. + + Object representing the assertion message + + + + Python runtime helper to create instance of Python List object. + + New instance of List + + + + Python runtime helper to create a populated instance of Python List object. + + + + + Python runtime helper to create a populated instance of Python List object w/o + copying the array contents. + + + + + Python runtime helper to create a populated instance of Python List object. + + List is populated by arbitrary user defined object. + + + + + Python runtime helper to create an instance of Python List object. + + List has the initial provided capacity. + + + + + Python runtime helper to create an instance of Tuple + + + + + + + Python runtime helper to create an instance of Tuple + + + + + + Python Runtime Helper for enumerator unpacking (tuple assignments, ...) + Creates enumerator from the input parameter e, and then extracts + expected number of values, returning them as array + + If the input is a Python tuple returns the tuples underlying data array. Callers + should not mutate the resulting tuple. + + The code context of the AST getting enumerator values. + object to enumerate + expected number of objects to extract from the enumerator + + array of objects (.Lengh == expected) if exactly expected objects are in the enumerator. + Otherwise throws exception + + + + + Python runtime helper to create instance of Slice object + + Start of the slice. + End of the slice. + Step of the slice. + Slice + + + + Prints newline into default standard output + + + + + Prints newline into specified destination. Sets softspace property to false. + + + + + Prints value into default standard output with Python comma semantics. + + + + + Prints value into specified destination with Python comma semantics. + + + + + Called from generated code when we are supposed to print an expression value + + + + + Called from generated code for: + + import spam.eggs + + + + + Python helper method called from generated code for: + + import spam.eggs as ham + + + + + Called from generated code for: + + from spam import eggs1, eggs2 + + + + + Imports one element from the module in the context of: + + from module import a, b, c, d + + Called repeatedly for all elements being imported (a, b, c, d above) + + + + + Called from generated code for: + + from spam import * + + + + + Unqualified exec statement support. + A Python helper which will be called for the statement: + + exec code + + + + + Qualified exec statement support, + Python helper which will be called for the statement: + + exec code in globals [, locals ] + + + + + Called from generated code at the start of a catch block. + + + + + Get an exception tuple for the "current" exception. This is used for sys.exc_info() + + + + + Get an exception tuple for a given exception. This is like the inverse of MakeException. + + the code context + the exception to create a tuple for. + a tuple of (type, value, traceback) + This is called directly by the With statement so that it can get an exception tuple + in its own private except handler without disturbing the thread-wide sys.exc_info(). + + + + helper function for re-raised exceptions. + + + + + helper function for non-re-raise exceptions. + + type is the type of exception to throw or an instance. If it + is an instance then value should be null. + + If type is a type then value can either be an instance of type, + a Tuple, or a single value. This case is handled by EC.CreateThrowable. + + + + + Extracts an argument from either the dictionary or params + + + + + Creates a new array the values set to Uninitialized.Instance. The array + is large enough to hold for all of the slots allocated for the type and + its sub types. + + + + + Helper to determine if the value is a simple numeric type (int or big int or bool) - used for OldInstance + deprecated form of slicing. + + + + + Helper to determine if the type is a simple numeric type (int or big int or bool) - used for OldInstance + deprecated form of slicing. + + + + + Helper to determine if the type is a simple numeric type (int or big int or bool) but not a subclass + + + + + For slicing. Fixes up a BigInteger and returns an integer w/ the length of the + object added if the value is negative. + + + + + For slicing. Gets the length of the object, used to only get the length once. + + + + + Helper method for DynamicSite rules that check the version of their dynamic object + TODO - Remove this method for more direct field accesses + + + + + + + + Called from generated code. Gets a builtin function and the BuiltinFunctionData associated + with the object. Tests to see if the function is bound and has the same data for the generated + rule. + + + + + Convert object to a given type. This code is equivalent to NewTypeMaker.EmitConvertFromObject + except that it happens at runtime instead of compile time. + + + + + Provides access to AppDomain.DefineDynamicAssembly which cannot be called from a DynamicMethod + + + + + Generates a new delegate type. The last type in the array is the return type. + + + + + Generates a new delegate type. The last type in the array is the return type. + + + + + Provides the entry point for a compiled module. The stub exe calls into InitializeModule which + does the actual work of adding references and importing the main module. Upon completion it returns + the exit code that the program reported via SystemExit or 0. + + + + + Provides the entry point for a compiled module. The stub exe calls into InitializeModule which + does the actual work of adding references and importing the main module. Upon completion it returns + the exit code that the program reported via SystemExit or 0. + + + + + Called from generated code, helper to remove a name + + + + + Called from generated code, helper to do name lookup + + + + + Called from generated code, helper to do name assignment + + + + + Returns an IntPtr in the proper way to CPython - an int or a Python long + + + + + Create at TypeError exception for when Raise() can't create the exception requested. + + original type of exception requested + a TypeEror exception + + + + Gets a list of DynamicStackFrames for the given exception. These stack frames + can be programmatically inspected to understand the frames the exception crossed + through including Python frames. + + Dynamic stack frames are not preserved when an exception crosses an app domain + boundary. + + + + + Helper clas for calls to unicode(...). We generate code which checks if unicode + is str and if it is we redirect those calls to the unicode function defined on this + class. + + + + + ExtensibleString is the base class that is used for types the user defines + that derive from string. It carries along with it the string's value and + our converter recognizes it as a string. + + + + + StringOps is the static class that contains the methods defined on strings, i.e. 'abc' + + Here we define all of the methods that a Python user would see when doing dir('abc'). + If the user is running in a CLS aware context they will also see all of the methods + defined in the CLS System.String type. + + + + + Returns a copy of this string converted to uppercase + + + + + return true if self is a titlecased string and there is at least one + character in self; also, uppercase characters may only follow uncased + characters (e.g. whitespace) and lowercase characters only cased ones. + return false otherwise. + + + + + Return a string which is the concatenation of the strings + in the sequence seq. The separator between elements is the + string providing this method + + + + + Replaces each replacement field in the string with the provided arguments. + + replacement_field = "{" field_name ["!" conversion] [":" format_spec] "}" + field_name = (identifier | integer) ("." identifier | "[" element_index "]")* + + format_spec: [[fill]align][sign][#][0][width][,][.precision][type] + + Conversion can be 'r' for repr or 's' for string. + + + + + Replaces each replacement field in the string with the provided arguments. + + replacement_field = "{" field_name ["!" conversion] [":" format_spec] "}" + field_name = (identifier | integer) ("." identifier | "[" element_index "]")* + + format_spec: [[fill]align][sign][#][0][width][.precision][type] + + Conversion can be 'r' for repr or 's' for string. + + + + + Gets the starting offset checking to see if the incoming bytes already include a preamble. + + + + When encoding or decoding strings if an error occurs CPython supports several different + behaviors, in addition it supports user-extensible behaviors as well. For the default + behavior we're ok - both of us support throwing and replacing. For custom behaviors + we define a single fallback for decoding and encoding that calls the python function to do + the replacement. + + When we do the replacement we call the provided handler w/ a UnicodeEncodeError or UnicodeDecodeError + object which contains: + encoding (string, the encoding the user requested) + end (the end of the invalid characters) + object (the original string being decoded) + reason (the error, e.g. 'unexpected byte code', not sure of others) + start (the start of the invalid sequence) + + The decoder returns a tuple of (unicode, int) where unicode is the replacement string + and int is an index where encoding should continue. + + + + Indexer for generic parameter resolution. We bind to one of the generic versions + available in this type collision. A user can also do someType[()] to force to + bind to the non-generic version, but we will always present the non-generic version + when no bindings are available. + + + + + Object.ToString() displays the CLI type name. But we want to display the class name (e.g. + '<foo object at 0x000000000000002C>' unless we've overridden __repr__ but not __str__ in + which case we'll display the result of __repr__. + + + + + Provides a debug view for user defined types. This class is declared as public + because it is referred to from generated code. You should not use this class. + + + + + A DynamicMetaObject which is just used to support custom conversions to COM. + + + + + A marker interface so we can recognize and access sequence members on our array objects. + + + + + List of unary operators which we have sites for to enable fast dispatch that + doesn't collide with other operators. + + + + + Sets the mode to text or binary. Returns true if previously set to text, false if previously set to binary. + + + + + Truncates the file to the current length as indicated by tell(). + + + + + Truncates the file to the specified length. + + + + + + Provides storage of IronPython specific data in the DLR Scope ScopeExtension. + + This enables IronPython to track code compilation flags such as from __future__ + flags and import clr flags across multiple executions of user-provided scopes. + + + + + Provides human readable names for how Python maps the various DLR NarrowingLevel's. + + + + + No narrowing conversions are performed + + + + + Double/Single to Decimal + PythonTuple to Array + Generic conversions + BigInteger to Int64 + + + + + Numeric conversions excluding from floating point values + Boolean conversions + Delegate conversions + Enumeration conversions + + + + + Enables Python protocol conversions (__int__, etc...) + + + + + Provides dictionary based storage which is backed by a Scope object. + + + + + Mutable set class + + + + + Appends an IEnumerable to an existing set + + + + + Immutable set class + + + + + Iterator over sets + + + + + Gets the indices for the deprecated __getslice__, __setslice__, __delslice__ functions + + This form is deprecated in favor of using __getitem__ w/ a slice object as an index. This + form also has subtly different mechanisms for fixing the slice index before calling the function. + + If an index is negative and __len__ is not defined on the object than an AttributeError + is raised. + + + + + StringFormatter provides Python's % style string formatting services. + + + + + Read a possible mapping key for %(key)s. + + The key name enclosed between the '%(key)s', + or null if there are no paranthesis such as '%s'. + + + + AppendBase appends an integer at the specified radix doing all the + special forms for Python. We have a copy and paste version of this + for BigInteger below that should be kept in sync. + + + + + BigInteger version of AppendBase. Should be kept in sync w/ AppendBase + + + + + public class to get optimized + + + + + Returns detailed call statistics. Not implemented in IronPython and always returns None. + + + + + Handles output of the expression statement. + Prints the value and sets the __builtin__._ + + + + + Provides a CustomTracker which handles special fields which have custom + behavior on get/set. + + + + + Provides custom, versioned, dictionary access for instances. Used for both + new-style and old-style instances. + + Each class can allocate a version for instance storage using the + CustomInstanceDictionaryStorage.AllocateInstance method. The version allocated + is dependent upon the names which are likely to appear in the instance + dictionary. Currently these names are calculated by collecting the names + that are assigned to during the __init__ method and combining these with + all such names in the types MRO. + + When creating the dictionary for storing instance values the class can then create + a PythonDictionary backed by a CustomInstanceDictionaryStorage with it's + version. When doing a get/set optimized code can then be produced that + verifies we have CustomInstanceDictionaryStorage and it has the + correct version. If we have a matching dictionary then gets/sets can turn + into simple array accesses rather than dictionary gets/sets. For programs + which access a large number of instance variables this can dramatically + speed up the program. + + TODO: Should we attempt to unify all versions which share the same keys? + + + + + Interface used for things which can convert to delegates w/o code gen. Currently + this is just non-overloaded builtin functions and bound builtin functions. Avoiding + the code gen is not only nice for compilation but it also enables delegates to be added + in C# and removed in Python. + + + + + Represents a set of attributes that different functions can have. + + + + No flags have been set + + + This is a function w/ no instance pointer + + + This is a method that requires an instance + + + Built-in functions can encapsulate both methods and functions, in which case both bits are set + + + True is the function/method should be visible from pure-Python code + + + True if this is a __r*__ method for a CLS overloaded operator method + + + + This method represents a binary operator method for a CLS overloaded operator method. + + Being a binary operator causes the following special behaviors to kick in: + A failed binding at call time returns NotImplemented instead of raising an exception + A reversed operator will automatically be created if: + 1. The parameters are both of the instance type + 2. The parameters are in reversed order (other, this) + + This enables simple .NET operator methods to be mapped into the Python semantics. + + + + + A method declared on a built-in module + + + + + OperatorMapping provides a mapping from DLR operators to their associated .NET methods. + + + + + Given an operator returns the OperatorMapping associated with the operator or null + + + + + The operator the OperatorMapping provides info for. + + + + + The primary method name associated with the method. This method name is + usally in the form of op_Operator (e.g. op_Addition). + + + + + The secondary method name associated with the method. This method name is + usually a standard .NET method name with pascal casing (e.g. Add). + + + + + The return type that must match for the alternate operator to be valid. + + This is available alternate operators don't have special names and therefore + could be confused for a normal method which isn't fulfilling the contract. + + + + + This helper type lets us build a fake ParameterInfo object with a specific type and name + to pass along to methods that expect ParameterInfos. This is currently found useful + for the NewTypeMaker code and may be useful in other situations as well. + + + + + Cached CallSites. User types are cached on the PythonType and System types are cached on the + PythonContext to avoid cross-runtime contamination due to the binder on the site. + + + + + Represents a PythonType. Instances of PythonType are created via PythonTypeBuilder. + + + + + Used in copy_reg which is the only consumer of __flags__ in the standard library. + + Set if the type is user defined + + + + + Set if the type has __abstractmethods__ defined + + + + + Implements fast binding for user defined types. This ensures that common highly dynamic + scenarios will run fast (for instance creating new types repeatedly and only creating a limited + number of instances of them). It also gives better code sharing amongst different subclasses + of the same types and improved startup time due to reduced code generation. + + + + + Provides delegates that will invoke a parameterless type ctor. The first key provides + the dictionary for a specific type, the 2nd key provides the delegate for a specific + call site type used in conjunction w/ our IFastInvokable implementation. + + + + + Shared built-in functions for creating instances of user defined types. Because all + types w/ the same UnderlyingSystemType share the same constructors these can be + shared across multiple types. + + + + + Creates a new type for a user defined type. The name, base classes (a tuple of type + objects), and a dictionary of members is provided. + + + + + Creates a new type for a user defined type. The name, base classes (a tuple of type + objects), and a dictionary of members is provided. + + + + + Creates a new PythonType object which is backed by the specified .NET type for + storage. The type is considered a system type which can not be modified + by the user. + + + + + + Creates a new PythonType which is a subclass of the specified PythonType. + + Used for runtime defined new-style classes which require multiple inheritance. The + primary example of this is the exception system. + + + + + Creates a new PythonType which is a subclass of the specified PythonTypes. + + Used for runtime defined new-style classes which require multiple inheritance. The + primary example of this is the exception system. + + + + + Creates a new PythonType which is a subclass of the specified PythonTypes. + + Used for runtime defined new-style classes which require multiple inheritance. The + primary example of this is the exception system. + + + + + Creates a new PythonType which is a subclass of the specified PythonType. + + Used for runtime defined new-style classes which require multiple inheritance. The + primary example of this is the exception system. + + + + + Creates a new PythonType which is a subclass of the specified PythonTypes. + + Used for runtime defined new-style classes which require multiple inheritance. The + primary example of this is the exception system. + + + + + Creates a new PythonType which is a subclass of the specified PythonTypes. + + Used for runtime defined new-style classes which require multiple inheritance. The + primary example of this is the exception system. + + + + + Creates a new PythonType object which represents an Old-style class. + + + + + Returns true if the specified object is an instance of this type. + + + + + Gets the dynamic type that corresponds with the provided static type. + + Returns null if no type is available. TODO: In the future this will + always return a PythonType created by the DLR. + + + + + + + Sets the python type that corresponds with the provided static type. + + This is used for built-in types which have a metaclass. Currently + only used by ctypes. + + + + + Allocates the storage for the instance running the .NET constructor. This provides + the creation functionality for __new__ implementations. + + + + + Allocates the storage for the instance running the .NET constructor. This provides + the creation functionality for __new__ implementations. + + + + + Allocates the storage for the instance running the .NET constructor. This provides + the creation functionality for __new__ implementations. + + + + + Allocates the storage for the instance running the .NET constructor. This provides + the creation functionality for __new__ implementations. + + + + + Allocates the storage for the instance running the .NET constructor. This provides + the creation functionality for __new__ implementations. + + + + + Allocates the storage for the instance running the .NET constructor. This provides + the creation functionality for __new__ implementations. + + + + + Returns true if this type is a subclass of other + + + + + Looks up a slot on the dynamic type + + + + + Searches the resolution order for a slot matching by name + + + + + Searches the resolution order for a slot matching by name. + + Includes searching for methods in old-style classes + + + + + Internal helper to add a new slot to the type + + + + + + + Gets a value from a dynamic type and any sub-types. Values are stored in slots (which serve as a level of + indirection). This searches the types resolution order and returns the first slot that + contains the value. + + + + + Attempts to lookup a member w/o using the customizer. Equivelent to object.__getattribute__ + but it doens't throw an exception. + + + + + + Gets a value from a dynamic type and any sub-types. Values are stored in slots (which serve as a level of + indirection). This searches the types resolution order and returns the first slot that + contains the value. + + + + + Attempts to lookup a member w/o using the customizer. + + + + + + Sets a value on an instance. If a slot is available in the most derived type the slot + is set there, otherwise the value is stored directly in the instance. + + + + + Attempst to set a value w/o going through the customizer. + + This enables languages to provide the "base" implementation for setting attributes + so that the customizer can call back here. + + + + + Returns a list of all slot names for the type and any subtypes. + + The context that is doing the inquiry of InvariantContext.Instance. + + + + Returns a list of all slot names for the type, any subtypes, and the instance. + + The context that is doing the inquiry of InvariantContext.Instance. + the instance to get instance members from, or null. + + + + Adds members from a user defined type. + + + + + Adds members from a user defined type instance + + + + + Gets the .NET type which is used for instances of the Python type. + + When overridden by a metaclass enables a customization of the .NET type which + is used for instances of the Python type. Meta-classes can construct custom + types at runtime which include new .NET methods, fields, custom attributes or + other features to better interoperate with .NET. + + + + + Initializes a PythonType that represents a standard .NET type. The same .NET type + can be shared with the Python type system. For example object, string, int, + etc... are all the same types. + + + + + Creates a __new__ method for the type. If the type defines interesting constructors + then the __new__ method will call that. Otherwise if it has only a single argless + + + + + This will return a unique integer for every version of every type in the system. + This means that DynamicSite code can generate a check to see if it has the correct + PythonType and version with a single integer compare. + + TODO - This method and related code should fail gracefully on overflow. + + + + + Internal helper function to add a subtype + + + + + Returns a CLR WeakReference object to this PythonType that can be shared + between anyone who needs a weak reference to the type. + + + + + Gets the name of the dynamic type + + + + + Gets the resolution order used for attribute lookup + + + + + Gets the underlying system type that is backing this type. All instances of this + type are an instance of the underlying system type. + + + + + Gets the extension type for this type. The extension type provides + a .NET type which can be inherited from to extend sealed classes + or value types which Python allows inheritance from. + + + + + Gets the base types from which this type inherits. + + + + + True if the type is a system type. A system type is a type which represents an + underlying .NET type and not a subtype of one of these types. + + + + + Gets a list of weak references to all the subtypes of this class. May return null + if there are no subtypes of the class. + + + + + Base class for doing fast type invoke binding. Subclasses are created using + reflection once during the binding. The subclasses can then proceed to do + the binding w/o using reflection. Otherwise we'd have lots more reflection + calls which would slow the binding up. + + + + + Gets or creates delegate for calling the constructor function. + + + + + The type has a ctor which does not accept PythonTypes. This is used + for user defined types which implement __clrtype__ + + + + + Used when a type overrides __new__ with a Python function or other object + that can return an arbitrary value. If the return value is not the same type + as the type which had __new__ then we need to lookup __init__ on the type + and invoke it. Also handles initialization for finalization when __del__ + is defined for the same reasons. + + + + + target is the newly initialized value. + args are the arguments to be passed to __init__ + + + + + Couples a MemberGroup and the name which produces the member group together + + + + + Represents an ops-extension which adds a new slot. The slot can have arbitrary + get/set behavior above and beyond normal .NET methods or properties. This is + typically in regards to how it processes access from instances or subtypes. + + + + + Provides a slot object for the dictionary to allow setting of the dictionary. + + + + + Calculates the method resolution order for a Python class + the rules are: + If A is a subtype of B, then A has precedence (A > B) + If C appears before D in the list of bases then C > D + If E > F in one __mro__ then E > F in all __mro__'s for our subtype + + class A(object): pass + class B(object): pass + class C(B): pass + class N(A,B,C): pass # illegal + + This is because: + C.__mro__ == (C, B, object) + N.__mro__ == (N, A, B, C, object) + which would conflict, but: + + N(B,A) is ok (N, B, a, object) + N(C, B, A) is ok (N, C, B, A, object) + + Calculates a C3 MRO as described in "The Python 2.3 Method Resolution Order" + plus support for old-style classes. + + We build up a list of our base classes MRO's plus our base classes themselves. + We go through the list in order. Look at the 1st class in the current list, and + if it's not the non-first class in any other list then remove it from all the lists + and append it to the mro. Otherwise continue to the next list. If all the classes at + the start are no-good then the MRO is bad and we throw. + + For old-style classes if the old-style class is the only one in the list of bases add + it as a depth-first old-style MRO, otherwise compute a new-style mro for all the classes + and use that. + + + + + + + + + Returns the dictionary used to store state for this object + + + + + Python module. Stores classes, functions, and data. Usually a module + is created by importing a file or package from disk. But a module can also + be directly created by calling the module type and providing a name or + optionally a documentation string. + + + + + Creates a new module backed by a Scope. Used for creating modules for foreign Scope's. + + + + + Creates a new PythonModule with the specified dictionary. + + Used for creating modules for builtin modules which don't have any code associated with them. + + + + + Represents a member of a user-defined type which defines __slots__. The names listed in + __slots__ have storage allocated for them with the type and provide fast get/set access. + + + + + Gets the index into the object array to be used for the slot storage. + + + + + Helpers for interacting w/ .NET types. This includes: + + Member resolution via GetMember/GetMembers. This performs a member lookup which includes the registered + extension types in the PythonBinder. Internally the class has many MemberResolver's which provide + the various resolution behaviors. + + Cached member access - this is via static classes such as Object and provides various MemberInfo's so we're + not constantly looking up via reflection. + + + + list of resolvers which we run to resolve items + + + + Gets the statically known member from the type with the specific name. Searches the entire type hierarchy to find the specified member. + + + + + Gets all the statically known members from the specified type. Searches the entire type hierarchy to get all possible members. + + The result may include multiple resolution. It is the callers responsibility to only treat the 1st one by name as existing. + + + + + Gets the statically known member from the type with the specific name. Searches only the specified type to find the member. + + + + + Gets all the statically known members from the specified type. Searches only the specified type to find the members. + + The result may include multiple resolution. It is the callers responsibility to only treat the 1st one by name as existing. + + + + + Creates the resolver table which includes all the possible resolutions. + + + + + + Provides a resolution for __str__. + + + + + Provides a resolution for __repr__ + + + + + Helper to see if the type explicitly overrides the method. This ignores members + defined on object. + + + + + Provides a resolution for __hash__, first looking for IStructuralEquatable.GetHashCode, + then IValueEquality.GetValueHashCode. + + + + + Provides a resolution for __new__. For standard .NET types __new__ resolves to their + constructor. For Python types they inherit __new__ from their base class. + + TODO: Can we just always fallback to object.__new__? If not why not? + + + + + Provides a resolution for next + + + + + Provides a resolution for __len__ + + + + + Provides a resolution for __iter__ + + + + + Looks for an Equals overload defined on the type and if one is present binds __ne__ to an + InstanceOps helper. + + + + + Provides an implementation of __contains__. We can pull contains from: + ICollection of T which defines Contains directly + IList which defines Contains directly + IDictionary which defines Contains directly + IDictionary of K,V which defines Contains directly + IEnumerable of K which we have an InstaceOps helper for + IEnumerable which we have an instance ops helper for + IEnumerator of K which we have an InstanceOps helper for + IEnumerator which we have an instance ops helper for + + String is ignored here because it defines __contains__ via extension methods already. + + The lookup is well ordered and not dependent upon the order of values returned by reflection. + + + + + Helper for IEnumerable/IEnumerator __contains__ + + + + + Primary worker for getting the member(s) associated with a single name. Can be called with different MemberBinder's to alter the + scope of the search. + + + + + Primary worker for returning a list of all members in a type. Can be called with different MemberBinder's to alter the scope + of the search. + + + + + Helper to get a MemberGroup for methods declared on InstanceOps + + + + + Helper to get the proper typecasting method, according to the following precedence rules: + + 1. Strongest (most specific) declaring type + 2. Strongest (most specific) parameter type + 3. Type of conversion + i. Implicit + ii. Explicit + 4. Return type (order specified in toTypes) + + + + + Helper for creating a typecast resolver + + + + + Helper for creating __getitem__/__setitem__ resolvers + + false for a getter, true for a setter + + + + Filters out methods which are present on standard .NET types but shouldn't be there in Python + + + + + When private binding is enabled we can have a collision between the private Event + and private field backing the event. We filter this out and favor the event. + + This matches the v1.0 behavior of private binding. + + + + + Filters down to include only protected methods + + + + + If an operator is a reverisble operator (e.g. addition) then we need to filter down to just the forward/reverse + versions of the .NET method. For example consider: + + String.op_Multiplication(int, string) + String.op_Multiplication(string, int) + + If this method were defined on string it defines that you can do: + 2 * 'abc' + or: + 'abc' * 2 + + either of which will produce 'abcabc'. The 1st form is considered the reverse form because it is declared on string + but takes a non-string for the 1st argument. The 2nd is considered the forward form because it takes a string as the + 1st argument. + + When dynamically dispatching for 2 * 'abc' we'll first try __mul__ on int, which will fail with a string argument. Then we'll try + __rmul__ on a string which will succeed and dispatch to the (int, string) overload. + + For multiplication in this case it's not too interesting because it's commutative. For addition this might be more interesting + if, for example, we had unicode and ASCII strings. In that case Unicode strings would define addition taking both unicode and + ASCII strings in both forms. + + + + + Checks to see if the parameter type and the declaring type are compatible to determine + if an operator is forward or reverse. + + + + + Checks to see if this is an operator method which Python recognizes. For example + op_Comma is not recognized by Python and therefore should exposed to the user as + a method that is callable by name. + + + + + Provides a resolution for __complex__ + + + + + Provides a resolution for __float__ + + + + + Provides a resolution for __int__ + + + + + Provides a resolution for __long__ + + + + + Provides a resolution for __getitem__ + + + + + Provides a resolution for __setitem__ + + + + + Abstract class used for resolving members. This provides two methods of member look. The first is looking + up a single member by name. The other is getting all of the members. + + There are various subclasses of this which have different methods of resolving the members. The primary + function of the resolvers are to provide the name->value lookup. They also need to provide a simple name + enumerator. The enumerator is kept simple because it's allowed to return duplicate names as well as return + names of members that don't exist. The base MemberResolver will then verify their existance as well as + filter duplicates. + + + + + Looks up an individual member and returns a MemberGroup with the given members. + + + + + Returns a list of members that exist on the type. The ResolvedMember structure indicates both + the name and provides the MemberGroup. + + + + + Returns a list of possible members which could exist. ResolveMember needs to be called to verify their existance. Duplicate + names can also be returned. + + + + + One off resolver for various special methods which are known by name. A delegate is provided to provide the actual member which + will be resolved. + + + + + Standard resolver for looking up .NET members. Uses reflection to get the members by name. + + + + + Resolves methods mapped to __eq__ and __ne__ from: + 1. IStructuralEquatable.Equals + 2. IValueEquality.Equals (CLR2 only) + + + + + Resolves methods mapped to __gt__, __lt__, __ge__, __le__, as well as providing an alternate resolution + for __eq__ and __ne__, from the comparable type's CompareTo method. + + This should be run after the EqualityResolver. + + + + + Resolves methods mapped to __*__ methods automatically from the .NET operator. + + + + + Filters alternative methods out that don't match the expected signature and therefore + are just sharing a common method name. + + + + + Removes Object.Equals methods as we never return these for PythonOperationKind. + + + + + Provides bindings to private members when that global option is enabled. + + + + + Provides resolutions for protected members that haven't yet been + subclassed by NewTypeMaker. + + + + + Base class used for resolving a name into a member on the type. + + + + + Gets an instance op method for the given type and name. + + Instance ops methods appaer on the base most class that's required to expose it. So + if we have: Array[int], Array, object we'd only add an instance op method to Array and + Array[int] inherits it. It's obviously not on object because if it was there we'd just + put the method in ObjectOps. + + Therefore the different binders expose this at the appropriate times. + + + + + MemberBinder which searches the entire type hierarchy and their extension types to find a member. + + + + + MemberBinder which searches only the current type and it's extension types to find a member. + + + + + BuiltinFunction represents any standard CLR function exposed to Python. + This is used for both methods on standard Python types such as list or tuple + and for methods from arbitrary .NET assemblies. + + All calls are made through the optimizedTarget which is created lazily. + + TODO: Back BuiltinFunction's by MethodGroup's. + + + + + Creates a new builtin function for a static .NET function. This is used for module methods + and well-known __new__ methods. + + + + + Creates a built-in function for a .NET method declared on a type. + + + + + Creates a bound built-in function. The instance may be null for built-in functions + accessed for None. + + + + + Returns a BuiltinFunction bound to the provided type arguments. Returns null if the binding + cannot be performed. + + + + + Returns a descriptor for the built-in function if one is + neededed + + + + + Makes a test for the built-in function against the private _data + which is unique per built-in function. + + + + + Helper for generating the call to a builtin function. This is used for calls from built-in method + descriptors and built-in functions w/ and w/o a bound instance. + + This provides all sorts of common checks on top of the call while the caller provides a delegate + to do the actual call. The common checks include: + check for generic-only methods + reversed operator support + transforming arguments so the default binder can understand them (currently user defined mapping types to PythonDictionary) + returning NotImplemented from binary operators + Warning when calling certain built-in functions + + + The call binder we're doing the call for + An expression which points to the code context + the meta object for the built in function + true if we're calling with an instance + The arguments being passed to the function + A restriction for the built-in function, method desc, etc... + A delegate to perform the actual call to the method. + + + + Gets the target methods that we'll be calling. + + + + + True if the method should be visible to non-CLS opt-in callers + + + + + Provides (for reflected methods) a mapping from a signature to the exact target + which takes this signature. + signature with syntax like the following: + someClass.SomeMethod.Overloads[str, int]("Foo", 123) + + + + + Gets the overload dictionary for the logical function. These overloads + are never bound to an instance. + + + + + Returns the instance used for binding. This differs on module functions implemented + using instance methods so the built-in functions there don't expose the instance. + + + + + A custom built-in function which supports indexing + + + + + Use indexing on generic methods to provide a new reflected method with targets bound with + the supplied type arguments. + + + + + The unbound representation of an event property + + + + + BoundEvent is the object that gets returned when the user gets an event object. An + BoundEvent tracks where the event was received from and is used to verify we get + a proper add when dealing w/ statics events. + + + + + Represents a ReflectedProperty created for an extension method. Logically the property is an + instance property but the method implementing it is static. + + + + + Base class for properties backed by methods. These include our slot properties, + indexers, and normal properties. This class provides the storage of these as well + as the storage of our optimized getter/setter methods, documentation for the property, + etc... + + + + + Convenience function for users to call directly + + + + + This function can be used to set a field on a value type without emitting a warning. Otherwise it is provided only to have symmetry with properties which have GetValue/SetValue for supporting explicitly implemented interfaces. + + Setting fields on value types usually warns because it can silently fail to update the value you expect. For example consider this example where Point is a value type with the public fields X and Y: + + arr = System.Array.CreateInstance(Point, 10) + arr[0].X = 42 + print arr[0].X + + prints 0. This is because reading the value from the array creates a copy of the value. Setting the value then mutates the copy and the array does not get updated. The same problem exists when accessing members of a class. + + + + + Provides access to non-default .NET indexers (aka properties w/ parameters). + + C# doesn't support these, but both COM and VB.NET do. The types dictionary + gets populated w/a ReflectedGetterSetter indexer which is a descriptor. Getting + the descriptor returns a bound indexer. The bound indexer supports indexing. + We support multiple indexer parameters via expandable tuples. + + + + + Convenience function for users to call directly + + + + + Convenience function for users to call directly + + + + + True if generating code for gets can result in more optimal accesses. + + + + + single finalizable instance used to track and deliver all the + callbacks for a single object that has been weakly referenced by + one or more references and proxies. The reference to this object + is held in objects that implement IWeakReferenceable. + + + + + Finalizable object used to hook up finalization calls for OldInstances. + + We create one of these each time an object w/ a finalizer gets created. The + only reference to this object is the instance so when that goes out of context + this does as well and this will get finalized. + + + + + Marks a method/field/property as being a wrapper descriptor. A wrapper desriptor + is a member defined on PythonType but is available both for type and other + instances of type. For example type.__bases__. + + + + diff --git a/packages/IronPython.2.7.4/lib/Net40/Microsoft.Dynamic.dll b/packages/IronPython.2.7.4/lib/Net40/Microsoft.Dynamic.dll new file mode 100644 index 0000000000..f6bb2688af Binary files /dev/null and b/packages/IronPython.2.7.4/lib/Net40/Microsoft.Dynamic.dll differ diff --git a/packages/IronPython.2.7.4/lib/Net40/Microsoft.Dynamic.xml b/packages/IronPython.2.7.4/lib/Net40/Microsoft.Dynamic.xml new file mode 100644 index 0000000000..323ac43bc8 --- /dev/null +++ b/packages/IronPython.2.7.4/lib/Net40/Microsoft.Dynamic.xml @@ -0,0 +1,6534 @@ + + + + Microsoft.Dynamic + + + + + Binds named arguments to the parameters. Returns a permutation of indices that captures the relationship between + named arguments and their corresponding parameters. Checks for duplicate and unbound named arguments. + + Ensures that for all i: namedArgs[i] binds to parameters[args.Length + bindingPermutation[i]] + + + + + The number of arguments not counting the collapsed ones. + + + + + Gets the total number of visible arguments passed to the call site including collapsed ones. + + + + + ArgBuilder provides an argument value used by the MethodBinder. One ArgBuilder exists for each + physical parameter defined on a method. + + Contrast this with ParameterWrapper which represents the logical argument passed to the method. + + + + + Provides the Expression which provides the value to be passed to the argument. + If null is returned the argument is skipped (not passed to the callee). + + + + + Provides an Expression which will update the provided value after a call to the method. May + return null if no update is required. + + + + + If the argument produces a return value (e.g. a ref or out value) this provides + the additional value to be returned. + + + + + The number of actual arguments consumed by this builder. + + + + + Returns the type required for the argument or null if the ArgBuilder + does not consume a type. + + + + + An assignable value that is passed to a byref parameter + After the call it will contain the updated value + + + + + Indicates the specific type of failure, if any, from binding to a method. + + + + + The binding succeeded. Only one method was applicable or had the best conversion. + + + + + More than one method was applicable for the provided parameters and no method was considered the best. + + + + + There are no overloads that match the number of parameters required for the call + + + + + None of the target method(s) can successfully be called. The failure can be due to: + 1. Arguments could not be successfully converted for the call + 2. Keyword arguments could not be assigned to positional arguments + 3. Keyword arguments could be assigned but would result in an argument being assigned + multiple times (keyword and positional arguments conflit or dupliate keyword arguments). + + + + + Actual arguments cannot be constructed. + + + + + No method is callable. For example, all methods have an unbound generic parameter. + + + + + Encapsulates the result of an attempt to bind to one or methods using the OverloadResolver. + + Users should first check the Result property to see if the binding was successful or + to determine the specific type of failure that occured. If the binding was successful + MakeExpression can then be called to create an expression which calls the method. + If the binding was a failure callers can then create a custom error message based upon + the reason the call failed. + + + + + Creates a new BindingTarget when the method binding has succeeded. + + + + + Creates a new BindingTarget when the method binding has failed due to an incorrect argument count + + + + + Creates a new BindingTarget when the method binding has failued due to + one or more parameters which could not be converted. + + + + + Creates a new BindingTarget when the match was ambiguous + + + + + Other failure. + + + + + Gets an Expression which calls the binding target if the method binding succeeded. + + Throws InvalidOperationException if the binding failed. + + + + + Gets the result of the attempt to bind. + + + + + Returns the method if the binding succeeded, or null if no method was applicable. + + + + + Returns the selected overload if the binding succeeded, or null if no one was applicable. + + + + + Gets the name of the method as supplied to the OverloadResolver. + + + + + Returns the MethodTarget if the binding succeeded, or null if no method was applicable. + + + + + Returns the methods which don't have any matches or null if Result == BindingResult.AmbiguousMatch + + + + + Returns the methods and their associated conversion failures if Result == BindingResult.CallFailure. + + + + + Returns the acceptable number of arguments which can be passed to the method if Result == BindingResult.IncorrectArgumentCount. + + + + + Returns the total number of arguments provided to the call. 0 if the call succeeded or failed for a reason other + than argument count mismatch. + + + + + Gets the MetaObjects which we originally did binding against in their restricted form. + + The members of the array correspond to each of the arguments. All members of the array + have a value. + + + + + Returns the return type of the binding, or null if no method was applicable. + + + + + Returns the NarrowingLevel of the method if the call succeeded. If the call + failed returns NarrowingLevel.None. + + + + + Returns true if the binding was succesful, false if it failed. + + This is an alias for BindingTarget.Result == BindingResult.Success. + + + + + Creates a ReturnBuilder + + the type the ReturnBuilder will leave on the stack + + + + Represents the reason why a call to a specific method could not be performed by the OverloadResolver. + + The reason for the failure is specified by the CallFailureReason property. Once this property + has been consulted the other properties can be consulted for more detailed information regarding + the failure. + + If reason is ConversionFailure the ConversionResults property will be non-null. + If reason is UnassignableKeyword the KeywordArguments property will be non-null and include + the keywords which could not be assigned. + If reason is DuplicateKeyword the KeywordArguments property will be non-null and include + the keywords which were duplicated (either by the keywords themselves or by positional + arguments). + + MethodTarget is always set and indicates the method which failed to bind. + + + + + Gets the MethodTarget which the call failed for. + + + + + Gets the reason for the call failure which determines the other + properties of the CallFailure which should be consulted. + + + + + Gets a list of ConversionResult's for each parameter indicating + whether the conversion was successful or failed and the types + being converted. + + + + + Gets the list of keyword arguments that were either dupliated or + unassignable. + + + + + Default value, their was no CallFailure. + + + + + One of more parameters failed to be converted + + + + + One or more keyword arguments could not be successfully assigned to a positional argument + + + + + One or more keyword arguments were duplicated or would have taken the spot of a + provided positional argument. + + + + + Type arguments could not be inferred + + + + + Represents a collection of MethodCandidate's which all accept the + same number of logical parameters. For example a params method + and a method with 3 parameters would both be a CandidateSet for 3 parameters. + + + + + Represents information about a failure to convert an argument from one + type to another. + + + + + Value of the argument or null if it is not available. + + + + + Argument actual type or its limit type if the value not known. + DynamicNull if the argument value is null. + + + + + ArgBuilder which provides a default parameter value for a method call. + + + + + Provides binding and overload resolution to .NET methods. + + MethodBinder's can be used for: + generating new AST code for calling a method + calling a method via reflection at runtime + (not implemented) performing an abstract call + + MethodBinder's support default arguments, optional arguments, by-ref (in and out), and keyword arguments. + + Implementation Details: + + The MethodBinder works by building up a CandidateSet for each number of effective arguments that can be + passed to a set of overloads. For example a set of overloads such as: + foo(object a, object b, object c) + foo(int a, int b) + + would have 2 target sets - one for 3 parameters and one for 2 parameters. For parameter arrays + we fallback and create the appropriately sized CandidateSet on demand. + + Each CandidateSet consists of a set of MethodCandidate's. Each MethodCandidate knows the flattened + parameters that could be received. For example for a function such as: + foo(params int[] args) + + When this method is in a CandidateSet of size 3 the MethodCandidate takes 3 parameters - all of them + ints; if it's in a CandidateSet of size 4 it takes 4 parameters. Effectively a MethodCandidate is + a simplified view that allows all arguments to be treated as required positional arguments. + + Each MethodCandidate in turn refers to a MethodTarget. The MethodTarget is composed of a set + of ArgBuilder's and a ReturnBuilder which know how to consume the positional arguments and pass + them to the appropriate argument of the destination method. This includes routing keyword + arguments to the correct position, providing the default values for optional arguments, etc... + + After binding is finished the MethodCandidates are thrown away and a BindingTarget is returned. + The BindingTarget indicates whether the binding was successful and if not any additional information + that should be reported to the user about the failed binding. It also exposes the MethodTarget which + allows consumers to get the flattened list of required parameters for the call. MethodCandidates + are not exposed and are an internal implementation detail of the MethodBinder. + + + + + Resolves a method overload and returns back a BindingTarget. + + The BindingTarget can then be tested for the success or particular type of + failure that prevents the method from being called. If successfully bound the BindingTarget + contains a list of argument meta-objects with additional restrictions that ensure the selection + of the particular overload. + + + + + Checks to see if the language allows named arguments to be bound to instance fields or + properties and turned into setters. By default this is only allowed on contructors. + + + + + Gets an expression that evaluates to the result of GetByRefArray operation. + + + + + Allow to bind an array/dictionary instance or a null reference to params array/dictionary parameter. + + + + + Called before arguments binding. + + + A bitmask that indicates (set bits) the parameters that were mapped by this method. + A default mapping will be constructed for the remaining parameters (cleared bits). + + + + + Return null if arguments cannot be constructed and overload resolution should produce an error. + + + + + Determines whether given overloads are overloaded on index-th parameter (the types of the index-th parameters are the same). + + + + + Selects the best (of two) candidates for conversion from actualType + + + + + Provides ordering for two parameter types if there is no conversion between the two parameter types. + + + + + The method is called each time an item of lazily splatted argument is needed. + + + + + The number of actual arguments consumed by this builder. + + + + + ArgBuilder which provides a value for a keyword argument. + + The KeywordArgBuilder calculates its position at emit time using it's initial + offset within the keyword arguments, the number of keyword arguments, and the + total number of arguments provided by the user. It then delegates to an + underlying ArgBuilder which only receives the single correct argument. + + Delaying the calculation of the position to emit time allows the method binding to be + done without knowing the exact the number of arguments provided by the user. Hence, + the method binder can be dependent only on the set of method overloads and keyword names, + but not the user arguments. While the number of user arguments could be determined + upfront, the current MethodBinder does not have this design. + + + + + The underlying builder should expect a single parameter as KeywordArgBuilder is responsible + for calculating the correct parameter to use + + + + + + Updates fields/properties of the returned value with unused keyword parameters. + + + + + MethodCandidate represents the different possible ways of calling a method or a set of method overloads. + A single method can result in multiple MethodCandidates. Some reasons include: + - Every optional parameter or parameter with a default value will result in a candidate + - The presence of ref and out parameters will add a candidate for languages which want to return the updated values as return values. + - ArgumentKind.List and ArgumentKind.Dictionary can result in a new candidate per invocation since the list might be different every time. + + Each MethodCandidate represents the parameter type for the candidate using ParameterWrapper. + + + + + Builds a new MethodCandidate which takes count arguments and the provided list of keyword arguments. + + The basic idea here is to figure out which parameters map to params or a dictionary params and + fill in those spots w/ extra ParameterWrapper's. + + + + + Narrowing conversions are conversions that cannot be proved to always succeed, conversions that are + known to possibly lose information, and conversions across domains of types sufficiently different + to merit narrowing notation like casts. + + Its upto every language to define the levels for conversions. The narrowling levels can be used by + for method overload resolution, where the overload is based on the parameter types (and not the number + of parameters). + + + + + Conversions at this level do not do any narrowing. Typically, this will include + implicit numeric conversions, Type.IsAssignableFrom, StringBuilder to string, etc. + + + + + Language defined prefered narrowing conversion. First level that introduces narrowing + conversions. + + + + + Language defined preferred narrowing conversion. Second level that introduces narrowing + conversions and should have more conversions than One. + + + + + Language defined preferred narrowing conversion. Third level that introduces narrowing + conversions and should have more conversions that Two. + + + + + A somewhat meaningful conversion is possible, but it will quite likely be lossy. + For eg. BigInteger to an Int32, Boolean to Int32, one-char string to a char, + larger number type to a smaller numeric type (where there is no overflow), etc + + + + + Builds the argument for an out argument when not passed a StrongBox. The out parameter + is returned as an additional return value. + + + + + Defines a method overload abstraction for the purpose of overload resolution. + It provides the overload resolver the metadata it needs to perform the resolution. + + + WARNING: This is a temporary API that will undergo breaking changes in future versions. + + + + + Null for constructors. + + + + + The method arity can vary, i.e. the method has params array or params dict parameters. + + + + + Represents a method overload that is bound to a . + + + Not thread safe. + WARNING: This is a temporary API that will undergo breaking changes in future versions. + + + + + Maps out parameters to return args and ref parameters to ones that don't accept StrongBox. + + + + + ParameterWrapper represents the logical view of a parameter. For eg. the byref-reduced signature + of a method with byref parameters will be represented using a ParameterWrapper of the underlying + element type, since the logical view of the byref-reduced signature is that the argument will be + passed by value (and the updated value is included in the return value). + + Contrast this with ArgBuilder which represents the real physical argument passed to the method. + + + + + ParameterInfo is not available. + + + + + Creates a parameter that represents an expanded item of params-array. + + + + + True if the wrapper represents a params-array parameter (false for parameters created by expansion of a params-array). + + + + + True if the wrapper represents a params-dict parameter (false for parameters created by expansion of a params-dict). + + + + + Builds the parameter for a params dictionary argument - this collects all the extra name/value + pairs provided to the function into a SymbolDictionary which is passed to the function. + + + + + An argument that the user wants to explicitly pass by-reference (with copy-in copy-out semantics). + The user passes a StrongBox[T] object whose value will get updated when the call returns. + + + + + SimpleArgBuilder produces the value produced by the user as the argument value. It + also tracks information about the original parameter and is used to create extended + methods for params arrays and param dictionary functions. + + + + + Parameter info is not available for this argument. + + + + + Type and whether the parameter is a params-array or params-dictionary is derived from info. + + + + + True if there are restrictions beyond just simple type restrictions + + + + + Builds a parameter for a reference argument when a StrongBox has not been provided. The + updated return value is returned as one of the resulting return values. + + + + + Gets the generic arguments for method based upon the constraints discovered during + type inference. Returns null if not all generic arguments had their types inferred. + + + + + Creates a new set of arg builders for the given generic method definition which target the new + parameters. + + + + + Creates a new list of ParameterWrappers for the generic method replacing the old parameters with the new ones. + + + + + Gets the generic type arguments sorted so that the type arguments + that are depended upon by other type arguments are sorted before + their dependencies. + + + + + Checks to see if the x type parameter is dependent upon the y type parameter. + + + + + Builds a mapping based upon generic parameter constraints between related generic + parameters. This is then used to sort the generic parameters so that we can process + the least dependent parameters first. For example given the method: + + void Foo{T0, T1}(T0 x, T1 y) where T0 : T1 + + We need to first infer the type information for T1 before we infer the type information + for T0 so that we can ensure the constraints are correct. + + + + + Returns a mapping from generic type parameter to the input DMOs which map to it. + + + + + Adds any additional ArgumentInputs entries for the given object and parameter type. + + + + + Walks the nested generic hierarchy to construct all of the generic parameters referred + to by this type. For example if getting the generic parameters for the x parameter on + the method: + + void Foo{T0, T1}(Dictionary{T0, T1} x); + + We would add both typeof(T0) and typeof(T1) to the list of generic arguments. + + + + + Provides generic type inference for a single parameter. + + + For example: + M{T}(T x) + M{T}(IList{T} x) + M{T}(ref T x) + M{T}(T[] x) + M{T}(ref Dictionary{T,T}[] x) + + + + + Provides generic type inference for a single parameter. + + + For example: + M{T}(T x) + M{T}(IList{T} x) + M{T}(ref T x) + M{T}(T[] x) + M{T}(ref Dictionary{T,T}[] x) + + + + + Checks if the constraints are violated by the given input for the specified generic method parameter. + + This method must be supplied with a mapping for any dependent generic method type parameters which + this one can be constrained to. For example for the signature "void Foo{T0, T1}(T0 x, T1 y) where T0 : T1". + we cannot know if the constraints are violated unless we know what we have calculated T1 to be. + + + + + Finds all occurences of genericParameter in openType and the corresponding concrete types in closedType. + Returns true iff all occurences of the generic parameter in the open type correspond to the same concrete type in the closed type + and this type satisfies given constraints. Returns the concrete type in match if so. + + + + + Maps a single type parameter to the possible parameters and DynamicMetaObjects + we can get inference from. For example for the signature: + + void Foo{T0, T1}(T0 x, T1 y, IList{T1} z); + + We would have one ArgumentInput for T0 which holds onto the DMO providing the argument + value for x. We would also have one ArgumentInput for T1 which holds onto the 2 DMOs + for y and z. Associated with y would be a GenericParameterInferer and associated with + z would be a ConstructedParameterInferer. + + + + + Implemented by DynamicMetaObject subclasses when the associated object + can participate in generic method type inference. This interface + is used when the inference engine is attempting to perform type inference + for a parameter which is typed to a delegate type. + + + + + Returns the type inferred for parameterType when performing + inference for a conversion to delegateType. + + + + + Provides information about the result of a custom object which dynamically + infers back types. + + Currently only used for invokable objects to feedback the types for a delegate + type. + + + + + Determines the result of a conversion action. The result can either result in an exception, a value that + has been successfully converted or default(T), or a true/false result indicating if the value can be converted. + + + + + Attempts to perform available implicit conversions and throws if there are no available conversions. + + + + + Attempst to perform available implicit and explicit conversions and throws if there are no available conversions. + + + + + Attempts to perform available implicit conversions and returns default(ReturnType) if no conversions can be performed. + + If the return type of the rule is a value type then the return value will be zero-initialized. If the return type + of the rule is object or another class then the return type will be null (even if the conversion is to a value type). + This enables ImplicitTry to be used to do TryConvertTo even if the type is value type (and the difference between + null and a real value can be distinguished). + + + + + Attempts to perform available implicit and explicit conversions and returns default(ReturnType) if no conversions + can be performed. + + If the return type of the rule is a value type then the return value will be zero-initialized. If the return type + of the rule is object or another class then the return type will be null (even if the conversion is to a value type). + This enables ExplicitTry to be used to do TryConvertTo even if the type is value type (and the difference between + null and a real value can be distinguished). + + + + + Provides binding semantics for a language. This include conversions as well as support + for producing rules for actions. These optimized rules are used for calling methods, + performing operators, and getting members using the ActionBinder's conversion semantics. + + + + + Provides binding semantics for a language. This include conversions as well as support + for producing rules for actions. These optimized rules are used for calling methods, + performing operators, and getting members using the ActionBinder's conversion semantics. + + + + + Converts an object at runtime into the specified type. + + + + + Determines if a conversion exists from fromType to toType at the specified narrowing level. + toNotNullable is true if the target variable doesn't allow null values. + + + + + Provides ordering for two parameter types if there is no conversion between the two parameter types. + + + + + Converts the provided expression to the given type. The expression is safe to evaluate multiple times. + + + + + Gets the members that are visible from the provided type of the specified name. + + The default implemetnation first searches the type, then the flattened heirachy of the type, and then + registered extension methods. + + + + + Called when a set is attempting to assign to a field or property from a derived class through the base class. + + The default behavior is to allow the assignment. + + + + + Creates an ErrorInfo object when a static property is accessed from an instance member. The default behavior is throw + an exception indicating that static members properties be accessed via an instance. Languages can override this to + customize the exception, message, or to produce an ErrorInfo object which reads or writes to the property being accessed. + + The static property being accessed through an instance + True if the user is assigning to the property, false if the user is reading from the property + The parameters being used to access the property. This includes the instance as the first entry, any index parameters, and the + value being assigned as the last entry if isAssignment is true. + + + + + Provides a way for the binder to provide a custom error message when lookup fails. Just + doing this for the time being until we get a more robust error return mechanism. + + Deprecated, use the non-generic version instead + + + + + Gets the extension members of the given name from the provided type. Base classes are also + searched for their extension members. Once any of the types in the inheritance hierarchy + provide an extension member the search is stopped. + + + + + Gets the extension members of the given name from the provided type. Subclasses of the + type and their extension members are not searched. + + + + + Provides an opportunity for languages to replace all MemberTracker's with their own type. + + Alternatlely a language can expose MemberTracker's directly. + + The member which is being returned to the user. + Tthe type which the memberTrack was accessed from + + + + + Determines if the binder should allow access to non-public members. + + By default the binder does not allow access to non-public members. Base classes + can inherit and override this value to customize whether or not private binding + is available. + + + + + Creates the MetaObject for indexing directly into arrays or indexing into objects which have + default members. Returns null if we're not an indexing operation. + + + + + Creates the MetaObject for indexing directly into arrays or indexing into objects which have + default members. Returns null if we're not an indexing operation. + + + + + Creates the meta object for the rest of the operations: comparisons and all other + ExpressionType. If the operation cannot be completed a MetaObject which indicates an + error will be returned. + + + + + Creates the meta object for the rest of the operations: comparisons and all other + ExpressionType. If the operation cannot be completed a MetaObject which indicates an + error will be returned. + + + + + Produces a rule for comparing a value to null - supports comparing object references and nullable types. + + + + + Checks if the conversion is to object and produces a target if it is. + + + + + Checks if any conversions are available and if so builds the target for that conversion. + + + + + Checks if the conversion can be handled by a simple cast. + + + + + Checks if the conversion can be handled by calling a user-defined conversion method. + + + + + Helper that checkes both types to see if either one defines the specified conversion + method. + + + + + Checks if any of the members of the MemberGroup provide the applicable conversion and + if so uses it to build a conversion rule. + + + + + Checks if the conversion is to applicable by extracting the value from Extensible of T. + + + + + Checks if there's an implicit numeric conversion for primitive data types. + + + + + Checks if there's a conversion to/from Nullable of T. + + + + + Checks to see if there's a conversion of null to a reference type + + + + + Helper to produce an error when a conversion cannot occur + + + + + Helper to produce a rule which just boxes a value type + + + + + Helper to produce a conversion rule by calling the helper method to do the convert + + + + + Helper to produce a conversion rule by calling the helper method to do the convert + + + + + Helper to produce a conversion rule by calling the method to do the convert. This version takes the parameter + to be passed to the conversion function and we call it w/ our own value or w/ our Extensible.Value. + + + + + Helper to wrap explicit conversion call into try/catch incase it throws an exception. If + it throws the default value is returned. + + + + + Helper to produce a rule when no conversion is required (the strong type of the expression + input matches the type we're converting to or has an implicit conversion at the IL level) + + + + + Helper to produce a rule when no conversion is required from an extensible type's + underlying storage to the type we're converting to. The type of extensible type + matches the type we're converting to or has an implicit conversion at the IL level. + + + + + Helper to extract the value from an Extensible of T + + + + + Helper to convert a null value to nullable of T + + + + + Helper to produce the rule for converting T to Nullable of T + + + + + Helper to produce the rule for converting T to Nullable of T + + + + + Returns a value which indicates failure when a OldConvertToAction of ImplicitTry or + ExplicitTry. + + + + + Helper to extract the Value of an Extensible of T from the + expression being converted. + + + + + Helper that checks if fromType is an Extensible of T or a subtype of + Extensible of T and if so returns the T. Otherwise it returns fromType. + + This is used to treat extensible types the same as their underlying types. + + + + + Creates a target which returns null for a reference type. + + + + if a member-injector is defined-on or registered-for this type call it + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + Returns a DynamicMetaObject which represents the value that will be returned when the member is accessed. + + The returned DynamicMetaObject may be strongly typed to a value type which needs boxing before being + returned from a standard DLR GetMemberBinder. The language is responsible for performing any boxing + so that it has an opportunity to perform custom boxing. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + Provides overload resolution and method binding for any calls which need to be performed for the GetMember. + + + Returns a DynamicMetaObject which represents the value that will be returned when the member is accessed. + + The returned DynamicMetaObject may be strongly typed to a value type which needs boxing before being + returned from a standard DLR GetMemberBinder. The language is responsible for performing any boxing + so that it has an opportunity to perform custom boxing. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + An OverloadResolverFactory which can be used for performing overload resolution and method binding. + + + True if the operation should return Operation.Failed on failure, false if it + should return the exception produced by MakeMissingMemberError. + + + The meta object to be used if the get results in an error. + + + Returns a DynamicMetaObject which represents the value that will be returned when the member is accessed. + + The returned DynamicMetaObject may be strongly typed to a value type which needs boxing before being + returned from a standard DLR GetMemberBinder. The language is responsible for performing any boxing + so that it has an opportunity to perform custom boxing. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + True if the operation should return Operation.Failed on failure, false if it + should return the exception produced by MakeMissingMemberError. + + + The meta object to be used if the get results in an error. + + + Returns a DynamicMetaObject which represents the value that will be returned when the member is accessed. + + The returned DynamicMetaObject may be strongly typed to a value type which needs boxing before being + returned from a standard DLR GetMemberBinder. The language is responsible for performing any boxing + so that it has an opportunity to perform custom boxing. + + + + if a member-injector is defined-on or registered-for this type call it + + + + Provides default binding for performing a call on the specified meta objects. + + The signature describing the call + The meta object to be called. + + Additional meta objects are the parameters for the call as specified by the CallSignature in the CallAction. + + A MetaObject representing the call or the error. + + + + Provides default binding for performing a call on the specified meta objects. + + The signature describing the call + The meta object to be called. + + Additional meta objects are the parameters for the call as specified by the CallSignature in the CallAction. + + Overload resolver factory. + A MetaObject representing the call or the error. + + + + Provides default binding for performing a call on the specified meta objects. + + The signature describing the call + The meta object to be called. + + Additional meta objects are the parameters for the call as specified by the CallSignature in the CallAction. + + Overload resolver factory. + The result should the object be uncallable. + A MetaObject representing the call or the error. + + + + Gets a TargetInfo object for performing a call on this object. + + If this object is a delegate we bind to the Invoke method. + If this object is a MemberGroup or MethodGroup we bind to the methods in the member group. + If this object is a BoundMemberTracker we bind to the methods with the bound instance. + If the underlying type has defined an operator Call method we'll bind to that method. + + + + + Binds to the methods in a method group. + + + + + Binds to the methods in a member group. + + TODO: We should really only have either MemberGroup or MethodGroup, not both. + + + + + Binds to the BoundMemberTracker and uses the instance in the tracker and restricts + based upon the object instance type. + + + + + Binds to the Invoke method on a delegate if this is a delegate type. + + + + + Attempts to bind to an operator Call method. + + + + + Performs binding against a set of overloaded methods using the specified arguments. The arguments are + consumed as specified by the CallSignature object. + + Overload resolver. + The methods to be called + A meta object which results from the call. + + + + Performs binding against a set of overloaded methods using the specified arguments. The arguments are + consumed as specified by the CallSignature object. + + Overload resolver. + The methods to be called + The name of the method or null to use the name from targets. + A meta object which results from the call. + + + + Performs binding against a set of overloaded methods using the specified arguments. The arguments are + consumed as specified by the CallSignature object. + + Overload resolver. + The methods to be called + Additional restrictions which should be applied to the resulting MetaObject. + A meta object which results from the call. + + + + Performs binding against a set of overloaded methods using the specified arguments. The arguments are + consumed as specified by the CallSignature object. + + Overload resolver. + The methods to be called + Additional restrictions which should be applied to the resulting MetaObject. + The name of the method or null to use the name from targets. + A meta object which results from the call. + + + + Performs binding against a set of overloaded methods using the specified arguments. The arguments are + consumed as specified by the CallSignature object. + + TODO. + TODO. + Overload resolver. + The methods to be called + Additional restrictions which should be applied to the resulting MetaObject. + The resulting binding target which can be used for producing error information. + The name of the method or null to use the name from targets. + A meta object which results from the call. + + + + Makes test for param arrays and param dictionary parameters. + + + + + Pulls out the right argument to build the splat test. MakeParamsTest makes the actual test. + + + + + Builds the restrictions for calling with a splatted argument array. Ensures that the + argument is still an ICollection of object and that it has the same number of arguments. + + + + + Builds the restrictions for calling with keyword arguments. The restrictions include + tests on the individual keys of the dictionary to ensure they have the same names. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + The value being assigned to the target member. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + The value being assigned to the target member. + + + Provides overload resolution and method binding for any calls which need to be performed for the SetMember. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + The value being assigned to the target member. + + + Provides a DynamicMetaObject that is to be used as the result if the member cannot be set. If null then then a language + specific error code is provided by ActionBinder.MakeMissingMemberErrorForAssign which can be overridden by the language. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + The value being assigned to the target member. + + + Provides overload resolution and method binding for any calls which need to be performed for the SetMember. + + + Provides a DynamicMetaObject that is to be used as the result if the member cannot be set. If null then then a language + specific error code is provided by ActionBinder.MakeMissingMemberErrorForAssign which can be overridden by the language. + + + + if a member-injector is defined-on or registered-for this type call it + + + + Provides a way for the binder to provide a custom error message when lookup fails. Just + doing this for the time being until we get a more robust error return mechanism. + + + + + Called when the user is accessing a protected or private member on a get. + + The default implementation allows access to the fields or properties using reflection. + + + + + Provides a way for the binder to provide a custom error message when lookup fails. Just + doing this for the time being until we get a more robust error return mechanism. + + + + + Helper class for flowing information about the GetMember request. + + + + + Helper class for flowing information about the GetMember request. + + + + + Encapsulates information about the target of the call. This includes an implicit instance for the call, + the methods that we'll be calling as well as any restrictions required to perform the call. + + + + + A MetaObject which was produced as the result of a failed binding. + + + + + Interceptor prototype. The interceptor is a call site binder that wraps + a real call site binder and can perform arbitrary operations on the expression + trees that the wrapped binder produces: + * Dumping the trees + * Additional rewriting + * Static compilation + * ... + + + + + Returns true if the method should not be displayed in the stack frame. + + + + + Specifies the action for which the default binder is requesting a member. + + + + + If the number of items added to the builder is greater than 4 returns a read-only collection builder containing all the items. + Returns null otherwise. + + + + + Returns null if no expression was added into the builder. + If only a single expression was added returns it. + Otherwise returns a containing the expressions added to the builder. + + + + + Wrapping a tree in this node enables jumps from finally blocks + It does this by generating control-flow logic in the tree + + Reducing this node requires a full tree walk of its body + (but not nested lambdas) + + WARNING: this node cannot contain jumps across blocks, because it + assumes any unknown jumps are jumps to an outer scope. + + + + + Factory methods. + + + + + Determines whether specified expression type represents an assignment. + + + True if the expression type represents an assignment. + + + Note that some other nodes can also assign to variables, members or array items: + MemberInit, NewArrayInit, Call with ref params, New with ref params, Dynamic with ref params. + + + + + Determines if the left child of the given expression is read or written to or both. + + + + + Converts an expression to a void type. + + An to convert to void. + An that has the property equal to and the and property set to void. + + + + Returns an expression that boxes a given value. Uses boxed objects cache for Int32 and Boolean types. + + + + + Creates a generator with type IEnumerable{T}, where T is the label.Type + + + + + + + + Null coalescing expression + {result} ::= ((tmp = {_left}) == null) ? {right} : tmp + '??' operator in C#. + + + + + True coalescing expression. + {result} ::= IsTrue(tmp = {left}) ? {right} : tmp + Generalized AND semantics. + + + + + False coalescing expression. + {result} ::= IsTrue(tmp = {left}) ? tmp : {right} + Generalized OR semantics. + + + + + True coalescing expression. + {result} ::= IsTrue(tmp = {left}) ? {right} : tmp + Generalized AND semantics. + + + + + False coalescing expression. + {result} ::= IsTrue(tmp = {left}) ? tmp : {right} + Generalized OR semantics. + + + + + Wraps the given value in a WeakReference and returns a tree that will retrieve + the value from the WeakReference. + + + + + Creates new instance of the LambdaBuilder with the specified name and return type. + + Return type of the lambda being built. + Name for the lambda being built. + new LambdaBuilder instance + + + + The helper to create the AST method call node. Will add conversions (Utils.Convert) + to parameters and instance if necessary. + + + + + The helper to create the AST method call node. Will add conversions (Utils.Convert) + to parameters and instance if necessary. + + + + + The complex call helper to create the AST method call node. + Will add conversions (Expression.Convert()), deals with default parameter values and params arrays. + + + + + The purpose of this rewriter is simple: ETs do not allow jumps (break, continue, return, goto) + that would go through a finally/fault. So we replace them with code that instead stores a flag, + and then jumps to the end of the finally/fault. At the end of the try-finally, we emit a switch + that then jumps to the correct label. + + A few things that make this more complicated: + + 1. If a finally contains a jump out, then jumps in the try/catch need to be replaced as well. + It's to support cases like this: + # returns 234 + def foo(): + try: return 123 + finally: return 234 + + We need to replace the "return 123" because after it jumps, we'll go to the finally, which + might decide to jump again, but once the IL finally exits, it ignores the finally jump and + keeps going with the original jump. The moral of the story is: if any jumps in finally are + rewritten, try/catch jumps must be also. + + 2. To generate better code, we only have one state variable, so if we have to jump out of + multiple finallys we just keep jumping. It looks sort of like this: + foo: + try { ... } finally { + try { ... } finally { + ... + if (...) { + // was: goto foo; + $flow = 1; goto endInnerFinally; + } + ... + endInnerFinally: + } + switch ($flow) { + case 1: goto endOuterFinally; + } + ... + endOuterFinally: + } + switch ($flow) { + case 1: $flow = 0; goto foo; + } + ... + + + + + + Implemented by expressions which can provide a version which is aware of light exceptions. + + Normally these expressions will simply reduce to a version which throws a real exception. + When the expression is used inside of a region of code which supports light exceptions + the light exception re-writer will call ReduceForLightExceptions. The expression can + then return a new expression which can return a light exception rather than throwing + a real .NET exception. + + + + + Implemented by binders which support light exceptions. Dynamic objects + binding against a binder which implements this interface can check + SupportsLightThrow to see if the binder currently supports safely + returning a light exception. Light exceptions can be created with + LightException.Throw. + + Binders also need to implement GetlightBinder. This method + returns a new call site binder which may return light exceptions if + the binder supports them. + + + + + Gets a binder which will support light exception if one is + available. + + + + + Returns true if a callsite binding against this binder can + return light exceptions. + + + + + Provides a method call to a method which may return light exceptions. + + The call is to a method which supports light exceptions. When reducing + an additional check and throw is added. When a block code of is re-written + for light exceptions this instead reduces to not throw a .NET exception. + + + + + Expression which produces a light exception value. This should be constructed + with the expression which creates the exception and this method will then call + a helper method which wraps the exception in our internal light exception class. + + + + + Used by compilers to provide additional debug information about LambdaExpression to DebugContext + + + + + Implemented by compilers to allow the traceback engine to get additional information. + + + + + Provides services to compilers for instrumenting code with tracebacks. + + + + + Creates a new instance of DebugContext + + + + + Transforms a LambdaExpression to a debuggable LambdaExpression + + + + + Transforms a LambdaExpression to a debuggable LambdaExpression + + + + + Resets a state associated with a source file that's maintained in the DebugContext + + + + + Threads + + + + + Hook + + + + + // This method is called from the generator to update the frame with generator's locals + + + + + Remaps the frame's state to use the generator for execution. + + Int32.MaxValue to map to latest version + + + + Thread + + + + + FrameOrder + + + + + Variables + + + + + CurrentSequencePointIndex + + + + + DebuggableLambdaBuilder is used to transform a DLR expression tree into a debuggable lambda expression. + + + + + Used to wrap a lambda that was already a generator prior to transform. + + + + + Used to rewrite expressions containing DebugInfoExpressions. + + + + + Combines source file and span. Also provides Contains and Intersects functionality. + + + + + Implementation of IDebugRuntimeVariables, which wraps IRuntimeVariables + FunctionInfo/DebugMarker + + + + + IDebugRuntimeVariables is used to wrap IRuntimeVariables and add properties for retrieving + FunctionInfo and DebugMarker from debuggable labmdas. + + + + + Default implementation of BaseDebugThread, which uses DLR's RuntimeVariablesExpression for lifting locals. + + + + + Default implementation of IDebugThreadFactory, which uses DLR's RuntimeVariablesExpression for lifting locals. + + + + + IDebugThreadFactory is used to abstract how frames and local variables are maintained at run/debug time. + + + + + GetTraceLocations + + + + + + SequencePoints + + + + + Name + + + + + CustomPayload + + + + + Callback that is fired by the traceback engine + + + + + Used to extract locals information from expressions. + + + + + Strongly-typed and parameterized string factory. + + + + + Implements IRuntimeVariables in a way that preserves scoping within the lambda. + + + + + TraceSession + + + + + Used to provide information about locals/parameters at debug time. + + + + + Type + + + + + Name + + + + + Parameter + + + + + Caches type member lookup. + + + When enumerating members (methods, properties, events) of a type (declared or inherited) Reflection enumerates all + runtime members of the type and its base types and caches the result. + When looking for a member of a specific name Reflection still enumerates all and filters out those that don't match the name. + That's inefficient when looking for members of multiple names one by one. + Instead we build a map of name to member list and then answer subsequent queries by simply looking up the dictionary. + + + + + Provides services for loading XAML and binding events to dynamic language code definitions. + + + + + Loads XAML from the specified stream and returns the deserialized object. Any event handlers + are bound to methods defined in the provided Scope and converted using the provided DynamicOperations + object. + + + + + Loads XAML from the specified filename and returns the deserialized object. Any event handlers + are bound to methods defined in the provided Scope and converted using the provided DynamicOperations + object. + + + + + Loads XAML from the specified XmlReader and returns the deserialized object. Any event handlers + are bound to methods defined in the provided Scope and converted using the provided DynamicOperations + object. + + + + + Loads XAML from the specified TextReader and returns the deserialized object. Any event handlers + are bound to methods defined in the provided Scope and converted using the provided DynamicOperations + object. + + + + + Loads XAML from the specified XamlXmlReader and returns the deserialized object. Any event handlers + are bound to methods defined in the provided Scope and converted using the provided DynamicOperations + object. + + + + + Dummy, should never be called + + + + + Returns the list of x:Name'd objects that we saw and should set on the root object. + + + + + Marks a method which may return a light exception. Such + methods need to have their return value checked and the exception + will need to be thrown if the caller is not light exception aware. + + + + + Internal re-writer class which creates code which is light exception aware. + + + + + Adds light exception handling to the provided expression which + is light exception aware. + + + + + Class used to be avoid overhead of creating expression trees when we're usually + + + + + Provides support for light exceptions. These exceptions are propagated by + returning an instance of a private wrapper class containing the exception. Code + which is aware of light exceptions will branch to apporiate exception handling + blocks when in a try and otherwise return the value up the stack. This avoids + using the underlying CLR exception mechanism with overhead such as creating stack + traces. + + When a light exception reaches the boundary of code which is not light exception + aware the caller must check to see if a light exception is being thrown and if + so raise a .NET exception. + + This class provides methods for re-writing expression trees to support light exceptions, + methods to create light throw objects, check if an object is a light + throw object, and turn such an object back into a .NET Exception which can be thrown. + + Light exceptions also don't build up stack traces or interoperate with filter blocks + via 2-pass exception handling. + + + + + Rewrites the provided expression to support light exceptions. + + Calls to the returned expression, if not from other light-weight aware calls, + need to call GetLightException on return to see if an exception was thrown + and if so throw it. + + + + + Returns a new expression which will lazily reduce to a light + expression re-written version of the same expression. + + + + + Returns a new expression which is re-written for light exceptions + but will throw an exception if it escapes the expression. If this + expression is part of a larger experssion which is later re-written + for light exceptions then it will propagate the light exception up. + + + + + Returns an object which represents a light exception. + + + + + Returns an object which represents a light exception. + + + + + Returns an object which represents a light exception. + + + + + If the binder supports light exceptions then a light exception throwing expression is returned. + + Otherwise a normal throwing expression is returned. + + + + + If the binder supports light exceptions then a light exception throwing expression is returned. + + Otherwise a normal throwing expression is returned. + + + + + Throws the exception if the value represents a light exception + + + + + Wraps the expression in a check and rethrow. + + + + + Checks to see if the provided value is a light exception. + + + + + Gets the light exception from an object which may contain a light + exception. Returns null if the object is not a light exception. + + Used for throwing the exception at non-light exception boundaries. + + + + + Returns true if the call site binder is a light exception binder and supports + light throws. Returns false otherwise. + + + + + + + Sealed wrapper class to indicate something is a light exception. + + + + + Stores information needed to emit debugging symbol information for a + source file, in particular the file name and unique language identifier + + + + + The source file name + + + + + Returns the language's unique identifier, if any + + + + + Returns the language vendor's unique identifier, if any + + + + + ArgBuilder provides an argument value used by the MethodBinder. One ArgBuilder exists for each + physical parameter defined on a method. + + Contrast this with ParameterWrapper which represents the logical argument passed to the method. + + + + + Provides the Expression which provides the value to be passed to the argument. + + + + + Provides the Expression which provides the value to be passed to the argument. + This method is called when result is intended to be used ByRef. + + + + + Provides an Expression which will update the provided value after a call to the method. + May return null if no update is required. + + + + + SimpleArgBuilder produces the value produced by the user as the argument value. It + also tracks information about the original parameter and is used to create extended + methods for params arrays and param dictionary functions. + + + + + Provides the implementation of performing AddAssign and SubtractAssign binary operations. + + The binder provided by the call site. + The handler for the operation. + The result of the operation. + true if the operation is complete, false if the call site should determine behavior. + + + + Adds a handler to an event. + + The handler to be added. + The original event with handler added. + + + + Removes handler from the event. + + The handler to be removed. + The original event with handler removed. + + + + Provides helper methods to bind COM objects dynamically. + + + + + Determines if an object is a COM object. + + The object to test. + true if the object is a COM object, false otherwise. + + + + Tries to perform binding of the dynamic get member operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + The new representing the result of the binding. + true if member evaluation may be delayed. + true if operation was bound successfully; otherwise, false. + + + + Tries to perform binding of the dynamic get member operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + The new representing the result of the binding. + true if operation was bound successfully; otherwise, false. + + + + Tries to perform binding of the dynamic set member operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + The representing the value for the set member operation. + The new representing the result of the binding. + true if operation was bound successfully; otherwise, false. + + + + Tries to perform binding of the dynamic invoke operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + An array of instances - arguments to the invoke member operation. + The new representing the result of the binding. + true if operation was bound successfully; otherwise, false. + + + + Tries to perform binding of the dynamic invoke member operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + An array of instances - arguments to the invoke member operation. + The new representing the result of the binding. + true if operation was bound successfully; otherwise, false. + + + + Tries to perform binding of the dynamic get index operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + An array of instances - arguments to the invoke member operation. + The new representing the result of the binding. + true if operation was bound successfully; otherwise, false. + + + + Tries to perform binding of the dynamic set index operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + An array of instances - arguments to the invoke member operation. + The representing the value for the set index operation. + The new representing the result of the binding. + true if operation was bound successfully; otherwise, false. + + + + Tries to perform binding of the dynamic Convert operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + The new representing the result of the binding. + true if operation was bound successfully; otherwise, false. + + + + Gets the member names associated with the object. + This function can operate only with objects for which returns true. + + The object for which member names are requested. + The collection of member names. + + + + Gets the member names of the data-like members associated with the object. + This function can operate only with objects for which returns true. + + The object for which member names are requested. + The collection of member names. + + + + Gets the data-like members and associated data for an object. + This function can operate only with objects for which returns true. + + The object for which data members are requested. + The enumeration of names of data members for which to retrieve values. + The collection of pairs that represent data member's names and their data. + + + + Special binder that indicates special semantics for COM GetMember operation. + + + + + This class implements an event sink for a particular RCW. + Unlike the implementation of events in TlbImp'd assemblies, + we will create only one event sink per RCW (theoretically RCW might have + several ComEventSink evenk sinks - but all these implement different source intefaces). + Each ComEventSink contains a list of ComEventSinkMethod objects - which represent + a single method on the source interface an a multicast delegate to redirect + the calls. Notice that we are chaining multicast delegates so that same + ComEventSinkMedhod can invoke multiple event handlers). + + ComEventSink implements an IDisposable pattern to Unadvise from the connection point. + Typically, when RCW is finalized the corresponding Dispose will be triggered by + ComEventSinksContainer finalizer. Notice that lifetime of ComEventSinksContainer + is bound to the lifetime of the RCW. + + + + + Contains a methods DISPID (in a string formatted of "[DISPID=N]" + and a chained list of delegates to invoke + + + + + ComEventSinkProxy class is responsible for handling QIs for sourceIid + on instances of ComEventSink. + + Background: When a COM even sink advises to a connection point it is + supposed to hand over the dispinterface. Now, some hosts will trust + the COM client to pass the correct pointer, but some will not. + E.g. Excel's implementation of Connection Points will not cause a + QI on the pointer that has been passed, however Word will QI the + pointer to return the required interface. + + ComEventSink does not, strongly speaking, implements the interface + that it claims to implement - it is just "faking" it by using IReflect. + Thus, Word's QIs on the pointer passed to ICP::Advise would fail. To + prevent this we take advangate of RealProxy's ability of + "dressing up" like other classes and hence successfully respond to QIs + for interfaces that it does not really support( it is OK to say + "I implement this interface" for event sinks only since the common + practice is to use IDistpach.Invoke when calling into event sinks). + + + + + ComEventSinksContainer is just a regular list with a finalizer. + This list is usually attached as a custom data for RCW object and + is finalized whenever RCW is finalized. + + + + + Layout of the IDispatch vtable + + + + + Invokes the object. If it falls back, just produce an error. + + + + + Splats the arguments to another nested dynamic site, which does the + real invocation of the IDynamicMetaObjectProvider. + + + + + Create a stub for the target of the optimized lopop. + + + + + + Gets expressions to access all the arguments. This includes the instance argument. + + + + + This is a helper class for runtime-callable-wrappers of COM instances. We create one instance of this type + for every generic RCW instance. + + + + + The runtime-callable wrapper + + + + + This is the factory method to get the ComObject corresponding to an RCW + + + + + + The parameter description of a method defined in a type library + + + + + Creates a representation for the paramter of a COM method + + + + + Creates a representation for the return value of a COM method + TODO: Return values should be represented by a different type + + + + + DBNull.Value if there is no default value + + + + + Look for typeinfo using IDispatch.GetTypeInfo + + + + Some COM objects just dont expose typeinfo. In these cases, this method will return null. + Some COM objects do intend to expose typeinfo, but may not be able to do so if the type-library is not properly + registered. This will be considered as acceptable or as an error condition depending on throwIfMissingExpectedTypeInfo + + + + + This method should be called when typeinfo is not available for an object. The function + will check if the typeinfo is expected to be missing. This can include error cases where + the same error is guaranteed to happen all the time, on all machines, under all circumstances. + In such cases, we just have to operate without the typeinfo. + + However, if accessing the typeinfo is failing in a transient way, we might want to throw + an exception so that we will eagerly predictably indicate the problem. + + + + + This class contains methods that either cannot be expressed in C#, or which require writing unsafe code. + Callers of these methods need to use them extremely carefully as incorrect use could cause GC-holes + and other problems. + + + + + + Ensure that "value" is a local variable in some caller's frame. So converting + the byref to an IntPtr is a safe operation. Alternatively, we could also allow + allowed "value" to be a pinned object. + + + + + We will emit an indirect call to an unmanaged function pointer from the vtable of the given interface pointer. + This approach can take only ~300 instructions on x86 compared with ~900 for Marshal.Release. We are relying on + the JIT-compiler to do pinvoke-stub-inlining and calling the pinvoke target directly. + + + + + We will emit an indirect call to an unmanaged function pointer from the vtable of the given IDispatch interface pointer. + It is not possible to express this in C#. Using an indirect pinvoke call allows us to do our own marshalling. + We can allocate the Variant arguments cheaply on the stack. We are relying on the JIT-compiler to do + pinvoke-stub-inlining and calling the pinvoke target directly. + The alternative of calling via a managed interface declaration of IDispatch would have a performance + penalty of going through a CLR stub that would have to re-push the arguments on the stack, etc. + Marshal.GetDelegateForFunctionPointer could be used here, but its too expensive (~2000 instructions on x86). + + + + + Cached information from a TLB. Only information that is required is saved. CoClasses are used + for event hookup. Enums are stored for accessing symbolic names from scripts. + + + + + Reads the latest registered type library for the corresponding GUID, + reads definitions of CoClass'es and Enum's from this library + and creates a IDynamicMetaObjectProvider that allows to instantiate coclasses + and get actual values for the enums. + + Type Library Guid + ComTypeLibDesc object + + + + Gets an ITypeLib object from OLE Automation compatible RCW , + reads definitions of CoClass'es and Enum's from this library + and creates a IDynamicMetaObjectProvider that allows to instantiate coclasses + and get actual values for the enums. + + OLE automation compatible RCW + ComTypeLibDesc object + + + + This represents a bound dispmember on a IDispatch object. + + + + + Strongly-typed and parameterized string factory. + + + Strongly-typed and parameterized string factory. + + + + + A string like "Unexpected VarEnum {0}." + + + + + A string like "Error while invoking {0}." + + + + + A string like "Error while invoking {0}." + + + + + A string like "Error while invoking {0}. Named arguments are not supported." + + + + + A string like "Error while invoking {0}." + + + + + A string like "Could not convert argument {0} for call to {1}." + + + + + A string like "Error while invoking {0}. A required parameter was omitted." + + + + + A string like "IDispatch::GetIDsOfNames behaved unexpectedly for {0}." + + + + + A string like "Could not get dispatch ID for {0} (error: {1})." + + + + + A string like "There are valid conversions from {0} to {1}." + + + + + A string like "Variant.GetAccessor cannot handle {0}." + + + + + A string like "Cannot access member {1} declared on type {0} because the type contains generic parameters." + + + + + A string like "Type '{0}' is missing or cannot be loaded." + + + + + A string like "static property "{0}" of "{1}" can only be read through a type, not an instance" + + + + + A string like "static property "{0}" of "{1}" can only be assigned to through a type, not an instance" + + + + + A string like "Type parameter is {0}. Expected a delegate." + + + + + A string like "Cannot cast from type '{0}' to type '{1}" + + + + + A string like "unknown member type: '{0}'. " + + + + + A string like "The operation requires a non-generic type for {0}, but this represents generic types only" + + + + + A string like "Invalid operation: '{0}'" + + + + + A string like "Cannot create default value for type {0}." + + + + + A string like "Unhandled convert: {0}" + + + + + A string like "{0}.{1} has no publiclly visible method." + + + + + A string like "Extension type {0} must be public." + + + + + A string like "Invalid type of argument {0}; expecting {1}." + + + + + A string like "Field {0} is read-only" + + + + + A string like "Property {0} is read-only" + + + + + A string like "Expected event from {0}.{1}, got event from {2}.{3}." + + + + + A string like "expected bound event, got {0}." + + + + + A string like "Expected type {0}, got {1}." + + + + + A string like "can only write to member {0}." + + + + + A string like "Invalid stream type: {0}." + + + + + A string like "can't add another casing for identifier {0}" + + + + + A string like "can't add new identifier {0}" + + + + + A string like "Type '{0}' doesn't provide a suitable public constructor or its implementation is faulty: {1}" + + + + + A string like "Cannot emit constant {0} ({1})" + + + + + A string like "No implicit cast from {0} to {1}" + + + + + A string like "No explicit cast from {0} to {1}" + + + + + A string like "name '{0}' not defined" + + + + + A string like "Cannot create instance of {0} because it contains generic parameters" + + + + + A string like "Non-verifiable assembly generated: {0}:\nAssembly preserved as {1}\nError text:\n{2}\n" + + + + + A string like "COM object is expected." + + + + + A string like "Cannot perform call." + + + + + A string like "COM object does not support events." + + + + + A string like "COM object does not support specified source interface." + + + + + A string like "Marshal.SetComObjectData failed." + + + + + A string like "This method exists only to keep the compiler happy." + + + + + A string like "ResolveComReference.CannotRetrieveTypeInformation." + + + + + A string like "Attempting to wrap an unsupported enum type." + + + + + A string like "Attempting to pass an event handler of an unsupported type." + + + + + A string like "Method precondition violated" + + + + + A string like "Invalid argument value" + + + + + A string like "Non-empty string required" + + + + + A string like "Non-empty collection required" + + + + + A string like "must by an Exception instance" + + + + + A string like "Type of test must be bool" + + + + + A string like "Type of the expression must be bool" + + + + + A string like "Empty string is not a valid path." + + + + + A string like "Invalid delegate type (Invoke method not found)." + + + + + A string like "expected only static property" + + + + + A string like "Property doesn't exist on the provided type" + + + + + A string like "Field doesn't exist on provided type" + + + + + A string like "Type doesn't have constructor with a given signature" + + + + + A string like "Type doesn't have a method with a given name." + + + + + A string like "Type doesn't have a method with a given name and signature." + + + + + A string like "Count must be non-negative." + + + + + A string like "arrayType must be an array type" + + + + + A string like "Either code or target must be specified." + + + + + A string like "RuleBuilder can only be used with delegates whose first argument is CallSite." + + + + + A string like "no instance for call." + + + + + A string like "Missing Test." + + + + + A string like "Missing Target." + + + + + A string like "Finally already defined." + + + + + A string like "Can not have fault and finally." + + + + + A string like "Fault already defined." + + + + + A string like "Global/top-level local variable names must be unique." + + + + + A string like "Generating code from non-serializable CallSiteBinder." + + + + + A string like "pecified path is invalid." + + + + + A string like "Dictionaries are not hashable." + + + + + A string like "language already registered." + + + + + A string like "The method or operation is not implemented." + + + + + A string like "No exception." + + + + + A string like "Already initialized." + + + + + A string like "CreateScopeExtension must return a scope extension." + + + + + A string like "Invalid number of parameters for the service." + + + + + A string like "Cannot change non-caching value." + + + + + A string like "No code to compile." + + + + + A string like "Queue empty." + + + + + A string like "Enumeration has not started. Call MoveNext." + + + + + A string like "Enumeration already finished." + + + + + A string like "Invalid output directory." + + + + + A string like "Invalid assembly name or file extension." + + + + + A string like "No default value for a given type." + + + + + A string like "Specified language provider type is not registered." + + + + + A string like "can't read from property" + + + + + A string like "can't write to property" + + + + + Strongly-typed and parameterized exception factory. + + + Strongly-typed and parameterized exception factory. + + + + + ArgumentException with message like "COM object does not support events." + + + + + ArgumentException with message like "COM object does not support specified source interface." + + + + + InvalidOperationException with message like "Marshal.SetComObjectData failed." + + + + + InvalidOperationException with message like "This method exists only to keep the compiler happy." + + + + + InvalidOperationException with message like "Unexpected VarEnum {0}." + + + + + System.Reflection.TargetParameterCountException with message like "Error while invoking {0}." + + + + + MissingMemberException with message like "Error while invoking {0}." + + + + + ArgumentException with message like "Error while invoking {0}. Named arguments are not supported." + + + + + OverflowException with message like "Error while invoking {0}." + + + + + ArgumentException with message like "Could not convert argument {0} for call to {1}." + + + + + ArgumentException with message like "Error while invoking {0}. A required parameter was omitted." + + + + + InvalidOperationException with message like "ResolveComReference.CannotRetrieveTypeInformation." + + + + + ArgumentException with message like "IDispatch::GetIDsOfNames behaved unexpectedly for {0}." + + + + + InvalidOperationException with message like "Attempting to wrap an unsupported enum type." + + + + + InvalidOperationException with message like "Attempting to pass an event handler of an unsupported type." + + + + + MissingMemberException with message like "Could not get dispatch ID for {0} (error: {1})." + + + + + System.Reflection.AmbiguousMatchException with message like "There are valid conversions from {0} to {1}." + + + + + NotImplementedException with message like "Variant.GetAccessor cannot handle {0}." + + + + + ArgumentException with message like "Either code or target must be specified." + + + + + InvalidOperationException with message like "Type parameter is {0}. Expected a delegate." + + + + + InvalidOperationException with message like "Cannot cast from type '{0}' to type '{1}" + + + + + InvalidOperationException with message like "unknown member type: '{0}'. " + + + + + InvalidOperationException with message like "RuleBuilder can only be used with delegates whose first argument is CallSite." + + + + + InvalidOperationException with message like "no instance for call." + + + + + InvalidOperationException with message like "Missing Test." + + + + + InvalidOperationException with message like "Missing Target." + + + + + TypeLoadException with message like "The operation requires a non-generic type for {0}, but this represents generic types only" + + + + + ArgumentException with message like "Invalid operation: '{0}'" + + + + + InvalidOperationException with message like "Finally already defined." + + + + + InvalidOperationException with message like "Can not have fault and finally." + + + + + InvalidOperationException with message like "Fault already defined." + + + + + ArgumentException with message like "Cannot create default value for type {0}." + + + + + ArgumentException with message like "Unhandled convert: {0}" + + + + + InvalidOperationException with message like "{0}.{1} has no publiclly visible method." + + + + + ArgumentException with message like "Global/top-level local variable names must be unique." + + + + + ArgumentException with message like "Generating code from non-serializable CallSiteBinder." + + + + + ArgumentException with message like "pecified path is invalid." + + + + + ArgumentTypeException with message like "Dictionaries are not hashable." + + + + + InvalidOperationException with message like "language already registered." + + + + + NotImplementedException with message like "The method or operation is not implemented." + + + + + InvalidOperationException with message like "No exception." + + + + + ArgumentException with message like "Extension type {0} must be public." + + + + + InvalidOperationException with message like "Already initialized." + + + + + InvalidImplementationException with message like "CreateScopeExtension must return a scope extension." + + + + + ArgumentException with message like "Invalid number of parameters for the service." + + + + + ArgumentException with message like "Invalid type of argument {0}; expecting {1}." + + + + + ArgumentException with message like "Cannot change non-caching value." + + + + + MissingMemberException with message like "Field {0} is read-only" + + + + + MissingMemberException with message like "Property {0} is read-only" + + + + + ArgumentException with message like "Expected event from {0}.{1}, got event from {2}.{3}." + + + + + ArgumentTypeException with message like "expected bound event, got {0}." + + + + + ArgumentTypeException with message like "Expected type {0}, got {1}." + + + + + MemberAccessException with message like "can only write to member {0}." + + + + + InvalidOperationException with message like "No code to compile." + + + + + ArgumentException with message like "Invalid stream type: {0}." + + + + + InvalidOperationException with message like "Queue empty." + + + + + InvalidOperationException with message like "Enumeration has not started. Call MoveNext." + + + + + InvalidOperationException with message like "Enumeration already finished." + + + + + InvalidOperationException with message like "can't add another casing for identifier {0}" + + + + + InvalidOperationException with message like "can't add new identifier {0}" + + + + + ArgumentException with message like "Invalid output directory." + + + + + ArgumentException with message like "Invalid assembly name or file extension." + + + + + ArgumentException with message like "Cannot emit constant {0} ({1})" + + + + + ArgumentException with message like "No implicit cast from {0} to {1}" + + + + + ArgumentException with message like "No explicit cast from {0} to {1}" + + + + + MissingMemberException with message like "name '{0}' not defined" + + + + + ArgumentException with message like "No default value for a given type." + + + + + ArgumentException with message like "Specified language provider type is not registered." + + + + + InvalidOperationException with message like "can't read from property" + + + + + InvalidOperationException with message like "can't write to property" + + + + + ArgumentException with message like "Cannot create instance of {0} because it contains generic parameters" + + + + + System.Security.VerificationException with message like "Non-verifiable assembly generated: {0}:\nAssembly preserved as {1}\nError text:\n{2}\n" + + + + + This is similar to ComTypes.EXCEPINFO, but lets us do our own custom marshaling + + + + + An object that implements IDispatch + + This currently has the following issues: + 1. If we prefer ComObjectWithTypeInfo over IDispatchComObject, then we will often not + IDispatchComObject since implementations of IDispatch often rely on a registered type library. + If we prefer IDispatchComObject over ComObjectWithTypeInfo, users get a non-ideal experience. + 2. IDispatch cannot distinguish between properties and methods with 0 arguments (and non-0 + default arguments?). So obj.foo() is ambiguous as it could mean invoking method foo, + or it could mean invoking the function pointer returned by property foo. + We are attempting to find whether we need to call a method or a property by examining + the ITypeInfo associated with the IDispatch. ITypeInfo tell's use what parameters the method + expects, is it a method or a property, what is the default property of the object, how to + create an enumerator for collections etc. + 3. IronPython processes the signature and converts ref arguments into return values. + However, since the signature of a DispMethod is not available beforehand, this conversion + is not possible. There could be other signature conversions that may be affected. How does + VB6 deal with ref arguments and IDispatch? + + We also support events for IDispatch objects: + Background: + COM objects support events through a mechanism known as Connect Points. + Connection Points are separate objects created off the actual COM + object (this is to prevent circular references between event sink + and event source). When clients want to sink events generated by + COM object they would implement callback interfaces (aka source + interfaces) and hand it over (advise) to the Connection Point. + + Implementation details: + When IDispatchComObject.TryGetMember request is received we first check + whether the requested member is a property or a method. If this check + fails we will try to determine whether an event is requested. To do + so we will do the following set of steps: + 1. Verify the COM object implements IConnectionPointContainer + 2. Attempt to find COM object's coclass's description + a. Query the object for IProvideClassInfo interface. Go to 3, if found + b. From object's IDispatch retrieve primary interface description + c. Scan coclasses declared in object's type library. + d. Find coclass implementing this particular primary interface + 3. Scan coclass for all its source interfaces. + 4. Check whether to any of the methods on the source interfaces matches + the request name + + Once we determine that TryGetMember requests an event we will return + an instance of BoundDispEvent class. This class has InPlaceAdd and + InPlaceSubtract operators defined. Calling InPlaceAdd operator will: + 1. An instance of ComEventSinksContainer class is created (unless + RCW already had one). This instance is hanged off the RCW in attempt + to bind the lifetime of event sinks to the lifetime of the RCW itself, + meaning event sink will be collected once the RCW is collected (this + is the same way event sinks lifetime is controlled by PIAs). + Notice: ComEventSinksContainer contains a Finalizer which will go and + unadvise all event sinks. + Notice: ComEventSinksContainer is a list of ComEventSink objects. + 2. Unless we have already created a ComEventSink for the required + source interface, we will create and advise a new ComEventSink. Each + ComEventSink implements a single source interface that COM object + supports. + 3. ComEventSink contains a map between method DISPIDs to the + multicast delegate that will be invoked when the event is raised. + 4. ComEventSink implements IReflect interface which is exposed as + custom IDispatch to COM consumers. This allows us to intercept calls + to IDispatch.Invoke and apply custom logic - in particular we will + just find and invoke the multicast delegate corresponding to the invoked + dispid. + + + + + ArgBuilder which always produces null. + + + + + If a managed user type (as opposed to a primitive type or a COM object) is passed as an argument to a COM call, we need + to determine the VarEnum type we will marshal it as. We have the following options: + 1. Raise an exception. Languages with their own version of primitive types would not be able to call + COM methods using the language's types (for eg. strings in IronRuby are not System.String). An explicit + cast would be needed. + 2. We could marshal it as VT_DISPATCH. Then COM code will be able to access all the APIs in a late-bound manner, + but old COM components will probably malfunction if they expect a primitive type. + 3. We could guess which primitive type is the closest match. This will make COM components be as easily + accessible as .NET methods. + 4. We could use the type library to check what the expected type is. However, the type library may not be available. + + VarEnumSelector implements option # 3 + + + + + Gets the managed type that an object needs to be coverted to in order for it to be able + to be represented as a Variant. + + In general, there is a many-to-many mapping between Type and VarEnum. However, this method + returns a simple mapping that is needed for the current implementation. The reason for the + many-to-many relation is: + 1. Int32 maps to VT_I4 as well as VT_ERROR, and Decimal maps to VT_DECIMAL and VT_CY. However, + this changes if you throw the wrapper types into the mix. + 2. There is no Type to represent COM types. __ComObject is a private type, and Object is too + general. + + + + + Creates a family of COM types such that within each family, there is a completely non-lossy + conversion from a type to an earlier type in the family. + + + + + Get the (one representative type for each) primitive type families that the argument can be converted to + + + + + If there is more than one type family that the argument can be converted to, we will throw a + AmbiguousMatchException instead of randomly picking a winner. + + + + + Is there a unique primitive type that has the best conversion for the argument + + + + + Get the COM Variant type that argument should be marshaled as for a call to COM + + + + + Variant is the basic COM type for late-binding. It can contain any other COM data type. + This type definition precisely matches the unmanaged data layout so that the struct can be passed + to and from COM calls. + + + + + Primitive types are the basic COM types. It includes valuetypes like ints, but also reference types + like BStrs. It does not include composite types like arrays and user-defined COM types (IUnknown/IDispatch). + + + + + Get the managed object representing the Variant. + + + + + + Release any unmanaged memory associated with the Variant + + + + + + VariantBuilder handles packaging of arguments into a Variant for a call to IDispatch.Invoke + + + + + Provides a simple expression which enables embedding FieldBuilder's + in an AST before the type is complete. + + + + + Used to dispatch a single interactive command. It can be used to control things like which Thread + the command is executed on, how long the command is allowed to execute, etc + + + + + Supports detecting the remote runtime being killed, and starting up a new one. + + Threading model: + + ConsoleRestartManager creates a separate thread on which to create and execute the consoles. + There are usually atleast three threads involved: + + 1. Main app thread: Instantiates ConsoleRestartManager and accesses its APIs. This thread has to stay + responsive to user input and so the ConsoleRestartManager APIs cannot be long-running or blocking. + Since the remote runtime process can terminate asynchronously, the current RemoteConsoleHost can + change at any time (if auto-restart is enabled). The app should typically not care which instance of + RemoteConsoleHost is currently being used. The flowchart of this thread is: + Create ConsoleRestartManager + ConsoleRestartManager.Start + Loop: + Respond to user input | Send user input to console for execution | BreakExecution | RestartConsole | GetMemberNames + ConsoleRestartManager.Terminate + TODO: Currently, BreakExecution and GetMemberNames are called by the main thread synchronously. + Since they execute code in the remote runtime, they could take arbitrarily long. We should change + this so that the main app thread can never be blocked indefinitely. + + 2. Console thread: Dedicated thread for creating RemoteConsoleHosts and executing code (which could + take a long time or block indefinitely). + Wait for ConsoleRestartManager.Start to be called + Loop: + Create RemoteConsoleHost + Wait for signal for: + Execute code | RestartConsole | Process.Exited + + 3. CompletionPort async callbacks: + Process.Exited | Process.OutputDataReceived | Process.ErrorDataReceived + + 4. Finalizer thred + Some objects may have a Finalize method (which possibly calls Dispose). Not many (if any) types + should have a Finalize method. + + + + + + Accessing _remoteConsoleHost from a thread other than console thread can result in race. + If _remoteConsoleHost is accessed while holding _accessLock, it is guaranteed to be + null or non-disposed. + + + + + This is created on the "creating thread", and goes on standby. Start needs to be called for activation. + + A host might want one of two behaviors: + 1. Keep the REPL loop alive indefinitely, even when a specific instance of the RemoteConsoleHost terminates normally + 2. Close the REPL loop when an instance of the RemoteConsoleHost terminates normally, and restart the loop + only if the instance terminates abnormally. + + + + Needs to be called for activation. + + + + + Request (from another thread) the console REPL loop to terminate + + + + + This allows the RemoteConsoleHost to abort a long-running operation. The RemoteConsoleHost itself + does not know which ThreadPool thread might be processing the remote call, and so it needs + cooperation from the remote runtime server. + + + + + Since OnOutputDataReceived is sent async, it can arrive late. The remote console + cannot know if all output from the current command has been received. So + RemoteCommandDispatcher writes out a marker to indicate the end of the output + + + + + Aborts the current active call to Execute by doing Thread.Abort + + true if a Thread.Abort was actually called. false if there is no active call to Execute + + + + Customize the CommandLine for remote scenarios + + + + + Command line hosting service. + + + + + Executes the comand line - depending upon the options provided we will + either run a single file, a single command, or enter the interactive loop. + + + + + Runs the command line. Languages can override this to provide custom behavior other than: + 1. Running a single command + 2. Running a file + 3. Entering the interactive console loop. + + + + + + Runs the specified filename + + + + + Starts the interactive loop. Performs any initialization necessary before + starting the loop and then calls RunInteractiveLoop to start the loop. + + Returns the exit code when the interactive loop is completed. + + + + + Runs the interactive loop. Repeatedly parse and run interactive actions + until an exit code is received. If any exceptions are unhandled displays + them to the console + + + + + Attempts to run a single interaction and handle any language-specific + exceptions. Base classes can override this and call the base implementation + surrounded with their own exception handling. + + Returns null if successful and execution should continue, or an exit code. + + + + + Parses a single interactive command or a set of statements and executes it. + + Returns null if successful and execution should continue, or the appropiate exit code. + + We check if the code read is an interactive command or statements is by checking for NewLine + If the code contains NewLine, it's a set of statements (most probably from SendToConsole) + If the code does not contain a NewLine, it's an interactive command typed by the user at the prompt + + + + + Private helper function to see if we should treat the current input as a blank link. + + We do this if we only have auto-indent text. + + + + + Read a statement, which can potentially be a multiple-line statement suite (like a class declaration). + + Should the console session continue, or did the user indicate + that it should be terminated? + Expression to evaluate. null for empty input + + + + Gets the next level for auto-indentation + + + + + Scope is not remotable, and this only works in the same AppDomain. + + + + + CommandDispatcher to ensure synchronize output from the remote runtime + + + + + ConsoleHost where the ScriptRuntime is hosted in a separate process (referred to as the remote runtime server) + + The RemoteConsoleHost spawns the remote runtime server and specifies an IPC channel name to use to communicate + with each other. The remote runtime server creates and initializes a ScriptRuntime and a ScriptEngine, and publishes + it over the specified IPC channel at a well-known URI. Note that the RemoteConsoleHost cannot easily participate + in the initialization of the ScriptEngine as classes like LanguageContext are not remotable. + + The RemoteConsoleHost then starts the interactive loop and executes commands on the ScriptEngine over the remoting channel. + The RemoteConsoleHost listens to stdout of the remote runtime server and echos it locally to the user. + + + + + Core functionality to implement an interactive console. This should be derived for concrete implementations + + + + + Request (from another thread) the console REPL loop to terminate + + The caller can specify the exitCode corresponding to the event triggering + the termination. This will be returned from CommandLine.Run + + + + To be called from entry point. + + + + + Console Host entry-point .exe name. + + + + + Allows the console to customize the environment variables, working directory, etc. + + At the least, processInfo.FileName should be initialized + + + + Aborts the current active call to Execute by doing Thread.Abort + + true if a Thread.Abort was actually called. false if there is no active call to Execute + + + + Called if the remote runtime process exits by itself. ie. without the remote console killing it. + + + + + The remote runtime server uses this class to publish an initialized ScriptEngine and ScriptRuntime + over a remoting channel. + + + + + Publish objects so that the host can use it, and then block indefinitely (until the input stream is open). + + Note that we should publish only one object, and then have other objects be accessible from it. Publishing + multiple objects can cause problems if the client does a call like "remoteProxy1(remoteProxy2)" as remoting + will not be able to know if the server object for both the proxies is on the same server. + + The IPC channel that the remote console expects to use to communicate with the ScriptEngine + A intialized ScriptScope that is ready to start processing script commands + + + Instruction can't be created due to insufficient privileges. + + + Instruction can't be created due to insufficient privileges. + + + + Gets the next type or null if no more types are available. + + + + + Uses reflection to create new instance of the appropriate ReflectedCaller + + + + + Fast creation works if we have a known primitive types for the entire + method siganture. If we have any non-primitive types then FastCreate + falls back to SlowCreate which works for all types. + + Fast creation is fast because it avoids using reflection (MakeGenericType + and Activator.CreateInstance) to create the types. It does this through + calling a series of generic methods picking up each strong type of the + signature along the way. When it runs out of types it news up the + appropriate CallInstruction with the strong-types that have been built up. + + One relaxation is that for return types which are non-primitive types + we can fallback to object due to relaxed delegates. + + + + + The number of arguments including "this" for instance methods. + + + + + This instruction implements a goto expression that can jump out of any expression. + It pops values (arguments) from the evaluation stack that the expression tree nodes in between + the goto expression and the target label node pushed and not consumed yet. + A goto expression can jump into a node that evaluates arguments only if it carries + a value and jumps right after the first argument (the carried value will be used as the first argument). + Goto can jump into an arbitrary child of a BlockExpression since the block doesn’t accumulate values + on evaluation stack as its child expressions are being evaluated. + + Goto needs to execute any finally blocks on the way to the target label. + + { + f(1, 2, try { g(3, 4, try { goto L } finally { ... }, 6) } finally { ... }, 7, 8) + L: ... + } + + The goto expression here jumps to label L while having 4 items on evaluation stack (1, 2, 3 and 4). + The jump needs to execute both finally blocks, the first one on stack level 4 the + second one on stack level 2. So, it needs to jump the first finally block, pop 2 items from the stack, + run second finally block and pop another 2 items from the stack and set instruction pointer to label L. + + Goto also needs to rethrow ThreadAbortException iff it jumps out of a catch handler and + the current thread is in "abort requested" state. + + + + + The first instruction of finally block. + + + + + The last instruction of finally block. + + + + + The last instruction of a catch exception handler. + + + + + The last instruction of a fault exception handler. + + + + + Implements dynamic call site with many arguments. Wraps the arguments into . + + + + + Contains compiler state corresponding to a LabelTarget + See also LabelScopeInfo. + + + + + Returns true if we can jump into this node + + + + + Attaches a cookie to the last emitted instruction. + + + + Instruction can't be created due to insufficient privileges. + + + + Manages creation of interpreted delegates. These delegates will get + compiled if they are executed often enough. + + + + + Used by LightLambda to get the compiled delegate. + + + + + Create a compiled delegate for the LightLambda, and saves it so + future calls to Run will execute the compiled code instead of + interpreting. + + + + + true if the compiled delegate has the same type as the lambda; + false if the type was changed for interpretation. + + + + + Provides notification that the LightLambda has been compiled. + + + + + A simple forth-style stack machine for executing Expression trees + without the need to compile to IL and then invoke the JIT. This trades + off much faster compilation time for a slower execution performance. + For code that is only run a small number of times this can be a + sweet spot. + + The core loop in the interpreter is the RunInstructions method. + + + + + Runs instructions within the given frame. + + + Interpreted stack frames are linked via Parent reference so that each CLR frame of this method corresponds + to an interpreted stack frame in the chain. It is therefore possible to combine CLR stack traces with + interpreted stack traces by aligning interpreted frames to the frames of this method. + Each group of subsequent frames of Run method corresponds to a single interpreted frame. + + + + + Visits a LambdaExpression, replacing the constants with direct accesses + to their StrongBox fields. This is very similar to what + ExpressionQuoter does for LambdaCompiler. + + Also inserts debug information tracking similar to what the interpreter + would do. + + + + + Local variable mapping. + + + + + The variable that holds onto the StrongBox{object}[] closure from + the interpreter + + + + + A stack of variables that are defined in nested scopes. We search + this first when resolving a variable in case a nested scope shadows + one of our variable instances. + + + + + Walks the lambda and produces a higher order function, which can be + used to bind the lambda to a closure array from the interpreter. + + The lambda to bind. + Variables which are being accessed defined in the outer scope. + A delegate that can be called to produce a delegate bound to the passed in closure array. + + + + Provides a list of variables, supporing read/write of the values + + + + + Gets a copy of the local variables which are defined in the current scope. + + + + + + Checks to see if the given variable is defined within the current local scope. + + + + + Gets the variables which are defined in an outer scope and available within the current scope. + + + + + Tracks where a variable is defined and what range of instructions it's used in + + + + + A single interpreted frame might be represented by multiple subsequent Interpreter.Run CLR frames. + This method filters out the duplicate CLR frames. + + + + + arbitrary precision integers + + + + + Calculates the natural logarithm of the BigInteger. + + + + + Calculates log base 10 of a BigInteger. + + + + + Return the value of this BigInteger as a little-endian twos-complement + byte array, using the fewest number of bytes possible. If the value is zero, + return an array of one byte whose element is 0x00. + + + + + Return the sign of this BigInteger: -1, 0, or 1. + + + + + Wraps all arguments passed to a dynamic site with more arguments than can be accepted by a Func/Action delegate. + The binder generating a rule for such a site should unwrap the arguments first and then perform a binding to them. + + + + + Provides support for converting objects to delegates using the DLR binders + available by the provided language context. + + Primarily this supports converting objects implementing IDynamicMetaObjectProvider + to the appropriate delegate type. + + If the provided object is already a delegate of the appropriate type then the + delegate will simply be returned. + + + + Table of dynamically generated delegates which are shared based upon method signature. + + + + Creates a delegate with a given signature that could be used to invoke this object from non-dynamic code (w/o code context). + A stub is created that makes appropriate conversions/boxing and calls the object. + The stub should be executed within a context of this object's language. + + The converted delegate. + The object is either a subclass of Delegate but not the requested type or does not implement IDynamicMetaObjectProvider. + + + + Represents the type of a null value. + + + + + Private constructor is never called since 'null' is the only valid instance. + + + + + These are some generally useful helper methods. Currently the only methods are those to + cached boxed representations of commonly used primitive types so that they can be shared. + This is useful to most dynamic languages that use object as a universal type. + + The methods in RuntimeHelepers are caleld by the generated code. From here the methods may + dispatch to other parts of the runtime to get bulk of the work done, but the entry points + should be here. + + + + + Used by prologue code that is injected in lambdas to ensure that delegate signature matches what + lambda body expects. Such code typically unwraps subset of the params array manually, + but then passes the rest in bulk if lambda body also expects params array. + + This calls ArrayUtils.ShiftLeft, but performs additional checks that + ArrayUtils.ShiftLeft assumes. + + + + + A singleton boxed boolean true. + + + + + A singleton boxed boolean false. + + + + + Gets a singleton boxed value for the given integer if possible, otherwise boxes the integer. + + The value to box. + The boxed value. + + + + Helper method to create an instance. Work around for Silverlight where Activator.CreateInstance + is SecuritySafeCritical. + + TODO: Why can't we just emit the right thing for default(T)? + It's always null for reference types and it's well defined for value types + + + + + EventInfo.EventHandlerType getter is marked SecuritySafeCritical in CoreCLR + This method is to get to the property without using Reflection + + + + + + + Provides the test to see if an interpreted call site should switch over to being compiled. + + + + + A parameterless generator, that is of type IEnumerable, IEnumerable{T}, + IEnumerator, or IEnumerator{T}. Its body can contain a series of + YieldExpressions. Each call into MoveNext on the enumerator reenters + the generator, and executes until it reaches a YieldReturn or YieldBreak + expression + + + + + The label used by YieldBreak and YieldReturn expressions to yield + from this generator + + + + + The body of the generator, which can contain YieldBreak and + YieldReturn expressions + + + + + Indicates whether the lhs instances are preserved when assignments + are made to expressions containing yields. + + + + + When finding a yield return or yield break, this rewriter flattens out + containing blocks, scopes, and expressions with stack state. All + scopes encountered have their variables promoted to the generator's + closure, so they survive yields. + + + + + Makes an assignment to this variable. Pushes the assignment as far + into the right side as possible, to allow jumps into it. + + + + + Returns true if the expression remains constant no matter when it is evaluated. + + + + + Represents either a YieldBreak or YieldReturn in a GeneratorExpression + If Value is non-null, it's a YieldReturn; otherwise it's a YieldBreak + and executing it will stop enumeration of the generator, causing + MoveNext to return false. + + + + + The value yieled from this expression, if it is a yield return + + + + + The label used to yield from this generator + + + + + Tests to see if the expression is a constant with the given value. + + The expression to examine + The constant value to check for. + true/false + + + + Tests to see if the expression is a constant with the given value. + + The expression to examine + The constant value to check for. + true/false + + + + Begins a catch block. + + + + + Begins an exception block for a filtered exception. + + + + + Begins an exception block for a non-filtered exception. + + + + + + Begins an exception fault block + + + + + Begins a finally block + + + + + Ends an exception block. + + + + + Begins a lexical scope. + + + + + Ends a lexical scope. + + + + + Declares a local variable of the specified type. + + + + + Declares a local variable of the specified type, optionally + pinning the object referred to by the variable. + + + + + Declares a new label. + + + + + Marks the label at the current position. + + + + + Emits an instruction. + + + + + Emits an instruction with a byte argument. + + + + + Emits an instruction with the metadata token for the specified contructor. + + + + + Emits an instruction with a double argument. + + + + + Emits an instruction with the metadata token for the specified field. + + + + + Emits an instruction with a float argument. + + + + + Emits an instruction with an int argument. + + + + + Emits an instruction with a label argument. + + + + + Emits an instruction with multiple target labels (switch). + + + + + Emits an instruction with a reference to a local variable. + + + + + Emits an instruction with a long argument. + + + + + Emits an instruction with the metadata token for a specified method. + + + + + Emits an instruction with a signed byte argument. + + + + + Emits an instruction with a short argument. + + + + + Emits an instruction with a signature token. + + + + + Emits an instruction with a string argument. + + + + + Emits an instruction with the metadata token for a specified type argument. + + + + + Emits a call or a virtual call to the varargs method. + + + + + Emits an unmanaged indirect call instruction. + + + + + Emits a managed indirect call instruction. + + + + + Marks a sequence point. + + + + + Specifies the namespace to be used in evaluating locals and watches for the + current active lexical scope. + + + + + Emits a Ldind* instruction for the appropriate type + + + + + Emits a Stind* instruction for the appropriate type. + + + + + Emits a Stelem* instruction for the appropriate type. + + + + + Boxes the value of the stack. No-op for reference types. Void is + converted to a null reference. For almost all value types this + method will box them in the standard way. Int32 and Boolean are + handled with optimized conversions that reuse the same object for + small values. For Int32 this is purely a performance optimization. + For Boolean this is use to ensure that True and False are always + the same objects. + + + + + Emits an array of constant values provided in the given list. + The array is strongly typed. + + + + + Emits an array of values of count size. The items are emitted via the callback + which is provided with the current item index to emit. + + + + + Emits an array construction code. + The code assumes that bounds for all dimensions + are already emitted. + + + + + Emits default(T) + Semantics match C# compiler behavior + + + + + A simple dictionary of queues, keyed off a particular type + This is useful for storing free lists of variables + + + + + Directory where snippet assembly will be saved if SaveSnippets is set. + + + + + Save snippets to an assembly (see also SnippetsDirectory, SnippetsFileName). + + + + + Gets the Compiler associated with the Type Initializer (cctor) creating it if necessary. + + + + + A tree rewriter which will find dynamic sites which consume dynamic sites and + turn them into a single combo dynamic site. The combo dynamic site will then run the + individual meta binders and produce the resulting code in a single dynamic site. + + + + + A reducible node which we use to generate the combo dynamic sites. Each time we encounter + a dynamic site we replace it with a ComboDynamicSiteExpression. When a child of a dynamic site + turns out to be a ComboDynamicSiteExpression we will then merge the child with the parent updating + the binding mapping info. If any of the inputs cause side effects then we'll stop the combination. + + + + + A binder which can combine multiple binders into a single dynamic site. The creator + of this needs to perform the mapping of parameters, constants, and sub-site expressions + and provide a List of BinderMappingInfo representing this data. From there the ComboBinder + just processes the list to create the resulting code. + + + + + Provides a mapping for inputs of combo action expressions. The input can map + to either an input of the new dynamic site, an input of a previous DynamicExpression, + or a ConstantExpression which has been pulled out of the dynamic site arguments. + + + + + Contains the mapping information for a single Combo Binder. This includes the original + meta-binder and the mapping of parameters, sub-sites, and constants into the binding. + + + + + Builds up a series of conditionals when the False clause isn't yet known. We can + keep appending conditions and if true's. Each subsequent true branch becomes the + false branch of the previous condition and body. Finally a non-conditional terminating + branch must be added. + + + + + Adds a new conditional and body. The first call this becomes the top-level + conditional, subsequent calls will have it added as false statement of the + previous conditional. + + + + + Adds the non-conditional terminating node. + + + + + Adds the non-conditional terminating node. + + + + + Gets the resulting meta object for the full body. FinishCondition + must have been called. + + + + + Adds a variable which will be scoped at the level of the final expression. + + + + + Marks a method as not having side effects. used by the combo binder + to allow calls to methods. + + + + + OperatorInfo provides a mapping from DLR ExpressionType to their associated .NET methods. + + + + + Given an operator returns the OperatorInfo associated with the operator or null + + + + + The operator the OperatorInfo provides info for. + + + + + The primary method name associated with the method. This method name is + usally in the form of op_Operator (e.g. op_Addition). + + + + + The secondary method name associated with the method. This method name is + usually a standard .NET method name with pascal casing (e.g. Add). + + + + + The builder for creating the LambdaExpression node. + + Since the nodes require that parameters and variables are created + before hand and then passed to the factories creating LambdaExpression + this builder keeps track of the different pieces and at the end creates + the LambdaExpression. + + TODO: This has some functionality related to CodeContext that should be + removed, in favor of languages handling their own local scopes + + + + + Creates a parameter on the lambda with a given name and type. + + Parameters maintain the order in which they are created, + however custom ordering is possible via direct access to + Parameters collection. + + + + + Creates a parameter on the lambda with a given name and type. + + Parameters maintain the order in which they are created, + however custom ordering is possible via direct access to + Parameters collection. + + + + + adds existing parameter to the lambda. + + Parameters maintain the order in which they are created, + however custom ordering is possible via direct access to + Parameters collection. + + + + + Creates a hidden parameter on the lambda with a given name and type. + + Parameters maintain the order in which they are created, + however custom ordering is possible via direct access to + Parameters collection. + + + + + Creates a params array argument on the labmda. + + The params array argument is added to the signature immediately. Before the lambda is + created, the builder validates that it is still the last (since the caller can modify + the order of parameters explicitly by maniuplating the parameter list) + + + + + Creates a local variable with specified name and type. + TODO: simplify by pushing logic into callers + + + + + Creates a local variable with specified name and type. + TODO: simplify by pushing logic into callers + + + + + Creates a temporary variable with specified name and type. + + + + + Adds the temporary variable to the list of variables maintained + by the builder. This is useful in cases where the variable is + created outside of the builder. + + + + + Creates the LambdaExpression from the builder. + After this operation, the builder can no longer be used to create other instances. + + Desired type of the lambda. + New LambdaExpression instance. + + + + Creates the LambdaExpression from the builder. + After this operation, the builder can no longer be used to create other instances. + + New LambdaExpression instance. + + + + Creates the generator LambdaExpression from the builder. + After this operation, the builder can no longer be used to create other instances. + + New LambdaExpression instance. + + + + Fixes up lambda body and parameters to match the signature of the given delegate if needed. + + + + + + Validates that the builder has enough information to create the lambda. + + + + + The name of the lambda. + Currently anonymous/unnamed lambdas are not allowed. + + + + + Return type of the lambda being created. + + + + + List of lambda's local variables for direct manipulation. + + + + + List of lambda's parameters for direct manipulation + + + + + The params array argument, if any. + + + + + The body of the lambda. This must be non-null. + + + + + The generated lambda should have dictionary of locals + instead of allocating them directly on the CLR stack. + + + + + The scope is visible (default). Invisible if false. + + + + + marks a field, class, or struct as being safe to have statics which can be accessed + from multiple runtimes. + + Static fields which are not read-only or marked with this attribute will be flagged + by a test which looks for state being shared between runtimes. Before applying this + attribute you should ensure that it is safe to share the state. This is typically + state which is lazy initialized or state which is caching values which are identical + in all runtimes and are immutable. + + + + + This class is useful for quickly collecting performance counts for expensive + operations. Usually this means operations involving either reflection or + code gen. Long-term we need to see if this can be plugged better into the + standard performance counter architecture. + + + + + temporary categories for quick investigation, use a custom key if you + need to track multiple items, and if you want to keep it then create + a new Categories entry and rename all your temporary entries. + + + + + Represents the context that is flowed for doing Compiler. Languages can derive + from this class to provide additional contextual information. + + + + + Source unit currently being compiled in the CompilerContext + + + + + Current error sink. + + + + + Sink for parser callbacks (e.g. brace matching, etc.). + + + + + Compiler specific options. + + + + + Indicates that a DynamicMetaObject might be convertible to a CLR type. + + + + + Gets custom data to be serialized when saving script codes to disk. + + + + + Indicates that a MetaObject is already representing a restricted type. Useful + when we're already restricted to a known type but this isn't captured in + the type info (e.g. the type is not sealed). + + + + + Returns Microsoft.Scripting.Runtime.DynamicNull if the object contains a null value, + otherwise, returns self.LimitType + + + + + Returns Microsoft.Scripting.Runtime.DynamicNull if the object contains a null value, + otherwise, returns self.RuntimeType + + + + + ScriptCode is an instance of compiled code that is bound to a specific LanguageContext + but not a specific ScriptScope. The code can be re-executed multiple times in different + scopes. Hosting API counterpart for this class is CompiledCode. + + + + + This takes an assembly name including extension and saves the provided ScriptCode objects into the assembly. + + The provided script codes can constitute code from multiple languages. The assemblyName can be either a fully qualified + or a relative path. The DLR will simply save the assembly to the desired location. The assembly is created by the DLR and + if a file already exists than an exception is raised. + + The DLR determines the internal format of the ScriptCode and the DLR can feel free to rev this as appropriate. + + + + + This will take an assembly object which the user has loaded and return a new set of ScriptCode’s which have + been loaded into the provided ScriptDomainManager. + + If the language associated with the ScriptCode’s has not already been loaded the DLR will load the + LanguageContext into the ScriptDomainManager based upon the saved LanguageContext type. + + If the LanguageContext or the version of the DLR the language was compiled against is unavailable a + TypeLoadException will be raised unless policy has been applied by the administrator to redirect bindings. + + + + + Sets the current position inside current token or one character behind it. + + + + + Sets the current position inside current token or one character behind it. + A relative displacement with respect to the current position in the token is specified. + + + + + Marks token end. Enables to read the current token. + + + + + Marks token start. It means the buffer can drop the current token. + Can be called even if no token has been read yet. + + + + + Reads till the end of line and returns the character that stopped the reading. + The returned character is not skipped. + + + + + Resizes an array to a speficied new size and copies a portion of the original array into its beginning. + + + + + Helper class to remove methods w/ identical signatures. Used for GetDefaultMembers + which returns members from all types in the hierarchy. + + + + + Handles input and output for the console. It is comparable to System.IO.TextReader, + System.IO.TextWriter, System.Console, etc + + + + + Read a single line of interactive input, or a block of multi-line statements. + + An event-driven GUI console can implement this method by creating a thread that + blocks and waits for an event indicating that input is available + + The indentation level to be used for the current suite of a compound statement. + The console can ignore this argument if it does not want to support auto-indentation + null if the input stream has been closed. A string with a command to execute otherwise. + It can be a multi-line string which should be processed as block of statements + + + + + + + + name == null means that the argument doesn't specify an option; the value contains the entire argument + name == "" means that the option name is empty (argument separator); the value is null then + + + + + Literal script command given using -c option + + + + + Filename to execute passed on the command line options. + + + + + Only print the version of the script interpreter and exit + + + + On error. + + + + The console input buffer. + + + + + Current position - index into the input buffer + + + + + The number of white-spaces displayed for the auto-indenation of the current line + + + + + Length of the output currently rendered on screen. + + + + + Command history + + + + + Tab options available in current context + + + + + Cursort anchor - position of cursor when the routine was called + + + + + The command line that this console is attached to. + + + + + Displays the next option in the option list, + or beeps if no options available for current input prefix. + If no input prefix, simply print tab. + + + + + + + Handle the enter key. Adds the current input (if not empty) to the history. + + + The input string. + + + + Class managing the command history. + + + + + List of available options + + + + + Cursor position management + + + + + Beginning position of the cursor - top coordinate. + + + + + Beginning position of the cursor - left coordinate. + + + + + Implementation of the complex number data type. + + + + + Helper methods that calls are generated to from the default DLR binders. + + + + + Helper function to combine an object array with a sequence of additional parameters that has been splatted for a function call. + + + + + EventInfo.EventHandlerType getter is marked SecuritySafeCritical in CoreCLR + This method is to get to the property without using Reflection + + + + + + + Implements explicit casts supported by the runtime. + + + Implements explicit casts supported by the runtime. + + + + + Explicitly casts the object to a given type (and returns it as object) + + + + + Used as the value for the ScriptingRuntimeHelpers.GetDelegate method caching system + + + + + Generates stub to receive the CLR call and then call the dynamic language code. + + + + + Used as the key for the LanguageContext.GetDelegate method caching system + + + + + A useful interface for taking slices of numeric arrays, inspired by Python's Slice objects. + + + + + The starting index of the slice or null if no first index defined + + + + + The ending index of the slice or null if no ending index defined + + + + + The length of step to take + + + + + Given an ID returns the object associated with that ID. + + + + + Gets a unique ID for an object + + + + + Goes over the hashtable and removes empty entries + + + + + Weak-ref wrapper caches the weak reference, our hash code, and the object ID. + + + + + WrapperComparer treats Wrapper as transparent envelope + + + + + Internal class which binds a LanguageContext, StreamContentProvider, and Encoding together to produce + a TextContentProvider which reads binary data with the correct language semantics. + + + + + Creates a dictionary of locals in this scope + + + + + Abstract base class used for optimized thread-safe dictionaries which have a set + of pre-defined string keys. + + Implementers derive from this class and override the GetExtraKeys, TrySetExtraValue, + and TryGetExtraValue methods. When looking up a value first the extra keys will be + searched using the optimized Try*ExtraValue functions. If the value isn't found there + then the value is stored in the underlying .NET dictionary. + + This dictionary can store object values in addition to string values. It also supports + null keys. + + + + + Gets a list of the extra keys that are cached by the the optimized implementation + of the module. + + + + + Try to set the extra value and return true if the specified key was found in the + list of extra values. + + + + + Try to get the extra value and returns true if the specified key was found in the + list of extra values. Returns true even if the value is Uninitialized. + + + + + Efficiently tracks (line,column) information as text is added, and + collects line mappings between the original and generated source code + so we can generate correct debugging information later + + + + + Marks the current position of the writer as corresponding to the + original location passed in + + the line pragma corresponding to the + current position in the generated code + + + + Provides a dictionary-like object used for caches which holds onto a maximum + number of elements specified at construction time. + + This class is not thread safe. + + + + + Creates a dictionary-like object used for caches. + + The maximum number of elements to store. + + + + Tries to get the value associated with 'key', returning true if it's found and + false if it's not present. + + + + + Adds a new element to the cache, replacing and moving it to the front if the + element is already present. + + + + + Returns the value associated with the given key, or throws KeyNotFoundException + if the key is not present. + + + + + Wraps the provided enumerable into a ReadOnlyCollection{T} + + Copies all of the data into a new array, so the data can't be + changed after creation. The exception is if the enumerable is + already a ReadOnlyCollection{T}, in which case we just return it. + + + + + List optimized for few writes and multiple reads. It provides thread-safe read and write access. + Iteration is not thread-safe by default, but GetCopyForRead allows for iteration + without taking a lock. + + + + + Gets a copy of the contents of the list. The copy will not change even if the original + CopyOnWriteList object is modified. This method should be used to iterate the list in + a thread-safe way if no lock is taken. Iterating on the original list is not guaranteed + to be thread-safe. + + The returned copy should not be modified by the caller. + + + + Returns the list of expressions represented by the instances. + + An array of instances to extract expressions from. + The array of expressions. + + + + Creates an instance of for a runtime value and the expression that represents it during the binding process. + + The runtime value to be represented by the . + An expression to represent this during the binding process. + The new instance of . + + + + Produces an interpreted binding using the given binder which falls over to a compiled + binding after hitCount tries. + + This method should be called whenever an interpreted binding is required. Sometimes it will + return a compiled binding if a previous binding was produced and it's hit count was exhausted. + In this case the binder will not be called back for a new binding - the previous one will + be used. + + The delegate type being used for the call site + The binder used for the call site + The number of calls before the binder should switch to a compiled mode. + The arguments that are passed for the binding (as received in a BindDelegate call) + A delegate which represents the interpreted binding. + + + + Expression which reduces to the normal test but under the interpreter adds a count down + check which enables compiling when the count down is reached. + + + + + Base class for storing information about the binding that a specific rule is applicable for. + + We have a derived generic class but this class enables us to refer to it w/o having the + generic type information around. + + This class tracks both the count down to when we should compile. When we compile we + take the Expression[T] that was used before and compile it. While this is happening + we continue to allow the interpreted code to run. When the compilation is complete we + store a thread static which tells us what binding failed and the current rule is no + longer functional. Finally the language binder will call us again and we'll retrieve + and return the compiled overload. + + + + + A hybrid dictionary which compares based upon object identity. + + + + + Calculates the quotient of two 32-bit signed integers rounded towards negative infinity. + + Dividend. + Divisor. + The quotient of the specified numbers rounded towards negative infinity, or (int)Floor((double)x/(double)y). + is 0. + The caller must check for overflow (x = Int32.MinValue, y = -1) + + + + Calculates the quotient of two 32-bit signed integers rounded towards negative infinity. + + Dividend. + Divisor. + The quotient of the specified numbers rounded towards negative infinity, or (int)Floor((double)x/(double)y). + is 0. + The caller must check for overflow (x = Int64.MinValue, y = -1) + + + + Calculates the remainder of floor division of two 32-bit signed integers. + + Dividend. + Divisor. + The remainder of of floor division of the specified numbers, or x - (int)Floor((double)x/(double)y) * y. + is 0. + + + + Calculates the remainder of floor division of two 32-bit signed integers. + + Dividend. + Divisor. + The remainder of of floor division of the specified numbers, or x - (int)Floor((double)x/(double)y) * y. + is 0. + + + + Behaves like Math.Round(value, MidpointRounding.AwayFromZero) + Needed because CoreCLR doesn't support this particular overload of Math.Round + + + + + Behaves like Math.Round(value, precision, MidpointRounding.AwayFromZero) + However, it works correctly on negative precisions and cases where precision is + outside of the [-15, 15] range. + + (This function is also needed because CoreCLR lacks this overload.) + + + + + Evaluates a polynomial in v0 where the coefficients are ordered in increasing degree + + + + + Evaluates a polynomial in v0 where the coefficients are ordered in increasing degree + if reverse is false, and increasing degree if reverse is true. + + + + + A numerically precise version of sin(v0 * pi) + + + + + A numerically precise version of |sin(v0 * pi)| + + + + + Take the quotient of the 2 polynomials forming the Lanczos approximation + with N=13 and G=13.144565 + + + + + Computes the Gamma function on positive values, using the Lanczos approximation. + Lanczos parameters are N=13 and G=13.144565. + + + + + Computes the Log-Gamma function on positive values, using the Lanczos approximation. + Lanczos parameters are N=13 and G=13.144565. + + + + + Thread safe dictionary that allows lazy-creation where readers will block for + the creation of the lazily created value. Call GetOrCreateValue w/ a key + and a callback function. If the value exists it is returned, if not the create + callback is called (w/o any locks held). The create call back will only be called + once for each key. + + + + + Helper class which stores the published value + + + + + Dictionary[TKey, TValue] is not thread-safe in the face of concurrent reads and writes. SynchronizedDictionary + provides a thread-safe implementation. It holds onto a Dictionary[TKey, TValue] instead of inheriting from + it so that users who need to do manual synchronization can access the underlying Dictionary[TKey, TValue]. + + + + + This returns the raw unsynchronized Dictionary[TKey, TValue]. Users are responsible for locking + on it before accessing it. Also, it should not be arbitrarily handed out to other code since deadlocks + can be caused if other code incorrectly locks on it. + + + + + Provides fast strongly typed thread local storage. This is significantly faster than + Thread.GetData/SetData. + + + + + True if the caller will guarantee that all cleanup happens as the thread + unwinds. + + This is typically used in a case where the thread local is surrounded by + a try/finally block. The try block pushes some state, the finally block + restores the previous state. Therefore when the thread exits the thread + local is back to it's original state. This allows the ThreadLocal object + to not check the current owning thread on retrieval. + + + + + Gets the current value if its not == null or calls the provided function + to create a new value. + + + + + Calls the provided update function with the current value and + replaces the current value with the result of the function. + + + + + Replaces the current value with a new one and returns the old value. + + + + + Gets the StorageInfo for the current thread. + + + + + Called when the fast path storage lookup fails. if we encountered the Empty storage + during the initial fast check then spin until we hit non-empty storage and try the fast + path again. + + + + + Creates the StorageInfo for the thread when one isn't already present. + + + + + Gets or sets the value for the current thread. + + + + + Helper class for storing the value. We need to track if a ManagedThreadId + has been re-used so we also store the thread which owns the value. + + + + + Returns a numerical code of the size of a type. All types get both a horizontal + and vertical code. Types that are lower in both dimensions have implicit conversions + to types that are higher in both dimensions. + + + + + Represents an array that has value equality. + + + + + Simple class for tracking a list of items and enumerating over them. + The items are stored in weak references; if the objects are collected, + they will not be seen when enumerating. + + The type of the collection element. + + + + Similar to Dictionary[TKey,TValue], but it also ensures that the keys will not be kept alive + if the only reference is from this collection. The value will be kept alive as long as the key + is alive. + + This currently has a limitation that the caller is responsible for ensuring that an object used as + a key is not also used as a value in *any* instance of a WeakHash. Otherwise, it will result in the + object being kept alive forever. This effectively means that the owner of the WeakHash should be the + only one who has access to the object used as a value. + + Currently, there is also no guarantee of how long the values will be kept alive even after the keys + get collected. This could be fixed by triggerring CheckCleanup() to be called on every garbage-collection + by having a dummy watch-dog object with a finalizer which calls CheckCleanup(). + + + + + Check if any of the keys have gotten collected + + Currently, there is also no guarantee of how long the values will be kept alive even after the keys + get collected. This could be fixed by triggerring CheckCleanup() to be called on every garbage-collection + by having a dummy watch-dog object with a finalizer which calls CheckCleanup(). + + + + + This class holds onto internal debugging options used in this assembly. + These options can be set via environment variables DLR_{option-name}. + Boolean options map "true" to true and other values to false. + + These options are for internal debugging only, and should not be + exposed through any public APIs. + + + + + Sets the value at the given index for a tuple of the given size. This set supports + walking through nested tuples to get the correct final index. + + + + + Gets the value at the given index for a tuple of the given size. This get + supports walking through nested tuples to get the correct final index. + + + + + Gets the unbound generic Tuple type which has at lease size slots or null if a large enough tuple is not available. + + + + + Creates a generic tuple with the specified types. + + If the number of slots fits within the maximum tuple size then we simply + create a single tuple. If it's greater then we create nested tuples + (e.g. a Tuple`2 which contains a Tuple`128 and a Tuple`8 if we had a size of 136). + + + + + Gets the number of usable slots in the provided Tuple type including slots available in nested tuples. + + + + + Creates a new instance of tupleType with the specified args. If the tuple is a nested + tuple the values are added in their nested forms. + + + + + Gets the values from a tuple including unpacking nested values. + + + + + Gets the series of properties that needs to be accessed to access a logical item in a potentially nested tuple. + + + + + Gets the series of properties that needs to be accessed to access a logical item in a potentially nested tuple. + + + + + Provides an expression for creating a tuple with the specified values. + + + + + TODO: Alternatively, it should be sufficient to remember indices for this, list, dict and block. + + + + + Convention for an individual argument at a callsite. + + Multiple different callsites can match against a single declaration. + Some argument kinds can be "unrolled" into multiple arguments, such as list and dictionary. + + + + + Simple unnamed positional argument. + In Python: foo(1,2,3) are all simple arguments. + + + + + Argument with associated name at the callsite + In Python: foo(a=1) + + + + + Argument containing a list of arguments. + In Python: foo(*(1,2*2,3)) would match 'def foo(a,b,c)' with 3 declared arguments such that (a,b,c)=(1,4,3). + it could also match 'def foo(*l)' with 1 declared argument such that l=(1,4,3) + + + + + Argument containing a dictionary of named arguments. + In Python: foo(**{'a':1, 'b':2}) + + + + + Represents a logical member of a type. The member could either be real concrete member on a type or + an extension member. + + This seperates the "physical" members that .NET knows exist on types from the members that + logically exist on a type. It also provides other abstractions above the level of .NET reflection + such as MemberGroups and NamespaceTracker's. + + It also provides a wrapper around the reflection APIs which cannot be extended from partial trust. + + + + + Gets the expression that creates the value. + + Returns null if it's an error to get the value. The caller can then call GetErrorForGet to get + the correct error Expression (or null if they should provide a default). + + + + + Gets an expression that assigns a value to the left hand side. + + Returns null if it's an error to assign to. The caller can then call GetErrorForSet to + get the correct error Expression (or null if a default error should be provided). + + + + + Gets an expression that assigns a value to the left hand side. + + Returns null if it's an error to assign to. The caller can then call GetErrorForSet to + get the correct error Expression (or null if a default error should be provided). + + + + + Gets an expression that performs a call on the object using the specified arguments. + + Returns null if it's an error to perform the specific operation. The caller can then call + GetErrorsForDoCall to get the correct error Expression (or null if a default error should be provided). + + + + + Returns the error associated with getting the value. + + A null return value indicates that the default error message should be provided by the caller. + + + + + Returns the error associated with accessing this member via a bound instance. + + A null return value indicates that the default error message should be provided by the caller. + + + + + Helper for getting values that have been bound. Called from BoundMemberTracker. Custom member + trackers can override this to provide their own behaviors when bound to an instance. + + + + + Helper for setting values that have been bound. Called from BoundMemberTracker. Custom member + trackers can override this to provide their own behaviors when bound to an instance. + + + + + Helper for setting values that have been bound. Called from BoundMemberTracker. Custom member + trackers can override this to provide their own behaviors when bound to an instance. + + + + + Binds the member tracker to the specified instance rturning a new member tracker if binding + is possible. If binding is not possible the existing member tracker will be returned. For example + binding to a static field results in returning the original MemberTracker. Binding to an instance + field results in a new BoundMemberTracker which will get GetBoundValue/SetBoundValue to pass the + instance through. + + + + + The type of member tracker. + + + + + The logical declaring type of the member. + + + + + The name of the member. + + + + + We ensure we only produce one MemberTracker for each member which logically lives on the declaring type. So + for example if you get a member from a derived class which is declared on the base class it should be the same + as getting the member from the base class. That’s easy enough until you get into extension members – here there + might be one extension member which is being applied to multiple types. Therefore we need to take into account the + extension type when ensuring that we only have 1 MemberTracker ever created. + + + + + Richly represents the signature of a callsite. + + + + + Array of additional meta information about the arguments, such as named arguments. + Null for a simple signature that's just an expression list. eg: foo(a*b,c,d) + + + + + Number of arguments in the signature. + + + + + True if the OldCallAction includes an ArgumentInfo of ArgumentKind.Dictionary or ArgumentKind.Named. + + + + + Gets the number of positional arguments the user provided at the call site. + + + + + All arguments are unnamed and matched by position. + + + + + A custom member tracker which enables languages to plug in arbitrary + members into the lookup process. + + + + + Encapsulates information about the result that should be produced when + a OldDynamicAction cannot be performed. The ErrorInfo can hold one of: + an expression which creates an Exception to be thrown + an expression which produces a value which should be returned + directly to the user and represents an error has occured (for + example undefined in JavaScript) + an expression which produces a value which should be returned + directly to the user but does not actually represent an error. + + ErrorInfo's are produced by an ActionBinder in response to a failed + binding. + + + + + Private constructor - consumers must use static From* factories + to create ErrorInfo objects. + + + + + Creates a new ErrorInfo which represents an exception that should + be thrown. + + + + + Creates a new ErrorInfo which represents a value which should be + returned to the user. + + + + + Crates a new ErrorInfo which represents a value which should be returned + to the user but does not represent an error. + + + + + + + The ErrorInfo expression produces an exception + + + + + The ErrorInfo expression produces a value which represents the error (e.g. undefined) + + + + + The ErrorInfo expression produces a value which is not an error + + + + + Gets the stub list for a COM Object. For COM objects we store the stub list + directly on the object using the Marshal APIs. This allows us to not have + any circular references to deal with via weak references which are challenging + in the face of COM. + + + + + Doesn't need to check PrivateBinding setting: no method that is part of the event is public the entire event is private. + If the code has already a reference to the event tracker instance for a private event its "static-ness" is not influenced + by private-binding setting. + + + + + Holds on a list of delegates hooked to the event. + We need the list because we cannot enumerate the delegates hooked to CLR event and we need to do so in + handler removal (we need to do custom delegate comparison there). If BCL enables the enumeration we could remove this. + + + + + Storage for the handlers - a key value pair of the callable object and the delegate handler. + + + + + Storage for the handlers - a key value pair of the callable object and the delegate handler. + + The delegate handler is closed over the callable object. Therefore as long as the object is alive the + delegate will stay alive and so will the callable object. That means it's fine to have a weak reference + to both of these objects. + + + + + Represents extension method. + + + + + The declaring type of the extension (the type this extension method extends) + + + + + The declaring type of the extension method. Since this is an extension method, + the declaring type is in fact the type this extension method extends, + not Method.DeclaringType + + + + + Represents a logical Property as a member of a Type. This Property can either be a real + concrete Property on a type (implemented with a ReflectedPropertyTracker) or an extension + property (implemented with an ExtensionPropertyTracker). + + + + + MemberGroups are a collection of MemberTrackers which are commonly produced + on-demand to talk about the available members. They can consist of a mix of + different member types or multiple membes of the same type. + + The most common source of MemberGroups is from ActionBinder.GetMember. From here + the DLR will perform binding to the MemberTrackers frequently producing the value + resulted from the user. If the result of the action produces a member it's self + the ActionBinder can provide the value exposed to the user via ReturnMemberTracker. + + ActionBinder provides default functionality for both getting members from a type + as well as exposing the members to the user. Getting members from the type maps + closely to reflection and exposing them to the user exposes the MemberTrackers + directly. + + + + + MethodGroup's represent a unique collection of method's. Typically this + unique set is all the methods which are overloaded by the same name including + methods with different arity. These methods represent a single logically + overloaded element of a .NET type. + + The base DLR binders will produce MethodGroup's when provided with a MemberGroup + which contains only methods. The MethodGroup's will be unique instances per + each unique group of methods. + + + + + Returns a BuiltinFunction bound to the provided type arguments. Returns null if the binding + cannot be performed. + + + + + NamespaceTracker represent a CLS namespace. + + + + + Provides a list of all the members of an instance. + + + + + Loads all the types from all assemblies that contribute to the current namespace (but not child namespaces) + + + + + Populates the tree with nodes for each part of the namespace + + + Full namespace name. It can be null (for top-level types) + + + + + As a fallback, so if the type does exist in any assembly. This would happen if a new type was added + that was not in the hardcoded list of types. + This code is not accurate because: + 1. We dont deal with generic types (TypeCollision). + 2. Previous calls to GetCustomMemberNames (eg. "from foo import *" in Python) would not have included this type. + 3. This does not deal with new namespaces added to the assembly + + + + + This stores all the public non-nested type names in a single namespace and from a single assembly. + This allows inspection of the namespace without eagerly loading all the types. Eagerly loading + types slows down startup, increases working set, and is semantically incorrect as it can trigger + TypeLoadExceptions sooner than required. + + + + + Enables implicit Type to TypeTracker conversions accross dynamic languages. + + + + + Represents the top reflected package which contains extra information such as + all the assemblies loaded and the built-in modules. + + + + + returns the package associated with the specified namespace and + updates the associated module to mark the package as imported. + + + + + Ensures that the assembly is loaded + + + true if the assembly was loaded for the first time. + false if the assembly had already been loaded before + + + + When an (interop) assembly is loaded, we scan it to discover the GUIDs of COM interfaces so that we can + associate the type definition with COM objects with that GUID. + Since scanning all loaded assemblies can be expensive, in the future, we might consider a more explicit + user binder to trigger scanning of COM types. + + + + Specifies that the member is a constructor, representing a ConstructorTracker + + + Specifies that the member is an event, representing a EventTracker + + + Specifies that the member is a field, representing a FieldTracker + + + Specifies that the member is a method, representing a MethodTracker + + + Specifies that the member is a property, representing a PropertyTracker + + + Specifies that the member is a property, representing a TypeTracker + + + Specifies that the member is a namespace, representing a NamespaceTracker + + + Specifies that the member is a group of method overloads, representing a MethodGroup + + + Specifies that the member is a group of types that very by arity, representing a TypeGroup + + + Specifies that the member is a custom meber, represetning a CustomTracker + + + Specifies that the member is a bound to an instance, representing a BoundMemberTracker + + + + A TypeCollision is used when we have a collision between + two types with the same name. Currently this is only possible w/ generic + methods that should logically have arity as a portion of their name. For eg: + System.EventHandler and System.EventHandler[T] + System.Nullable and System.Nullable[T] + System.IComparable and System.IComparable[T] + + The TypeCollision provides an indexer but also is a real type. When used + as a real type it is the non-generic form of the type. + + The indexer allows the user to disambiguate between the generic and + non-generic versions. Therefore users must always provide additional + information to get the generic version. + + + + The merged list so far. Could be null + The new type(s) to add to the merged list + The merged list. Could be a TypeTracker or TypeGroup + + + Gets the arity of generic parameters + + + No non-generic type is represented by this group. + + + + This returns the DeclaringType of all the types in the TypeGroup + + + + + This returns the base name of the TypeGroup (the name shared by all types minus arity) + + + + + This will return the result only for the non-generic type if one exists, and will throw + an exception if all types in the TypeGroup are generic + + + + + This will return the result only for the non-generic type if one exists, and will throw + an exception if all types in the TypeGroup are generic + + + + + True if the MethodBase is method which is going to construct an object + + + + + Returns the System.Type for any object, including null. The type of null + is represented by None.Type and all other objects just return the + result of Object.GetType + + + + + Simply returns a Type[] from calling GetType on each element of args. + + + + + EMITTED + Used by default method binder to check types of splatted arguments. + + + + + Given a MethodInfo which may be declared on a non-public type this attempts to + return a MethodInfo which will dispatch to the original MethodInfo but is declared + on a public type. + + Returns the original method if the method if a public version cannot be found. + + + + + Non-public types can have public members that we find when calling type.GetMember(...). This + filters out the non-visible members by attempting to resolve them to the correct visible type. + + If no correct visible type can be found then the member is not visible and we won't call it. + + + + + Sees if two MemberInfos point to the same underlying construct in IL. This + ignores the ReflectedType property which exists on MemberInfos which + causes direct comparisons to be false even if they are the same member. + + + + + Returns a value which indicates failure when a OldConvertToAction of ImplicitTry or + ExplicitTry. + + + + + Creates an interpreted delegate for the lambda. + + The lambda to compile. + A delegate which can interpret the lambda. + + + + Creates an interpreted delegate for the lambda. + + The lambda to compile. + The number of iterations before the interpreter starts compiling + A delegate which can interpret the lambda. + + + + Creates an interpreted delegate for the lambda. + + The lambda's delegate type. + The lambda to compile. + A delegate which can interpret the lambda. + + + + Creates an interpreted delegate for the lambda. + + The lambda to compile. + The number of iterations before the interpreter starts compiling + A delegate which can interpret the lambda. + + + + Compiles the lambda into a method definition. + + the lambda to compile + A which will be used to hold the lambda's IL. + A parameter that indicates if debugging information should be emitted to a PDB symbol store. + + + + Compiles the LambdaExpression. + + If the lambda is compiled with emitDebugSymbols, it will be + generated into a TypeBuilder. Otherwise, this method is the same as + calling LambdaExpression.Compile() + + This is a workaround for a CLR limitiation: DynamicMethods cannot + have debugging information. + + the lambda to compile + true to generate a debuggable method, false otherwise + the compiled delegate + + + + Compiles the LambdaExpression, emitting it into a new type, and + optionally making it debuggable. + + This is a workaround for a CLR limitiation: DynamicMethods cannot + have debugging information. + + the lambda to compile + Debugging information generator used by the compiler to mark sequence points and annotate local variables. + True if debug symbols (PDBs) are emitted by the . + the compiled delegate + + + + Reduces the provided DynamicExpression into site.Target(site, *args). + + + + + Removes all live objects and places them in static fields of a type. + + + + + Enables an object to be serializable to an Expression tree. The expression tree can then + be emitted into an assembly enabling the de-serialization of the object. + + + + + Serializes constants and dynamic sites so the code can be saved to disk + + + + + The MethodBinder will perform normal method binding. + + + + + The MethodBinder will return the languages definition of NotImplemented if the arguments are + incompatible with the signature. + + + + + The MethodBinder will set properties/fields for unused keyword arguments on the instance + that gets returned from the method. + + + + + The delegate representing the DLR Main function + + + + + An attribute that is applied to saved ScriptCode's to be used to re-create the ScriptCode + from disk. + + + + + Gets names stored in optimized scope. + + + + + Provides a mechanism for providing documentation stored in an assembly as metadata. + + Applying this attribute will enable documentation to be provided to the user at run-time + even if XML Documentation files are unavailable. + + + + + Updates an exception before it's getting re-thrown so + we can present a reasonable stack trace to the user. + + + + + Returns all the stack traces associates with an exception + + + + + Marks a class in the assembly as being an extension type for another type. + + + + + Marks a type in the assembly as being an extension type for another type. + + The type which is being extended + The type which provides the extension members. + + + + The type which contains extension members which are added to the type being extended. + + + + + The type which is being extended by the extension type. + + + + + Not all .NET enumerators throw exceptions if accessed in an invalid state. This type + can be used to throw exceptions from enumerators implemented in IronPython. + + + + + Event args for when a ScriptScope has had its contents changed. + + + + + Creates a new ModuleChangeEventArgs object with the specified name and type. + + + + + Creates a nwe ModuleChangeEventArgs with the specified name, type, and changed value. + + + + + Gets the name of the symbol that has changed. + + + + + Gets the way in which the symbol has changed: Set or Delete. + + + + + The the symbol has been set provides the new value. + + + + + The way in which a module has changed : Set or Delete + + + + + A new value has been set in the module (or a previous value has changed). + + + + + A value has been removed from the module. + + + + + A NullTextContentProvider to be provided when we have a pre-compiled ScriptCode which doesn't + have source code associated with it. + + + + + Singleton instance returned from an operator method when the operator method cannot provide a value. + + + + + Represents an ops-extension method which is added as an operator. + + The name must be a well-formed name such as "Add" that matches the CLS + naming conventions for adding overloads associated with op_* methods. + + + + + Represents an ops-extension method which is used to implement a property. + + + + + Provides a cache of reflection members. Only one set of values is ever handed out per a + specific request. + + + + + TODO: Make me private again + + + + + Indicates an extension method should be added as a static method, not a instance method. + + + + + Converts a generic ICollection of T into an array of T. + + If the collection is already an array of T the original collection is returned. + + + + + Converts a generic ICollection of T into an array of R using a given conversion. + + If the collection is already an array of R the original collection is returned. + + + + + Allows wrapping of proxy types (like COM RCWs) to expose their IEnumerable functionality + which is supported after casting to IEnumerable, even though Reflection will not indicate + IEnumerable as a supported interface + + + + + Requires the specified index to point inside the array. + + Array is null. + Index is outside the array. + + + + Requires the specified index to point inside the array. + + Index is outside the array. + + + + Requires the specified index to point inside the array or at the end + + Array is null. + Index is outside the array. + + + + Requires the specified index to point inside the array or at the end + + Array is null. + Index is outside the array. + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + Offset or count are out of range. + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + Offset or count are out of range. + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + Array is null. + Offset or count are out of range. + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + String is null. + Offset or count are out of range. + + + + Requires the array and all its items to be non-null. + + + + + Requires the enumerable collection and all its items to be non-null. + + + + + Presents a flat enumerable view of multiple dictionaries + + + + + Seeks the first character of a specified line in the text stream. + + The reader. + Line number. The current position is assumed to be line #1. + + Returns true if the line is found, false otherwise. + + + + + Reads characters to a string until end position or a terminator is reached. + Doesn't include the terminator into the resulting string. + Returns null, if the reader is at the end position. + + + + + Reads characters until end position or a terminator is reached. + Returns true if the character has been found (the reader is positioned right behind the character), + false otherwise. + + + + + Creates an open delegate for the given (dynamic)method. + + + + + Creates a closed delegate for the given (dynamic)method. + + + + + Gets a Func of CallSite, object * paramCnt, object delegate type + that's suitable for use in a non-strongly typed call site. + + + + + Returns true if the specified parameter is mandatory, i.e. is not optional and doesn't have a default value. + + + + + Yields all ancestors of the given type including the type itself. + Does not include implemented interfaces. + + + + + Like Type.GetInterfaces, but only returns the interfaces implemented by this type + and not its parents. + + + + + Enumerates extension methods in given assembly. Groups the methods by declaring namespace. + Uses a global cache if is true. + + + + + Binds occurances of generic parameters in against corresponding types in . + Invokes (parameter, type) for each such binding. + Returns false if the is structurally different from or if the binder returns false. + + + + + Determines if a given type matches the type that the method extends. + The match might be non-trivial if the extended type is an open generic type with constraints. + + + + + Splits text and optionally indents first lines - breaks along words, not characters. + + + + + Provides a StreamContentProvider for a stream of content backed by a file on disk. + + + + diff --git a/packages/IronPython.2.7.4/lib/Net40/Microsoft.Scripting.AspNet.dll b/packages/IronPython.2.7.4/lib/Net40/Microsoft.Scripting.AspNet.dll new file mode 100644 index 0000000000..dedc713be7 Binary files /dev/null and b/packages/IronPython.2.7.4/lib/Net40/Microsoft.Scripting.AspNet.dll differ diff --git a/packages/IronPython.2.7.4/lib/Net40/Microsoft.Scripting.AspNet.xml b/packages/IronPython.2.7.4/lib/Net40/Microsoft.Scripting.AspNet.xml new file mode 100644 index 0000000000..b543f81049 --- /dev/null +++ b/packages/IronPython.2.7.4/lib/Net40/Microsoft.Scripting.AspNet.xml @@ -0,0 +1,8 @@ + + + + Microsoft.Scripting.AspNet + + + + diff --git a/packages/IronPython.2.7.4/lib/Net40/Microsoft.Scripting.Metadata.dll b/packages/IronPython.2.7.4/lib/Net40/Microsoft.Scripting.Metadata.dll new file mode 100644 index 0000000000..d0d9ad031b Binary files /dev/null and b/packages/IronPython.2.7.4/lib/Net40/Microsoft.Scripting.Metadata.dll differ diff --git a/packages/IronPython.2.7.4/lib/Net40/Microsoft.Scripting.Metadata.xml b/packages/IronPython.2.7.4/lib/Net40/Microsoft.Scripting.Metadata.xml new file mode 100644 index 0000000000..44526e991f --- /dev/null +++ b/packages/IronPython.2.7.4/lib/Net40/Microsoft.Scripting.Metadata.xml @@ -0,0 +1,373 @@ + + + + Microsoft.Scripting.Metadata + + + + + Represents a block in memory. + + + + + Reads data from a memory block. Maintains a position. + + + + + Reads zero terminated sequence of bytes of given maximal length and converts it into an ASCII string. + + + + + Zero terminated, UTF8 encoded sequence of bytes representing a name in metadata (a type name, a member name, etc). + The name is bound to the module it was retrieved from. The module is kept alive until all its metadata names are collected. + Doesn't cache hashcode, byte or character count. + + + + + Gets the module whose metadata tables this instance represents. + Null if the tables reflect unloaded module file. + + + + + Gets the path of the module whose metadata tables this instance represents. + Null for in-memory modules that are not backed by a file. + + The path is not accessible in partial trust. + + + + Returns AssemblyDef for manifest modules, null token otherwise. + + + + + Token is null or represents a row in a metadata table. + + + + + Gets the number of records in the view. + If the view is over an entire table this operation is O(1), + otherwise it might take up to O(log(#records in the table)). + + + + + Module table entry (0x00 tokens). + + + + + TypeRef table entry (0x01 tokens). + + + + + AssemblyRef: + If the target type is defined in a different Assembly from the current module. + TypeRef: + Target type is nested in TypeRef. + ModuleRef: + Target type is defined in another module within the same Assembly as this one. + ModuleDef: + If the target type is defined in the current module (this should not occur in a CLI "compressed metadata" module). + Null token: + There shall be a row in the ExportedType table for this Type - its Implementation field shall contain + a File token or an AssemblyRef token that says where the type is defined. + + + + + TypeDef table entry (0x02 tokens). + + + + + Finds a nesting type-def. The search time is logarithmic in the number of nested types defined in the owning module. + Returns a null token if this is not a nested type-def. + + + + + O(log(#generic parameters in module)) + + + + + Flags field in TypeDef table. + + + + + This typedef represents a container of global functions and fields (manufactured <Module> type). + + + + + Combines Field (0x04 tokens), FieldRVA (0x1d tokens) and Constant (0x0B) table entries. + + + + + O(log(#fields, parameters and properties with default value)). + Returns if the field doesn't have a default value. + + + + + Returns null reference iff the field has no RVA. + If size is 0 the memory block will span over the rest of the data section. + O(log(#fields with RVAs)). + + + + + Finds type-def that declares this field. The search time is logarithmic in the number of types defined in the owning module. + + + + + Flags field in the Field table. + + + + + MethodDef table entry (0x06 tokens). + + + + + Returns a null reference iff the method has no body. + If size is 0 the memory block will span over the rest of the data section. + + + + + Finds type-def that declares this method. The search time is logarithmic in the number of types defined in the owning module. + + + + + O(log(#generic parameters in module)) + + + + + ImplFlags field in the MethodDef table. + + + + + Flags field in the MethodDef table. + + + + + Param table entry (0x08 tokens). + + + + + O(log(#fields, parameters and properties with default value)). + Returns if the field doesn't have a default value. + + + + + Binary searches MethodDef table for a method that declares this parameter. + + + + + Value greater or equal to zero and less than or equal to the number of parameters in owner method. + A value of 0 refers to the owner method's return type; its parameters are then numbered from 1 onwards. + Not all parameters need to have a corresponding ParamDef entry. + + + + + InterfaceImpl table entry (0x09 tokens). + TODO: we might not need this - TypeDef.ImplementedInterfaces might be a special enumerator that directly returns InterfaceType tokens. + + + + + Could be a null token in EnC scenarios. + + + + + TypeDef, TypeRef, or TypeSpec. + + + + + MemberRef table entry (0x0A tokens). + Stores MethodRefs and FieldRefs. + + + + + TypeRef or TypeDef: + If the class that defines the member is defined in another module. + Note that it is unusual, but valid, to use a TypeRef token when the member is defined in this same module, + in which case, its TypeDef token can be used instead. + ModuleRef: + If the member is defined, in another module of the same assembly, as a global function or variable. + MethodDef: + When used to supply a call-site signature for a vararg method that is defined in this module. + The Name shall match the Name in the corresponding MethodDef row. + The Signature shall match the Signature in the target method definition + TypeSpec: + If the member is a member of a generic type + + + + + CustomAttribute table entry (0x0C tokens). + + + + + Any token except the CustomAttribute. + + + + + Returns the value of Type column in the CustomAttribute table. + MethodDef or MemberRef. + + + + + Value blob. + + + + + StandAloneSig table entry (0x11 token). + + + + + Combines information from PropertyMap (0x15), MethodSemantics (0x18) and Property (0x17) tables. + + + + + O(log(#fields, parameters and properties with default value)). + Returns if the field doesn't have a default value. + + + + + Finds type-def that declares this property. The search time is logarithmic in the number of types with properties defined in the owning module. + + + + + Combines information from EventMap (0x15), MethodSemantics (0x18) and Event (0x17) tables. + + + + + Finds type-def that declares this event. The search time is logarithmic in the number of types with events defined in the owning module. + + + + + ModuleRef table entry (0x1A tokens). + + + + + TypeSpec table entry (0x1B tokens). + + + + + Assembly table entry (0x20 tokens). + + + + + Assembly table entry (0x23 tokens). + + + + + File table entry (0x26 tokens). + + + + + ExportedType table entry (0x27 tokens). + + + + + Forwarded type: AssemblyRef + Nested types: ExportedType + Type in another module of this assembly: FileDef + + + + + ManifestResource table entry (0x28 tokens). + + + + + NestedClass table entry (0x29 tokens). + TODO: Don't need if we exposed nested types enumeration on type-def directly and build TypeNesting mapping lazily. + + + + + GenericParam table entry (0x2A tokens). + + + + + Value greater or equal to zero and less than or equal to the number of parameters in owner method/type. + All generic parameters are listed in the table. + + + + + TypeDef or MethodDef. + + + + + GenericParamConstraint table entry (0x2C tokens). + + + + + TypeDef, TypeRef, or TypeSpec. + + + + + MethodSpec table entry (0x2B tokens). + Used when decoding IL instructions. + + + + + MethodDef or MethodRef. + + + + + We need to be able to construct tokens out of byte-code. + + + + diff --git a/packages/IronPython.2.7.4/lib/Net40/Microsoft.Scripting.dll b/packages/IronPython.2.7.4/lib/Net40/Microsoft.Scripting.dll new file mode 100644 index 0000000000..89909ef0f1 Binary files /dev/null and b/packages/IronPython.2.7.4/lib/Net40/Microsoft.Scripting.dll differ diff --git a/packages/IronPython.2.7.4/lib/Net40/Microsoft.Scripting.xml b/packages/IronPython.2.7.4/lib/Net40/Microsoft.Scripting.xml new file mode 100644 index 0000000000..9fd9794e20 --- /dev/null +++ b/packages/IronPython.2.7.4/lib/Net40/Microsoft.Scripting.xml @@ -0,0 +1,3812 @@ + + + + Microsoft.Scripting + + + + + Provides documentation against live objects for use in a REPL window. + + + + + Gets the available members defined on the provided object. + + + + + Gets the overloads available for the provided object if it is invokable. + + + + + Gets the available members on the provided remote object. + + + + + Gets the overloads available for the provided remote object if it is invokable. + + + + + Provides documentation about a member in a live object. + + + + + The name of the member + + + + + The kind of the member if it's known. + + + + + Specifies the type of member. + + + + + Provides documentation for a single overload of an invokable object. + + + + + The name of the invokable object. + + + + + The documentation for the overload or null if no documentation is available. + + + + + The parameters for the invokable object. + + + + + Information about the return value. + + + + + Provides documentation for a single parameter. + + + + + The name of the parameter + + + + + The type name of the parameter or null if no type information is available. + + + + + Provides addition information about the parameter such as if it's a parameter array. + + + + + Gets the documentation string for this parameter or null if no documentation is available. + + + + + Indications extra information about a parameter such as if it's a parameter array. + + + + + This structure represents an immutable integer interval that describes a range of values, from Start to End. + + It is closed on the left and open on the right: [Start .. End). + + + + + Wraps a an IDictionary[object, object] and exposes it as an IDynamicMetaObjectProvider so that + users can access string attributes using member accesses. + + + + + Provides language specific documentation for live objects. + + + + + Helper for storing information about stack frames. + + + + + Exposes a IDictionary[string, object] as a dynamic object. Gets/sets/deletes turn + into accesses on the underlying dictionary. + + + + + Class that represents compiler options. + Note that this class is likely to change when hosting API becomes part of .Net + + + + + This overload will be called when a SourceUnit is not available. This can happen if the code is being executed remotely, + since SourceUnit cannot be marshaled across AppDomains. + + + + + Hosting API counterpart for . + + + + + Executes code in a default scope. + + + + + Execute code within a given scope and returns the result. + + + + + Executes code in in a default scope and converts to a given type. + + + + + Execute code within a given scope and converts result to a given type. + + + + + Executes the code in an empty scope. + Returns an ObjectHandle wrapping the resulting value of running the code. + + + + + Executes the code in the specified scope. + Returns an ObjectHandle wrapping the resulting value of running the code. + + + + + Executes the code in an empty scope. + Returns an ObjectHandle wrapping the resulting value of running the code. + + If an exception is thrown the exception is caught and an ObjectHandle to + the exception is provided. + + + Use this API to handle non-serializable exceptions (exceptions might not be serializable due to security restrictions) + or if an exception serialization loses information. + + + + + Executes the expression in the specified scope and return a result. + Returns an ObjectHandle wrapping the resulting value of running the code. + + If an exception is thrown the exception is caught and an ObjectHandle to + the exception is provided. + + + Use this API to handle non-serializable exceptions (exceptions might not be serializable due to security restrictions) + or if an exception serialization loses information. + + + + + Engine that compiled this code. + + + + + Default scope for this code. + + + + + The host can use this class to track for errors reported during script parsing and compilation. + Hosting API counterpart for . + + + + + Bridges ErrorSink and ErrorListener. + Errors reported by language compilers to ErrorSink are forwarded to the ErrorListener provided by the host. + + + This proxy is created in the scenario when the compiler is processing a single SourceUnit. + Therefore it could maintain one to one mapping from SourceUnit to ScriptSource. + In a case, which shouldn't happen, that the compiler reports an error in a different SourceUnit we just create + a new instance of the ScriptSource each time. + + TODO: Consider compilation of multiple source units and creating a hashtable mapping SourceUnits to ScriptSources + within the context of compilation unit. + + + + + Bridges ErrorListener and ErrorSink. It provides the reverse functionality as ErrorSinkProxyListener + + + + + Stores information needed to setup a language + + + + + Creates a new LanguageSetup + + assembly qualified type name of the language + provider + + + + Creates a new LanguageSetup with the provided options + TODO: remove this overload? + + + + + Creates a new LanguageSetup with the provided options + + + + + Gets an option as a strongly typed value. + + + + + The assembly qualified type name of the language provider + + + + + Display name of the language. If empty, it will be set to the first + name in the Names list. + + + + + Case-insensitive language names. + + + + + Case-insensitive file extension, optionally starts with a dot. + + + + + Option names are case-sensitive. + + + + + ObjectOperations provide a large catalogue of object operations such as member access, conversions, + indexing, and things like addition. There are several introspection and tool support services available + for more advanced hosts. + + You get ObjectOperation instances from ScriptEngine, and they are bound to their engines for the semantics + of the operations. There is a default instance of ObjectOperations you can share across all uses of the + engine. However, very advanced hosts can create new instances. + + + + + Returns true if the object can be called, false if it cannot. + + Even if an object is callable Call may still fail if an incorrect number of arguments or type of arguments are provided. + + + + + Invokes the provided object with the given parameters and returns the result. + + The prefered way of calling objects is to convert the object to a strongly typed delegate + using the ConvertTo methods and then invoking that delegate. + + + + + Invokes a member on the provided object with the given parameters and returns the result. + + + + + Creates a new instance from the provided object using the given parameters, and returns the result. + + + + + Gets the member name from the object obj. Throws an exception if the member does not exist or is write-only. + + + + + Gets the member name from the object obj and converts it to the type T. Throws an exception if the + member does not exist, is write-only, or cannot be converted. + + + + + Gets the member name from the object obj. Returns true if the member is successfully retrieved and + stores the value in the value out param. + + + + + Returns true if the object has a member named name, false if the member does not exist. + + + + + Removes the member name from the object obj. + + + + + Sets the member name on object obj to value. + + + + + Sets the member name on object obj to value. This overload can be used to avoid + boxing and casting of strongly typed members. + + + + + Gets the member name from the object obj. Throws an exception if the member does not exist or is write-only. + + + + + Gets the member name from the object obj and converts it to the type T. Throws an exception if the + member does not exist, is write-only, or cannot be converted. + + + + + Gets the member name from the object obj. Returns true if the member is successfully retrieved and + stores the value in the value out param. + + + + + Returns true if the object has a member named name, false if the member does not exist. + + + + + Removes the member name from the object obj. + + + + + Sets the member name on object obj to value. + + + + + Sets the member name on object obj to value. This overload can be used to avoid + boxing and casting of strongly typed members. + + + + + Converts the object obj to the type T. The conversion will be explicit or implicit depending on + what the langauge prefers. + + + + + Converts the object obj to the type type. The conversion will be explicit or implicit depending on + what the langauge prefers. + + + + + Converts the object obj to the type T. Returns true if the value can be converted, false if it cannot. + + The conversion will be explicit or implicit depending on what the langauge prefers. + + + + + Converts the object obj to the type type. Returns true if the value can be converted, false if it cannot. + + The conversion will be explicit or implicit depending on what the langauge prefers. + + + + + Converts the object obj to the type T including explicit conversions which may lose information. + + + + + Converts the object obj to the type type including explicit conversions which may lose information. + + + + + Converts the object obj to the type T including explicit conversions which may lose information. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type type including explicit conversions which may lose information. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type T including implicit conversions. + + + + + Converts the object obj to the type type including implicit conversions. + + + + + Converts the object obj to the type T including implicit conversions. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type type including implicit conversions. + + Returns true if the value can be converted, false if it cannot. + + + + + Performs a generic unary operation on the specified target and returns the result. + + + + + Performs a generic unary operation on the strongly typed target and returns the value as the specified type + + + + + Performs the generic binary operation on the specified targets and returns the result. + + + + + Peforms the generic binary operation on the specified strongly typed targets and returns + the strongly typed result. + + + + + Performs addition on the specified targets and returns the result. Throws an exception + if the operation cannot be performed. + + + + + Performs subtraction on the specified targets and returns the result. Throws an exception + if the operation cannot be performed. + + + + + Raises the first object to the power of the second object. Throws an exception + if the operation cannot be performed. + + + + + Multiplies the two objects. Throws an exception + if the operation cannot be performed. + + + + + Divides the first object by the second object. Throws an exception + if the operation cannot be performed. + + + + + Performs modulus of the 1st object by the second object. Throws an exception + if the operation cannot be performed. + + + + + Shifts the left object left by the right object. Throws an exception if the + operation cannot be performed. + + + + + Shifts the left object right by the right object. Throws an exception if the + operation cannot be performed. + + + + + Performs a bitwise-and of the two operands. Throws an exception if the operation + cannot be performed. + + + + + Performs a bitwise-or of the two operands. Throws an exception if the operation + cannot be performed. + + + + + Performs a exclusive-or of the two operands. Throws an exception if the operation + cannot be performed. + + + + + Compares the two objects and returns true if the left object is less than the right object. + Throws an exception if hte comparison cannot be performed. + + + + + Compares the two objects and returns true if the left object is greater than the right object. + Throws an exception if hte comparison cannot be performed. + + + + + Compares the two objects and returns true if the left object is less than or equal to the right object. + Throws an exception if hte comparison cannot be performed. + + + + + Compares the two objects and returns true if the left object is greater than or equal to the right object. + Throws an exception if hte comparison cannot be performed. + + + + + Compares the two objects and returns true if the left object is equal to the right object. + Throws an exception if the comparison cannot be performed. + + + + + Compares the two objects and returns true if the left object is not equal to the right object. + Throws an exception if hte comparison cannot be performed. + + + + + Returns a string which describes the object as it appears in source code + + + + + Returns a string representation of the object in a language specific object display format. + + + + + Returns a list of strings which contain the known members of the object. + + + + + Returns a string providing documentation for the specified object. + + + + + Returns a list of signatures applicable for calling the specified object in a form displayable to the user. + + + + + Returns true if the remote object is callable. + + + + + Invokes the specified remote object with the specified remote parameters. + + Though delegates are preferable for calls they may not always be usable for remote objects. + + + + + Invokes the specified remote object with the local parameters which will be serialized + to the remote app domain. + + + + + Creates a new remote instance from the provided remote object using the given parameters, and returns the result. + + + + + Creates a new remote instance from the provided remote object using the given parameters, and returns the result. + + + + + Sets the remote object as a member on the provided remote object. + + + + + Sets the member name on the remote object obj to value. This overload can be used to avoid + boxing and casting of strongly typed members. + + + + + Gets the member name on the remote object. Throws an exception if the member is not defined or + is write-only. + + + + + Gets the member name on the remote object. Throws an exception if the member is not defined or + is write-only. + + + + + Gets the member name on the remote object. Returns false if the member is not defined or + is write-only. + + + + + Tests to see if the member name is defined on the remote object. + + + + + Removes the member from the remote object + + + + + Converts the remote object into the specified type returning a handle to + the new remote object. The conversion will be explicit or implicit depending on + what the langauge prefers. + + + + + Converts the remote object into the specified type returning a handle to + the new remote object. The conversion will be explicit or implicit depending on + what the langauge prefers. + + + + + Converts the remote object into the specified type returning a handle to + the new remote object. Returns true if the value can be converted, + false if it cannot. The conversion will be explicit or implicit depending on + what the langauge prefers. + + + + + Converts the remote object into the specified type returning a handle to + the new remote object. Returns true if the value can be converted, + false if it cannot. The conversion will be explicit or implicit depending on + what the langauge prefers. + + + + + Converts the object obj to the type T including explicit conversions which may lose information. + + + + + Converts the object obj to the type type including explicit conversions which may lose information. + + + + + Converts the object obj to the type T including explicit conversions which may lose information. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type type including explicit conversions which may lose information. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type T including implicit conversions. + + + + + Converts the object obj to the type type including implicit conversions. + + + + + Converts the object obj to the type T including implicit conversions. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type type including implicit conversions. + + Returns true if the value can be converted, false if it cannot. + + + + + Unwraps the remote object and converts it into the specified type before + returning it. + + + + + Performs the specified unary operator on the remote object. + + + + + Performs the specified binary operator on the remote object. + + + + + Adds the two remote objects. Throws an exception if the operation cannot be performed. + + + + + Subtracts the 1st remote object from the second. Throws an exception if the operation cannot be performed. + + + + + Raises the 1st remote object to the power of the 2nd. Throws an exception if the operation cannot be performed. + + + + + Multiplies the two remote objects. Throws an exception if the operation cannot be performed. + + + + + Divides the 1st remote object by the 2nd. Throws an exception if the operation cannot be performed. + + + + + Performs modulus on the 1st remote object by the 2nd. Throws an exception if the operation cannot be performed. + + + + + Shifts the 1st remote object left by the 2nd remote object. Throws an exception if the operation cannot be performed. + + + + + Shifts the 1st remote object right by the 2nd remote object. Throws an exception if the operation cannot be performed. + + + + + Performs bitwise-and on the two remote objects. Throws an exception if the operation cannot be performed. + + + + + Performs bitwise-or on the two remote objects. Throws an exception if the operation cannot be performed. + + + + + Performs exclusive-or on the two remote objects. Throws an exception if the operation cannot be performed. + + + + + Compares the two remote objects and returns true if the 1st is less than the 2nd. Throws an exception if the operation cannot be performed. + + + + + Compares the two remote objects and returns true if the 1st is greater than the 2nd. Throws an exception if the operation cannot be performed. + + + + + Compares the two remote objects and returns true if the 1st is less than or equal to the 2nd. Throws an exception if the operation cannot be performed. + + + + + Compares the two remote objects and returns true if the 1st is greater than or equal to than the 2nd. Throws an exception if the operation cannot be performed. + + + + + Compares the two remote objects and returns true if the 1st is equal to the 2nd. Throws an exception if the operation cannot be performed. + + + + + Compares the two remote objects and returns true if the 1st is not equal to the 2nd. Throws an exception if the operation cannot be performed. + + + + + Returns a string representation of the object in a langauge specific object display format. + + + + + Returns a list of strings which contain the known members of the remote object. + + + + + Returns a string providing documentation for the specified remote object. + + + + + Returns a list of signatures applicable for calling the specified object in a form displayable to the user. + + + + + Helper to unwrap an object - in the future maybe we should validate the current app domain. + + + + + Helper to unwrap multiple objects + + + + + Reads an option whose value is expected to be a collection of non-null strings. + Reaturns a read-only copy of the option's value. + + + + + Dynamically choose between interpreting, simple compilation and compilation + that takes advantage of runtime history. + + + + + The number of iterations before the interpreter starts compiling.s + + + + + Display exception detail (callstack) when exception gets caught + + + + + Whether to gather performance statistics. + + + + + Initial file search paths provided by the host. + + + + + Abstracts system operations that are used by DLR and could potentially be platform specific. + The host can implement its PAL to adapt DLR to the platform it is running on. + For example, the Silverlight host adapts some file operations to work against files on the server. + + + + Invalid path. + + + Invalid path. + + + + Advanced APIs for HAPI providers. These methods should not be used by hosts. + They are provided for other hosting API implementers that would like to leverage existing HAPI and + extend it with language specific functionality, for example. + + + + is a null reference. + is remote. + + + e is a null reference. + is remote. + + + is a null reference. + is remote. + + + is a null reference. + is remote. + + + is a null reference. + is remote. + + + is a null reference. + is remote. + + + is a null reference. + is a null reference. + is a transparent proxy. + + + + Performs a callback in the ScriptEngine's app domain and returns the result. + + + + + Creates a new DocumentationOperations object from the given DocumentationProvider. + + + + + Represents a language in Hosting API. + Hosting API counterpart for . + + + + + Returns a new ObjectOperations object. See the Operations property for why you might want to call this. + + + + + Returns a new ObjectOperations object that inherits any semantics particular to the provided ScriptScope. + + See the Operations property for why you might want to call this. + + + + + Executes an expression. The execution is not bound to any particular scope. + + The engine doesn't support code execution. + is a null reference. + + + + Executes an expression within the specified scope. + + The engine doesn't support code execution. + is a null reference. + is a null reference. + + + + Executes an expression within a new scope and converts result to the given type. + + The engine doesn't support code execution. + is a null reference. + + + + Executes an expression within the specified scope and converts result to the given type. + + The engine doesn't support code execution. + is a null reference. + is a null reference. + + + + Executes content of the specified file in a new scope and returns that scope. + + The engine doesn't support code execution. + is a null reference. + + + + Executes content of the specified file against the given scope. + + The . + The engine doesn't support code execution. + is a null reference. + is a null reference. + + + + Executes the expression in the specified scope and return a result. + Returns an ObjectHandle wrapping the resulting value of running the code. + + + + + Executes the code in an empty scope. + Returns an ObjectHandle wrapping the resulting value of running the code. + + + + + Executes the expression in the specified scope and return a result. + Returns an ObjectHandle wrapping the resulting value of running the code. + + If an exception is thrown the exception is caught and an ObjectHandle to + the exception is provided. + + + Use this API in case the exception is not serializable (for example, due to security restrictions) or its serialization + loses information that you need to access. + + + + + Executes the code in an empty scope. + Returns an ObjectHandle wrapping the resulting value of running the code. + + If an exception is thrown the exception is caught and an ObjectHandle to + the exception is provided. + + + Use this API in case the exception is not serializable (for example, due to security restrictions) or its serialization + loses information that you need to access. + + + + + Creates a new ScriptScope whose storage is an arbitrary object. + + Accesses to the ScriptScope will turn into get, set, and delete members against the object. + + + + + This method returns the ScriptScope in which a ScriptSource of given path was executed. + + The ScriptSource.Path property is the key to finding the ScriptScope. Hosts need + to make sure they create a ScriptSource and set its Path property appropriately. + + GetScope is primarily useful for tools that need to map files to their execution scopes. For example, + an editor and interpreter tool might run a file Foo that imports or requires a file Bar. + + The editor's user might later open the file Bar and want to execute expressions in its context. + The tool would need to find Bar's ScriptScope for setting the appropriate context in its interpreter window. + This method helps with this scenario. + + + + + Return a ScriptSource object from string contents with the current engine as the language binding. + + The default SourceCodeKind is AutoDetect. + + The ScriptSource's Path property defaults to null. + + + + + Return a ScriptSource object from string contents with the current engine as the language binding. + + The ScriptSource's Path property defaults to null. + + + + + Return a ScriptSource object from string contents with the current engine as the language binding. + + The default SourceCodeKind is AutoDetect. + + + + + Return a ScriptSource object from string contents. These are helpers for creating ScriptSources' with the right language binding. + + + + + Return a ScriptSource object from file contents with the current engine as the language binding. + + The path's extension does NOT have to be in ScriptRuntime.GetRegisteredFileExtensions + or map to this language engine with ScriptRuntime.GetEngineByFileExtension. + + The default SourceCodeKind is File. + + The ScriptSource's Path property will be the path argument. + + The encoding defaults to System.Text.Encoding.Default. + + + + + Return a ScriptSource object from file contents with the current engine as the language binding. + + The path's extension does NOT have to be in ScriptRuntime.GetRegisteredFileExtensions + or map to this language engine with ScriptRuntime.GetEngineByFileExtension. + + The default SourceCodeKind is File. + + The ScriptSource's Path property will be the path argument. + + + + + Return a ScriptSource object from file contents with the current engine as the language binding. + + The path's extension does NOT have to be in ScriptRuntime.GetRegisteredFileExtensions + or map to this language engine with ScriptRuntime.GetEngineByFileExtension. + + The ScriptSource's Path property will be the path argument. + + + + + This method returns a ScriptSource object from a System.CodeDom.CodeObject. + This is a factory method for creating a ScriptSources with this language binding. + + The expected CodeDom support is extremely minimal for syntax-independent expression of semantics. + + Languages may do more, but hosts should only expect CodeMemberMethod support, + and only sub nodes consisting of the following: + CodeSnippetStatement + CodeSnippetExpression + CodePrimitiveExpression + CodeMethodInvokeExpression + CodeExpressionStatement (for holding MethodInvoke) + + + + + This method returns a ScriptSource object from a System.CodeDom.CodeObject. + This is a factory method for creating a ScriptSources with this language binding. + + The expected CodeDom support is extremely minimal for syntax-independent expression of semantics. + + Languages may do more, but hosts should only expect CodeMemberMethod support, + and only sub nodes consisting of the following: + CodeSnippetStatement + CodeSnippetExpression + CodePrimitiveExpression + CodeMethodInvokeExpression + CodeExpressionStatement (for holding MethodInvoke) + + + + + This method returns a ScriptSource object from a System.CodeDom.CodeObject. + This is a factory method for creating a ScriptSources with this language binding. + + The expected CodeDom support is extremely minimal for syntax-independent expression of semantics. + + Languages may do more, but hosts should only expect CodeMemberMethod support, + and only sub nodes consisting of the following: + CodeSnippetStatement + CodeSnippetExpression + CodePrimitiveExpression + CodeMethodInvokeExpression + CodeExpressionStatement (for holding MethodInvoke) + + + + + This method returns a ScriptSource object from a System.CodeDom.CodeObject. + This is a factory method for creating a ScriptSources with this language binding. + + The expected CodeDom support is extremely minimal for syntax-independent expression of semantics. + + Languages may do more, but hosts should only expect CodeMemberMethod support, + and only sub nodes consisting of the following: + CodeSnippetStatement + CodeSnippetExpression + CodePrimitiveExpression + CodeMethodInvokeExpression + CodeExpressionStatement (for holding MethodInvoke) + + + + + These methods return ScriptSource objects from stream contents with the current engine as the language binding. + + The default SourceCodeKind is File. + + The encoding defaults to Encoding.Default. + + + + + These methods return ScriptSource objects from stream contents with the current engine as the language binding. + + The default SourceCodeKind is File. + + + + + These methods return ScriptSource objects from stream contents with the current engine as the language binding. + + The encoding defaults to Encoding.Default. + + + + + This method returns a ScriptSource with the content provider supplied with the current engine as the language binding. + + This helper lets you own the content provider so that you can implement a stream over internal host data structures, such as an editor's text representation. + + + + + This method returns a language-specific service. + + It provides a point of extensibility for a language implementation + to offer more functionality than the standard engine members discussed here. + + Commonly available services include: + TokenCategorizer + Provides standardized tokenization of source code + ExceptionOperations + Provides formatting of exception objects. + DocumentationProvidera + Provides documentation for live object. + + + + + Sets the search paths used by the engine for loading files when a script wants + to import or require another file of code. + + The language doesn't allow to set search paths. + + + + Gets the search paths used by the engine for loading files when a script wants + to import or require another file of code. + + + + + Returns a default ObjectOperations for the engine. + + Because an ObjectOperations object caches rules for the types of + objects and operations it processes, using the default ObjectOperations for + many objects could degrade the caching benefits. Eventually the cache for + some operations could degrade to a point where ObjectOperations stops caching and + does a full search for an implementation of the requested operation for the given objects. + + Another reason to create a new ObjectOperations instance is to have it bound + to the specific view of a ScriptScope. Languages may attach per-language + behavior to a ScriptScope which would alter how the operations are performed. + + For simple hosting situations, this is sufficient behavior. + + + + + + + This property returns readon-only LanguageOptions this engine is using. + + + The values are determined during runtime initialization and read-only afterwards. + You can change the settings via a configuration file or explicitly using ScriptRuntimeSetup class. + + + + + This property returns the ScriptRuntime for the context in which this engine executes. + + + + + This property returns the engine's version as a string. The format is language-dependent. + + + + + ScriptHost is collocated with ScriptRuntime in the same app-domain. + The host can implement a derived class to consume some notifications and/or + customize operations like TryGetSourceUnit,ResolveSourceUnit, etc. + + The areguments to the the constructor of the derived class are specified in ScriptRuntimeSetup + instance that enters ScriptRuntime initialization. + + If the host is remote with respect to DLR (i.e. also with respect to ScriptHost) + and needs to access objects living in its app-domain it can pass MarshalByRefObject + as an argument to its ScriptHost subclass constructor. + + + + + The runtime the host is attached to. + + + + + Invoked after the initialization of the associated Runtime is finished. + The host can override this method to perform additional initialization of runtime (like loading assemblies etc.). + + + + + Invoked after a new language is loaded into the Runtime. + The host can override this method to perform additional initialization of language engines. + + + + + Provides hosting to DLR. Forwards DLR requests to the ScriptHost. + + + + + DLR requires any Hosting API provider to implement this class and provide its instance upon Runtime initialization. + DLR calls on it to perform basic host/system dependent operations. + + + + + Abstracts system operations that are used by DLR and could potentially be platform specific. + + + + + Provides host-redirectable IO streams used by DLR languages for default IO. + + + + + Used if the host stores the output as binary data. + + Binary stream to write data to. + Encoding used to convert textual data written to the output by the script. + + + + Used if the host handles both kinds of data (textual and binary) by itself. + + + + + Represents a Dynamic Language Runtime in Hosting API. + Hosting API counterpart for . + + + + + Creates ScriptRuntime in the current app-domain and initialized according to the the specified settings. + Creates an instance of host class specified in the setup and associates it with the created runtime. + Both Runtime and ScriptHost are collocated in the current app-domain. + + + + + Creates a new runtime with languages set up according to the current application configuration + (using System.Configuration). + + + + + Creates ScriptRuntime in the current app-domain and initialized according to the the specified settings. + Creates an instance of host class specified in the setup and associates it with the created runtime. + Both Runtime and ScriptHost are collocated in the specified app-domain. + + + + + + + + + Gets engine for the specified language. + + + + + Looks up the engine for the specified language. If the engine hasn't been created in this Runtime, it is instantiated here. + The method doesn't lock nor send notifications to the host. + + + + + path is empty, contains one or more of the invalid characters defined in GetInvalidPathChars or doesn't have an extension. + + + + path is null + file extension does not map to language engine + language does not have any search paths + file does exist in language's search path + + + + This method walks the assembly's namespaces and name bindings to ScriptRuntime.Globals + to represent the types available in the assembly. Each top-level namespace name gets + bound in Globals to a dynamic object representing the namespace. Within each top-level + namespace object, nested namespace names are bound to dynamic objects representing each + tier of nested namespaces. When this method encounters the same namespace-qualified name, + it merges names together objects representing the namespaces. + + + + + + This property returns the "global object" or name bindings of the ScriptRuntime as a ScriptScope. + + You can set the globals scope, which you might do if you created a ScriptScope with an + IAttributesCollection so that your host could late bind names. + + + + + Stores information needed to setup a ScriptRuntime + + + + + Reads setup from .NET configuration system (.config files). + If there is no configuration available returns an empty setup. + + + + + Reads setup from a specified XML stream. + + + + + Reads setup from a specified XML file. + + + + + The list of language setup information for languages to load into + the runtime + + + + + Indicates that the script runtime is in debug mode. + This means: + + 1) Symbols are emitted for debuggable methods (methods associated with SourceUnit). + 2) Debuggable methods are emitted to non-collectable types (this is due to CLR limitations on dynamic method debugging). + 3) JIT optimization is disabled for all methods + 4) Languages may disable optimizations based on this value. + + + + + Ignore CLR visibility checks + + + + + Can be any derived class of ScriptHost. When set, it allows the + host to override certain methods to control behavior of the runtime + + + + + Option names are case-sensitive. + + + + + Arguments passed to the host type when it is constructed + + + + + A ScriptScope is a unit of execution for code. It consists of a global Scope which + all code executes in. A ScriptScope can have an arbitrary initializer and arbitrary + reloader. + + ScriptScope is not thread safe. Host should either lock when multiple threads could + access the same module or should make a copy for each thread. + + Hosting API counterpart for . + + + + + Gets a value stored in the scope under the given name. + + The specified name is not defined in the scope. + is a null reference. + + + + Gets a value stored in the scope under the given name. + Converts the result to the specified type using the conversion that the language associated with the scope defines. + If no language is associated with the scope, the default CLR conversion is attempted. + + The specified name is not defined in the scope. + is a null reference. + + + + Tries to get a value stored in the scope under the given name. + + is a null reference. + + + + Tries to get a value stored in the scope under the given name. + Converts the result to the specified type using the conversion that the language associated with the scope defines. + If no language is associated with the scope, the default CLR conversion is attempted. + + is a null reference. + + + + Sets the name to the specified value. + + is a null reference. + + + + Gets a handle for a value stored in the scope under the given name. + + The specified name is not defined in the scope. + is a null reference. + + + + Tries to get a handle for a value stored in the scope under the given name. + Returns true if there is such name, false otherwise. + + is a null reference. + + + + Sets the name to the specified value. + + + The value held by the handle isn't from the scope's app-domain and isn't serializable or MarshalByRefObject. + + or is a null reference. + + + + Determines if this context or any outer scope contains the defined name. + + is a null reference. + + + + Removes the variable of the given name from this scope. + + true if the value existed in the scope before it has been removed. + is a null reference. + + + + Gets a list of variable names stored in the scope. + + + + + Gets an array of variable names and their values stored in the scope. + + + + + Gets an engine for the language associated with this scope. + Returns invariant engine if the scope is language agnostic. + + + + + Hosting counterpart for . + + + + + Compile the ScriptSource into CompileCode object that can be executed + repeatedly in its default scope or in other scopes without having to recompile the code. + + Code cannot be compiled. + + + + Errors are reported to the specified listener. + Returns null if the parser cannot compile the code due to errors. + + + + + Errors are reported to the specified listener. + Returns null if the parser cannot compile the code due to error(s). + + + + + Errors are reported to the specified listener. + Returns null if the parser cannot compile the code due to error(s). + + + + + Executes the code in the specified scope. + Returns an object that is the resulting value of running the code. + + When the ScriptSource is a file or statement, the engine decides what is + an appropriate value to return. Some languages return the value produced + by the last expression or statement, but languages that are not expression + based may return null. + + Code cannot be compiled. + + + + Executes the source code. The execution is not bound to any particular scope. + + + + + Executes the code in a specified scope and converts the result to the specified type. + The conversion is language specific. + + + + + Executes the code in an empty scope and converts the result to the specified type. + The conversion is language specific. + + + + + Executes the code in an empty scope. + Returns an ObjectHandle wrapping the resulting value of running the code. + + + + + Executes the code in the specified scope. + Returns an ObjectHandle wrapping the resulting value of running the code. + + + + + Executes the code in an empty scope. + Returns an ObjectHandle wrapping the resulting value of running the code. + + If an exception is thrown the exception is caught and an ObjectHandle to + the exception is provided. + + + Use this API to handle non-serializable exceptions (exceptions might not be serializable due to security restrictions) + or if an exception serialization loses information. + + + + + Executes the expression in the specified scope and return a result. + Returns an ObjectHandle wrapping the resulting value of running the code. + + If an exception is thrown the exception is caught and an ObjectHandle to + the exception is provided. + + + Use this API to handle non-serializable exceptions (exceptions might not be serializable due to security restrictions) + or if an exception serialization loses information. + + + + + Runs a specified code as if it was a program launched from OS command shell. + and returns a process exit code indicating the success or error condition + of executing the code. + + Exact behavior depends on the language. Some languages have a dedicated "exit" exception that + carries the exit code, in which case the exception is cought and the exit code is returned. + The default behavior returns the result of program's execution converted to an integer + using a language specific conversion. + + Code cannot be compiled. + + + + Detects the encoding of the content. + + + An encoding that is used by the reader of the script source to transcode its content to Unicode text. + Null if the content is already textual and no transcoding is performed. + + + Note that the default encoding specified when the script source is created could be overridden by + an encoding that is found in the content preamble (Unicode BOM or a language specific encoding preamble). + In that case the preamble encoding is returned. Otherwise, the default encoding is returned. + + An I/O error occurs. + + + + Reads specified range of lines (or less) from the source unit. + + 1-based number of the first line to fetch. + The number of lines to fetch. + + Which character sequences are considered line separators is language specific. + If language doesn't specify otherwise "\r", "\n", "\r\n" are recognized line separators. + + An I/O error occurs. + + + + Reads a specified line. + + 1-based line number. + Line content. Line separator is not included. + An I/O error occurs. + + Which character sequences are considered line separators is language specific. + If language doesn't specify otherwise "\r", "\n", "\r\n" are recognized line separators. + + + + + Gets script source content. + + Entire content. + An I/O error occurs. + + The result includes language specific preambles (e.g. "#coding:UTF-8" encoding preamble recognized by Ruby), + but not the preamble defined by the content encoding (e.g. BOM). + The entire content of the source unit is encoded by single encoding (if it is read from binary stream). + + + + + Identification of the source unit. Assigned by the host. + The format and semantics is host dependent (could be a path on file system or URL). + null for anonymous script source. + Cannot be an empty string. + + + + + Move the tokenizer past the next token and return its category. + + The token information associated with the token just scanned. + + + + Move the tokenizer past the next token. + + False if the end of stream has been reached, true otherwise. + + + + Get all tokens over a block of the stream. + + + + The scanner should return full tokens. If startLocation + length lands in the middle of a token, the full token + should be returned. + + s + Tokens are read until at least given amount of characters is read or the stream ends. + A enumeration of tokens. + + + + Scan from startLocation to at least startLocation + length. + + Tokens are read until at least given amount of characters is read or the stream ends. + + This method is used to determine state at arbitrary startLocation. + + False if the end of stream has been reached, true otherwise. + + + + The current internal state of the scanner. + + + + + The current startLocation of the scanner. + + + + + Represents a language context. Typically there is at most 1 context + associated with each language, but some languages may use more than one context + to identify code that should be treated differently. Contexts are used during + member and operator lookup. + + + + + Registers a language within the system with the specified name. + + + + + Looks up the context ID for the specified context identifier + + + + + Singleton for each language. + + + + + Must not be called under a lock as it can potentially call a user code. + + The language context's implementation failed to instantiate. + + + + Whether the application is in debug mode. + This means: + + 1) Symbols are emitted for debuggable methods (methods associated with SourceUnit). + 2) Debuggable methods are emitted to non-collectable types (this is due to CLR limitations on dynamic method debugging). + 3) JIT optimization is disabled for all methods + 4) Languages may disable optimizations based on this value. + + + + + Ignore CLR visibility checks. + + + + + ObjectOperations provide a large catalogue of object operations such as member access, conversions, + indexing, and things like addition. There are several introspection and tool support services available + for more advanced hosts. + + You get ObjectOperation instances from ScriptEngine, and they are bound to their engines for the semantics + of the operations. There is a default instance of ObjectOperations you can share across all uses of the + engine. However, very advanced hosts can create new instances. + + + + the number of sites required before we'll try cleaning up the cache... + + + the minimum difference between the average that is required to remove + + + the maximum number we'll remove on a single cache cleanup + + + the number of sites we should clear after if we can't make progress cleaning up otherwise + + + a dictionary of SiteKey's which are used to cache frequently used operations, logically a set + + + the # of sites we had created at the last cleanup + + + the total number of sites we've ever created + + + + Calls the provided object with the given parameters and returns the result. + + The prefered way of calling objects is to convert the object to a strongly typed delegate + using the ConvertTo methods and then invoking that delegate. + + + + + Invokes a member on the provided object with the given parameters and returns the result. + + + + + Invokes a member on the provided object with the given parameters and returns the result. + + + + + Creates a new instance from the provided object using the given parameters, and returns the result. + + + + + Gets the member name from the object obj. Throws an exception if the member does not exist or is write-only. + + + + + Gets the member name from the object obj and converts it to the type T. Throws an exception if the + member does not exist, is write-only, or cannot be converted. + + + + + Gets the member name from the object obj. Returns true if the member is successfully retrieved and + stores the value in the value out param. + + + + + Returns true if the object has a member named name, false if the member does not exist. + + + + + Removes the member name from the object obj. + + + + + Sets the member name on object obj to value. + + + + + Sets the member name on object obj to value. This overload can be used to avoid + boxing and casting of strongly typed members. + + + + + Gets the member name from the object obj. Throws an exception if the member does not exist or is write-only. + + + + + Gets the member name from the object obj and converts it to the type T. The conversion will be explicit or implicit + depending on what the langauge prefers. Throws an exception if the member does not exist, is write-only, or cannot be converted. + + + + + Gets the member name from the object obj. Returns true if the member is successfully retrieved and + stores the value in the value out param. + + + + + Returns true if the object has a member named name, false if the member does not exist. + + + + + Removes the member name from the object obj. Returns true if the member was successfully removed + or false if the member does not exist. + + + + + Sets the member name on object obj to value. + + + + + Sets the member name on object obj to value. This overload can be used to avoid + boxing and casting of strongly typed members. + + + + + Converts the object obj to the type T. The conversion will be explicit or implicit + depending on what the langauge prefers. + + + + + Converts the object obj to the type type. The conversion will be explicit or implicit + depending on what the langauge prefers. + + + + + Converts the object obj to the type T. Returns true if the value can be converted, false if it cannot. + + The conversion will be explicit or implicit depending on what the langauge prefers. + + + + + Converts the object obj to the type type. Returns true if the value can be converted, false if it cannot. + + The conversion will be explicit or implicit depending on what the langauge prefers. + + + + + Convers the object obj to the type T including explicit conversions which may lose information. + + + + + Converts the object obj to the type type including explicit conversions which may lose information. + + + + + Converts the object obj to the type type including explicit conversions which may lose information. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type T. Returns true if the value can be converted, false if it cannot. + + + + + Convers the object obj to the type T including implicit conversions. + + + + + Converts the object obj to the type type including implicit conversions. + + + + + Converts the object obj to the type type including implicit conversions. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type T. Returns true if the value can be converted, false if it cannot. + + + + + Performs a generic unary operation on the strongly typed target and returns the value as the specified type + + + + + Peforms the generic binary operation on the specified strongly typed targets and returns + the strongly typed result. + + + + + Returns a list of strings which contain the known members of the object. + + + + + Returns a string representation of the object in a language specific object display format. + + + + + Gets or creates a dynamic site w/ the specified type parameters for the provided binder. + + + This will either get the site from the cache or create a new site and return it. The cache + may be cleaned if it's gotten too big since the last usage. + + + + + Gets or creates a dynamic site w/ the specified type parameters for the provided binder. + + + This will either get the site from the cache or create a new site and return it. The cache + may be cleaned if it's gotten too big since the last usage. + + + + + Gets or creates a dynamic site w/ the specified type parameters for the provided binder. + + + This will either get the site from the cache or create a new site and return it. The cache + may be cleaned if it's gotten too big since the last usage. + + + + + Gets or creates a dynamic site w/ the specified type parameters for the provided binder. + + + This will either get the site from the cache or create a new site and return it. The cache + may be cleaned if it's gotten too big since the last usage. + + + + + Gets or creates a dynamic site w/ the specified type parameters for the provided binder. + + + This will either get the site from the cache or create a new site and return it. The cache + may be cleaned if it's gotten too big since the last usage. + + + + + Helper to create to get or create the dynamic site - called by the GetSite methods. + + + + + Removes items from the cache that have the lowest usage... + + + + + Helper class for tracking all of our unique dynamic sites and their + usage patterns. We hash on the combination of the binder and site type. + + We also track the hit count and the key holds the site associated w/ the + key. Logically this is a set based upon the binder and site-type but we + store it in a dictionary. + + + + + Singleton LanguageContext which represents a language-neutral LanguageContext + + + + + Provides language specific facilities which are typically called by the runtime. + + + + + Provides access to setting variables in scopes. + + By default this goes through ObjectOperations which can be rather slow. + Languages can override this to provide fast customized access which avoids + ObjectOperations. Languages can provide fast access to commonly used scope + types for that language. Typically this includes ScopeStorage and any other + classes which the language themselves uses for backing of a Scope. + + + + + Provides access to try getting variables in scopes. + + By default this goes through ObjectOperations which can be rather slow. + Languages can override this to provide fast customized access which avoids + ObjectOperations. Languages can provide fast access to commonly used scope + types for that language. Typically this includes ScopeStorage and any other + classes which the language themselves uses for backing of a Scope. + + + + + Provides access to getting variables in scopes and converting the result. + + By default this goes through ObjectOperations which can be rather slow. + Languages can override this to provide fast customized access which avoids + ObjectOperations. Languages can provide fast access to commonly used scope + types for that language. Typically this includes ScopeStorage and any other + classes which the language themselves uses for backing of a Scope. + + + + + Provides access to getting variables in scopes. + + By default this goes through ObjectOperations which can be rather slow. + Languages can override this to provide fast customized access which avoids + ObjectOperations. Languages can provide fast access to commonly used scope + types for that language. Typically this includes ScopeStorage and any other + classes which the language themselves uses for backing of a Scope. + + + + + Provides a text reader for source code that is to be read from a given stream. + + The stream open for reading. The stream must also allow seeking. + An encoding that should be used if the stream doesn't have Unicode or language specific preamble. + the path of the source unit if available + The reader. + An I/O error occurs. + + + + Creates the language specific CompilerOptions object for compilation of code not bound to any particular scope. + The language should flow any relevant options from LanguageContext to the newly created options instance. + + + + + Creates the language specific CompilerOptions object for compilation of code bound to a given scope. + + + + + Parses the source code within a specified compiler context. + The source unit to parse is held on by the context. + + null on failure. + Could also set the code properties and line/file mappings on the source unit. + + + + Creates a conversion binder. + + If explicitCast is true then the binder should do explicit conversions. + If explicitCast is false then the binder should do implicit conversions. + + If explicitCast is null it is up to the language to select the conversions + which closest match their normal behavior. + + + + + Gets the member names associated with the object + By default, only returns IDO names + + + + + Returns a string representation of the object in a language specific object display format. + + Dynamic sites container that could be used for any dynamic dispatches necessary for formatting. + Object to format. + A string representation of object. + + + + Provides the ContextId which includes members that should only be shown for this LanguageContext. + + ContextId's are used for filtering by Scope's. + + + + + Gets the ScriptDomainManager that this LanguageContext is running within. + + + + + Whether the language can parse code and create source units. + + + + + Internal class which binds a LanguageContext, StreamContentProvider, and Encoding together to produce + a TextContentProvider which reads binary data with the correct language semantics. + + + + + Provides a factory to create TextReader's over one source of textual content. + + TextContentProvider's are used when reading from a source which is already decoded + or has a known specific decoding. + + For example a text editor might provide a TextContentProvider whose backing is + an in-memory text buffer that the user can actively edit. + + + + + Creates a new TextReader which is backed by the content the TextContentProvider was created for. + + This method may be called multiple times. For example once to compile the code and again to get + the source code to display error messages. + + + + + This attribute marks a parameter that is not allowed to be null. + It is used by the method binding infrastructure to generate better error + messages and method selection. + + + + + This attribute marks a parameter whose type is an array that is not allowed to have null items. + It is used by the method binding infrastructure to generate better error + messages and method selection. + + + + + This attribute is used to mark a parameter that can accept any keyword parameters that + are not bound to normal arguments. The extra keyword parameters will be + passed in a dictionary which is created for the call. + + Most languages which support params dictionaries will support the following types: + IDictionary<string, anything> + IDictionary<object, anything> + Dictionary<string, anything> + Dictionary<object, anything> + IDictionary + IAttributesCollection (deprecated) + + For languages which don't have language level support the user will be required to + create and populate the dictionary by hand. + + This attribute is the dictionary equivalent of the System.ParamArrayAttribute. + + + public static void KeywordArgFunction([ParamsDictionary]IDictionary<string, object> dict) { + foreach (var v in dict) { + Console.WriteLine("Key: {0} Value: {1}", v.Key, v.Value); + } + } + + Called from Python: + + KeywordArgFunction(a = 2, b = "abc") + + will print: + Key: a Value = 2 + Key: b Value = abc + + + + + Represents a host-provided variables for executable code. The variables are + typically backed by a host-provided dictionary. Languages can also associate per-language + information with the context by using scope extensions. This can be used for tracking + state which is used across multiple executions, for providing custom forms of + storage (for example object keyed access), or other language specific semantics. + + Scope objects are thread-safe as long as their underlying storage is thread safe. + + Script hosts can choose to use thread safe or thread unsafe modules but must be sure + to constrain the code they right to be single-threaded if using thread unsafe + storage. + + + + + Creates a new scope with a new empty thread-safe dictionary. + + + + + Creates a new scope which is backed by an arbitrary object for it's storage. + + + + + + Gets the ScopeExtension associated with the provided ContextId. + + + + + Sets the ScopeExtension to the provided value for the given ContextId. + + The extension can only be set once. The returned value is either the new ScopeExtension + if no value was previously set or the previous value. + + + + + Provides optimized and cacheable support for scope storage. + + This is the default object used for storing values in a scope. + + + + The implementation uses a case-insensitive dictionary which holds + onto ScopeVariableIgnoreCase objects. The SVIC's hold onto ScopeVariable + objects for each possible casing. + + + + + Gets the named value from the scope optionally ignoring case. + + If the named value is not present an InvalidOperationException is raised. + + + + + Attempts to get the named value from the scope optionally ignoring the case. + + Returns true if the value is present, false if it is not. + + + + + Sets the named value in the scope optionally ignoring the case. + + + + + Deletes the named value from the scope optionally ignoring the case. + + + + + Checks if the named value is present in the scope optionally ignoring the case. + + + + + Gets the IScopeVariable for the scope optionally ignoring case. + + The IScopeVariable can be held onto and get/set/deleted without performing + a dictionary lookup on subsequent accesses. + + + + + Gets the ScopeVariable for the scope in a case-sensitive manner. + + The ScopeVariable can be held onto and get/set/deleted without performing + a dictionary lookup on subsequent accesses. + + + + + Gets the ScopeVariableIgnoreCase for the scope in a case-insensitive manner. + + The ScopeVariable can be held onto and get/set/deleted without performing + a dictionary lookup on subsequent accesses. + + + + + Returns all of the member names which currently have values in the scope. + + The list contains all available casings. + + + + + Returns all of the member names and their associated values from the scope. + + The list contains all available casings. + + + + + Provides convenient case-sensitive value access. + + + + + Provides a common interface for accessing both case sensitive and + case insensitive variable storage. + + + + + Atempts to get the value. If a value is assigned it returns true otherwise + it returns false. + + + + + Sets the current value in the scope. + + + + + Removes the current value from the scope. + + + + + True if the scope has a value, false if it does not. + + + + + Boxes the value for storage in a scope. Languages or consumers of the scope + can save this value and use it to get/set the current value in the scope for + commonly accessed values. + + ScopeVariables are case sensitive and will only refer to a single value. + + + + + Atempts to get the value. If a value is assigned it returns true otherwise + it returns false. + + + + + Sets the current value in the scope. + + + + + Removes the current value from the scope. + + + + + True if the scope has a value, false if it does not. + + + + + Boxes the value for storage in a scope. Languages or consumers of the scope + can save this value and use it to get/set the current value in the scope for + commonly accessed values. + + ScopeVariablesIgnoreCase are case insensitive and may access different casings + depending on how other gets/sets occur in the scope. + + + + + Atempts to get the value. If a value is assigned it returns true otherwise + it returns false. + + + + + Sets the current value in the scope. + + + + + Removes the current value from the scope. + + + + + True if the scope has a value, false if it does not. + + + + + ScriptCode is an instance of compiled code that is bound to a specific LanguageContext + but not a specific ScriptScope. The code can be re-executed multiple times in different + scopes. Hosting API counterpart for this class is CompiledCode. + + + + + A collection of environment variables. + + + + + Event for when a host calls LoadAssembly. After hooking this + event languages will need to call GetLoadedAssemblyList to + get any assemblies which were loaded before the language was + loaded. + + + + + Only host should redirect I/O. + + + + + Provides a factory to create streams over one source of binary content. + + StreamContentProvider's are used when opening a file of an unknown encoding. The + StreamContentProvider will be wrapped in a TextContentProvider provided by the language + which can support a language specific way of interpreting the binary data into text. + + For example some languages allow a marker at the beginning of the file which specifies + the encoding of the rest of the file. + + + + + Creates a new Stream which is backed by the content the StreamContentProvider was created for. + + For example if the StreamContentProvider was backing a file then GetStream re-opens the file and returns + the new stream. + + This method may be called multiple times. For example once to compile the code and again to get + the source code to display error messages. + + + + + Move the tokenizer past the next token and return its category. + + The token information associated with the token just scanned. + + + + Move the tokenizer past the next token. + + False if the end of stream has been reached, true otherwise. + + + + Get all tokens over a block of the stream. + + + + The scanner should return full tokens. If startLocation + length lands in the middle of a token, the full token + should be returned. + + + Tokens are read until at least given amount of characters is read or the stream ends. + A enumeration of tokens. + + + + Scan from startLocation to at least startLocation + length. + + The mininum number of characters to process while getting tokens. + + This method is used to determine state at arbitrary startLocation. + + False if the end of stream has been reached, true otherwise. + + + + The current internal state of the scanner. + + + + + The current startLocation of the scanner. + + + + + See also Microsoft.VisualStudio.Package.TokenTriggers. + + + + + Source code is a syntactically correct. + + + + + Source code represents an empty statement/expression. + + + + + Source code is already invalid and no suffix can make it syntactically correct. + + + + + Last token is incomplete. Source code can still be completed correctly. + + + + + Last statement is incomplete. Source code can still be completed correctly. + + + + + Defines a kind of the source code. The parser sets its initial state accordingly. + + + + + The code is an expression. + + + + + The code is a sequence of statements. + + + + + The code is a single statement. + + + + + The code is a content of a file. + + + + + The code is an interactive command. + + + + + The language parser auto-detects the kind. A syntax error is reported if it is not able to do so. + + + + + Source code reader. + + + + + Seeks the first character of a specified line in the text stream. + + Line number. The current position is assumed to be line #1. + + Returns true if the line is found, false otherwise. + + + + + Encoding that is used by the reader to convert binary data read from an underlying binary stream. + Null if the reader is reading from a textual source (not performing any byte to character transcoding). + + + + + Provides a StreamContentProvider for a stream of content backed by a file on disk. + + + + + Represents a location in source code. + + + + + Creates a new source location. + + The index in the source stream the location represents (0-based). + The line in the source stream the location represents (1-based). + The column in the source stream the location represents (1-based). + + + + Compares two specified location values to see if they are equal. + + One location to compare. + The other location to compare. + True if the locations are the same, False otherwise. + + + + Compares two specified location values to see if they are not equal. + + One location to compare. + The other location to compare. + True if the locations are not the same, False otherwise. + + + + Compares two specified location values to see if one is before the other. + + One location to compare. + The other location to compare. + True if the first location is before the other location, False otherwise. + + + + Compares two specified location values to see if one is after the other. + + One location to compare. + The other location to compare. + True if the first location is after the other location, False otherwise. + + + + Compares two specified location values to see if one is before or the same as the other. + + One location to compare. + The other location to compare. + True if the first location is before or the same as the other location, False otherwise. + + + + Compares two specified location values to see if one is after or the same as the other. + + One location to compare. + The other location to compare. + True if the first location is after or the same as the other location, False otherwise. + + + + Compares two specified location values. + + One location to compare. + The other location to compare. + 0 if the locations are equal, -1 if the left one is less than the right one, 1 otherwise. + + + + A location that is valid but represents no location at all. + + + + + An invalid location. + + + + + A minimal valid location. + + + + + The index in the source stream the location represents (0-based). + + + + + The line in the source stream the location represents (1-based). + + + + + The column in the source stream the location represents (1-based). + + + + + Whether the location is a valid location. + + True if the location is valid, False otherwise. + + + + Stores the location of a span of text in a source file. + + + + + Constructs a new span with a specific start and end location. + + The beginning of the span. + The end of the span. + + + + A valid span that represents no location. + + + + + An invalid span. + + + + + Compares two specified Span values to see if they are equal. + + One span to compare. + The other span to compare. + True if the spans are the same, False otherwise. + + + + Compares two specified Span values to see if they are not equal. + + One span to compare. + The other span to compare. + True if the spans are not the same, False otherwise. + + + + The start location of the span. + + + + + The end location of the span. Location of the first character behind the span. + + + + + Length of the span (number of characters inside the span). + + + + + Whether the locations in the span are valid. + + + + + Reads specified range of lines (or less) from the source unit. + Line numbers starts with 1. + + + + + Errors are reported to the specified sink. + Returns null if the parser cannot compile the code due to error(s). + + + + + Executes against a specified scope. + + + + + Executes against a specified scope and reports errors to the given error sink. + + + + + Executes in a new scope created by the language. + + + + + Executes in a new scope created by the language. + + + + + Executes in a new scope created by the language. + + + + + Identification of the source unit. Assigned by the host. + The format and semantics is host dependent (could be a path on file system or URL). + Empty string for anonymous source units. + + + + + LanguageContext of the language of the unit. + + + + + Unmapped span. + + + + + A token marking an end of stream. + + + + + A space, tab, or newline. + + + + + A block comment. + + + + + A single line comment. + + + + + A documentation comment. + + + + + A numeric literal. + + + + + A character literal. + + + + + A string literal. + + + + + A regular expression literal. + + + + + A keyword. + + + + + A directive (e.g. #line). + + + + + A punctuation character that has a specific meaning in a language. + + + + + A token that operates as a separator between two language elements. + + + + + An identifier (variable, $variable, @variable, @@variable, $variable$, function!, function?, [variable], i'variable', ...) + + + + + Braces, parenthesis, brackets. + + + + + Errors. + + + + + Converts a generic ICollection of T into an array of T. + + If the collection is already an array of T the original collection is returned. + + + + + Not all .NET enumerators throw exceptions if accessed in an invalid state. This type + can be used to throw exceptions from enumerators implemented in IronPython. + + + + + Wraps the provided enumerable into a ReadOnlyCollection{T} + + Copies all of the data into a new array, so the data can't be + changed after creation. The exception is if the enumerable is + already a ReadOnlyCollection{T}, in which case we just return it. + + + + + Console input stream (Console.OpenStandardInput) has a bug that manifests itself if reading small amounts of data. + This class wraps the standard input stream with a buffer that ensures that enough data are read from the underlying stream. + + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + Offset or count are out of range. + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + Offset or count are out of range. + + + + Requires the array and all its items to be non-null. + + + + + Requires the enumerable collection and all its items to be non-null. + + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + Array is null. + Offset or count are out of range. + + + + Presents a flat enumerable view of multiple dictionaries + + + + + Strongly-typed and parameterized string factory. + + + + + A string like "Cannot access member {1} declared on type {0} because the type contains generic parameters." + + + + + A string like "Type '{0}' is missing or cannot be loaded." + + + + + A string like "static property "{0}" of "{1}" can only be read through a type, not an instance" + + + + + A string like "static property "{0}" of "{1}" can only be assigned to through a type, not an instance" + + + + + A string like "Type parameter is {0}. Expected a delegate." + + + + + A string like "Cannot cast from type '{0}' to type '{1}" + + + + + A string like "unknown member type: '{0}'. " + + + + + A string like "The operation requires a non-generic type for {0}, but this represents generic types only" + + + + + A string like "Invalid operation: '{0}'" + + + + + A string like "Cannot create default value for type {0}." + + + + + A string like "Unhandled convert: {0}" + + + + + A string like "{0}.{1} has no publiclly visible method." + + + + + A string like "Extension type {0} must be public." + + + + + A string like "Invalid type of argument {0}; expecting {1}." + + + + + A string like "Field {0} is read-only" + + + + + A string like "Property {0} is read-only" + + + + + A string like "Expected event from {0}.{1}, got event from {2}.{3}." + + + + + A string like "expected bound event, got {0}." + + + + + A string like "Expected type {0}, got {1}." + + + + + A string like "can only write to member {0}." + + + + + A string like "Invalid stream type: {0}." + + + + + A string like "can't add another casing for identifier {0}" + + + + + A string like "can't add new identifier {0}" + + + + + A string like "Type '{0}' doesn't provide a suitable public constructor or its implementation is faulty: {1}" + + + + + A string like "Cannot emit constant {0} ({1})" + + + + + A string like "No implicit cast from {0} to {1}" + + + + + A string like "No explicit cast from {0} to {1}" + + + + + A string like "name '{0}' not defined" + + + + + A string like "Cannot create instance of {0} because it contains generic parameters" + + + + + A string like "Non-verifiable assembly generated: {0}:\nAssembly preserved as {1}\nError text:\n{2}\n" + + + + + A string like "Method precondition violated" + + + + + A string like "Invalid argument value" + + + + + A string like "Non-empty string required" + + + + + A string like "Non-empty collection required" + + + + + A string like "must by an Exception instance" + + + + + A string like "Type of test must be bool" + + + + + A string like "Type of the expression must be bool" + + + + + A string like "Empty string is not a valid path." + + + + + A string like "Invalid delegate type (Invoke method not found)." + + + + + A string like "expected only static property" + + + + + A string like "Property doesn't exist on the provided type" + + + + + A string like "Field doesn't exist on provided type" + + + + + A string like "Type doesn't have constructor with a given signature" + + + + + A string like "Type doesn't have a method with a given name." + + + + + A string like "Type doesn't have a method with a given name and signature." + + + + + A string like "Count must be non-negative." + + + + + A string like "arrayType must be an array type" + + + + + A string like "Either code or target must be specified." + + + + + A string like "RuleBuilder can only be used with delegates whose first argument is CallSite." + + + + + A string like "no instance for call." + + + + + A string like "Missing Test." + + + + + A string like "Missing Target." + + + + + A string like "Finally already defined." + + + + + A string like "Can not have fault and finally." + + + + + A string like "Fault already defined." + + + + + A string like "Global/top-level local variable names must be unique." + + + + + A string like "Generating code from non-serializable CallSiteBinder." + + + + + A string like "Specified path is invalid." + + + + + A string like "Dictionaries are not hashable." + + + + + A string like "language already registered." + + + + + A string like "The method or operation is not implemented." + + + + + A string like "No exception." + + + + + A string like "Already initialized." + + + + + A string like "CreateScopeExtension must return a scope extension." + + + + + A string like "Invalid number of parameters for the service." + + + + + A string like "Cannot change non-caching value." + + + + + A string like "No code to compile." + + + + + A string like "Queue empty." + + + + + A string like "Enumeration has not started. Call MoveNext." + + + + + A string like "Enumeration already finished." + + + + + A string like "Invalid output directory." + + + + + A string like "Invalid assembly name or file extension." + + + + + A string like "No default value for a given type." + + + + + A string like "Specified language provider type is not registered." + + + + + A string like "can't read from property" + + + + + A string like "can't write to property" + + + + + Strongly-typed and parameterized exception factory. + + + + + ArgumentException with message like "Either code or target must be specified." + + + + + InvalidOperationException with message like "Type parameter is {0}. Expected a delegate." + + + + + InvalidOperationException with message like "Cannot cast from type '{0}' to type '{1}" + + + + + InvalidOperationException with message like "unknown member type: '{0}'. " + + + + + InvalidOperationException with message like "RuleBuilder can only be used with delegates whose first argument is CallSite." + + + + + InvalidOperationException with message like "no instance for call." + + + + + InvalidOperationException with message like "Missing Test." + + + + + InvalidOperationException with message like "Missing Target." + + + + + TypeLoadException with message like "The operation requires a non-generic type for {0}, but this represents generic types only" + + + + + ArgumentException with message like "Invalid operation: '{0}'" + + + + + InvalidOperationException with message like "Finally already defined." + + + + + InvalidOperationException with message like "Can not have fault and finally." + + + + + InvalidOperationException with message like "Fault already defined." + + + + + ArgumentException with message like "Cannot create default value for type {0}." + + + + + ArgumentException with message like "Unhandled convert: {0}" + + + + + InvalidOperationException with message like "{0}.{1} has no publiclly visible method." + + + + + ArgumentException with message like "Global/top-level local variable names must be unique." + + + + + ArgumentException with message like "Generating code from non-serializable CallSiteBinder." + + + + + ArgumentException with message like "Specified path is invalid." + + + + + ArgumentTypeException with message like "Dictionaries are not hashable." + + + + + InvalidOperationException with message like "language already registered." + + + + + NotImplementedException with message like "The method or operation is not implemented." + + + + + InvalidOperationException with message like "No exception." + + + + + ArgumentException with message like "Extension type {0} must be public." + + + + + InvalidOperationException with message like "Already initialized." + + + + + InvalidImplementationException with message like "CreateScopeExtension must return a scope extension." + + + + + ArgumentException with message like "Invalid number of parameters for the service." + + + + + ArgumentException with message like "Invalid type of argument {0}; expecting {1}." + + + + + ArgumentException with message like "Cannot change non-caching value." + + + + + MissingMemberException with message like "Field {0} is read-only" + + + + + MissingMemberException with message like "Property {0} is read-only" + + + + + ArgumentException with message like "Expected event from {0}.{1}, got event from {2}.{3}." + + + + + ArgumentTypeException with message like "expected bound event, got {0}." + + + + + ArgumentTypeException with message like "Expected type {0}, got {1}." + + + + + MemberAccessException with message like "can only write to member {0}." + + + + + InvalidOperationException with message like "No code to compile." + + + + + ArgumentException with message like "Invalid stream type: {0}." + + + + + InvalidOperationException with message like "Queue empty." + + + + + InvalidOperationException with message like "Enumeration has not started. Call MoveNext." + + + + + InvalidOperationException with message like "Enumeration already finished." + + + + + InvalidOperationException with message like "can't add another casing for identifier {0}" + + + + + InvalidOperationException with message like "can't add new identifier {0}" + + + + + ArgumentException with message like "Invalid output directory." + + + + + ArgumentException with message like "Invalid assembly name or file extension." + + + + + ArgumentException with message like "Cannot emit constant {0} ({1})" + + + + + ArgumentException with message like "No implicit cast from {0} to {1}" + + + + + ArgumentException with message like "No explicit cast from {0} to {1}" + + + + + MissingMemberException with message like "name '{0}' not defined" + + + + + ArgumentException with message like "No default value for a given type." + + + + + ArgumentException with message like "Specified language provider type is not registered." + + + + + InvalidOperationException with message like "can't read from property" + + + + + InvalidOperationException with message like "can't write to property" + + + + + ArgumentException with message like "Cannot create instance of {0} because it contains generic parameters" + + + + + System.Security.VerificationException with message like "Non-verifiable assembly generated: {0}:\nAssembly preserved as {1}\nError text:\n{2}\n" + + + + + Gets a Func of CallSite, object * paramCnt, object delegate type + that's suitable for use in a non-strongly typed call site. + + + + diff --git a/packages/IronPython.2.7.4/lib/Net45/IronPython.Modules.dll b/packages/IronPython.2.7.4/lib/Net45/IronPython.Modules.dll new file mode 100644 index 0000000000..499a6307a9 Binary files /dev/null and b/packages/IronPython.2.7.4/lib/Net45/IronPython.Modules.dll differ diff --git a/packages/IronPython.2.7.4/lib/Net45/IronPython.Modules.xml b/packages/IronPython.2.7.4/lib/Net45/IronPython.Modules.xml new file mode 100644 index 0000000000..c930b5f680 --- /dev/null +++ b/packages/IronPython.2.7.4/lib/Net45/IronPython.Modules.xml @@ -0,0 +1,4510 @@ + + + + IronPython.Modules + + + + + Try to convert IList(Of byte) to byte[] without copying, if possible. + + + + + + + Copy the latest data from the memory buffer. + + This won't always contain data, because comrpessed data is only written after a block is filled. + + + + + + Add data to the input buffer. This manipulates the position of the stream + to make it appear to the BZip2 stream that nothing has actually changed. + + The data to append to the buffer. + + + + Reset the BitWriter. + + + + This is useful when the BitWriter writes into a MemoryStream, and + is used by a BZip2Compressor, which itself is re-used for multiple + distinct data blocks. + + + + + + Write some number of bits from the given value, into the output. + + + + The nbits value should be a max of 25, for safety. For performance + reasons, this method does not check! + + + + + + Write a full 8-bit byte into the output. + + + + + Write four 8-bit bytes into the output. + + + + + Write all available byte-aligned bytes. + + + + This method writes no new output, but flushes any accumulated + bits. At completion, the accumulator may contain up to 7 + bits. + + + This is necessary when re-assembling output from N independent + compressors, one for each of N blocks. The output of any + particular compressor will in general have some fragment of a byte + remaining. This fragment needs to be accumulated into the + parent BZip2OutputStream. + + + + + + Writes all available bytes, and emits padding for the final byte as + necessary. This must be the last method invoked on an instance of + BitWriter. + + + + + Delivers the remaining bits, left-aligned, in a byte. + + + + This is valid only if NumRemainingBits is less than 8; + in other words it is valid only after a call to Flush(). + + + + + Knuth's increments seem to work better than Incerpi-Sedgewick here. + Possibly because the number of elems to sort is usually small, typically + <= 20. + + + + BZip2Compressor writes its compressed data out via a BitWriter. This + is necessary because BZip2 does byte shredding. + + + + + Accept new bytes into the compressor data buffer + + + + This method does the first-level (cheap) run-length encoding, and + stores the encoded data into the rle block. + + + + + + Process one input byte into the block. + + + + + To "process" the byte means to do the run-length encoding. + There are 3 possible return values: + + 0 - the byte was not written, in other words, not + encoded into the block. This happens when the + byte b would require the start of a new run, and + the block has no more room for new runs. + + 1 - the byte was written, and the block is not full. + + 2 - the byte was written, and the block is full. + + + + 0 if the byte was not written, non-zero if written. + + + + Append one run to the output block. + + + + + This compressor does run-length-encoding before BWT and etc. This + method simply appends a run to the output block. The append always + succeeds. The return value indicates whether the block is full: + false (not full) implies that at least one additional run could be + processed. + + + true if the block is now full; otherwise false. + + + + Compress the data that has been placed (Run-length-encoded) into the + block. The compressed data goes into the CompressedBytes array. + + + + Side effects: 1. fills the CompressedBytes array. 2. sets the + AvailableBytesOut property. + + + + + This is the most hammered method of this class. + +

+ This is the version using unrolled loops. +

+
+ + Method "mainQSort3", file "blocksort.c", BZip2 1.0.2 + + + + The number of uncompressed bytes being held in the buffer. + + + + I am thinking this may be useful in a Stream that uses this + compressor class. In the Close() method on the stream it could + check this value to see if anything has been written at all. You + may think the stream could easily track the number of bytes it + wrote, which would eliminate the need for this. But, there is the + case where the stream writes a complete block, and it is full, and + then writes no more. In that case the stream may want to check. + + + + + Array instance identical to sfmap, both are used only + temporarily and independently, so we do not need to allocate + additional memory. + + + + A read-only decorator stream that performs BZip2 decompression on Read. + + + + + Create a BZip2InputStream, wrapping it around the given input Stream. + + + + The input stream will be closed when the BZip2InputStream is closed. + + + The stream from which to read compressed data + + + + Create a BZip2InputStream with the given stream, and + specifying whether to leave the wrapped stream open when + the BZip2InputStream is closed. + + The stream from which to read compressed data + + Whether to leave the input stream open, when the BZip2InputStream closes. + + + + + This example reads a bzip2-compressed file, decompresses it, + and writes the decompressed data into a newly created file. + + + var fname = "logfile.log.bz2"; + using (var fs = File.OpenRead(fname)) + { + using (var decompressor = new Ionic.BZip2.BZip2InputStream(fs)) + { + var outFname = fname + ".decompressed"; + using (var output = File.Create(outFname)) + { + byte[] buffer = new byte[2048]; + int n; + while ((n = decompressor.Read(buffer, 0, buffer.Length)) > 0) + { + output.Write(buffer, 0, n); + } + } + } + } + + + + + + Read data from the stream. + + + + + To decompress a BZip2 data stream, create a BZip2InputStream, + providing a stream that reads compressed data. Then call Read() on + that BZip2InputStream, and the data read will be decompressed + as you read. + + + + A BZip2InputStream can be used only for Read(), not for Write(). + + + + The buffer into which the read data should be placed. + the offset within that data array to put the first byte read. + the number of bytes to read. + the number of bytes actually read + + + + Read a single byte from the stream. + + the byte read from the stream, or -1 if EOF + + + + Flush the stream. + + + + + Calling this method always throws a . + + this is irrelevant, since it will always throw! + this is irrelevant, since it will always throw! + irrelevant! + + + + Calling this method always throws a . + + this is irrelevant, since it will always throw! + + + + Calling this method always throws a . + + this parameter is never used + this parameter is never used + this parameter is never used + + + + Dispose the stream. + + + indicates whether the Dispose method was invoked by user code. + + + + + Close the stream. + + + + + Read n bits from input, right justifying the result. + + + + For example, if you read 1 bit, the result is either 0 + or 1. + + + + The number of bits to read, always between 1 and 32. + + + + Called by createHuffmanDecodingTables() exclusively. + + + Called by recvDecodingTables() exclusively. + + + + Dump the current state of the decompressor, to restore it in case of an error. + This allows the decompressor to be essentially "rewound" and retried when more + data arrives. + + This is only used by IronPython. + + The current state. + + + + Restore the internal compressor state if an error occurred. + + The old state. + + + + Indicates whether the stream can be read. + + + The return value depends on whether the captive stream supports reading. + + + + + Indicates whether the stream supports Seek operations. + + + Always returns false. + + + + + Indicates whether the stream can be written. + + + The return value depends on whether the captive stream supports writing. + + + + + Reading this property always throws a . + + + + + The position of the stream pointer. + + + + Setting this property always throws a . Reading will return the + total number of uncompressed bytes read in. + + + + + Compressor State + + + + Freq table collected to save a pass over the data during + decompression. + + + Initializes the tt array. + + This method is called when the required length of the array is known. + I don't initialize it at construction time to avoid unneccessary + memory allocation when compressing small files. + + + + A write-only decorator stream that compresses data as it is + written using the BZip2 algorithm. + + + + + Constructs a new BZip2OutputStream, that sends its + compressed output to the given output stream. + + + + The destination stream, to which compressed output will be sent. + + + + + This example reads a file, then compresses it with bzip2 file, + and writes the compressed data into a newly created file. + + + var fname = "logfile.log"; + using (var fs = File.OpenRead(fname)) + { + var outFname = fname + ".bz2"; + using (var output = File.Create(outFname)) + { + using (var compressor = new Ionic.BZip2.BZip2OutputStream(output)) + { + byte[] buffer = new byte[2048]; + int n; + while ((n = fs.Read(buffer, 0, buffer.Length)) > 0) + { + compressor.Write(buffer, 0, n); + } + } + } + } + + + + + + Constructs a new BZip2OutputStream with specified blocksize. + + the destination stream. + + The blockSize in units of 100000 bytes. + The valid range is 1..9. + + + + + Constructs a new BZip2OutputStream. + + the destination stream. + + whether to leave the captive stream open upon closing this stream. + + + + + Constructs a new BZip2OutputStream with specified blocksize, + and explicitly specifies whether to leave the wrapped stream open. + + + the destination stream. + + The blockSize in units of 100000 bytes. + The valid range is 1..9. + + + whether to leave the captive stream open upon closing this stream. + + + + + Close the stream. + + + + This may or may not close the underlying stream. Check the + constructors that accept a bool value. + + + + + + Flush the stream. + + + + + Write data to the stream. + + + + + Use the BZip2OutputStream to compress data while writing: + create a BZip2OutputStream with a writable output stream. + Then call Write() on that BZip2OutputStream, providing + uncompressed data as input. The data sent to the output stream will + be the compressed form of the input data. + + + + A BZip2OutputStream can be used only for Write() not for Read(). + + + + + The buffer holding data to write to the stream. + the offset within that data array to find the first byte to write. + the number of bytes to write. + + + + Calling this method always throws a . + + this is irrelevant, since it will always throw! + this is irrelevant, since it will always throw! + irrelevant! + + + + Calling this method always throws a . + + this is irrelevant, since it will always throw! + + + + Calling this method always throws a . + + this parameter is never used + this parameter is never used + this parameter is never used + never returns anything; always throws + + + + The blocksize parameter specified at construction time. + + + + + Indicates whether the stream can be read. + + + The return value is always false. + + + + + Indicates whether the stream supports Seek operations. + + + Always returns false. + + + + + Indicates whether the stream can be written. + + + The return value should always be true, unless and until the + object is disposed and closed. + + + + + Reading this property always throws a . + + + + + The position of the stream pointer. + + + + Setting this property always throws a . Reading will return the + total number of uncompressed bytes written through. + + + + + Computes a CRC-32. The CRC-32 algorithm is parameterized - you + can set the polynomial and enable or disable bit + reversal. This can be used for GZIP, BZip2, or ZIP. + + + This type is used internally by DotNetZip; it is generally not used + directly by applications wishing to create, read, or manipulate zip + archive files. + + + + + Returns the CRC32 for the specified stream. + + The stream over which to calculate the CRC32 + the CRC32 calculation + + + + Returns the CRC32 for the specified stream, and writes the input into the + output stream. + + The stream over which to calculate the CRC32 + The stream into which to deflate the input + the CRC32 calculation + + + + Get the CRC32 for the given (word,byte) combo. This is a + computation defined by PKzip for PKZIP 2.0 (weak) encryption. + + The word to start with. + The byte to combine it with. + The CRC-ized result. + + + + Update the value for the running CRC32 using the given block of bytes. + This is useful when using the CRC32() class in a Stream. + + block of bytes to slurp + starting point in the block + how many bytes within the block to slurp + + + + Process one byte in the CRC. + + the byte to include into the CRC . + + + + Process a run of N identical bytes into the CRC. + + + + This method serves as an optimization for updating the CRC when a + run of identical bytes is found. Rather than passing in a buffer of + length n, containing all identical bytes b, this method accepts the + byte value and the length of the (virtual) buffer - the length of + the run. + + + the byte to include into the CRC. + the number of times that byte should be repeated. + + + + Combines the given CRC32 value with the current running total. + + + This is useful when using a divide-and-conquer approach to + calculating a CRC. Multiple threads can each calculate a + CRC32 on a segment of the data, and then combine the + individual CRC32 values at the end. + + the crc value to be combined with this one + the length of data the CRC value was calculated on + + + + Create an instance of the CRC32 class using the default settings: no + bit reversal, and a polynomial of 0xEDB88320. + + + + + Create an instance of the CRC32 class, specifying whether to reverse + data bits or not. + + + specify true if the instance should reverse data bits. + + + + In the CRC-32 used by BZip2, the bits are reversed. Therefore if you + want a CRC32 with compatibility with BZip2, you should pass true + here. In the CRC-32 used by GZIP and PKZIP, the bits are not + reversed; Therefore if you want a CRC32 with compatibility with + those, you should pass false. + + + + + + Create an instance of the CRC32 class, specifying the polynomial and + whether to reverse data bits or not. + + + The polynomial to use for the CRC, expressed in the reversed (LSB) + format: the highest ordered bit in the polynomial value is the + coefficient of the 0th power; the second-highest order bit is the + coefficient of the 1 power, and so on. Expressed this way, the + polynomial for the CRC-32C used in IEEE 802.3, is 0xEDB88320. + + + specify true if the instance should reverse data bits. + + + + + In the CRC-32 used by BZip2, the bits are reversed. Therefore if you + want a CRC32 with compatibility with BZip2, you should pass true + here for the reverseBits parameter. In the CRC-32 used by + GZIP and PKZIP, the bits are not reversed; Therefore if you want a + CRC32 with compatibility with those, you should pass false for the + reverseBits parameter. + + + + + + Reset the CRC-32 class - clear the CRC "remainder register." + + + + Use this when employing a single instance of this class to compute + multiple, distinct CRCs on multiple, distinct data blocks. + + + + + + Indicates the total number of bytes applied to the CRC. + + + + + Indicates the current CRC for all blocks slurped in. + + + + + A Stream that calculates a CRC32 (a checksum) on all bytes read, + or on all bytes written. + + + + + This class can be used to verify the CRC of a ZipEntry when + reading from a stream, or to calculate a CRC when writing to a + stream. The stream should be used to either read, or write, but + not both. If you intermix reads and writes, the results are not + defined. + + + + This class is intended primarily for use internally by the + DotNetZip library. + + + + + + The default constructor. + + + + Instances returned from this constructor will leave the underlying + stream open upon Close(). The stream uses the default CRC32 + algorithm, which implies a polynomial of 0xEDB88320. + + + The underlying stream + + + + The constructor allows the caller to specify how to handle the + underlying stream at close. + + + + The stream uses the default CRC32 algorithm, which implies a + polynomial of 0xEDB88320. + + + The underlying stream + true to leave the underlying stream + open upon close of the CrcCalculatorStream; false otherwise. + + + + A constructor allowing the specification of the length of the stream + to read. + + + + The stream uses the default CRC32 algorithm, which implies a + polynomial of 0xEDB88320. + + + Instances returned from this constructor will leave the underlying + stream open upon Close(). + + + The underlying stream + The length of the stream to slurp + + + + A constructor allowing the specification of the length of the stream + to read, as well as whether to keep the underlying stream open upon + Close(). + + + + The stream uses the default CRC32 algorithm, which implies a + polynomial of 0xEDB88320. + + + The underlying stream + The length of the stream to slurp + true to leave the underlying stream + open upon close of the CrcCalculatorStream; false otherwise. + + + + A constructor allowing the specification of the length of the stream + to read, as well as whether to keep the underlying stream open upon + Close(), and the CRC32 instance to use. + + + + The stream uses the specified CRC32 instance, which allows the + application to specify how the CRC gets calculated. + + + The underlying stream + The length of the stream to slurp + true to leave the underlying stream + open upon close of the CrcCalculatorStream; false otherwise. + the CRC32 instance to use to calculate the CRC32 + + + + Read from the stream + + the buffer to read + the offset at which to start + the number of bytes to read + the number of bytes actually read + + + + Write to the stream. + + the buffer from which to write + the offset at which to start writing + the number of bytes to write + + + + Flush the stream. + + + + + Seeking is not supported on this stream. This method always throws + + + N/A + N/A + N/A + + + + This method always throws + + + N/A + + + + Closes the stream. + + + + + Gets the total number of bytes run through the CRC32 calculator. + + + + This is either the total number of bytes read, or the total number of + bytes written, depending on the direction of this stream. + + + + + Provides the current CRC for all blocks slurped in. + + + + The running total of the CRC is kept as data is written or read + through the stream. read this property after all reads or writes to + get an accurate CRC for the entire stream. + + + + + + Indicates whether the underlying stream will be left open when the + CrcCalculatorStream is Closed. + + + + Set this at any point before calling . + + + + + + Indicates whether the stream supports reading. + + + + + Indicates whether the stream supports seeking. + + + + Always returns false. + + + + + + Indicates whether the stream supports writing. + + + + + Returns the length of the underlying stream. + + + + + The getter for this property returns the total bytes read. + If you use the setter, it will throw + . + + + + + A write-only decorator stream that compresses data as it is + written using the BZip2 algorithm. This stream compresses by + block using multiple threads. + + + This class performs BZIP2 compression through writing. For + more information on the BZIP2 algorithm, see + . + + + + This class is similar to , + except that this implementation uses an approach that employs multiple + worker threads to perform the compression. On a multi-cpu or multi-core + computer, the performance of this class can be significantly higher than + the single-threaded BZip2OutputStream, particularly for larger streams. + How large? Anything over 10mb is a good candidate for parallel + compression. + + + + The tradeoff is that this class uses more memory and more CPU than the + vanilla BZip2OutputStream. Also, for small files, the + ParallelBZip2OutputStream can be much slower than the vanilla + BZip2OutputStream, because of the overhead associated to using the + thread pool. + + + + + + + Constructs a new ParallelBZip2OutputStream, that sends its + compressed output to the given output stream. + + + + The destination stream, to which compressed output will be sent. + + + + + This example reads a file, then compresses it with bzip2 file, + and writes the compressed data into a newly created file. + + + var fname = "logfile.log"; + using (var fs = File.OpenRead(fname)) + { + var outFname = fname + ".bz2"; + using (var output = File.Create(outFname)) + { + using (var compressor = new Ionic.BZip2.ParallelBZip2OutputStream(output)) + { + byte[] buffer = new byte[2048]; + int n; + while ((n = fs.Read(buffer, 0, buffer.Length)) > 0) + { + compressor.Write(buffer, 0, n); + } + } + } + } + + + + + + Constructs a new ParallelBZip2OutputStream with specified blocksize. + + the destination stream. + + The blockSize in units of 100000 bytes. + The valid range is 1..9. + + + + + Constructs a new ParallelBZip2OutputStream. + + the destination stream. + + whether to leave the captive stream open upon closing this stream. + + + + + Constructs a new ParallelBZip2OutputStream with specified blocksize, + and explicitly specifies whether to leave the wrapped stream open. + + + the destination stream. + + The blockSize in units of 100000 bytes. + The valid range is 1..9. + + + whether to leave the captive stream open upon closing this stream. + + + + + Close the stream. + + + + This may or may not close the underlying stream. Check the + constructors that accept a bool value. + + + + + + Flush the stream. + + + + + Write data to the stream. + + + + + Use the ParallelBZip2OutputStream to compress data while + writing: create a ParallelBZip2OutputStream with a writable + output stream. Then call Write() on that + ParallelBZip2OutputStream, providing uncompressed data as + input. The data sent to the output stream will be the compressed + form of the input data. + + + + A ParallelBZip2OutputStream can be used only for + Write() not for Read(). + + + + + The buffer holding data to write to the stream. + the offset within that data array to find the first byte to write. + the number of bytes to write. + + + + Calling this method always throws a . + + this is irrelevant, since it will always throw! + this is irrelevant, since it will always throw! + irrelevant! + + + + Calling this method always throws a . + + this is irrelevant, since it will always throw! + + + + Calling this method always throws a . + + this parameter is never used + this parameter is never used + this parameter is never used + never returns anything; always throws + + + + The maximum number of concurrent compression worker threads to use. + + + + + This property sets an upper limit on the number of concurrent worker + threads to employ for compression. The implementation of this stream + employs multiple threads from the .NET thread pool, via + ThreadPool.QueueUserWorkItem(), to compress the incoming data by + block. As each block of data is compressed, this stream re-orders the + compressed blocks and writes them to the output stream. + + + + A higher number of workers enables a higher degree of + parallelism, which tends to increase the speed of compression on + multi-cpu computers. On the other hand, a higher number of buffer + pairs also implies a larger memory consumption, more active worker + threads, and a higher cpu utilization for any compression. This + property enables the application to limit its memory consumption and + CPU utilization behavior depending on requirements. + + + + By default, DotNetZip allocates 4 workers per CPU core, subject to the + upper limit specified in this property. For example, suppose the + application sets this property to 16. Then, on a machine with 2 + cores, DotNetZip will use 8 workers; that number does not exceed the + upper limit specified by this property, so the actual number of + workers used will be 4 * 2 = 8. On a machine with 4 cores, DotNetZip + will use 16 workers; again, the limit does not apply. On a machine + with 8 cores, DotNetZip will use 16 workers, because of the limit. + + + + For each compression "worker thread" that occurs in parallel, there is + up to 2mb of memory allocated, for buffering and processing. The + actual number depends on the property. + + + + CPU utilization will also go up with additional workers, because a + larger number of buffer pairs allows a larger number of background + threads to compress in parallel. If you find that parallel + compression is consuming too much memory or CPU, you can adjust this + value downward. + + + + The default value is 16. Different values may deliver better or + worse results, depending on your priorities and the dynamic + performance characteristics of your storage and compute resources. + + + + The application can set this value at any time, but it is effective + only before the first call to Write(), which is when the buffers are + allocated. + + + + + + The blocksize parameter specified at construction time. + + + + + Indicates whether the stream can be read. + + + The return value is always false. + + + + + Indicates whether the stream supports Seek operations. + + + Always returns false. + + + + + Indicates whether the stream can be written. + + + The return value depends on whether the captive stream supports writing. + + + + + Reading this property always throws a . + + + + + The position of the stream pointer. + + + + Setting this property always throws a . Reading will return the + total number of uncompressed bytes written through. + + + + + The total number of bytes written out by the stream. + + + This value is meaningful only after a call to Close(). + + + + + Returns the "random" number at a specific index. + + the index + the random number + + + + Implementes a resource-based meta_path importer as described in PEP 302. + + + + + Instantiates a new meta_path importer using an embedded ZIP resource file. + + + + + + + zip_searchorder defines how we search for a module in the Zip + archive: we first search for a package __init__, then for + non-package .pyc, .pyo and .py entries. The .pyc and .pyo entries + are swapped by initzipimport() if we run in optimized mode. Also, + '/' is replaced by SEP there. + + + + + Given a path to a Zip file and a toc_entry, return the (uncompressed) + data as a new reference. + + + + + + + + Return the code object for the module named by 'fullname' from the + Zip archive as a new reference. + + + + + + + + + + + Given a path to a Zip archive, build a dict, mapping file names + (local to the archive, using SEP as a separator) to toc entries. + + A toc_entry is a tuple: + (__file__, # value to use for __file__, available for all files + compress, # compression kind; 0 for uncompressed + data_size, # size of compressed data on disk + file_size, # size of decompressed data + file_offset, # offset of file header from start of archive + time, # mod time of file (in dos format) + date, # mod data of file (in dos format) + crc, # crc checksum of the data + ) + Directories can be recognized by the trailing SEP in the name, + data_size and file_offset are 0. + + + + + + + Given a (sub)modulename, write the potential file path in the + archive (without extension) to the path buffer. + + + + + + + + Determines the type of module we have (package or module, or not found). + + + + + + + + Provides a StreamContentProvider for a stream of content backed by a file on disk. + + + + + This class represents adler32 checksum algorithm + + + + + This static method returns adler32 checksum of the buffer data + + + + + Implementation of the Deflate compression algorithm. + + + + + Maximum memory level + + + + + Defalult compression method + + + + + Default memory level + + + + + block not completed, need more input or more output + + + + + Block internalFlush performed + + + + + Finish started, need only more output at next deflate + + + + + finish done, accept no more input or output + + + + + preset dictionary flag in zlib header + + + + + The deflate compression method + + + + + The size of the buffer + + + + + repeat previous bit length 3-6 times (2 bits of repeat count) + + + + + repeat a zero length 3-10 times (3 bits of repeat count) + + + + + repeat a zero length 11-138 times (7 bits of repeat count) + + + + + Deflate class congiration table + + + + + Pointer back to this zlib stream + + + + + As the name implies + + + + + Output still pending + + + + + Size of Pending_buf + + + + + Next pending byte to output to the stream + + + + + Number of bytes in the pending buffer + + + + + suppress zlib header and adler32 + + + + + UNKNOWN, BINARY or ASCII + + + + + STORED (for zip only) or DEFLATED + + + + + Value of internalFlush parameter for previous deflate call + + + + + LZ77 Window size (32K by default) + + + + + log2(w_size) (8..16) + + + + + w_size - 1 + + + + + Sliding Window. Input bytes are ReadPos into the second half of the Window, + and move to the first half later to keep a dictionary of at least wSize + bytes. With this organization, matches are limited to a distance of + wSize-MAX_MATCH bytes, but this ensures that IO is always + performed with a length multiple of the block size. Also, it limits + the Window size to 64K, which is quite useful on MSDOS. + To do: use the user input buffer as sliding Window. + + + + + Actual size of Window: 2*wSize, except when the user input buffer is directly used as sliding Window. + + + + + Link to older string with same hash index. To limit the size of this + array to 64K, this link is maintained only for the last 32K strings. + An index in this array is thus a Window index modulo 32K. + + + + + Heads of the hash chains or NIL. + + + + + hash index of string to be inserted + + + + + number of elements in hash table + + + + + log2(hash_size) + + + + + hash_size-1 + + + + + Number of bits by which ins_h must be shifted at each input + step. It must be such that after MIN_MATCH steps, the oldest + byte no longer takes part in the hash key, that is: + hash_shift * MIN_MATCH >= hash_bits + + + + + Window position at the beginning of the current output block. Gets negative when the Window is moved backwards. + + + + + length of best match + + + + + previous match + + + + + set if previous match exists + + + + + start of string to insert + + + + + start of matching string + + + + + number of valid bytes ahead in Window + + + + + Length of the best match at previous step. Matches not greater than this + are discarded. This is used in the lazy match evaluation. + + + + + To speed up deflation, hash chains are never searched beyond this + length. A higher limit improves compression ratio but degrades the speed. + + + + + Attempt to find a better match only when the current match is strictly + smaller than this value. This mechanism is used only for compression + levels >= 4. + + + + + compression level (1..9) + + + + + favor or force Huffman coding + + + + + Use a faster search when the previous match is longer than this + + + + + Stop searching when current match exceeds this + + + + + literal and length tree + + + + + distance tree + + + + + Huffman tree for bit lengths + + + + + Desc for literal tree + + + + + desc for distance tree + + + + + desc for bit length tree + + + + + number of codes at each bit length for an optimal tree + + + + + heap used to build the Huffman trees + + + + + number of elements in the heap + + + + + element of largest frequency + + + + + Depth of each subtree used as tie breaker for trees of equal frequency + + + + + index for literals or lengths + + + + + Size of match buffer for literals/lengths. There are 4 reasons for + limiting lit_bufsize to 64K: + - frequencies can be kept in 16 bit counters + - if compression is not successful for the first block, all input + data is still in the Window so we can still emit a stored block even + when input comes from standard input. (This can also be done for + all blocks if lit_bufsize is not greater than 32K.) + - if compression is not successful for a file smaller than 64K, we can + even emit a stored file instead of a stored block (saving 5 bytes). + This is applicable only for zip (not gzip or zlib). + - creating new Huffman trees less frequently may not provide fast + adaptation to changes in the input data statistics. (Take for + example a binary file with poorly compressible code followed by + a highly compressible string table.) Smaller buffer sizes give + fast adaptation but have of course the overhead of transmitting + trees more frequently. + - I can't count above 4 + + + + + running index in l_buf + + + + + index of pendig_buf + + + + + bit length of current block with optimal trees + + + + + bit length of current block with static trees + + + + + number of string matches in current block + + + + + bit length of EOB code for last block + + + + + Output buffer. bits are inserted starting at the bottom (least + significant bits). + + + + + Number of valid bits in bi_buf. All bits above the last valid bit + are always zero. + + + + + Default constructor + + + + + Initialization + + + + + Initialize the tree data structures for a new zlib stream. + + + + + Initializes block + + + + + Restore the heap property by moving down the tree starting at node k, + exchanging a node with the smallest of its two sons if necessary, stopping + when the heap property is re-established (each father smaller than its + two sons). + + + + + Scan a literal or distance tree to determine the frequencies of the codes + in the bit length tree. + + + + + Construct the Huffman tree for the bit lengths and return the index in + bl_order of the last bit length code to send. + + + + + Send the header for a block using dynamic Huffman trees: the counts, the + lengths of the bit length codes, the literal tree and the distance tree. + IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. + + + + + Send a literal or distance tree in compressed form, using the codes in + bl_tree. + + + + + Output a byte on the stream. + IN assertion: there is enough room in Pending_buf. + + + + + Adds a byte to the buffer + + + + + Send one empty static block to give enough lookahead for inflate. + This takes 10 bits, of which 7 may remain in the bit buffer. + The current inflate code requires 9 bits of lookahead. If the + last two codes for the previous block (real code plus EOB) were coded + on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode + the last real code. In this case we send two empty static blocks instead + of one. (There are no problems if the previous block is stored or fixed.) + To simplify the code, we assume the worst case of last real code encoded + on one bit only. + + + + + Save the match info and tally the frequency counts. Return true if + the current block must be flushed. + + + + + Send the block data compressed using the given Huffman trees + + + + + Set the data type to ASCII or BINARY, using a crude approximation: + binary if more than 20% of the bytes are <= 6 or >= 128, ascii otherwise. + IN assertion: the fields freq of dyn_ltree are set and the total of all + frequencies does not exceed 64K (to fit in an int on 16 bit machines). + + + + + Flush the bit buffer, keeping at most 7 bits in it. + + + + + Flush the bit buffer and align the output on a byte boundary + + + + + Copy a stored block, storing first the length and its + one's complement if requested. + + + + + Flushes block + + + + + Copy without compression as much as possible from the input stream, return + the current block state. + This function does not insert new strings in the dictionary since + uncompressible data is probably not useful. This function is used + only for the level=0 compression option. + NOTE: this function should be optimized to avoid extra copying from + Window to Pending_buf. + + + + + Send a stored block + + + + + Determine the best encoding for the current block: dynamic trees, static + trees or store, and output the encoded block to the zip file. + + + + + Fill the Window when the lookahead becomes insufficient. + Updates strstart and lookahead. + + IN assertion: lookahead less than MIN_LOOKAHEAD + OUT assertions: strstart less than or equal to window_size-MIN_LOOKAHEAD + At least one byte has been ReadPos, or _avail_in == 0; reads are + performed for at least two bytes (required for the zip translate_eol + option -- not supported here). + + + + + Compress as much as possible from the input stream, return the current + block state. + This function does not perform lazy evaluation of matches and inserts + new strings in the dictionary only for unmatched strings or for short + matches. It is used only for the fast compression options. + + + + + Same as above, but achieves better compression. We use a lazy + evaluation for matches: a match is finally adopted only if there is + no better match at the next Window position. + + + + + Finds the longest matching data part + + + + + Deflate algorithm initialization + + ZStream object + Compression level + Window bits + A result code + + + + Initializes deflate algorithm + + ZStream object + Compression level + Operation result result code + + + + Deflate algorithm initialization + + ZStream object + Compression level + Compression method + Window bits + Memory level + Compression strategy + Operation result code + + + + Resets the current state of deflate object + + + + + Finish compression with deflate algorithm + + + + + Sets deflate algorithm parameters + + + + + Sets deflate dictionary + + + + + Performs data compression with the deflate algorithm + + + + + Static constructor initializes config_table + + + + + Compression level + + + + + Number of bytes in the pending buffer + + + + + Output still pending + + + + + Next pending byte to output to the stream + + + + + suppress zlib header and adler32 + + + + + Deflate algorithm configuration parameters class + + + + + reduce lazy search above this match length + + + + + do not perform lazy search above this match length + + + + + quit search above this match length + + + + + Constructor which initializes class inner fields + + + + + current inflate_block mode + + + + + if STORED, bytes left to copy + + + + + table lengths (14 bits) + + + + + index into blens (or border) + + + + + bit lengths of codes + + + + + bit length tree depth + + + + + bit length decoding tree + + + + + if CODES, current state + + + + + true if this block is the last block + + + + + bits in bit buffer + + + + + bit buffer + + + + + single malloc for tree space + + + + + sliding Window + + + + + one byte after sliding Window + + + + + Window ReadPos pointer + + + + + Window WritePos pointer + + + + + need check + + + + + check on output + + + + + Resets this InfBlocks class instance + + + + + Block processing functions + + + + + Frees inner buffers + + + + + Sets dictionary + + + + + Returns true if inflate is currently at the End of a block generated + by Z_SYNC_FLUSH or Z_FULL_FLUSH. + + + + + copy as much as possible from the sliding Window to the output area + + + + + sliding window + + + + + one byte after sliding Window + + + + + Window ReadPos pointer + + + + + Window WritePos pointer + + + + + bits in bit buffer + + + + + bit buffer + + + + + Inflate codes mode + + + + + This class is used by the InfBlocks class + + + + + current inflate_codes mode + + + + + length + + + + + pointer into tree + + + + + current index of the tree + + + + + + + + + + ltree bits decoded per branch + + + + + dtree bits decoded per branch + + + + + literal/length/eob tree + + + + + literal/length/eob tree index + + + + + distance tree + + + + + distance tree index + + + + + Constructor which takes literal, distance trees, corresponding bites decoded for branches, corresponding indexes and a ZStream object + + + + + Constructor which takes literal, distance trees, corresponding bites decoded for branches and a ZStream object + + + + + Block processing method + + An instance of the InfBlocks class + A ZStream object + A result code + + + + Frees allocated resources + + + + + Fast inflate procedure. Called with number of bytes left to WritePos in Window at least 258 + (the maximum string length) and number of input bytes available + at least ten. The ten bytes are six bytes for the longest length/ + distance pair plus four bytes for overloading the bit buffer. + + + + + This enumeration contains modes of inflate processing + + + + + waiting for method byte + + + + + waiting for flag byte + + + + + four dictionary check bytes to go + + + + + three dictionary check bytes to go + + + + + two dictionary check bytes to go + + + + + one dictionary check byte to go + + + + + waiting for inflateSetDictionary + + + + + decompressing blocks + + + + + four check bytes to go + + + + + three check bytes to go + + + + + two check bytes to go + + + + + one check byte to go + + + + + finished check, done + + + + + got an error--stay here + + + + + current inflate mode + + + + + if FLAGS, method byte + + + + + computed check value + + + + + stream check value + + + + + if BAD, inflateSync's marker bytes count + + + + + flag for no wrapper + + + + + log2(Window size) (8..15, defaults to 15) + + + + + current inflate_blocks state + + + + + Resets the Inflate algorithm + + A ZStream object + A result code + + + + Finishes the inflate algorithm processing + + A ZStream object + Operation result code + + + + Initializes the inflate algorithm + + A ZStream object + Window size + Operation result code + + + + Runs inflate algorithm + + A ZStream object + Flush strategy + Operation result code + + + + Sets dictionary for the inflate operation + + A ZStream object + An array of byte - dictionary + Dictionary length + Operation result code + + + + Inflate synchronization + + A ZStream object + Operation result code + + + + Returns true if inflate is currently at the End of a block generated + by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP + implementation to provide an additional safety check. PPP uses Z_SYNC_FLUSH + but removes the length bytes of the resulting empty stored block. When + decompressing, PPP checks that at the End of input packet, inflate is + waiting for these length bytes. + + + + + Contains utility information for the InfTree class + + + + + Given a list of code lengths and a maximum table size, make a set of + tables to decode that set of codes. + + Return (int)ZLibResultCode.Z_OK on success, (int)ZLibResultCode.Z_DATA_ERROR if the given code set is incomplete (the tables are still built in this case), (int)ZLibResultCode.Z_DATA_ERROR if the input is invalid (an over-subscribed set of lengths), or (int)ZLibResultCode.Z_DATA_ERROR if not enough memory. + + + + + Build trees + + + + + Builds dynamic trees + + + + + Build fixed trees + + + + + Bit length codes must not exceed MAX_BL_BITS bits + + + + + This class represents a tree and is used in the Deflate class + + + + + The dynamic tree + + + + + Largest code with non zero frequency + + + + + the corresponding static tree + + + + + Mapping from a distance to a distance code. dist is the distance - 1 and + must not have side effects. _dist_code[256] and _dist_code[257] are never + used. + + + + + Compute the optimal bit lengths for a tree and update the total bit length + for the current block. + IN assertion: the fields freq and dad are set, heap[heap_max] and + above are the tree nodes sorted by increasing frequency. + OUT assertions: the field count is set to the optimal bit length, the + array bl_count contains the frequencies for each bit length. + The length opt_len is updated; static_len is also updated if stree is + not null. + + + + + Construct one Huffman tree and assigns the code bit strings and lengths. + Update the total bit length for the current block. + IN assertion: the field freq is set for all tree elements. + OUT assertions: the fields count and code are set to the optimal bit length + and corresponding code. The length opt_len is updated; static_len is + also updated if stree is not null. The field max_code is set. + + + + + Generate the codes for a given tree and bit counts (which need not be + optimal). + IN assertion: the array bl_count contains the bit length statistics for + the given tree and the field count is set for all tree elements. + OUT assertion: the field code is set for all tree elements of non + zero code length. + + + + + Reverse the first count bits of a code, using straightforward code (a faster + method would use a table) + + + + + The dynamic tree + + + + + Largest code with non zero frequency + + + + + the corresponding static tree + + + + + Some constants for specifying compression levels. Methods which takes a compression level as a parameter expects an integer value from 0 to 9. You can either specify an integer value or use constants for some most widely used compression levels. + + + + + No compression should be used at all. + + + + + Minimal compression, but greatest speed. + + + + + Maximum compression, but slowest. + + + + + Select default compression level (good compression, good speed). + + + + + Compression strategies. The strategy parameter is used to tune the compression algorithm. The strategy parameter only affects the compression ratio but not the correctness of the compressed output even if it is not set appropriately. + + + + + This strategy is designed for filtered data. Data which consists of mostly small values, with random distribution should use Z_FILTERED. With this strategy, less string matching is performed. + + + + + Z_HUFFMAN_ONLY forces Huffman encoding only (no string match) + + + + + The default strategy is the most commonly used. With this strategy, string matching and huffman compression are balanced. + + + + + Flush strategies + + + + + Do not internalFlush data, but just write data as normal to the output buffer. This is the normal way in which data is written to the output buffer. + + + + + Obsolete. You should use Z_SYNC_FLUSH instead. + + + + + All pending output is flushed to the output buffer and the output is aligned on a byte boundary, so that the decompressor can get all input data available so far. + + + + + All output is flushed as with Z_SYNC_FLUSH, and the compression state is reset so that decompression can restart from this point if previous compressed data has been damaged or if random access is desired. Using Z_FULL_FLUSH too often can seriously degrade the compression. ZLib_InflateSync will locate points in the compression string where a full has been performed. + + + + + Notifies the module that the input has now been exhausted. Pending input is processed, pending output is flushed and calls return with Z_STREAM_END if there was enough output space. + + + + + Results of operations in ZLib library + + + + + No failure was encountered, the operation completed without problem. + + + + + No failure was encountered, and the input has been exhausted. + + + + + A preset dictionary is required for decompression of the data. + + + + + An internal error occurred + + + + + The stream structure was inconsistent + + + + + Input data has been corrupted (for decompression). + + + + + Memory allocation failed. + + + + + There was not enough space in the output buffer. + + + + + The version supplied does not match that supported by the ZLib module. + + + + + States of deflate operation + + + + + Data block types, i.e. binary or ascii text + + + + + Helper class + + + + + Max Window size + + + + + preset dictionary flag in zlib header + + + + + The size of the buffer + + + + + Deflate compression method index + + + + + see definition of array dist_code below + + + + + This method returns the literal value received + + The literal to return + The received value + + + + This method returns the literal value received + + The literal to return + The received value + + + + This method returns the literal value received + + The literal to return + The received value + + + + This method returns the literal value received + + The literal to return + The received value + + + + Performs an unsigned bitwise right shift with the specified number + + Number to operate on + Ammount of bits to shift + The resulting number from the shift operation + + + + Performs an unsigned bitwise right shift with the specified number + + Number to operate on + Ammount of bits to shift + The resulting number from the shift operation + + + + Performs an unsigned bitwise right shift with the specified number + + Number to operate on + Ammount of bits to shift + The resulting number from the shift operation + + + + Performs an unsigned bitwise right shift with the specified number + + Number to operate on + Ammount of bits to shift + The resulting number from the shift operation + + + Reads a number of characters from the current source Stream and writes the data to the target array at the specified index. + The source Stream to ReadPos from. + Contains the array of characters ReadPos from the source Stream. + The starting index of the target array. + The maximum number of characters to ReadPos from the source Stream. + The number of characters ReadPos. The number will be less than or equal to count depending on the data available in the source Stream. Returns -1 if the End of the stream is reached. + + + Reads a number of characters from the current source TextReader and writes the data to the target array at the specified index. + The source TextReader to ReadPos from + Contains the array of characteres ReadPos from the source TextReader. + The starting index of the target array. + The maximum number of characters to ReadPos from the source TextReader. + The number of characters ReadPos. The number will be less than or equal to count depending on the data available in the source TextReader. Returns -1 if the End of the stream is reached. + + + + Converts a string to an array of bytes + + The string to be converted + The new array of bytes + + + + Converts an array of bytes to an array of chars + + The array of bytes to convert + The new array of chars + + + + Copies large array which was passed as srcBuf to the Initialize method into the destination array which were passes as destBuff + + The number of bytes copied + + + + ZStream is used to store user data to compress/decompress. + + + + + Maximum memory level + + + + + Next input byte array + + + + + Index of the first byte in the input array. + + + + + Number of bytes available at _next_in + + + + + total nb of input bytes ReadPos so far + + + + + Byte array for the next output block + + + + + Index of the first byte in the _next_out array + + + + + Remaining free space at _next_out + + + + + Total number of bytes in output array + + + + + A string to store operation result message (corresponding to result codes) + + + + + A deflate object to perform data compression + + + + + Inflate object to perform data decompression + + + + + Best guess about the data type: ascii or binary + + + + + A checksum computed with Adler algorithm + + + + + Initializes the internal stream state for decompression. The fields , must be + initialized before by the caller. If is not null and is large + enough (the exact value depends on the compression method), determines the compression + method from the ZLib header and allocates all data structures accordingly; otherwise the allocation will be deferred + to the first call of . + + + inflateInit returns if success, if there was not enough memory, + if the ZLib library version is incompatible with the version assumed by the caller. + is set to null if there is no error message. does not perform any decompression + apart from reading the ZLib header if present: this will be done by . (So and + may be modified, but and are unchanged.) + + + + + This is another version of with an extra parameter. The fields , must be + initialized before by the caller. If is not null and is large enough + (the exact value depends on the compression method), determines the compression method from + the ZLib header and allocates all data structures accordingly; otherwise the allocation will be deferred to the first + call of . + + The windowBits parameter is the base two logarithm of the maximum window size (the size of the history buffer). + It should be in the range 8..15 for this version of the library. The default value is 15 if is used instead. + If a compressed stream with a larger window size is given as input, will return with the error code + instead of trying to allocate a larger window. + + inflateInit returns if success, if there was not enough memory, + if a parameter is invalid (such as a negative memLevel). is set to null + if there is no error message. does not perform any decompression apart from reading the ZLib header + if present: this will be done by . (So and may be modified, + but and are unchanged.) + + + + + This method decompresses as much data as possible, and stops when the input buffer () becomes empty or + the output buffer () becomes full. It may some introduce some output latency (reading input without producing any output) + except when forced to flush. + The detailed semantics are as follows. performs one or both of the following actions: + + + Decompress more input starting at and update and + accordingly. If not all input can be processed (because there is not enough room in the output buffer), is updated and + processing will resume at this point for the next call of . + Provide more output starting at and update and + accordingly. provides as much output as possible, until there is no more input data or no more space in + the output buffer (see below about the parameter). + + + + Flush strategy to use. + + Before the call of , the application should ensure that at least one of the actions is possible, by providing + more input and/or consuming more output, and updating the next_* and avail_* values accordingly. The application can consume the uncompressed + output when it wants, for example when the output buffer is full (avail_out == 0), or after each call of . + If returns and with zero , it must be called again + after making room in the output buffer because there might be more output pending. + If the parameter is set to , flushes + as much output as possible to the output buffer. The flushing behavior of is not specified for values of + the parameter other than and , + but the current implementation actually flushes as much output as possible anyway. + should normally be called until it returns or an error. + However if all decompression is to be performed in a single step (a single call of inflate), the parameter + should be set to . In this case all pending input is processed and all pending output is flushed; + must be large enough to hold all the uncompressed data. (The size of the uncompressed data may have been + saved by the compressor for this purpose.) The next operation on this stream must be to deallocate the decompression + state. The use of is never required, but can be used to inform that a faster + routine may be used for the single call. + If a preset dictionary is needed at this point (see ), sets strm-adler + to the adler32 checksum of the dictionary chosen by the compressor and returns ; otherwise it + sets strm->adler to the adler32 checksum of all output produced so far (that is, bytes) and returns + , or an error code as described below. At the end of the stream, + ) checks that its computed adler32 checksum is equal to that saved by the compressor and returns + only if the checksum is correct. + + + returns if some progress has been made (more input processed or more output produced), + if the end of the compressed data has been reached and all uncompressed output has been produced, + if a preset dictionary is needed at this point, if + the input data was corrupted (input stream not conforming to the ZLib format or incorrect adler32 checksum), + if the stream structure was inconsistent (for example if or + was null), if there was not enough memory, + if no progress is possible or if there was not enough room in the output buffer + when is used. In the case, the application + may then call to look for a good compression block. + + + + + All dynamically allocated data structures for this stream are freed. This function discards any unprocessed input and does not flush any + pending output. + + + inflateEnd returns if success, + if the stream state was inconsistent. In the error case, msg may be set but then points to a static string (which must not be deallocated). + + + + + Skips invalid compressed data until a full flush point (see the description of deflate with Z_FULL_FLUSH) can be found, + or until all available input is skipped. No output is provided. + + + returns if a full flush point has been found, + if no more input was provided, if no flush point has been found, or + if the stream structure was inconsistent. In the success case, the application may save the current + current value of which indicates where valid compressed data was found. In the error case, the application may repeatedly + call , providing more input each time, until success or end of the input data. + + + + + Initializes the decompression dictionary from the given uncompressed byte sequence. This function must be called immediately after a call of if this call returned . The dictionary chosen by the compressor can be determined from the Adler32 value returned by this call of . The compressor and decompresser must use exactly the same dictionary. + + A byte array - a dictionary. + The length of the dictionary. + + inflateSetDictionary returns if success, if a parameter is invalid (such as null dictionary) or the stream state is inconsistent, if the given dictionary doesn't match the expected one (incorrect Adler32 value). inflateSetDictionary does not perform any decompression: this will be done by subsequent calls of . + + + + + Initializes the internal stream state for compression. + + An integer value from 0 to 9 indicating the desired compression level. + + deflateInit returns if success, if there was not enough memory, + if level is not a valid compression level. is set to null if there is + no error message. does not perform any compression: this will be done by . + + + + + Initializes the internal stream state for compression. + + An integer value from 0 to 9 indicating the desired compression level. + The windowBits parameter is the base two logarithm of the window size (the size of the history buffer). It should be in the + range 8..15 for this version of the library. Larger values of this parameter result in better compression at the expense of memory usage. + The default value is 15 if deflateInit is used instead. + + deflateInit returns if success, if there was not enough memory, + if level is not a valid compression level. is set to null if there + is no error message. does not perform any compression: this will be done by . + + + + + Deflate compresses as much data as possible, and stops when the input buffer becomes empty or the + output buffer becomes full. It may introduce some output latency (reading input without producing any output) + except when forced to flush. + The detailed semantics are as follows. deflate performs one or both of the following actions: + + Compress more input starting at and update and accordingly. + If not all input can be processed (because there is not enough room in the output buffer), and + are updated and processing will resume at this point for the next call of . + Provide more output starting at and update and accordingly. + This action is forced if the parameter flush is non zero. Forcing flush frequently degrades the compression ratio, so this parameter should + be set only when necessary (in interactive applications). Some output may be provided even if flush is not set. + + + + The flush strategy to use. + + + Before the call of , the application should ensure that at least one of the actions is possible, by providing + more input and/or consuming more output, and updating or accordingly ; + should never be zero before the call. The application can consume the compressed output when it wants, for example when the output buffer is full + (avail_out == 0), or after each call of . If returns + and with zero , it must be called again after making room in the output buffer because there might be more output pending. + + + If the parameter is set to , all pending output is flushed to the + output buffer and the output is aligned on a byte boundary, so that the decompressor can get all input + data available so far. (In particular is zero after the call if enough output space has been provided before the call.) + Flushing may degrade compression for some compression algorithms and so it should be used only when necessary. + + + If flush is set to , all output is flushed as with , + and the compression state is reset so that decompression can restart from this point if previous compressed data has been damaged or if + random access is desired. Using too often can seriously degrade the compression. + + + + + If deflate returns with == 0, this function must be called again with the same value of the flush + parameter and more output space (updated ), until the flush is complete ( returns with + non-zero ). + + + If the parameter is set to , pending input is processed, pending + output is flushed and deflate returns with if there was enough output space ; + if deflate returns with , this function must be called again with + and more output space (updated ) but no more input data, until it returns with + or an error. After deflate has returned , the only possible operation on the stream is + . + + can be used immediately after if all the compression is to be + done in a single step. In this case, avail_out must be at least 0.1% larger than avail_in plus 12 bytes. If deflate does not return + Z_STREAM_END, then it must be called again as described above. + + + sets strm-> adler to the adler32 checksum of all input read so far (that is, bytes). + + + may update data_type if it can make a good guess about the input data type (Z_ASCII or Z_BINARY). + In doubt, the data is considered binary. This field is only for information purposes and does not affect the compression algorithm in any manner. + + + returns if some progress has been made (more input processed or more output produced), + if all input has been consumed and all output has been produced (only when flush is set to + ), if the stream state was inconsistent (for example if + or was null), if no progress is possible + (for example or was zero). + + + + + + All dynamically allocated data structures for this stream are freed. This function discards any unprocessed input and does not flush any pending + output. + + + deflateEnd returns if success, if the stream state was inconsistent, + if the stream was freed prematurely (some input or output was discarded). In the error case, + may be set but then points to a static string (which must not be deallocated). + + + + + Dynamically update the compression level and compression strategy. The interpretation of level is as in . + This can be used to switch between compression and straight copy of the input data, or to switch to a different kind of input data + requiring a different strategy. If the compression level is changed, the input available so far is compressed with the old level + (and may be flushed); the new level will take effect only at the next call of + + An integer value indicating the desired compression level. + A flush strategy to use. + + Before the call of , the stream state must be set as for a call of , since the + currently available input may have to be compressed and flushed. In particular, must be non-zero. + + + deflateParams returns if success, if the source stream + state was inconsistent or if a parameter was invalid, if was zero. + + + + + Initializes the compression dictionary from the given byte sequence without producing any compressed output. This function must be called + immediately after , before any call of . The compressor and decompressor must use + exactly the same dictionary (see ). + + A byte array - a dictionary. + The length of the dictionary byte array + + + The dictionary should consist of strings (byte sequences) that are likely to be encountered later in the data to be compressed, + with the most commonly used strings preferably put towards the end of the dictionary. Using a dictionary is most useful when the data + to be compressed is short and can be predicted with good accuracy; the data can then be compressed better than with the default empty dictionary. + + Depending on the size of the compression data structures selected by , a part of the dictionary may + in effect be discarded, for example if the dictionary is larger than the window size in . Thus the strings most likely + to be useful should be put at the end of the dictionary, not at the front. + Upon return of this function, adler is set to the Adler32 value of the dictionary; the decompresser may later use this value to determine + which dictionary has been used by the compressor. (The Adler32 value applies to the whole dictionary even if only a subset of the dictionary + is actually used by the compressor.) + + + deflateSetDictionary returns if success, or if a parameter + is invalid (such as null dictionary) or the stream state is inconsistent (for example if has already been + called for this stream or if the compression method is bsort). does not perform any compression: + this will be done by . + + + + + Flush as much pending output as possible. All output goes through this function so some applications may wish to + modify it to avoid allocating a large buffer and copying into it. + + + + + + Read a new buffer from the current input stream, update the adler32 and total number of bytes read. All input goes + through this function so some applications may wish to modify it to avoid allocating a large buffer and copying from it. + + + + + + Frees all inner buffers. + + + + + Adler-32 value for uncompressed data processed so far. + + + + + Best guess about the data type: ascii or binary + + + + + Gets/Sets the next input byte array. + + + + + Index of the first byte in the input array. + + + + + Gets/Sets the number of bytes available in the input buffer. + + + + + Gets/Sets the total number of bytes in the input buffer. + + + + + Gets/Sets the buffer for the next output data. + + + + + Gets/Sets the index of the first byte in the byte array to write to. + + + + + Gets/Sets the remaining free space in the buffer. + + + + + Gets/Sets the total number of bytes in the output array. + + + + + Gets sets the last error message occurred during class operations. + + + + + A deflate object to perform data compression + + + + + Inflate object to perform data decompression + + + + + Exceptions that occur in ZStream + + + + + Default constructor. + + + + + Constructor which takes one parameter - an error message + + + + + Creates an optimized encoding mapping that can be consumed by an optimized version of charmap_encode. + + + + + Decodes the input string using the provided string mapping. + + + + + Encodes the input string with the specified optimized encoding map. + + + + + Optimied encoding mapping that can be consumed by charmap_encode. + + + + + Provides helper functions which need to be called from generated code to implement various + portions of modules. + + + + + Convert string or bytes into bytes + + + + + Convert most bytearray-like objects into IList of byte + + + + + BytesIO([initializer]) -> object + + Create a buffered I/O implementation using an in-memory bytes + buffer, ready for reading and writing. + + + + + close() -> None. Disable all I/O operations. + + + + + getvalue() -> bytes. + + Retrieve the entire contents of the BytesIO object. + + + + + True if the file is closed. + + + + + Read and decode the next chunk from the buffered reader. Returns true if EOF was + not reached. Places decoded string in _decodedChars. + + + + + Remove all 'b's from mode string to simplify parsing + + + + + Walks the queue calling back to the specified delegate for + each populated index in the queue. + + + + + Throw TypeError with a specified message if object isn't callable. + + + + + Convert object to ushort, throwing ValueError on overflow. + + + + + Interface for "file-like objects" that implement the protocol needed by load() and friends. + This enables the creation of thin wrappers that make fast .NET types and slow Python types look the same. + + + + + Interface for "file-like objects" that implement the protocol needed by dump() and friends. + This enables the creation of thin wrappers that make fast .NET types and slow Python types look the same. + + + + + Call the appropriate reduce method for obj and pickle the object using + the resulting data. Use the first available of + copy_reg.dispatch_table[type(obj)], obj.__reduce_ex__, and obj.__reduce__. + + + + + Pickle the result of a reduce function. + + Only context, obj, func, and reduceCallable are required; all other arguments may be null. + + + + + Write value in pickle decimalnl_short format. + + + + + Write value in pickle float8 format. + + + + + Write value in pickle uint1 format. + + + + + Write value in pickle uint2 format. + + + + + Write value in pickle int4 format. + + + + + Write value in pickle decimalnl_short format. + + + + + Write value in pickle decimalnl_short format. + + + + + Write value in pickle decimalnl_long format. + + + + + Write value in pickle unicodestringnl format. + + + + + Write value in pickle unicodestring4 format. + + + + + Write value in pickle stringnl_noescape_pair format. + + + + + Return true if value is appropriate for formatting in pickle uint1 format. + + + + + Return true if value is appropriate for formatting in pickle uint2 format. + + + + + Return true if value is appropriate for formatting in pickle int4 format. + + + + + Emit a series of opcodes that will set append all items indexed by iter + to the object at the top of the stack. Use APPENDS if possible, but + append no more than BatchSize items at a time. + + + + + Emit a series of opcodes that will set all (key, value) pairs indexed by + iter in the object at the top of the stack. Use SETITEMS if possible, + but append no more than BatchSize items at a time. + + + + + Emit a series of opcodes that will set all (key, value) pairs indexed by + iter in the object at the top of the stack. Use SETITEMS if possible, + but append no more than BatchSize items at a time. + + + + + Find the module for obj and ensure that obj is reachable in that module by the given name. + + Throw PicklingError if any of the following are true: + - The module couldn't be determined. + - The module couldn't be loaded. + - The given name doesn't exist in the module. + - The given name is a different object than obj. + + Otherwise, return the name of the module. + + To determine which module obj lives in, obj.__module__ is used if available. The + module named by obj.__module__ is loaded if needed. If obj has no __module__ + attribute, then each loaded module is searched. If a loaded module has an + attribute with the given name, and that attribute is the same object as obj, + then that module is used. + + + + + Interpret everything from markIndex to the top of the stack as a sequence + of key, value, key, value, etc. Set dict[key] = value for each. Pop + everything from markIndex up when done. + + + + + Used to check the type to see if we can do a comparison. Returns true if we can + or false if we should return NotImplemented. May throw if the type's really wrong. + + + + + Helper function for doing the comparisons. time has no __cmp__ method + + + + + Base class used for iterator wrappers. + + + + + Returns the dialects from the code context. + + + + + + + Populates the given directory w/ the locale information from the given + CultureInfo. + + + + + Error function on real values + + + + + Complementary error function on real values: erfc(x) = 1 - erf(x) + + + + + Gamma function on real values + + + + + Natural log of absolute value of Gamma function + + + + + Checks for the specific permissions, provided by the mode parameter, are available for the provided path. Permissions can be: + + F_OK: Check to see if the file exists + R_OK | W_OK | X_OK: Check for the specific permissions. Only W_OK is respected. + + + + + single instance of environment dictionary is shared between multiple runtimes because the environment + is shared by multiple runtimes. + + + + + lstat(path) -> stat result + Like stat(path), but do not follow symbolic links. + + + + + spawns a new process. + + If mode is nt.P_WAIT then then the call blocks until the process exits and the return value + is the exit code. + + Otherwise the call returns a handle to the process. The caller must then call nt.waitpid(pid, options) + to free the handle and get the exit code of the process. Failure to call nt.waitpid will result + in a handle leak. + + + + + spawns a new process. + + If mode is nt.P_WAIT then then the call blocks until the process exits and the return value + is the exit code. + + Otherwise the call returns a handle to the process. The caller must then call nt.waitpid(pid, options) + to free the handle and get the exit code of the process. Failure to call nt.waitpid will result + in a handle leak. + + + + + spawns a new process. + + If mode is nt.P_WAIT then then the call blocks until the process exits and the return value + is the exit code. + + Otherwise the call returns a handle to the process. The caller must then call nt.waitpid(pid, options) + to free the handle and get the exit code of the process. Failure to call nt.waitpid will result + in a handle leak. + + + + + spawns a new process. + + If mode is nt.P_WAIT then then the call blocks until the process exits and the return value + is the exit code. + + Otherwise the call returns a handle to the process. The caller must then call nt.waitpid(pid, options) + to free the handle and get the exit code of the process. Failure to call nt.waitpid will result + in a handle leak. + + + + + Copy elements from a Python mapping of dict environment variables to a StringDictionary. + + + + + Convert a sequence of args to a string suitable for using to spawn a process. + + + + + Python regular expression module. + + + + + Preparses a regular expression text returning a ParsedRegex class + that can be used for further regular expressions. + + + + + Compiled reg-ex pattern + + + + + Process a sequence of objects that are compatible with ObjectToSocket(). Return two + things as out params: an in-order List of sockets that correspond to the original + objects in the passed-in sequence, and a mapping of these socket objects to their + original objects. + + The socketToOriginal mapping is generated because the CPython select module supports + passing to select either file descriptor numbers or an object with a fileno() method. + We try to be faithful to what was originally requested when we return. + + + + + Return the System.Net.Sockets.Socket object that corresponds to the passed-in + object. obj can be a System.Net.Sockets.Socket, a PythonSocket.SocketObj, a + long integer (representing a socket handle), or a Python object with a fileno() + method (whose result is used to look up an existing PythonSocket.SocketObj, + which is in turn converted to a Socket. + + + + + Convert an object to a 32-bit integer. This adds two features to Converter.ToInt32: + 1. Sign is ignored. For example, 0xffff0000 converts to 4294901760, where Convert.ToInt32 + would throw because 0xffff0000 is less than zero. + 2. Overflow exceptions are thrown. Converter.ToInt32 throws TypeError if x is + an integer, but is bigger than 32 bits. Instead, we throw OverflowException. + + + + + Convert an object to a 16-bit integer. This adds two features to Converter.ToInt16: + 1. Sign is ignored. For example, 0xff00 converts to 65280, where Convert.ToInt16 + would throw because signed 0xff00 is -256. + 2. Overflow exceptions are thrown. Converter.ToInt16 throws TypeError if x is + an integer, but is bigger than 16 bits. Instead, we throw OverflowException. + + + + + Return a standard socket exception (socket.error) whose message and error code come from a SocketException + This will eventually be enhanced to generate the correct error type (error, herror, gaierror) based on the error code. + + + + + Convert an IPv6 address byte array to a string in standard colon-hex notation. + The .NET IPAddress.ToString() method uses dotted-quad for the last 32 bits, + which differs from the normal Python implementation (but is allowed by the IETF); + this method returns the standard (no dotted-quad) colon-hex form. + + + + + Handle conversion of "" to INADDR_ANY and "<broadcast>" to INADDR_BROADCAST. + Otherwise returns host unchanged. + + + + + Return the IP address associated with host, with optional address family checking. + host may be either a name or an IP address (in string form). + + If family is non-null, a gaierror will be thrown if the host's address family is + not the same as the specified family. gaierror is also raised if the hostname cannot be + converted to an IP address (e.g. through a name lookup failure). + + + + + Return the IP address associated with host, with optional address family checking. + host may be either a name or an IP address (in string form). + + If family is non-null, a gaierror will be thrown if the host's address family is + not the same as the specified family. gaierror is also raised if the hostname cannot be + converted to an IP address (e.g. through a name lookup failure). + + + + + Return fqdn, but with its domain removed if it's on the same domain as the local machine. + + + + + Convert a (host, port) tuple [IPv4] (host, port, flowinfo, scopeid) tuple [IPv6] + to its corresponding IPEndPoint. + + Throws gaierror if host is not a valid address. + Throws ArgumentTypeException if any of the following are true: + - address does not have exactly two elements + - address[0] is not a string + - address[1] is not an int + + + + + Convert an IPEndPoint to its corresponding (host, port) [IPv4] or (host, port, flowinfo, scopeid) [IPv6] tuple. + Throws SocketException if the address family is other than IPv4 or IPv6. + + + + + handleToSocket allows us to translate from Python's idea of a socket resource (file + descriptor numbers) to .NET's idea of a socket resource (System.Net.Socket objects). + In particular, this allows the select module to convert file numbers (as returned by + fileno()) and convert them to Socket objects so that it can do something useful with them. + + + + + Return the internal System.Net.Sockets.Socket socket object associated with the given + handle (as returned by GetHandle()), or null if no corresponding socket exists. This is + primarily intended to be used by other modules (such as select) that implement + networking primitives. User code should not normally need to call this function. + + + + + Create a Python socket object from an existing .NET socket object + (like one returned from Socket.Accept()) + + + + + Perform initialization common to all constructors + + + + + Wrapper class for emitting locals/variables during marshalling code gen. + + + + + A wrapper around allocated memory to ensure it gets released and isn't accessed + when it could be finalized. + + + + + Creates a new MemoryHolder and allocates a buffer of the specified size. + + + + + Creates a new MemoryHolder at the specified address which is not tracked + by us and we will never free. + + + + + Creates a new MemoryHolder at the specified address which will keep alive the + parent memory holder. + + + + + Used to track the lifetime of objects when one memory region depends upon + another memory region. For example if you have an array of objects that + each have an element which has it's own lifetime the array needs to keep + the individual elements alive. + + The keys used here match CPython's keys as tested by CPython's test_ctypes. + Typically they are a string which is the array index, "ffffffff" when + from_buffer is used, or when it's a simple type there's just a string + instead of the full dictionary - we store that under the key "str". + + + + + Copies the data in data into this MemoryHolder. + + + + + Copies memory from one location to another keeping the associated memory holders alive during the + operation. + + + + + Gets the address of the held memory. The caller should ensure the MemoryHolder + is always alive as long as the address will continue to be accessed. + + + + + Gets a list of objects which need to be kept alive for this MemoryHolder to be + remain valid. + + + + + Native functions used for exposing ctypes functionality. + + + + + Allocates memory that's zero-filled + + + + + Helper function for implementing memset. Could be more efficient if we + could P/Invoke or call some otherwise native code to do this. + + + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + Provides support for interop with native code from Python code. + + + + + Implementation of our cast function. data is marshalled as a void* + so it ends up as an address. obj and type are marshalled as an object + so we need to unmarshal them. + + + + + Returns a new type which represents a pointer given the existing type. + + + + + Converts an address acquired from PyObj_FromPtr or that has been + marshaled as type 'O' back into an object. + + + + + Converts an object into an opaque address which can be handed out to + managed code. + + + + + Decreases the ref count on an object which has been increased with + Py_INCREF. + + + + + Increases the ref count on an object ensuring that it will not be collected. + + + + + returns address of C instance internal buffer. + + It is the callers responsibility to ensure that the provided instance will + stay alive if memory in the resulting address is to be used later. + + + + + Gets the required alignment of the given type. + + + + + Gets the required alignment of an object. + + + + + Returns a pointer instance for the given CData + + + + + Given a specific size returns a .NET type of the equivalent size that + we can use when marshalling these values across calls. + + + + + Shared helper between struct and union for getting field info and validating it. + + + + + Verifies that the provided bit field settings are valid for this type. + + + + + Shared helper to get the _fields_ list for struct/union and validate it. + + + + + Helper function for translating from memset to NT's FillMemory API. + + + + + Helper function for translating from memset to NT's FillMemory API. + + + + + Emits the marshalling code to create a CData object for reverse marshalling. + + + + + Gets a function which casts the specified memory. Because this is used only + w/ Python API we use a delegate as the return type instead of an actual address. + + + + + Gets the ModuleBuilder used to generate our unsafe call stubs into. + + + + + The enum used for tracking the various ctypes primitive types. + + + + 'c' + + + 'b' + + + 'B' + + + 'h' + + + 'H' + + + 'i' + + + 'I' + + + 'l' + + + 'L' + + + 'f' + + + 'd', 'g' + + + 'q' + + + 'Q' + + + 'O' + + + 'P' + + + 'z' + + + 'Z' + + + 'u' + + + '?' + + + 'v' + + + 'X' + + + + Base class for all ctypes interop types. + + + + + The meta class for ctypes array instances. + + + + + Common functionality that all of the meta classes provide which is part of + our implementation. This is used to implement the serialization/deserialization + of values into/out of memory, emit the marshalling logic for call stubs, and + provide common information (size/alignment) for the types. + + + + + Deserialized the value of this type from the given address at the given + offset. Any new objects which are created will keep the provided + MemoryHolder alive. + + raw determines if the cdata is returned or if the primitive value is + returned. This is only applicable for subtypes of simple cdata types. + + + + + Serializes the provided value into the specified address at the given + offset. + + + + + Gets the .NET type which is used when calling or returning the value + from native code. + + + + + Gets the .NET type which the native type is converted into when going to Python + code. This is usually int, BigInt, double, object, or a CData type. + + + + + Emits marshalling of an object from Python to native code. This produces the + native type from the Python type. + + + + + Emits marshalling from native code to Python code This produces the python type + from the native type. This is used for return values and parameters + to Python callable objects that are passed back out to native code. + + + + + Gets the native size of the type + + + + + Gets the required alignment for the type + + + + + Returns a string which describes the type. Used for _buffer_info implementation which + only exists for testing purposes. + + + + + Converts an object into a function call parameter. + + + + + Creates a new CFuncPtr object from a tuple. The 1st element of the + tuple is the ordinal or function name. The second is an object with + a _handle property. The _handle property is the handle of the module + from which the function will be loaded. + + + + + Creates a new CFuncPtr which calls a COM method. + + + + + Creates a new CFuncPtr with the specfied address. + + + + + Creates a new CFuncPtr with the specfied address. + + + + + we need to keep alive any methods which have arguments for the duration of the + call. Otherwise they could be collected on the finalizer thread before we come back. + + + + + Creates a method for calling with the specified signature. The returned method has a signature + of the form: + + (IntPtr funcAddress, arg0, arg1, ..., object[] constantPool) + + where IntPtr is the address of the function to be called. The arguments types are based upon + the types that the ArgumentMarshaller requires. + + + + + Base class for marshalling arguments from the user provided value to the + call stub. This class provides the logic for creating the call stub and + calling it. + + + + + Emits the IL to get the argument for the call stub generated into + a dynamic method. + + + + + Gets an expression which keeps alive the argument for the duration of the call. + + Returns null if a keep alive is not necessary. + + + + + Gets the expression used to provide the argument. This is the expression + from an incoming DynamicMetaObject. + + + + + Provides marshalling of primitive values when the function type + has no type information or when the user has provided us with + an explicit cdata instance. + + + + + Provides marshalling for when the function type provide argument information. + + + + + Provides marshalling for when the user provides a native argument object + (usually gotten by byref or pointer) and the function type has no type information. + + + + + The meta class for ctypes function pointer instances. + + + + + Converts an object into a function call parameter. + + + + + Fields are created when a Structure is defined and provide + introspection of the structure. + + + + + Called for fields which have been limited to a range of bits. Given the + value for the full type this extracts the individual bits. + + + + + Called for fields which have been limited to a range of bits. Sets the + specified value into the bits for the field. + + + + + The meta class for ctypes pointers. + + + + + Converts an object into a function call parameter. + + + + + Access an instance at the specified address + + + + + The meta class for ctypes simple data types. These include primitives like ints, + floats, etc... char/wchar pointers, and untyped pointers. + + + + + Converts an object into a function call parameter. + + + + + Helper function for reading char/wchar's. This is used for reading from + arrays and pointers to avoid creating lots of 1-char strings. + + + + + Meta class for structures. Validates _fields_ on creation, provides factory + methods for creating instances from addresses and translating to parameters. + + + + + Converts an object into a function call parameter. + + Structures just return themselves. + + + + + If our size/alignment hasn't been initialized then grabs the size/alignment + from all of our base classes. If later new _fields_ are added we'll be + initialized and these values will be replaced. + + + + + Base class for data structures. Subclasses can define _fields_ which + specifies the in memory layout of the values. Instances can then + be created with the initial values provided as the array. The values + can then be accessed from the instance by field name. The value can also + be passed to a foreign C API and the type can be used in other structures. + + class MyStructure(Structure): + _fields_ = [('a', c_int), ('b', c_int)] + + MyStructure(1, 2).a + MyStructure() + + class MyOtherStructure(Structure): + _fields_ = [('c', MyStructure), ('b', c_int)] + + MyOtherStructure((1, 2), 3) + MyOtherStructure(MyStructure(1, 2), 3) + + + + + The meta class for ctypes unions. + + + + + Converts an object into a function call parameter. + + + + + Enum which specifies the format type for a compiled struct + + + + + Struct used to store the format and the number of times it should be repeated. + + + + + Stops execution of Python or other .NET code on the main thread. If the thread is + blocked in native code the thread will be interrupted after it returns back to Python + or other .NET code. + + + + + Provides a dictionary storage implementation whose storage is local to + the thread. + + + + + Represents the date components that we found while parsing the date. Used for zeroing out values + which have different defaults from CPython. Currently we only know that we need to do this for + the year. + + + + + Samples on how to subtype built-in types from C# + + + + + an int variable for demonstration purposes + + + + + an int variable for demonstration purposes + + + + + Returns a new callable object with the provided initial set of arguments + bound to it. Calling the new function then appends to the additional + user provided arguments. + + + + + Creates a new partial object with the provided positional arguments. + + + + + Creates a new partial object with the provided positional and keyword arguments. + + + + + Calls func with the previously provided arguments and more positional arguments. + + + + + Calls func with the previously provided arguments and more positional arguments and keyword arguments. + + + + + Operator method to set arbitrary members on the partial object. + + + + + Operator method to get additional arbitrary members defined on the partial object. + + + + + Operator method to delete arbitrary members defined in the partial object. + + + + + Gets the function which will be called + + + + + Gets the initially provided positional arguments. + + + + + Gets the initially provided keyword arguments or None. + + + + + Gets or sets the dictionary used for storing extra attributes on the partial object. + + + + + BER encoding of an integer value is the number of bytes + required to represent the integer followed by the bytes + + + + + Duplicates a subprocess handle which was created for piping. + + This is only called when we're duplicating the handle to make it inheritable to the child process. In CPython + the parent handle is always reliably garbage collected. Because we know this handle is not going to be + used we close the handle being duplicated. + + + + + Special hash function because IStructuralEquatable.GetHashCode is not allowed to throw. + + + + + Special equals because none of the special cases in Ops.Equals + are applicable here, and the reference equality check breaks some tests. + + + + + gets the object or throws a reference exception + + + + + Special equality function because IStructuralEquatable.Equals is not allowed to throw. + + + + + gets the object or throws a reference exception + + + + + Special equality function because IStructuralEquatable.Equals is not allowed to throw. + + + + + Returns the underlying .NET RegistryKey + + + +
+
diff --git a/packages/IronPython.2.7.4/lib/Net45/IronPython.SQLite.dll b/packages/IronPython.2.7.4/lib/Net45/IronPython.SQLite.dll new file mode 100644 index 0000000000..d7ed1581b3 Binary files /dev/null and b/packages/IronPython.2.7.4/lib/Net45/IronPython.SQLite.dll differ diff --git a/packages/IronPython.2.7.4/lib/Net45/IronPython.SQLite.xml b/packages/IronPython.2.7.4/lib/Net45/IronPython.SQLite.xml new file mode 100644 index 0000000000..a58a149621 --- /dev/null +++ b/packages/IronPython.2.7.4/lib/Net45/IronPython.SQLite.xml @@ -0,0 +1,34 @@ + + + + IronPython.SQLite + + + + * The rest are extensions, not normally found in printf() */ + + + * beginning-of-error-codes */ + + + * previously SQLITE_CONFIG_CHUNKALLOC 12 which is now unused. */ + + + * x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE xF */ + + + + Basic locking strategy for Console/Winform applications + + + + + Locking strategy for Medium Trust. It uses the same trick used in the native code for WIN_CE + which doesn't support LockFileEx as well. + + + + * The methods above are in version 1 of the sqlite_module object. Those + + + diff --git a/packages/IronPython.2.7.4/lib/Net45/IronPython.Wpf.dll b/packages/IronPython.2.7.4/lib/Net45/IronPython.Wpf.dll new file mode 100644 index 0000000000..07a090e336 Binary files /dev/null and b/packages/IronPython.2.7.4/lib/Net45/IronPython.Wpf.dll differ diff --git a/packages/IronPython.2.7.4/lib/Net45/IronPython.Wpf.xml b/packages/IronPython.2.7.4/lib/Net45/IronPython.Wpf.xml new file mode 100644 index 0000000000..660557fde3 --- /dev/null +++ b/packages/IronPython.2.7.4/lib/Net45/IronPython.Wpf.xml @@ -0,0 +1,53 @@ + + + + IronPython.Wpf + + + + + Provides helpers for interacting with Windows Presentation Foundation applications. + + + + + Loads XAML from the specified XmlReader and returns the deserialized object. Any event handlers + are bound to methods defined in the provided module. Any named objects are assigned to the object. + + The provided object is expected to be the same type as the root of the XAML element. + + + + + Loads XAML from the specified XmlReader and returns the deserialized object. Any event handlers + are bound to methods defined in the provided module. Any named objects are assigned to the object. + + The provided object is expected to be the same type as the root of the XAML element. + + + + + Loads XAML from the specified XmlReader and returns the deserialized object. Any event handlers + are bound to methods defined in the provided module. Any named objects are assigned to the object. + + The provided object is expected to be the same type as the root of the XAML element. + + + + + Loads XAML from the specified XmlReader and returns the deserialized object. Any event handlers + are bound to methods defined in the provided module. Any named objects are assigned to the object. + + The provided object is expected to be the same type as the root of the XAML element. + + + + + Loads XAML from the specified XmlReader and returns the deserialized object. Any event handlers + are bound to methods defined in the provided module. Any named objects are assigned to the object. + + The provided object is expected to be the same type as the root of the XAML element. + + + + diff --git a/packages/IronPython.2.7.4/lib/Net45/IronPython.dll b/packages/IronPython.2.7.4/lib/Net45/IronPython.dll new file mode 100644 index 0000000000..44946b9d9f Binary files /dev/null and b/packages/IronPython.2.7.4/lib/Net45/IronPython.dll differ diff --git a/packages/IronPython.2.7.4/lib/Net45/IronPython.xml b/packages/IronPython.2.7.4/lib/Net45/IronPython.xml new file mode 100644 index 0000000000..c22da1cbbf --- /dev/null +++ b/packages/IronPython.2.7.4/lib/Net45/IronPython.xml @@ -0,0 +1,7569 @@ + + + + IronPython + + + + + Creates a method frame for tracking purposes and enforces recursion + + + + + Removes the frames from generated code for when we're compiling the tracing delegate + which will track the frames it's self. + + + + + Returns true if the node can throw, false otherwise. Used to determine + whether or not we need to update the current dynamic stack info. + + + + + A temporary variable to track if the current line number has been emitted via the fault update block. + + For example consider: + + try: + raise Exception() + except Exception, e: + # do something here + raise + + At "do something here" we need to have already emitted the line number, when we re-raise we shouldn't add it + again. If we handled the exception then we should have set the bool back to false. + + We also sometimes directly check _lineNoUpdated to avoid creating this unless we have nested exceptions. + + + + + A temporary variable to track the current line number + + + + + Fake ScopeStatement for FunctionCode's to hold on to after we have deserialized pre-compiled code. + + + + + Gets or creates the FunctionCode object for this FunctionDefinition. + + + + + Gets the expression for updating the dynamic stack trace at runtime when an + exception is thrown. + + + + + Gets the expression for the actual updating of the line number for stack traces to be available + + + + + Wraps the body of a statement which should result in a frame being available during + exception handling. This ensures the line number is updated as the stack is unwound. + + + + + The variable used to hold out parents closure tuple in our local scope. + + + + + Gets the expression associated with the local CodeContext. If the function + doesn't have a local CodeContext then this is the global context. + + + + + True if this scope accesses a variable from an outer scope. + + + + + True if an inner scope is accessing a variable defined in this scope. + + + + + True if we are forcing the creation of a dictionary for storing locals. + + This occurs for calls to locals(), dir(), vars(), unqualified exec, and + from ... import *. + + + + + True if variables can be set in a late bound fashion that we don't + know about at code gen time - for example via from foo import *. + + This is tracked independently of the ContainsUnqualifiedExec/NeedsLocalsDictionary + + + + + Variables that are bound in an outer scope - but not a global scope + + + + + Variables that are bound to the global scope + + + + + Variables that are referred to from a nested scope and need to be + promoted to cells. + + + + + Provides a place holder for the expression which represents + a FunctionCode. For functions/classes this gets updated after + the AST has been generated because the FunctionCode needs to + know about the tree which gets generated. For modules we + immediately have the value because it always comes in as a parameter. + + + + + Reducible node so that re-writing for profiling does not occur until + after the script code has been completed and is ready to be compiled. + + Without this extra node profiling would force reduction of the node + and we wouldn't have setup our constant access correctly yet. + + + + + A global allocator that puts all of the globals into an array access. The array is an + array of PythonGlobal objects. We then just close over the array for any inner functions. + + Once compiled a RuntimeScriptCode is produced which is closed over the entire execution + environment. + + + + + Specifies the compilation mode which will be used during the AST transformation + + + + + Compilation will proceed in a manner in which the resulting AST can be serialized to disk. + + + + + Compilation will use a type and declare static fields for globals. The resulting type + is uncollectible and therefore extended use of this will cause memory leaks. + + + + + Compilation will use an array for globals. The resulting code will be fully collectible + and once all references are released will be collected. + + + + + Compilation will force all global accesses to do a full lookup. This will also happen for + any unbound local references. This is the slowest form of code generation and is only + used for exec/eval code where we can run against an arbitrary dictionary. + + + + + Implements globals which are backed by a static type, followed by an array if the static types' slots become full. The global + variables are stored in static fields on a type for fast access. The type also includes fields for constants and call sites + so they can be accessed much fasetr. + + We don't generate any code into the type though - DynamicMethod's are much faster for code gen then normal ref emit. + + + Implements globals which are backed by a static type, followed by an array if the static types' slots become full. The global + variables are stored in static fields on a type for fast access. The type also includes fields for constants and call sites + so they can be accessed much fasetr. + + We don't generate any code into the type though - DynamicMethod's are much faster for code gen then normal ref emit. + + + + Ensures the underlying array is long enough to accomodate the given index + The context storage type corresponding to the given index + + + Ensures the underlying array is long enough to accomodate the given index + The constant storage type corresponding to the given index + + + Ensures the underlying array is long enough to accomodate the given index + The global storage type corresponding to the given index + + + Ensures the underlying array is long enough to accomodate the given index + The site storage type corresponding to the given index + + + + Not used. + + + + + Not used. + + + + + PythonWalker class - The Python AST Walker (default result is true) + + + + + Not an actual node. We don't create this, but it's here for compatibility. + + + + + Interface used to mark objects which contain a dictionary of custom attributes that shadow + their existing attributes in a dynamic fashion. + + + + + Ensures that a non-null IDictionary instance is created for CustomAttributes and + returns it. + + + + + Meta-object which allows IPythonExpandable objects to behave like Python objects in their + ability to dynamically add and remove new or existing custom attributes, generally shadowing + existing built-in members. + + Getting: Member accesses first consult the object's CustomAttributes dictionary, then fall + through to the underlying object. + + Setting: Values can be bound to any member name, shadowing any existing attributes except + public non-PythonHidden fields and properties, which will bypass the dictionary. Thus, + it is possible for SetMember to fail, for example if the property is read-only or of + the wrong type. + + Deleting: Any member represented in the dictionary can be deleted, re-exposing the + underlying member if it exists. Any other deletions will fail. + + + + + Provides a way for the binder to provide a custom error message when lookup fails. Just + doing this for the time being until we get a more robust error return mechanism. + + + + + Provides a way for the binder to provide a custom error message when lookup fails. Just + doing this for the time being until we get a more robust error return mechanism. + + + + + Gets the PythonBinder associated with tihs CodeContext + + + + + Performs .NET member resolution. This looks within the given type and also + includes any extension members. Base classes and their extension members are + not searched. + + + + + Performs .NET member resolution. This looks within the given type and also + includes any extension members. Base classes and their extension members are + not searched. + + This version allows PythonType's for protected member resolution. It shouldn't + be called externally for other purposes. + + + + + Performs .NET member resolution. This looks the type and any base types + for members. It also searches for extension members in the type and any base types. + + + + + Gets the member names which are defined in this type and any extension members. + + This search does not include members in any subtypes or their extension members. + + + + + Gets the member names which are defined in the type and any subtypes. + + This search includes members in the type and any subtypes as well as extension + types of the type and its subtypes. + + + + + Creates the initial table of extension types. These are standard extension that we apply + to well known .NET types to make working with them better. Being added to this table does + not make a type a Python type though so that it's members are generally accessible w/o an + import clr and their type is not re-named. + + + + + Creates a table of standard .NET types which are also standard Python types. These types have a standard + set of extension types which are shared between all runtimes. + + + + + Event handler for when our domain manager has an assembly loaded by the user hosting the script + runtime. Here we can gather any information regarding extension methods. + + Currently DLR-style extension methods become immediately available w/o an explicit import step. + + + + + Provides a cache from Type/name -> PythonTypeSlot and also allows access to + all members (and remembering whether all members are cached). + + + + + Writes to a cache the result of a type lookup. Null values are allowed for the slots and they indicate that + the value does not exist. + + + + + Looks up a cached type slot for the specified member and type. This may return true and return a null slot - that indicates + that a cached result for a member which doesn't exist has been stored. Otherwise it returns true if a slot is found or + false if it is not. + + + + + Looks up a cached member group for the specified member and type. This may return true and return a null group - that indicates + that a cached result for a member which doesn't exist has been stored. Otherwise it returns true if a group is found or + false if it is not. + + + + + Checks to see if all members have been populated for the provided type. + + + + + Populates the type with all the provided members and marks the type + as being fully cached. + + The dictionary is used for the internal storage and should not be modified after + providing it to the cache. + + + + + Returns an enumerable object which provides access to all the members of the provided type. + + The caller must check that the type is fully cached and populate the cache if it isn't before + calling this method. + + + + + Implements a built-in module which is instanced per PythonContext. + + Implementers can subclass this type and then have a module which has efficient access + to internal state (this doesn't need to go through PythonContext.GetModuleState). These + modules can also declare module level globals which they'd like to provide efficient + access to by overloading GetGlobalVariableNames. When Initialize is called these + globals are provided and can be cached in the instance for fast global access. + + Just like normal static modules these modules are registered with the PythonModuleAttribute. + + + + + Initializes the module for it's first usage. By default this calls PerformModuleReload with the + the dictionary. + + The CodeContext for the module. + A list of globals which have optimize access. Contains at least all of the global variables reutrned by GetGlobalVariableNames. + + + + Gets a list of variable names which should have optimized storage (instances of PythonGlobal objects). + The module receives the global objects during the Initialize call and can hold onto them for + direct access to global members. + + + + + Called when the user attempts to reload() on your module and by the base class Initialize method. + + This provides an opportunity to allocate any per-module data which is not simply function definitions. + + A common usage here is to create exception objects which are allocated by the module using PythonExceptions.CreateSubType. + + + + + Provides access to the PythonContext which this module was created for. + + + + + Provides access to the CodeContext for the module. Returns null before Initialize() is called. + + + + + Copy on write constant dictionary storage used for dictionaries created with constant items. + + + + + Abstract base class for all PythonDictionary storage. + + Defined as a class instead of an interface for performance reasons. Also not + using IDictionary* for keeping a simple interface. + + Full locking is defined as being on the DictionaryStorage object it's self, + not an internal member. This enables subclasses to provide their own locking + aruond large operations and call lock free functions. + + + + + Adds items from this dictionary into the other dictionary + + + + + Provides fast access to the __path__ attribute if the dictionary storage supports caching it. + + + + + Provides fast access to the __package__ attribute if the dictionary storage supports caching it. + + + + + Provides fast access to the __builtins__ attribute if the dictionary storage supports caching it. + + + + + Provides fast access to the __name__ attribute if the dictionary storage supports caching it. + + + + + Provides fast access to the __import__ attribute if the dictionary storage supports caching it. + + + + + Provides more specific type information for Python dictionaries which are not strongly typed. + + This attribute can be applied to fields, parameters, proeprties, and return values. It can be + inspected to get type information about the types of the keys and values of the expected + dictionary or the returned dictionary. + + + + + Adapts an IDictionary[object, object] for use as a PythonDictionary used for + our debug frames. Also hides the special locals which start with $. + + + + + An interface that is implemented on DynamicMetaObjects. + + This allows objects to opt-into custom conversions when calling + COM APIs. The IronPython binders all call this interface before + doing any COM binding. + + + + + Captures and flows the state of executing code from the generated + Python code into the IronPython runtime. + + + + + Creates a new CodeContext which is backed by the specified Python dictionary. + + + + + Attempts to lookup the provided name in this scope or any outer scope. + + + + + Looks up a global variable. If the variable is not defined in the + global scope then built-ins is consulted. + + + + + Attempts to lookup the variable in the local scope. + + + + + Removes a variable from the local scope. + + + + + Sets a variable in the local scope. + + + + + Gets a variable from the global scope. + + + + + Sets a variable in the global scope. + + + + + Removes a variable from the global scope. + + + + + Returns the dictionary associated with __builtins__ if one is + set or null if it's not available. If __builtins__ is a module + the module's dictionary is returned. + + + + + Gets the module state for top-level code. + + + + + Gets the DLR scope object that corresponds to the global variables of this context. + + + + + Gets the PythonContext which created the CodeContext. + + + + + Gets the dictionary for the global variables from the ModuleContext. + + + + + True if this global context should display CLR members on shared types (for example .ToString on int/bool/etc...) + + False if these attributes should be hidden. + + + + + Gets the dictionary used for storage of local variables. + + + + + Marks a type so that IronPython will not expose the IEnumerable interface out as + __iter__ + + + + + ArgBuilder which provides the CodeContext parameter to a method. + + + + + Small reducable node which just fetches the value from a ClosureCell + object. Like w/ global variables the compiler recognizes these on + sets and turns them into assignments on the python global object. + + + + + Creates the storage for the closure cell. If this is a closure over a parameter it + captures the initial incoming parameter value. + + + + + Reduces the closure cell to a read of the value stored in the cell. + + + + + Assigns a value to the closure cell. + + + + + Removes the current value from the closure cell. + + + + + Gets the expression which points at the closure cell. + + + + + The original expression for the incoming parameter if this is a parameter closure. Otherwise + the value is null. + + + + + Gets the PythonVariable for which this closure expression was created. + + + + + Tracking for variables lifted into closure objects. Used to store information in a function + about the outer variables it accesses. + + + + + When finding a yield return or yield break, this rewriter flattens out + containing blocks, scopes, and expressions with stack state. All + scopes encountered have their variables promoted to the generator's + closure, so they survive yields. + + + + + Spills the right side into a temp, and replaces it with its temp. + Returns the expression that initializes the temp. + + + + + Makes an assignment to this variable. Pushes the assignment as far + into the right side as possible, to allow jumps into it. + + + + + Accesses the property of a tuple. The node can be created first and then the tuple and index + type can be filled in before the tree is actually generated. This enables creation of these + nodes before the tuple type is actually known. + + + + + Represents code which can be lazily compiled. + + The code is created in an AST which provides the Expression of T and + whether or not the code should be interpreted. For non-pre compiled + scenarios the code will not be compiled until the 1st time it is run. + + For pre-compiled scenarios the code is IExpressionSerializable and will + turn into a normal pre-compiled method. + + + + + Marks a type so that IronPython will not expose types which have GetMemberNames + as having a __dir__ method. + + Also suppresses __dir__ on something which implements IDynamicMetaObjectProvider + but is not an IPythonObject. + + + + + Marks a type so that IronPython will not expose the ICollection interface out as + __len__. + + + + + Marks a type so that IronPython will not expose the IDisposable interface out as + __enter__ and __exit__ methods of a context manager. + + + + + Marks a type so that IronPython will not expose the IEnumerable interface out as + __contains__ + + + + + Singleton used for dictionaries which contain no items. + + + + + Represents the set of extension methods which are loaded into a module. + + This set is immutable (as far the external viewer is considered). When a + new extension method set is loaded into a module we create a new ExtensionMethodsSet object. + + Multiple modules which have the same set of extension methods use the same set. + + + + + Returns all of the extension methods with the given name. + + + + + Returns all of the extension methods which are applicable for the given type. + + + + + Tracks the extension types that are loaded for a given assembly. + + We can have either types, namespaces, or a full assembly added as a reference. + + When the user just adds types we just add them to the type hash set. + + When the user adds namespaces we add them to the namespaces hashset. On the + next lookup we'll lazily load the types from that namespace and put them in Types. + + When the user adds assemblies we set the value to the NotYetLoadedButFullAssembly + value. The next load request will load the types from that namespace and put them + in Types. When we do that we'll mark the assembly as FullyLoaded so we don't + have to go through that again if the user adds a namespace. + + + + + Return a copy of this tuple's data array. + + + + + ModuleDictionaryStorage for a built-in module which is bound to a specific instance. + + These modules don't need to use PythonContext.GetModuleState() for storage and therefore + can provide efficient access to internal variables. They can also cache PythonGlobal + objects and provide efficient access to module globals. + + To the end user these modules appear just like any other module. These modules are + implemented by subclassing the BuiltinPythonModule class. + + + + + Enables lazy initialization of module dictionaries. + + + + + Gets all of the extra names and values stored in the dictionary. + + + + + Attemps to sets a value in the extra keys. Returns true if the value is set, false if + the value is not an extra key. + + + + + Attempts to get a value from the extra keys. Returns true if the value is an extra + key and has a value. False if it is not an extra key or doesn't have a value. + + + + + Attempts to remove the key. Returns true if the key is removed, false + if the key was not removed, or null if the key is not an extra key. + + + + + A TypeSlot is an item that gets stored in a type's dictionary. Slots provide an + opportunity to customize access at runtime when a value is get or set from a dictionary. + + + + + Gets the value stored in the slot for the given instance binding it to an instance if one is provided and + the slot binds to instances. + + + + + Sets the value of the slot for the given instance. + + true if the value was set, false if it can't be set + + + + Deletes the value stored in the slot from the instance. + + true if the value was deleted, false if it can't be deleted + + + + Gets an expression which is used for accessing this slot. If the slot lookup fails the error expression + is used again. + + The default implementation just calls the TryGetValue method. Subtypes of PythonTypeSlot can override + this and provide a more optimal implementation. + + + + + True if generating code for gets can result in more optimal accesses. + + + + + True if TryGetValue will always succeed, false if it may fail. + + This is used to optimize away error generation code. + + + + + Defines the internal interface used for accessing weak references and adding finalizers + to user-defined types. + + + + + Gets the current WeakRefTracker for an object that can be used to + append additional weak references. + + + + + Attempts to set the WeakRefTracker for an object. Used on the first + addition of a weak ref tracker to an object. If the object doesn't + support adding weak references then it returns false. + + + + + Sets a WeakRefTracker on an object for the purposes of supporting finalization. + All user types (new-style and old-style) support finalization even if they don't + support weak-references, and therefore this function always succeeds. Note the + slot used to store the WeakRefTracker is still shared between SetWeakRef and + SetFinalizer if a type supports both. + + + + + + Provides a list of all the members of an instance. ie. all the keys in the + dictionary of the object. Note that it can contain objects that are not strings. + + Such keys can be added in IronPython using syntax like: + obj.__dict__[100] = someOtherObject + + This Python specific version also supports filtering based upon the show cls + flag by flowing in the code context. + + + + + Validates that the current self object is usable for this method. + + + + + Marks a class as being hidden from the Python hierarchy. This is applied to the base class + and then all derived types will not see the base class in their hierarchy and will not be + able to access members declaredo on the base class. + + + + + Provides more specific type information for Python lists which are not strongly typed. + + This attribute can be applied to fields, parameters, proeprties, and return values. It can be + inspected to get type information about the types of the values of the expected + list or the returned list. + + + + + Captures the globals and other state of module code. + + + + + Creates a new ModuleContext which is backed by the specified dictionary. + + + + + Creates a new ModuleContext for the specified module. + + + + + Initializes __builtins__ for the module scope. + + + + + Gets the dictionary used for the global variables in the module + + + + + Gets the language context which created this module. + + + + + Gets the DLR Scope object which is associated with the modules dictionary. + + + + + Gets the global CodeContext object which is used for execution of top-level code. + + + + + Gets the module object which this code is executing in. + + This module may or may not be published in sys.modules. For user defined + code typically the module gets published at the start of execution. But if + this ModuleContext is attached to a Scope, or if we've just created a new + module context for executing code it will not be in sys.modules. + + + + + Gets the features that code has been compiled with in the module. + + + + + Gets or sets whether code running in this context should display + CLR members (for example .ToString on objects). + + + + + Cached global value. Created and maintained on a per-language basis. Default + implementation returns a singleton which indicates caching is not occuring. + + + + + Creates a new ModuleGlobalCache with the specified value. + + + + + Event handler for when the value has changed. Language implementors should call this when + the cached value is invalidated. + + + + + True if the ModuleGlobalCache is participating in a caching strategy. + + + + + True if there is currently a value associated with this global variable. False if + it is currently unassigned. + + + + + Gets or sets the current cached value + + + + + Enable true division (1/2 == .5) + + + + + Indicates that .NET methods such as .ToString should be available on Python objects. + + + + + Indicates that the module should be generated in an optimal form which will result + in it being uncollectable. + + + + + Indicates when the module should be executed immedatiately upon creation. + + + + + Enable usage of the with statement + + + + + Enable absolute imports + + + + + Indiciates that __builtins__ should not be set in the module + + + + + Indiciates that when the module is initialized it should set __builtins__ to the __builtin__ module + instead of the __builtin__ dictionary. + + + + + Marks code as being created for exec, eval. Code generated this way will + be capable of running against different scopes and will do lookups at runtime + for free global variables. + + + + + Indiciates that the first line of code should be skipped. + + + + + Enable usage of print as a function for better compatibility with Python 3.0. + + + + + Forces the code to be interpreted rather than compiled + + + + + String Literals should be parsed as Unicode strings + + + + + Include comments in the parse tree + + + + + Generated code should support light exceptions + + + + + Manages the acquisition of profiling data for a single ScriptRuntime + + + + + Get the unique Profiler instance for this ScriptRuntime + + + + + Given a MethodBase, return an index into the array of perf data. Treat each + CLR method as unique. + + + + + Given the unique name of something we're profiling, return an index into the array of perf data. + + + + + Add a new profiler entry. Not all names are unique. + + + + + Gets the current summary of profile data + + + + + Resets the current summary of profile data back to zero + + + + + Adds profiling calls to a Python method. + Calculates both the time spent only in this method + + + + + Wraps a call to a MethodInfo with profiling capture for that MethodInfo + + + + + Encapsulates profiler data to return to clients + + + + + Marks that this built-in method should be treated as external by the profiler. + When placed on a call emitted into a Python method, all the time spent in this + call will still show up in its parent's inclusive time, but will not be + part of its exclusive time. + + + + + Gets the closure tuple from our parent context. + + + + + PythonWalkerNonRecursive class - The Python AST Walker (default result is false) + + + + + Pulls the closure tuple from our function/generator which is flowed into each function call. + + + + + Returns an expression which creates the function object. + + + + + Creates the LambdaExpression which is the actual function body. + + + + + Creates the LambdaExpression which implements the body of the function. + + The functions signature is either "object Function(PythonFunction, ...)" + where there is one object parameter for each user defined parameter or + object Function(PythonFunction, object[]) for functions which take more + than PythonCallTargets.MaxArgs arguments. + + + + + Determines delegate type for the Python function + + + + + Scope for the comprehension. Because scopes are usually statements and comprehensions are expressions + this doesn't actually show up in the AST hierarchy and instead hangs off the comprehension expression. + + + + + Provides globals for when we need to lookup into a dictionary for each global access. + + This is the slowest form of globals and is only used when we need to run against an + arbitrary dictionary given to us by a user. + + + + + Provides a wrapper around "dynamic" expressions which we've opened coded (for optimized code generation). + + This lets us recognize both normal Dynamic and our own Dynamic expressions and apply the combo binder on them. + + + + + A ScriptCode which can be saved to disk. We only create this when called via + the clr.CompileModules API. This ScriptCode does not support running. + + + + + Parameter base class + + + + + Position of the parameter: 0-based index + + + + + Parameter name + + + + + Top-level ast for all Python code. Typically represents a module but could also + be exec or eval code. + + + + + Creates a new PythonAst without a body. ParsingFinished should be called afterwards to set + the body. + + + + + Called when parsing is complete, the body is built, the line mapping and language features are known. + + This is used in conjunction with the constructor which does not take a body. It enables creating + the outer most PythonAst first so that nodes can always have a global parent. This lets an un-bound + tree to still provide it's line information immediately after parsing. When we set the location + of each node during construction we also set the global parent. When we name bind the global + parent gets replaced with the real parent ScopeStatement. + + a mapping of where each line begins + The body of code + The language features which were set during parsing. + + + + Binds an AST and makes it capable of being reduced and compiled. Before calling Bind an AST cannot successfully + be reduced. + + + + + Creates a variable at the global level. Called for known globals (e.g. __name__), + for variables explicitly declared global by the user, and names accessed + but not defined in the lexical scope. + + + + + Reduces the PythonAst to a LambdaExpression of type Type. + + + + + Returns a ScriptCode object for this PythonAst. The ScriptCode object + can then be used to execute the code against it's closed over scope or + to execute it against a different scope. + + + + + Rewrites the tree for performing lookups against globals instead of being bound + against the optimized scope. This is used if the user compiles optimied code and then + runs it against a different scope. + + + + + True division is enabled in this AST. + + + + + True if the with statement is enabled in this AST. + + + + + True if absolute imports are enabled + + + + + True if this is on-disk code which we don't really have an AST for. + + + + + Represents a reference to a name. A PythonReference is created for each name + referred to in a scope (global, class, or function). + + + + + True if the user provided a step parameter (either providing an explicit parameter + or providing an empty step parameter) false if only start and stop were provided. + + + + + The statements under the try-block. + + + + + Array of except (catch) blocks associated with this try. NULL if there are no except blocks. + + + + + The body of the optional Else block for this try. NULL if there is no Else block. + + + + + The body of the optional finally associated with this try. NULL if there is no finally block. + + + + + Transform multiple python except handlers for a try block into a single catch body. + + The variable for the exception in the catch block. + Null if there are no except handlers. Else the statement to go inside the catch handler + + + + Surrounds the body of an except block w/ the appropriate code for maintaining the traceback. + + + + + True iff there is a path in control flow graph on which the variable is used before initialized (assigned or deleted). + + + + + True iff the variable is referred to from the inner scope. + + + + + Local variable. + + Local variables can be referenced from nested lambdas + + + + + Parameter to a LambdaExpression + + Like locals, they can be referenced from nested lambdas + + + + + Global variable + + Should only appear in global (top level) lambda. + + + + + WithStatement is translated to the DLR AST equivalent to + the following Python code snippet (from with statement spec): + + mgr = (EXPR) + exit = mgr.__exit__ # Not calling it yet + value = mgr.__enter__() + exc = True + try: + VAR = value # Only if "as VAR" is present + BLOCK + except: + # The exceptional case is handled here + exc = False + if not exit(*sys.exc_info()): + raise + # The exception is swallowed if exit() returns true + finally: + # The normal and non-local-goto cases are handled here + if exc: + exit(None, None, None) + + + + + + A ScriptCode which has been loaded from an assembly which is saved on disk. + + + + + Creates a fake PythonAst object which is represenative of the on-disk script code. + + + + + Base class for all of our fast get delegates. This holds onto the + delegate and provides the Update function. + + + + + Updates the call site when the current rule is no longer applicable. + + + + + Base class for all of our fast set delegates. This holds onto the + delegate and provides the Update and Optimize functions. + + + + + Updates the call site when the current rule is no longer applicable. + + + + + Provides cached global variable for modules to enable optimized access to + module globals. Both the module global value and the cached value can be held + onto and the cached value can be invalidated by the providing LanguageContext. + + The cached value is provided by the LanguageContext.GetModuleCache API. + + + + + Small reducable node which just fetches the value from a PythonGlobal + object. The compiler recognizes these on sets and turns them into + assignments on the python global object. + + + + + Represents a script code which can be dynamically bound to execute against + arbitrary Scope objects. This is used for code when the user runs against + a particular scope as well as for exec and eval code as well. It is also + used when tracing is enabled. + + + + + Represents a script code which can be consumed at runtime as-is. This code has + no external dependencies and is closed over its scope. + + + + + Helper class for implementing the Python class. + + This is exposed as a service through PythonEngine and the helper class + uses this service to get the correct remoting semantics. + + + + + Returns an ObjectHandle to a delegate of type Action[Action] which calls the current + command dispatcher. + + + + + Marks that the return value of a function might include NotImplemented. + + This is added to an operator method to ensure that all necessary methods are called + if one cannot guarantee that it can perform the comparison. + + + + + Provides support for emitting warnings when built in methods are invoked at runtime. + + + + + Backwards compatible Convert for the old sites that need to flow CodeContext + + + + + Creates a new InvokeBinder which will call with positional splatting. + + The signature of the target site should be object(function), object[], retType + + + + + + + Creates a new InvokeBinder which will call with positional and keyword splatting. + + The signature of the target site should be object(function), object[], dictionary, retType + + + + + Fallback action for performing an invoke from Python. We translate the + CallSignature which supports splatting position and keyword args into + their expanded form. + + + + + Gets the PythonContext which the CallSiteBinder is associated with. + + + + + Fallback action for performing a new() on a foreign IDynamicMetaObjectProvider. used + when call falls back. + + + + + Python's Invoke is a non-standard action. Here we first try to bind through a Python + internal interface (IPythonInvokable) which supports CallSigantures. If that fails + and we have an IDO then we translate to the DLR protocol through a nested dynamic site - + this includes unsplatting any keyword / position arguments. Finally if it's just a plain + old .NET type we use the default binder which supports CallSignatures. + + + + + Interface used to mark objects as being invokable from Python. These objects support + calling with splatted positional and keyword arguments. + + + + + Provides binding logic which is implemented to follow various Python protocols. This includes + things such as calling __call__ to perform calls, calling __nonzero__/__len__ to convert to + bool, calling __add__/__radd__ to do addition, etc... + + This logic gets shared between both the IDynamicMetaObjectProvider implementation for Python objects as well + as the Python sites. This ensures the logic we follow for our builtin types and user defined + types is identical and properly conforming to the various protocols. + + + + + Gets a MetaObject which converts the provided object to a bool using __nonzero__ or __len__ + protocol methods. This code is shared between both our fallback for a site and our MetaObject + for user defined objects. + + + + + Used for conversions to bool + + + + + Creates a rule for the contains operator. This is exposed via "x in y" in + IronPython. It is implemented by calling the __contains__ method on x and + passing in y. + + If a type doesn't define __contains__ but does define __getitem__ then __getitem__ is + called repeatedly in order to see if the object is there. + + For normal .NET enumerables we'll walk the iterator and see if it's present. + + + + + Helper to handle a comparison operator call. Checks to see if the call can + return NotImplemented and allows the caller to modify the expression that + is ultimately returned (e.g. to turn __cmp__ into a bool after a comparison) + + + + + calls __coerce__ for old-style classes and performs the operation if the coercion is successful. + + + + + Makes the comparison rule which returns an int (-1, 0, 1). TODO: Better name? + + + + + Python has three protocols for slicing: + Simple Slicing x[i:j] + Extended slicing x[i,j,k,...] + Long Slice x[start:stop:step] + + The first maps to __*slice__ (get, set, and del). + This takes indexes - i, j - which specify the range of elements to be + returned. In the slice variants both i, j must be numeric data types. + The 2nd and 3rd are both __*item__. + This receives a single index which is either a Tuple or a Slice object (which + encapsulates the start, stop, and step values) + + This is in addition to a simple indexing x[y]. + + For simple slicing and long slicing Python generates Operators.*Slice. For + the extended slicing and simple indexing Python generates a Operators.*Item + action. + + Extended slicing maps to the normal .NET multi-parameter input. + + So our job here is to first determine if we're to call a __*slice__ method or + a __*item__ method. + + + + + Helper to convert all of the arguments to their known types. + + + + + Gets the arguments that need to be provided to __*item__ when we need to pass a slice object. + + + + + Helper to get the symbols for __*item__ and __*slice__ based upon if we're doing + a get/set/delete and the minimum number of arguments required for each of those. + + + + + Checks if a coercion check should be performed. We perform coercion under the following + situations: + 1. Old instances performing a binary operator (excluding rich comparisons) + 2. User-defined new instances calling __cmp__ but only if we wouldn't dispatch to a built-in __coerce__ on the parent type + + This matches the behavior of CPython. + + + + + + Produces an error message for the provided message and type names. The error message should contain + string formatting characters ({0}, {1}, etc...) for each of the type names. + + + + + Delegate for finishing the comparison. This takes in a condition and a return value and needs to update the ConditionalBuilder + with the appropriate resulting body. The condition may be null. + + + + + Base class for calling indexers. We have two subclasses that target built-in functions and user defined callable objects. + + The Callable objects get handed off to ItemBuilder's which then call them with the appropriate arguments. + + + + + Creates a new CallableObject. If BuiltinFunction is available we'll create a BuiltinCallable otherwise + we create a SlotCallable. + + + + + Gets the arguments in a form that should be used for extended slicing. + + Python defines that multiple tuple arguments received (x[1,2,3]) get + packed into a Tuple. For most .NET methods we just want to expand + this into the multiple index arguments. For slots and old-instances + we want to pass in the tuple + + + + + Adds the target of the call to the rule. + + + + + Subclass of Callable for a built-in function. This calls a .NET method performing + the appropriate bindings. + + + + + Callable to a user-defined callable object. This could be a Python function, + a class defining __call__, etc... + + + + + Base class for building a __*item__ or __*slice__ call. + + + + + Derived IndexBuilder for calling __*slice__ methods + + + + + Derived IndexBuilder for calling __*item__ methods. + + + + + Common helpers used by the various binding logic. + + + + + Tries to get the BuiltinFunction for the given name on the type of the provided MetaObject. + + Succeeds if the MetaObject is a BuiltinFunction or BuiltinMethodDescriptor. + + + + + Gets the best CallSignature from a MetaAction. + + The MetaAction should be either a Python InvokeBinder, or a DLR InvokeAction or + CreateAction. For Python we can use a full-fidelity + + + + + + + Transforms an invoke member into a Python GetMember/Invoke. The caller should + verify that the given attribute is not resolved against a normal .NET class + before calling this. If it is a normal .NET member then a fallback InvokeMember + is preferred. + + + + + Determines if the type associated with the first MetaObject is a subclass of the + type associated with the second MetaObject. + + + + + Adds a try/finally which enforces recursion limits around the target method. + + + + + Helper to do fallback for Invoke's so we can handle both StandardAction and Python's + InvokeBinder. + + + + + Converts arguments into a form which can be used for COM interop. + + The argument is only converted if we have an IronPython specific + conversion when calling COM methods. + + + + + Converts a single argument into a form which can be used for COM + interop. + + The argument is only converted if we have an IronPython specific + conversion when calling COM methods. + + + + + Builds up a series of conditionals when the False clause isn't yet known. We can + keep appending conditions and if true's. Each subsequent true branch becomes the + false branch of the previous condition and body. Finally a non-conditional terminating + branch must be added. + + + + + Adds a new conditional and body. The first call this becomes the top-level + conditional, subsequent calls will have it added as false statement of the + previous conditional. + + + + + Adds a new condition to the last added body / condition. + + + + + Adds the non-conditional terminating node. + + + + + Gets the resulting meta object for the full body. FinishCondition + must have been called. + + + + + Adds a variable which will be scoped at the level of the final expression. + + + + + Returns true if no conditions have been added + + + + + Returns true if a final, non-conditional, body has been added. + + + + + Creates a target which creates a new dynamic method which contains a single + dynamic site that invokes the callable object. + + TODO: This should be specialized for each callable object + + + + + Various helpers related to calling Python __*__ conversion methods + + + + + Helper for falling back - if we have a base object fallback to it first (which can + then fallback to the calling site), otherwise fallback to the calling site. + + + + + Helper for falling back - if we have a base object fallback to it first (which can + then fallback to the calling site), otherwise fallback to the calling site. + + + + + Checks to see if this type has __getattribute__ that overrides all other attribute lookup. + + This is more complex then it needs to be. The problem is that when we have a + mixed new-style/old-style class we have a weird __getattribute__ defined. When + we always dispatch through rules instead of PythonTypes it should be easy to remove + this. + + + + + Looks up the associated PythonTypeSlot from the object. Indicates if the result + came from a standard .NET type in which case we will fallback to the sites binder. + + + + + Helper for falling back - if we have a base object fallback to it first (which can + then fallback to the calling site), otherwise fallback to the calling site. + + + + + Helper for falling back - if we have a base object fallback to it first (which can + then fallback to the calling site), otherwise fallback to the calling site. + + + + + Provides the lookup logic for resolving a Python object. Subclasses + provide the actual logic for producing the binding result. Currently + there are two forms of the binding result: one is the DynamicMetaObject + form used for non-optimized bindings. The other is the Func of CallSite, + object, CodeContext, object form which is used for fast binding and + pre-compiled rules. + + + + + GetBinder which produces a DynamicMetaObject. This binder always + successfully produces a DynamicMetaObject which can perform the requested get. + + + + + Makes a rule which calls a user-defined __getattribute__ function and falls back to __getattr__ if that + raises an AttributeError. + + slot is the __getattribute__ method to be called. + + + + + Checks a range of the MRO to perform old-style class lookups if any old-style classes + are present. We will call this twice to produce a search before a slot and after + a slot. + + + + + Helper for falling back - if we have a base object fallback to it first (which can + then fallback to the calling site), otherwise fallback to the calling site. + + + + + Custom dynamic site kinds for simple sites that just take a fixed set of parameters. + + + + + Unary operator. + + Gets various documentation about the object returned as a string + + + + + Unary operator. + + Gets information about the type of parameters, returned as a string. + + + + + Unary operator. + + Checks whether the object is callable or not, returns true if it is. + + + + + Binary operator. + + Checks to see if the instance contains another object. Returns true or false. + + + + + Unary operator. + + Returns the number of items stored in the object. + + + + + Binary operator. + + Compares two instances returning an integer indicating the relationship between them. May + throw if the object types are uncomparable. + + + + + Binary operator. + + Returns both the dividend and quotioent of x / y. + + + + + Unary operator. + + Get the absolute value of the instance. + + + + + Unary operator. + + Gets the positive value of the instance. + + + + + Unary operator. + + Negates the instance and return the new value. + + + + + Unary operator. + + Returns the ones complement of the instance. + + + + + Unary operator. + + Boolean negation + + + + + Unary operator. + + Negation, returns object + + + + + Get enumerator for iteration binder. Returns a KeyValuePair<IEnumerator, IDisposable> + + The IEnumerator is used for iteration. The IDisposable is provided if the object was an + IEnumerable or IEnumerable<T> and is a disposable object. + + + + Operator for performing add + + + Operator for performing sub + + + Operator for performing pow + + + Operator for performing mul + + + Operator for performing floordiv + + + Operator for performing div + + + Operator for performing truediv + + + Operator for performing mod + + + Operator for performing lshift + + + Operator for performing rshift + + + Operator for performing and + + + Operator for performing or + + + Operator for performing xor + + + Operator for performing lt + + + Operator for performing gt + + + Operator for performing le + + + Operator for performing ge + + + Operator for performing eq + + + Operator for performing ne + + + Operator for performing lg + + + Operator for performing in-place add + + + Operator for performing in-place sub + + + Operator for performing in-place pow + + + Operator for performing in-place mul + + + Operator for performing in-place floordiv + + + Operator for performing in-place div + + + Operator for performing in-place truediv + + + Operator for performing in-place mod + + + Operator for performing in-place lshift + + + Operator for performing in-place rshift + + + Operator for performing in-place and + + + Operator for performing in-place or + + + Operator for performing in-place xor + + + Operator for performing reverse add + + + Operator for performing reverse sub + + + Operator for performing reverse pow + + + Operator for performing reverse mul + + + Operator for performing reverse floordiv + + + Operator for performing reverse div + + + Operator for performing reverse truediv + + + Operator for performing reverse mod + + + Operator for performing reverse lshift + + + Operator for performing reverse rshift + + + Operator for performing reverse and + + + Operator for performing reverse or + + + Operator for performing reverse xor + + + Operator for performing reverse divmod + + + + Provides an abstraction for calling something which might be a builtin function or + might be some arbitrary user defined slot. If the object is a builtin function the + call will go directly to the underlying .NET method. If the object is an arbitrary + callable object we will setup a nested dynamic site for performing the additional + dispatch. + + TODO: We could probably do a specific binding to the object if it's another IDyanmicObject. + + + + + Combines two methods, which came from two different binary types, selecting the method which has the best + set of conversions (the conversions which result in the least narrowing). + + + + + Tries to get a MethodBinder associated with the slot for the specified type. + + If a method is found the binder is set and true is returned. + If nothing is found binder is null and true is returned. + If something other than a method is found false is returned. + + TODO: Remove rop + + + + + bytearray(string, encoding[, errors]) -> bytearray + bytearray(iterable) -> bytearray + + Construct a mutable bytearray object from: + - an iterable yielding values in range(256), including: + + a list of integer values + + a bytes, bytearray, buffer, or array object + - a text string encoded using the specified encoding + + bytearray([int]) -> bytearray + + Construct a zero-ititialized bytearray of the specified length. + (default=0) + + + + + return true if self is a titlecased string and there is at least one + character in self; also, uppercase characters may only follow uncased + characters (e.g. whitespace) and lowercase characters only cased ones. + return false otherwise. + + + + + Return a string which is the concatenation of the strings + in the sequence seq. The separator between elements is the + string providing this method + + + + + return true if self is a titlecased string and there is at least one + character in self; also, uppercase characters may only follow uncased + characters (e.g. whitespace) and lowercase characters only cased ones. + return false otherwise. + + + + + Return a string which is the concatenation of the strings + in the sequence seq. The separator between elements is the + string providing this method + + + + + Returns a copy of the internal byte array. + + + System.Byte[] + + + + + This method returns the underlying byte array directly. + It should be used sparingly! + + + System.Byte[] + + + + + Marks a method as being a class method. The PythonType which was used to access + the method will then be passed as the first argument. + + + + + this class contains objecs and static methods used for + .NET/CLS interop with Python. + + + + + Gets the current ScriptDomainManager that IronPython is loaded into. The + ScriptDomainManager can then be used to work with the language portion of the + DLR hosting APIs. + + + + + Use(name) -> module + + Attempts to load the specified module searching all languages in the loaded ScriptRuntime. + + + + + Use(path, language) -> module + + Attempts to load the specified module belonging to a specific language loaded into the + current ScriptRuntime. + + + + + SetCommandDispatcher(commandDispatcher) + + Sets the current command dispatcher for the Python command line. + + The command dispatcher will be called with a delegate to be executed. The command dispatcher + should invoke the target delegate in the desired context. + + A common use for this is to enable running all REPL commands on the UI thread while the REPL + continues to run on a non-UI thread. + + + + + LoadTypeLibrary(rcw) -> type lib desc + + Gets an ITypeLib object from OLE Automation compatible RCW , + reads definitions of CoClass'es and Enum's from this library + and creates an object that allows to instantiate coclasses + and get actual values for the enums. + + + + + LoadTypeLibrary(guid) -> type lib desc + + Reads the latest registered type library for the corresponding GUID, + reads definitions of CoClass'es and Enum's from this library + and creates a IDynamicMetaObjectProvider that allows to instantiate coclasses + and get actual values for the enums. + + + + + AddReferenceToTypeLibrary(rcw) -> None + + Makes the type lib desc available for importing. See also LoadTypeLibrary. + + + + + AddReferenceToTypeLibrary(guid) -> None + + Makes the type lib desc available for importing. See also LoadTypeLibrary. + + + + + Gets the CLR Type object from a given Python type object. + + + + + Gets the Python type object from a given CLR Type object. + + + + + OBSOLETE: Gets the Python type object from a given CLR Type object. + + Use clr.GetPythonType instead. + + + + + accepts(*types) -> ArgChecker + + Decorator that returns a new callable object which will validate the arguments are of the specified types. + + + + + + + returns(type) -> ReturnChecker + + Returns a new callable object which will validate the return type is of the specified type. + + + + + returns the result of dir(o) as-if "import clr" has not been performed. + + + + + Returns the result of dir(o) as-if "import clr" has been performed. + + + + + Attempts to convert the provided object to the specified type. Conversions that + will be attempted include standard Python conversions as well as .NET implicit + and explicit conversions. + + If the conversion cannot be performed a TypeError will be raised. + + + + + Provides a helper for compiling a group of modules into a single assembly. The assembly can later be + reloaded using the clr.AddReference API. + + + + + clr.CompileSubclassTypes(assemblyName, *typeDescription) + + Provides a helper for creating an assembly which contains pre-generated .NET + base types for new-style types. + + This assembly can then be AddReferenced or put sys.prefix\DLLs and the cached + types will be used instead of generating the types at runtime. + + This function takes the name of the assembly to save to and then an arbitrary + number of parameters describing the types to be created. Each of those + parameter can either be a plain type or a sequence of base types. + + clr.CompileSubclassTypes(object) -> create a base type for object + clr.CompileSubclassTypes(object, str, System.Collections.ArrayList) -> create + base types for both object and ArrayList. + + clr.CompileSubclassTypes(object, (object, IComparable)) -> create base types for + object and an object which implements IComparable. + + + + + + clr.GetSubclassedTypes() -> tuple + + Returns a tuple of information about the types which have been subclassed. + + This tuple can be passed to clr.CompileSubclassTypes to cache these + types on disk such as: + + clr.CompileSubclassTypes('assembly', *clr.GetSubclassedTypes()) + + + + + Goes through the list of files identifying the relationship between packages + and subpackages. Returns a dictionary with all of the package filenames (minus __init__.py) + mapping to their full name. For example given a structure: + + C:\ + someDir\ + package\ + __init__.py + a.py + b\ + __init.py + c.py + + Returns: + {r'C:\somedir\package' : 'package', r'C:\somedir\package\b', 'package.b'} + + This can then be used for calculating the full module name of individual files + and packages. For example a's full name is "package.a" and c's full name is + "package.b.c". + + + + + Returns a list of profile data. The values are tuples of Profiler.Data objects + + All times are expressed in the same unit of measure as DateTime.Ticks + + + + + Resets all profiler counters back to zero + + + + + Enable or disable profiling for the current ScriptEngine. This will only affect code + that is compiled after the setting is changed; previously-compiled code will retain + whatever setting was active when the code was originally compiled. + + The easiest way to recompile a module is to reload() it. + + + + + Serializes data using the .NET serialization formatter for complex + types. Returns a tuple identifying the serialization format and the serialized + data which can be fed back into clr.Deserialize. + + Current serialization formats include custom formats for primitive .NET + types which aren't already recognized as tuples. None is used to indicate + that the Binary .NET formatter is used. + + + + + Deserializes the result of a Serialize call. This can be used to perform serialization + for .NET types which are serializable. This method is the callable object provided + from __reduce_ex__ for .serializable .NET types. + + The first parameter indicates the serialization format and is the first tuple element + returned from the Serialize call. + + The second parameter is the serialized data. + + + + + Decorator for verifying the arguments to a function are of a specified type. + + + + + Returned value when using clr.accepts/ArgChecker. Validates the argument types and + then calls the original function. + + + + + Decorator for verifying the return type of functions. + + + + + Returned value when using clr.returns/ReturnChecker. Calls the original function and + validates the return type is of a specified type. + + + + + Provides a StreamContentProvider for a stream of content backed by a file on disk. + + + + + Wrapper class used when a user defined type (new-style or old-style) + defines __index__. We provide a conversion from all user defined + types to the Index type so they can be used for determing and method bind + time the most appropriate method to dispatch to. + + + + + New string formatter for 'str'.format(...) calls and support for the Formatter + library via the _formatter_parser / _formatter_field_name_split + methods. + + We parse this format: + + replacement_field = "{" field_name ["!" conversion] [":" format_spec] "}" + field_name = (identifier | integer) ("." attribute_name | "[" element_index "]")* + attribute_name = identifier + element_index = identifier + conversion = "r" | "s" + format_spec = any char, { must be balanced (for computed values), passed to __format__ method on object + + + + + Runs the formatting operation on the given format and keyword arguments + + + + + Gets the formatting information for the given format. This is a list of tuples. The tuples + include: + + text, field name, format spec, conversion + + + + + Parses a field name returning the argument name and an iterable + object which can be used to access the individual attribute + or element accesses. The iterator yields tuples of: + + bool (true if attribute, false if element index), attribute/index value + + + + + Parses the field name including attribute access or element indexing. + + + + + Parses the field name including attribute access or element indexing. + + + + + Converts accessors from our internal structure into a PythonTuple matching how CPython + exposes these + + + + + Parses an identifier and returns it + + + + + Base class used for parsing the format. Subclasss override Text/ReplacementField methods. Those + methods get called when they call Parse and then they can do the appropriate actions for the + format. + + + + + Gets an enumerable object for walking the parsed format. + + TODO: object array? struct? + + + + + Provides an enumerable of the parsed format. The elements of the tuple are: + the text preceding the format information + the field name + the format spec + the conversion + + + + + Handles {{ and }} within the string. Returns true if a double bracket + is found and yields the text + + + + + Parses the conversion character and returns it + + + + + Checks to see if we're at the end of the format. If there's no more characters left we report + the error, otherwise if we hit a } we return true to indicate parsing should stop. + + + + + Parses the format spec string and returns it. + + + + + Parses the field name and returns it. + + + + + Handles parsing the field name and the format spec and returns it. At the parse + level these are basically the same - field names just have more terminating characters. + + The most complex part of parsing them is they both allow nested braces and require + the braces are matched. Strangely though the braces need to be matched across the + combined field and format spec - not within each format. + + + + + Provides the built-in string formatter which is exposed to Python via the str.format API. + + + + + Inspects a format spec to see if it contains nested format specs which + we need to compute. If so runs another string formatter on the format + spec to compute those values. + + + + + Given the field name gets the object from our arguments running + any of the member/index accessors. + + + + + Applies the known built-in conversions to the object if a conversion is + specified. + + + + + Gets the initial object represented by the field name - e.g. the 0 or + keyword name. + + + + + Given the object value runs the accessors in the field name (if any) against the object. + + + + + Encodes all the information about the field name. + + + + + Encodes a single field accessor (.b or [number] or [str]) + + + + + For IList arguments: Marks that the argument is typed to accept a bytes or + bytearray object. This attribute disallows passing a Python list object and + auto-applying our generic conversion. It also enables conversion of a string to + a IList of byte in IronPython 2.6. + + For string arguments: Marks that the argument is typed to accept a bytes object + as well. (2.6 only) + + + + stored for copy_reg module, used for reduce protocol + + + stored for copy_reg module, used for reduce protocol + + + + Creates a new PythonContext not bound to Engine. + + + + + Checks to see if module state has the current value stored already. + + + + + Gets per-runtime state used by a module. The module should have a unique key for + each piece of state it needs to store. + + + + + Sets per-runtime state used by a module. The module should have a unique key for + each piece of state it needs to store. + + + + + Sets per-runtime state used by a module and returns the previous value. The module + should have a unique key for each piece of state it needs to store. + + + + + Sets per-runtime state used by a module and returns the previous value. The module + should have a unique key for each piece of state it needs to store. + + + + + Initializes the sys module on startup. Called both to load and reload sys + + + + + Reads one line keeping track of the # of bytes read + + + + + We use Assembly.LoadFile to load assemblies from a path specified by the script (in LoadAssemblyFromFileWithPath). + However, when the CLR loader tries to resolve any of assembly references, it will not be able to + find the dependencies, unless we can hook into the CLR loader. + + + + + Returns (and creates if necessary) the PythonService that is associated with this PythonContext. + + The PythonService is used for providing remoted convenience helpers for the DLR hosting APIs. + + + + + Gets the member names associated with the object + TODO: Move "GetMemberNames" functionality into MetaObject implementations + + + + + Gets a SiteLocalStorage when no call site is available. + + + + + Invokes the specified operation on the provided arguments and returns the new resulting value. + + operation is usually a value from StandardOperators (standard CLR/DLR operator) or + OperatorStrings (a Python specific operator) + + + + + Sets the current command dispatcher for the Python command line. The previous dispatcher + is returned. Null can be passed to remove the current command dispatcher. + + The command dispatcher will be called with a delegate to be executed. The command dispatcher + should invoke the target delegate in the desired context. + + A common use for this is to enable running all REPL commands on the UI thread while the REPL + continues to run on a non-UI thread. + + The ipy.exe REPL will call into PythonContext.DispatchCommand to dispatch each execution to + the correct thread. Other REPLs can do the same to support this functionality as well. + + + + + Dispatches the command to the current command dispatcher. If there is no current command + dispatcher the command is executed immediately on the current thread. + + + + + Gets a function which can be used for comparing two values. If cmp is not null + then the comparison will use the provided comparison function. Otherwise + it will use the normal Python semantics. + + If type is null then a generic comparison function is returned. If type is + not null a comparison function is returned that's used for just that type. + + + + + Performs a GC collection including the possibility of freeing weak data structures held onto by the Python runtime. + + + + + + Gets a PythonContext given a DynamicMetaObjectBinder. + + + + + Gets or sets the maximum depth of function calls. Equivalent to sys.getrecursionlimit + and sys.setrecursionlimit. + + + + + Gets or sets the main thread which should be interupted by thread.interrupt_main + + + + + Gets or sets the default encoding for this system state / engine. + + + + + Dictionary from name to type of all known built-in module names. + + + + + Dictionary from type to name of all built-in modules. + + + + + TODO: Remove me, or stop caching built-ins. This is broken if the user changes __builtin__ + + + + Dictionary of error handlers for string codecs. + + + Table of functions used for looking for additional codecs. + + + + Returns a shared code context for the current PythonContext. This shared + context can be used for performing general operations which usually + require a CodeContext. + + + + + Returns an overload resolver for the current PythonContext. The overload + resolver will flow the shared context through as it's CodeContext. + + + + + Returns a shared code context for the current PythonContext. This shared + context can be used for doing lookups which need to occur as if they + happened in a module which has done "import clr". + + + + + A DynamicStackFrame which has Python specific data. Currently this + includes the code context which may provide access to locals and the + function code object which is needed to build frame objects from. + + + + + Gets the code context of the function. + + If the function included a call to locals() or the FullFrames + option is enabled then the code context includes all local variables. + + Null if deserialized. + + + + + Gets the code object for this frame. This is used in creating + the trace back. Null if deserialized. + + + + + Created for a user-defined function. + + + + + Python ctor - maps to function.__new__ + + y = func(x.__code__, globals(), 'foo', None, (a, )) + + + + + Calculates the _compat value which is used for call-compatibility checks + for simple calls. Whenver any of the dependent values are updated this + must be called again. + + The dependent values include: + _nparams - this is readonly, and never requies an update + _defaults - the user can mutate this (func_defaults) and that forces + an update + expand dict/list - based on nparams and flags, both read-only + + Bits are allocated as: + 00003fff - Normal argument count + 0fffb000 - Default count + 10000000 - unused + 20000000 - expand list + 40000000 - expand dict + 80000000 - unused + + Enforce recursion is added at runtime. + + + + + The parent CodeContext in which this function was declared. + + + + + Captures the # of args and whether we have kw / arg lists. This + enables us to share sites for simple calls (calls that don't directly + provide named arguments or the list/dict params). + + + + + Generators w/ exception handling need to have some data stored + on them so that we appropriately set/restore the exception state. + + + + + Returns an ID for the function if one has been assigned, or zero if the + function has not yet required the use of an ID. + + + + + Gets the position for the expand list argument or -1 if the function doesn't have an expand list parameter. + + + + + Gets the position for the expand dictionary argument or -1 if the function doesn't have an expand dictionary parameter. + + + + + Gets the number of normal (not params or kw-params) parameters. + + + + + Gets the number of extra arguments (params or kw-params) + + + + + Gets the collection of command line arguments. + + + + + Should we strip out all doc strings (the -O command line option). + + + + + Should we strip out all doc strings (the -OO command line option). + + + + + List of -W (warning filter) options collected from the command line. + + + + + Enables warnings related to Python 3.0 features. + + + + + Enables 3.0 features that are implemented in IronPython. + + + + + Enables debugging support. When enabled a .NET debugger can be attached + to the process to step through Python code. + + + + + Enables inspect mode. After running the main module the REPL will be started + within that modules context. + + + + + Suppresses addition of the user site directory. This is ignored by IronPython + except for updating sys.flags. + + + + + Disables import site on startup. + + + + + Ignore environment variables that configure the IronPython context. + + + + + Enables the verbose option which traces import statements. This is ignored by IronPython + except for setting sys.flags. + + + + + Sets the maximum recursion depth. Setting to Int32.MaxValue will disable recursion + enforcement. + + + + + Makes available sys._getframe. Local variables will not be available in frames unless the + function calls locals(), dir(), vars(), etc... For ensuring locals are always available use + the FullFrames option. + + + + + Makes available sys._getframe. All locals variables will live on the heap (for a considerable + performance cost) enabling introspection of all code. + + + + + Tracing is always available. Without this option tracing is only enabled when sys.settrace + is called. This means code that was already running before sys.settrace will not be debuggable. + + With this option pdb.set_trace and pdb.post_mortem will always work properly. + + + + + Severity of a warning that indentation is formatted inconsistently. + + + + + The division options (old, new, warn, warnall) + + + + + Forces all code to be compiled in a mode in which the code can be reliably collected by the CLR. + + + + + Enable profiling code + + + + + Returns a regular expression of Python files which should not be emitted in debug mode. + + + + + Gets the CPython version which IronPython will emulate. Currently limited + to either 2.6 or 3.0. + + + + + Marks a member as being hidden from Python code. + + + + + This assembly-level attribute specifies which types in the engine represent built-in Python modules. + + Members of a built-in module type should all be static as an instance is never created. + + + + + Creates a new PythonModuleAttribute that can be used to specify a built-in module that exists + within an assembly. + + The built-in module name + The type that implements the built-in module. + + + + The built-in module name + + + + + The type that implements the built-in module + + + + + Marks a type as being a PythonType for purposes of member lookup, creating instances, etc... + + If defined a PythonType will use __new__ / __init__ when creating instances. This allows the + object to match the native Python behavior such as returning cached values from __new__ or + supporting initialization to run multiple times via __init__. + + The attribute also allows you to specify an alternate type name. This allows the .NET name to + be different from the Python name so they can follow .NET naming conventions. + + Types defining this attribute also don't show CLR methods such as Equals, GetHashCode, etc... until + the user has done an import clr. + + + + + General-purpose storage used for Python sets and frozensets. + + The set storage is thread-safe for multiple readers or writers. + + Mutations to the set involve a simple locking strategy of locking on the SetStorage object + itself to ensure mutual exclusion. + + Reads against the set happen lock-free. When the set is mutated, it adds or removes buckets + in an atomic manner so that the readers will see a consistent picture as if the read + occurred either before or after the mutation. + + + + + Creates a new set storage with no buckets + + + + + Creates a new set storage with no buckets + + + + + Adds a new item to the set, unless an equivalent item is already present + + + + + Static helper which adds the given non-null item with a precomputed hash code. Returns + true if the item was added, false if it was already present in the set. + + + + + Lock-free helper on a non-null item with a pre-calculated hash code. Removes the item + if it is present in the set, otherwise adds it. + + + + + Clears the contents of the set + + + + + Clones the set, returning a new SetStorage object + + + + + Checks to see if the given item exists in the set + + + + + Checks to see if the given item exists in the set, and tries to hash it even + if it is known not to be in the set. + + + + + + + Adds items from this set into the other set + + + + + Removes the first set element in the iteration order. + + true if an item was removed, false if the set was empty + + + + Removes an item from the set and returns true if it was present, otherwise returns + false + + + + + Removes an item from the set and returns true if it was removed. The item will always + be hashed, throwing if it is unhashable - even if the set has no buckets. + + + + + Lock-free helper to remove a non-null item + + + + + Determines whether the current set shares no elements with the given set + + + + + Determines whether the current set is a subset of the given set + + + + + Determines whether the current set is a strict subset of the given set + + + + + Mutates this set to contain its union with 'other'. The caller must lock the current + set if synchronization is desired. + + + + + Mutates this set to contain its intersection with 'other'. The caller must lock the + current set if synchronization is desired. + + + + + Mutates this set to contain its symmetric difference with 'other'. The caller must + lock the current set if synchronization is desired. + + + + + Mutates this set to contain its difference with 'other'. The caller must lock the + current set if synchronization is desired. + + + + + Computes the union of self and other, returning an entirely new set. This method is + thread-safe and makes no modifications to self or other. + + + + + Computes the intersection of self and other, returning an entirely new set. This + method is thread-safe and makes no modifications to self or other. + + + + + Computes the symmetric difference of self and other, returning an entirely new set. + This method is thread-safe and makes no modifications to self or other. + + + + + Computes the difference of self and other, returning an entirely new set. This + method is thread-safe and makes no modifications to self or other. + + + + + Helper to hash the given item w/ support for null + + + + + Helper which ensures that the first argument x requires the least work to enumerate + + + + + A factory which creates a SetStorage object from any Python iterable. It extracts + the underlying storage of a set or frozen set without copying, which is left to the + caller if necessary. + + + + + A factory which creates a SetStorage object from any Python iterable. It extracts + the underlying storage of a set or frozen set without copying, which is left to the + caller if necessary. + Returns true if the given object was a set or frozen set, false otherwise. + + + + + A factory which creates a SetStorage object from any Python iterable. It extracts + the underlying storage of a set or frozen set, copying in the former case, to return + a SetStorage object that is guaranteed not to receive any outside mutations. + + + + + Extracts the SetStorage object from o if it is a set or frozenset and returns true. + Otherwise returns false. + + + + + Creates a hashable set from the given set, or does nothing if the given object + is not a set. + + True if o is a set or frozenset, false otherwise + + + + Returns the number of items currently in the set + + + + + Used to store a single hashed item. + + Bucket is not serializable because it stores the computed hash code, which could change + between serialization and deserialization. + + + + + Provides storage which is flowed into a callers site. The same storage object is + flowed for multiple calls enabling the callee to cache data that can be re-used + across multiple calls. + + Data is a public field so that this works properly with DynamicSite's as the reference + type (and EnsureInitialize) + + + + + Provides a representation and parsing for the default formatting specification. This is used + by object.__format__, int.__format__, long.__format__, and float.__format__ to do the common + format spec parsing. + + The default specification is: + + format_spec = [[fill]align][sign][#][0][width][,][.precision][type] + fill = a character other than } + align = "<" | ">" | "=" | "^" + sign = "+" | "-" | " " + width = integer + precision = integer + type = "b" | "c" | "d" | "e" | "E" | "f" | "F" | "g" | "G" | "n" | "o" | "x" | "X" | "%" + + + + + Parses a format spec and returns a new StringFormatSpec object. + + + + + Optimized storage for setting exc_type, exc_value, and exc_traceback. + + This optimization can go away in Python 3.0 when these attributes are no longer used. + + + + + Marks a type as being a suitable type to be used for user-defined classes. + + The requirements for this are that a type has to follow the patterns + that NewTypeMaker derived types follow. This includes: + The type's constructors must all take PythonType as the 1st parameter + which sets the underlying type for the actual object + The type needs to implement IPythonObject + Dictionary-based storage needs to be provided for setting individual members + Virtual methods exposed to Python need to support checking the types dictionary for invocations + + + + + Base class for helper which creates instances. We have two derived types: One for user + defined types which prepends the type before calling, and one for .NET types which + doesn't prepend the type. + + + + + Contains helper methods for converting C# names into Python names. + + + + + TypeInfo captures the minimal CLI information required by NewTypeMaker for a Python object + that inherits from a CLI type. + + + + + "bases" contains a set of PythonTypes. These can include types defined in Python (say cpy1, cpy2), + CLI types (say cCLI1, cCLI2), and CLI interfaces (say iCLI1, iCLI2). Here are some + examples of how this works: + + (bases) => baseType, {interfaceTypes} + + (cpy1) => System.Object, {} + (cpy1, cpy2) => System.Object, {} + (cpy1, cCLI1, iCLI1, iCLI2) => cCLI1, {iCLI1, iCLI2} + [some type that satisfies the line above] => + cCLI1, {iCLI1, iCLI2} + (cCLI1, cCLI2) => error + + + + + Filters out old-classes and throws if any non-types are included, returning a + yielding the remaining PythonType objects. + + + + + Python class hierarchy is represented using the __class__ field in the object. It does not + use the CLI type system for pure Python types. However, Python types which inherit from a + CLI type, or from a builtin Python type which is implemented in the engine by a CLI type, + do have to use the CLI type system to interoperate with the CLI world. This means that + objects of different Python types, but with the same CLI base type, can use the same CLI type - + they will just have different values for the __class__ field. + + The easiest way to inspect the functionality implemented by NewTypeMaker is to persist the + generated IL using "ipy.exe -X:SaveAssemblies", and then inspect the + persisted IL using ildasm. + + + + + Loads any available new types from the provided assembly and makes them + available via the GetNewType API. + + + + + Is this a type used for instances Python types (and not for the types themselves)? + + + + + Gets the position for the parameter which we are overriding. + + + + + + + + + Defines an interface on the type that forwards all calls + to a helper method in UserType. The method names all will + have Helper appended to them to get the name for UserType. The + UserType version should take 1 extra parameter (self). + + + + + Overrides methods - this includes all accessible virtual methods as well as protected non-virtual members + including statics and non-statics. + + + + + Loads all the incoming arguments and forwards them to mi which + has the same signature and then returns the result + + + + + Emits code to check if the class has overridden this specific + function. For example: + + MyDerivedType.SomeVirtualFunction = ... + or + + class MyDerivedType(MyBaseType): + def SomeVirtualFunction(self, ...): + + + + + + Emit code to convert object to a given type. This code is semantically equivalent + to PythonBinder.EmitConvertFromObject, except this version accepts ILGen whereas + PythonBinder accepts Compiler. The Binder will chagne soon and the two will merge. + + + + + Emits code to check if the class has overridden this specific + function. For example: + + MyDerivedType.SomeVirtualFunction = ... + or + + class MyDerivedType(MyBaseType): + def SomeVirtualFunction(self, ...): + + + + + + Emits the call to lookup a member defined in the user's type. Returns + the local which stores the resulting value and leaves a value on the + stack indicating the success of the lookup. + + + + + Creates a method for doing a base method dispatch. This is used to support + super(type, obj) calls. + + + + + Generates stub to receive the CLR call and then call the dynamic language code. + This code is same as StubGenerator.cs in the Microsoft.Scripting, except it + accepts ILGen instead of Compiler. + + + + + Called from PythonTypeOps - the BuiltinFunction._function lock must be held. + + + + + Same as the DLR ReturnFixer, but accepts lower level constructs, + such as LocalBuilder, ParameterInfos and ILGen. + + + + + Creates a new PythonCompilerOptions with the default language features enabled. + + + + + Creates a new PythonCompilerOptions with the specified language features enabled. + + + + + Creates a new PythonCompilerOptions and enables or disables true division. + + This overload is obsolete, instead you should use the overload which takes a + ModuleOptions. + + + + + Gets or sets the initial indentation. This can be set to allow parsing + partial blocks of code that are already indented. + + For each element of the array there is an additional level of indentation. + Each integer value represents the number of spaces used for the indentation. + + If this value is null then no indentation level is specified. + + + + + Language features initialized on parser construction and possibly updated during parsing. + The code can set the language features (e.g. "from __future__ import division"). + + + + + Parse one or more lines of interactive input + + null if input is not yet valid but could be with more lines + + + + Given the interactive text input for a compound statement, calculate what the + indentation level of the next line should be + + + + + Peek if the next token is a 'yield' and parse a yield expression. Else return null. + + Called w/ yield already eaten. + + A yield expression if present, else null. + + + + Maybe eats a new line token returning true if the token was + eaten. + + Python always tokenizes to have only 1 new line character in a + row. But we also craete NLToken's and ignore them except for + error reporting purposes. This gives us the same errors as + CPython and also matches the behavior of the standard library + tokenize module. This function eats any present NL tokens and throws + them away. + + + + + Eats a new line token throwing if the next token isn't a new line. + + Python always tokenizes to have only 1 new line character in a + row. But we also craete NLToken's and ignore them except for + error reporting purposes. This gives us the same errors as + CPython and also matches the behavior of the standard library + tokenize module. This function eats any present NL tokens and throws + them away. + + + + + Summary description for Token. + + + + + IronPython tokenizer + + + + + Used to create tokenizer for hosting API. + + + + + Returns whether the + + + + + Resizes an array to a speficied new size and copies a portion of the original array into its beginning. + + + + + True if the last characters in the buffer are a backslash followed by a new line indicating + that their is an incompletement statement which needs further input to complete. + + + + + Equality comparer that can compare strings to our current token w/o creating a new string first. + + + + + A simple Python command-line should mimic the standard python.exe + + + + + Returns the display look for IronPython. + + The returned string uses This \n instead of Environment.NewLine for it's line seperator + because it is intended to be outputted through the Python I/O system. + + + + + Loads any extension DLLs present in sys.prefix\DLLs directory and adds references to them. + + This provides an easy drop-in location for .NET assemblies which should be automatically referenced + (exposed via import), COM libraries, and pre-compiled Python code. + + + + + Attempts to run a single interaction and handle any language-specific + exceptions. Base classes can override this and call the base implementation + surrounded with their own exception handling. + + Returns null if successful and execution should continue, or an exit code. + + + + + Parses a single interactive command and executes it. + + Returns null if successful and execution should continue, or the appropiate exit code. + + + + + Skip the first line of the code to execute. This is useful for executing Unix scripts which + have the command to execute specified in the first line. + This only apply to the script code executed by the ScriptEngine APIs, but not for other script code + that happens to get called as a result of the execution. + + + + On error. + + + + Provides helpers for interacting with IronPython. + + + + + Creates a new ScriptRuntime with the IronPython scipting engine pre-configured. + + + + + + Creates a new ScriptRuntime with the IronPython scipting engine pre-configured and + additional options. + + + + + Creates a new ScriptRuntime with the IronPython scripting engine pre-configured + in the specified AppDomain. The remote ScriptRuntime may be manipulated from + the local domain but all code will run in the remote domain. + + + + + Creates a new ScriptRuntime with the IronPython scripting engine pre-configured + in the specified AppDomain with additional options. The remote ScriptRuntime may + be manipulated from the local domain but all code will run in the remote domain. + + + + + Creates a new ScriptRuntime and returns the ScriptEngine for IronPython. If + the ScriptRuntime is required it can be acquired from the Runtime property + on the engine. + + + + + Creates a new ScriptRuntime with the specified options and returns the + ScriptEngine for IronPython. If the ScriptRuntime is required it can be + acquired from the Runtime property on the engine. + + + + + Creates a new ScriptRuntime and returns the ScriptEngine for IronPython. If + the ScriptRuntime is required it can be acquired from the Runtime property + on the engine. + + The remote ScriptRuntime may be manipulated from the local domain but + all code will run in the remote domain. + + + + + Creates a new ScriptRuntime with the specified options and returns the + ScriptEngine for IronPython. If the ScriptRuntime is required it can be + acquired from the Runtime property on the engine. + + The remote ScriptRuntime may be manipulated from the local domain but + all code will run in the remote domain. + + + + + Given a ScriptRuntime gets the ScriptEngine for IronPython. + + + + + Gets a ScriptScope which is the Python sys module for the provided ScriptRuntime. + + + + + Gets a ScriptScope which is the Python sys module for the provided ScriptEngine. + + + + + Gets a ScriptScope which is the Python __builtin__ module for the provided ScriptRuntime. + + + + + Gets a ScriptScope which is the Python __builtin__ module for the provided ScriptEngine. + + + + + Gets a ScriptScope which is the Python clr module for the provided ScriptRuntime. + + + + + Gets a ScriptScope which is the Python clr module for the provided ScriptEngine. + + + + + Imports the Python module by the given name and returns its ScriptSCope. If the + module does not exist an exception is raised. + + + + + Imports the Python module by the given name and returns its ScriptSCope. If the + module does not exist an exception is raised. + + + + + Imports the Python module by the given name and inserts it into the ScriptScope as that name. If the + module does not exist an exception is raised. + + + + + + + Sets sys.exec_prefix, sys.executable and sys.version and adds the prefix to sys.path + + + + + Sets sys.exec_prefix, sys.executable and sys.version and adds the prefix to sys.path + + + + + Enables call tracing for the current thread in this ScriptEngine. + + TracebackDelegate will be called back for each function entry, exit, exception, and line change. + + + + + Enables call tracing for the current thread for the Python engine in this ScriptRuntime. + + TracebackDelegate will be called back for each function entry, exit, exception, and line change. + + + + + Provides nested level debugging support when SetTrace or SetProfile are used. + + This saves the current tracing information and then calls the provided object. + + + + + Provides nested level debugging support when SetTrace or SetProfile are used. + + This saves the current tracing information and then calls the provided object. + + + + + Creates a ScriptRuntimeSetup object which includes the Python script engine with the specified options. + + The ScriptRuntimeSetup object can then be additional configured and used to create a ScriptRuntime. + + + + + Creates a LanguageSetup object which includes the Python script engine with the specified options. + + The LanguageSetup object can be used with other LanguageSetup objects from other languages to + configure a ScriptRuntimeSetup object. + + + + + Creates a new PythonModule with the specified name and published it in sys.modules. + + Returns the ScriptScope associated with the module. + + + + + Creates a new PythonModule with the specified name and filename published it + in sys.modules. + + Returns the ScriptScope associated with the module. + + + + + Creates a new PythonModule with the specified name, filename, and doc string and + published it in sys.modules. + + Returns the ScriptScope associated with the module. + + + + + Gets the list of loaded Python module files names which are available in the provided ScriptEngine. + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to couldn't find member {0}. + + + + + Looks up a localized string similar to default value must be specified here. + + + + + Looks up a localized string similar to duplicate argument '{0}' in function definition. + + + + + Looks up a localized string similar to duplicate keyword argument. + + + + + Looks up a localized string similar to <eof> while reading string. + + + + + Looks up a localized string similar to EOF while scanning triple-quoted string. + + + + + Looks up a localized string similar to EOL while scanning single-quoted string. + + + + + Looks up a localized string similar to expected an indented block. + + + + + Looks up a localized string similar to expected name. + + + + + Looks up a localized string similar to Expecting identifier:. + + + + + Looks up a localized string similar to inconsistent use of tabs and spaces in indentation. + + + + + Looks up a localized string similar to unindent does not match any outer indentation level. + + + + + Looks up a localized string similar to Invalid argument value.. + + + + + Looks up a localized string similar to MakeGenericType on non-generic type. + + + + + Looks up a localized string similar to Invalid parameter collection for the function.. + + + + + Looks up a localized string similar to invalid syntax. + + + + + Looks up a localized string similar to object ({0}) is not creatable w/ keyword arguments. + + + + + Looks up a localized string similar to keywords must come before * args. + + + + + Looks up a localized string similar to type does not have {0} field. + + + + + Looks up a localized string similar to from __future__ imports must occur at the beginning of the file. + + + + + Looks up a localized string similar to 'return' outside function. + + + + + Looks up a localized string similar to 'yield' outside function. + + + + + Looks up a localized string similar to NEWLINE in double-quoted string. + + + + + Looks up a localized string similar to NEWLINE in single-quoted string. + + + + + Looks up a localized string similar to future statement does not support import *. + + + + + Looks up a localized string similar to non-keyword arg after keyword arg. + + + + + Looks up a localized string similar to not a chance. + + + + + Looks up a localized string similar to The method or operation is not implemented.. + + + + + Looks up a localized string similar to only one ** allowed. + + + + + Looks up a localized string similar to only one * allowed. + + + + + Looks up a localized string similar to Context must be PythonCompilerContext. + + + + + Looks up a localized string similar to cannot delete slot. + + + + + Looks up a localized string similar to cannot get slot. + + + + + Looks up a localized string similar to cannot set slot. + + + + + Looks up a localized string similar to static property '{0}' of '{1}' can only be read through a type, not an instance. + + + + + Looks up a localized string similar to static property '{0}' of '{1}' can only be assigned to through a type, not an instance. + + + + + Looks up a localized string similar to no value for this token. + + + + + Looks up a localized string similar to too many versions. + + + + + Looks up a localized string similar to unexpected token '{0}'. + + + + + Looks up a localized string similar to future feature is not defined:. + + + + + The Action used for Python call sites. This supports both splatting of position and keyword arguments. + + When a foreign object is encountered the arguments are expanded into normal position/keyword arguments. + + + + + Python's Invoke is a non-standard action. Here we first try to bind through a Python + internal interface (IPythonInvokable) which supports CallSigantures. If that fails + and we have an IDO then we translate to the DLR protocol through a nested dynamic site - + this includes unsplatting any keyword / position arguments. Finally if it's just a plain + old .NET type we use the default binder which supports CallSignatures. + + + + + Fallback - performs the default binding operation if the object isn't recognized + as being invokable. + + + + + Creates a nested dynamic site which uses the unpacked arguments. + + + + + Translates our CallSignature into a DLR Argument list and gives the simple MetaObject's which are extracted + from the tuple or dictionary parameters being splatted. + + + + + Gets the CallSignature for this invocation which describes how the MetaObject array + is to be mapped. + + + + + General purpose storage used for most PythonDictionarys. + + This dictionary storage is thread safe for multiple readers or writers. + + Mutations to the dictionary involves a simple locking strategy of + locking on the DictionaryStorage object to ensure that only one + mutation happens at a time. + + Reads against the dictionary happen lock free. When the dictionary is mutated + it is either adding or removing buckets in a thread-safe manner so that the readers + will either see a consistent picture as if the read occured before or after the mutation. + + When resizing the dictionary the buckets are replaced atomically so that the reader + sees the new buckets or the old buckets. When reading the reader first reads + the buckets and then calls a static helper function to do the read from the bucket + array to ensure that readers are not seeing multiple bucket arrays. + + + + + Creates a new dictionary storage with no buckets + + + + + Creates a new dictionary storage with no buckets + + + + + Creates a new dictionary geting values/keys from the + items arary + + + + + Creates a new dictionary storage with the given set of buckets + and size. Used when cloning the dictionary storage. + + + + + Adds a new item to the dictionary, replacing an existing one if it already exists. + + + + + Initializes the buckets to their initial capacity, the caller + must check if the buckets are empty first. + + + + + Add helper that works over a single set of buckets. Used for + both the normal add case as well as the resize case. + + + + + Add helper which adds the given key/value (where the key is not null) with + a pre-computed hash code. + + + + + Removes an entry from the dictionary and returns true if the + entry was removed or false. + + + + + Removes an entry from the dictionary and returns true if the + entry was removed or false. The key will always be hashed + so if it is unhashable an exception will be thrown - even + if the dictionary has no buckets. + + + + + Checks to see if the key exists in the dictionary. + + + + + Trys to get the value associated with the given key and returns true + if it's found or false if it's not present. + + + + + Static helper to try and get the value from the dictionary. + + Used so the value lookup can run against a buckets while a writer + replaces the buckets. + + + + + Clears the contents of the dictionary. + + + + + Clones the storage returning a new DictionaryStorage object. + + + + + Helper to hash the given key w/ support for null. + + + + + Returns the number of key/value pairs currently in the dictionary. + + + + + Used to store a single hashed key/value. + + Bucket is not serializable because it stores the computed hash + code which could change between serialization and deserialization. + + + + + Special marker NullValue used during deserialization to not add + an extra field to the dictionary storage type. + + + + + The error involved an incomplete statement due to an unexpected EOF. + + + + + The error involved an incomplete token. + + + + + The mask for the actual error values + + + + + The error was a general syntax error + + + + + The error was an indentation error. + + + + + The error was a tab error. + + + + + syntax error shouldn't include a caret (no column offset should be included) + + + + + GeneratorExitException is a standard exception raised by Generator.Close() to allow a caller + to close out a generator. + + GeneratorExit is introduced in Pep342 for Python2.5. + + + + .NET exception thrown when a Python syntax error is related to incorrect indentation. + + + + + Implementation of the Python exceptions module and the IronPython/CLR exception mapping + mechanism. The exception module is the parent module for all Python exception classes + and therefore is built-in to IronPython.dll instead of IronPython.Modules.dll. + + The exception mapping mechanism is exposed as internal surface area available to only + IronPython / IronPython.Modules.dll. The actual exceptions themselves are all public. + + Because the oddity of the built-in exception types all sharing the same physical layout + (see also PythonExceptions.BaseException) some classes are defined as classes w/ their + proper name and some classes are defined as PythonType fields. When a class is defined + for convenience their's also an _TypeName version which is the PythonType. + + + + + Creates a new throwable exception of type type where the type is an new-style exception. + + Used at runtime when creating the exception from a user provided type via the raise statement. + + + + + Creates a throwable exception of type type where the type is an OldClass. + + Used at runtime when creating the exception form a user provided type that's an old class (via the raise statement). + + + + + Returns the CLR exception associated with a Python exception + creating a new exception if necessary + + + + + Given a CLR exception returns the Python exception which most closely maps to the CLR exception. + + + + + Creates a new style Python exception from the .NET exception + + + + + Internal helper to associate a .NET exception and a Python exception. + + + + + Internal helper to get the associated Python exception from a .NET exception. + + + + + Converts the DLR SyntaxErrorException into a Python new-style SyntaxError instance. + + + + + Creates a PythonType for a built-in module. These types are mutable like + normal user types. + + + + + Creates a PythonType for a built-in module. These types are mutable like + normal user types. + + + + + Creates a PythonType for a built-in module, where the type may inherit + from multiple bases. These types are mutable like normal user types. + + + + + Creates a new type for a built-in exception which derives from another Python + type. . These types are built-in and immutable like any other normal type. For + example StandardError.x = 3 is illegal. This isn't for module exceptions which + are like user defined types. thread.error.x = 3 is legal. + + + + + Creates a new type for a built-in exception which is the root concrete type. + + + + + Gets the list of DynamicStackFrames for the current exception. + + + + + Base class for all Python exception objects. + + When users throw exceptions they typically throw an exception which is + a subtype of this. A mapping is maintained between Python exceptions + and .NET exceptions and a corresponding .NET exception is thrown which + is associated with the Python exception. This class represents the + base class for the Python exception hierarchy. + + Users can catch exceptions rooted in either hierarchy. The hierarchy + determines whether the user catches the .NET exception object or the + Python exception object. + + Most built-in Python exception classes are actually instances of the BaseException + class here. This is important because in CPython the exceptions do not + add new members and therefore their layouts are compatible for multiple + inheritance. The exceptions to this rule are the classes which define + their own fields within their type, therefore altering their layout: + EnvironmentError + SyntaxError + IndentationError (same layout as SyntaxError) + TabError (same layout as SyntaxError) + SystemExit + UnicodeDecodeError + UnicodeEncodeError + UnicodeTranslateError + + These exceptions cannot be combined in multiple inheritance, e.g.: + class foo(EnvironmentError, IndentationError): pass + + fails but they can be combined with anything which is just a BaseException: + class foo(UnicodeDecodeError, SystemError): pass + + Therefore the majority of the classes are just BaseException instances with a + custom PythonType object. The specialized ones have their own .NET class + which inherits from BaseException. User defined exceptions likewise inherit + from this and have their own .NET class. + + + + + This interface is used for implementing parts of the IronPython type system. It + is not intended for consumption from user programs. + + + + + Thread-safe dictionary set. Returns the dictionary set or the previous value if already set or + null if the dictionary set isn't supported. + + + + + + + Dictionary replacement. Returns true if replaced, false if the dictionary set isn't supported. + + + + + + + Initializes the Exception object with an unlimited number of arguments + + + + + Returns a tuple of (type, (arg0, ..., argN)) for implementing pickling/copying + + + + + Returns a tuple of (type, (arg0, ..., argN)) for implementing pickling/copying + + + + + Updates the exception's state (dictionary) with the new values + + + + + Provides custom member lookup access that fallbacks to the dictionary + + + + + Provides custom member assignment which stores values in the dictionary + + + + + Provides custom member deletion which deletes values from the dictionary + or allows clearing 'message'. + + + + + Implements __repr__ which returns the type name + the args + tuple code formatted. + + + + + Initializes the Python exception from a .NET exception + + + + + + Helper to get the CLR exception associated w/ this Python exception + creating it if one has not already been created. + + + + + Returns the exception 'message' if only a single argument was provided + during creation or an empty string. + + + + + Gets or sets the arguments used for creating the exception + + + + + Gets the nth member of the args property + + + + + Gets or sets the dictionary which is used for storing members not declared to have space reserved + within the exception object. + + + + + Gets the CLR exception associated w/ this Python exception. Not visible + until a .NET namespace is imported. + + + + + .NET exception that is thrown to signal the end of iteration in Python + + + + + .NET exception that is thrown to shutdown the interpretter and exit the system. + + + + + Result of sys.exit(n) + + + null if the script exited using "sys.exit(int_value)" + null if the script exited using "sys.exit(None)" + x if the script exited using "sys.exit(x)" where isinstance(x, int) == False + + + int_value if the script exited using "sys.exit(int_value)" + 1 otherwise + + + + + .NET Exception thrown when a Python syntax error is related to incorrect tabs. + + + + + Represents a sequence which may have been provided as a set of parameters to an indexer. + + TODO: This should be removed, and all uses of this should go to [SpecialName]object GetItem(..., params object[] keys) + and [SpecialName]void SetItem(..., params object [] keys) or this[params object[]xyz] which is also legal. + + currently this exists for backwards compatibility w/ IronPython's "expandable tuples". + + + + + Provides a MetaObject for instances of Python's old-style classes. + + TODO: Lots of CodeConetxt references, need to move CodeContext onto OldClass and pull it from there. + + + + + Performs the actual work of binding to the function. + + Overall this works by going through the arguments and attempting to bind all the outstanding known + arguments - position arguments and named arguments which map to parameters are easy and handled + in the 1st pass for GetArgumentsForRule. We also pick up any extra named or position arguments which + will need to be passed off to a kw argument or a params array. + + After all the normal args have been assigned to do a 2nd pass in FinishArguments. Here we assign + a value to either a value from the params list, kw-dict, or defaults. If there is ambiguity between + this (e.g. we have a splatted params list, kw-dict, and defaults) we call a helper which extracts them + in the proper order (first try the list, then the dict, then the defaults). + + + + + Makes the test for our rule. + + + + + Makes the test when we just have simple positional arguments. + + + + + Makes the test when we have a keyword argument call or splatting. + + + + + + Gets the array of expressions which correspond to each argument for the function. These + correspond with the function as it's defined in Python and must be transformed for our + delegate type before being used. + + + + + Binds any missing arguments to values from params array, kw dictionary, or default values. + + + + + Creates the argument for the list expansion parameter. + + + + + Adds extra positional arguments to the start of the expanded list. + + + + + Creates the argument for the dictionary expansion parameter. + + + + + Adds an unbound keyword argument into the dictionary. + + + + + + Adds a check to the last parameter (so it's evaluated after we've extracted + all the parameters) to ensure that we don't have any extra params or kw-params + when we don't have a params array or params dict to expand them into. + + + + + Helper function to validate that a named arg isn't duplicated with by + a params list or the dictionary (or both). + + + + + Helper function to get a value (which has no default) from either the + params list or the dictionary (or both). + + + + + Helper function to get the specified variable from the dictionary. + + + + + Helper function to extract the variable from defaults, or to call a helper + to check params / kw-dict / defaults to see which one contains the actual value. + + + + + Helper function to extract from the params list or dictionary depending upon + which one has an available value. + + + + + Helper function to extract the next argument from the params list. + + + + + Fixes up the argument list for the appropriate target delegate type. + + + + + Helper function to get the function argument strongly typed. + + + + + Called when the user is expanding a dictionary - we copy the user + dictionary and verify that it contains only valid string names. + + + + + Called when the user is expanding a params argument + + + + + Called when the user hasn't supplied a dictionary to be expanded but the + function takes a dictionary to be expanded. + + + + + Helper function to create the expression for creating the actual tuple passed through. + + + + + Creates the code to invoke the target delegate function w/ the specified arguments. + + + + + Appends the initialization code for the call to the function if any exists. + + + + + Creating a standard .NET type is easy - we just call it's constructor with the provided + arguments. + + + + + Creating a Python type involves calling __new__ and __init__. We resolve them + and generate calls to either the builtin funcions directly or embed sites which + call the slots at runtime. + + + + + Checks if we have a default new and init - in this case if we have any + arguments we don't allow the call. + + + + + Creates a test which tests the specific version of the type. + + + + + Base class for performing member binding. Derived classes override Add methods + to produce the actual final result based upon what the GetBinderHelper resolves. + + + + + + Provides the normal meta binder binding. + + + + + Provides delegate based fast binding. + + + + + The result type of the operation. + + + + + Looks up __init__ avoiding calls to __getattribute__ and handling both + new-style and old-style classes in the MRO. + + + + + Gets a builtin function for the given declaring type and member infos. + + Given the same inputs this always returns the same object ensuring there's only 1 builtinfunction + for each .NET method. + + This method takes both a cacheName and a pythonName. The cache name is the real method name. The pythonName + is the name of the method as exposed to Python. + + + + + Checks to see if the provided members are always visible for the given type. + + This filters out methods such as GetHashCode and Equals on standard .NET + types that we expose directly as Python types (e.g. object, string, etc...). + + It also filters out the base helper overrides that are added for supporting + super calls on user defined types. + + + + + a function is static if it's a static .NET method and it's defined on the type or is an extension method + with StaticExtensionMethod decoration. + + + + + If we have only interfaces, we'll need to insert object's base + + + + + Simple implementation of ASCII encoding/decoding. The default instance (PythonAsciiEncoding.Instance) is + setup to always convert even values outside of the ASCII range. The EncoderFallback/DecoderFallbacks can + be replaced with versions that will throw exceptions instead though. + + + + + Specialized version because enumerating tuples by Python's definition + doesn't call __getitem__, but filter does! + + + + + Opens a file and returns a new file object. + + name -> the name of the file to open. + mode -> the mode to open the file (r for reading, w for writing, a for appending, default is r). + bufsize -> the size of the buffer to be used (<= 0 indicates to use the default size) + + + + + Creates a new Python file object from a .NET stream object. + + stream -> the stream to wrap in a file object. + + + + + object overload of range - attempts to convert via __int__, and __trunc__ if arg is + an OldInstance + + + + + object overload of range - attempts to convert via __int__, and __trunc__ if arg is + an OldInstance + + + + + Gets the appropriate LanguageContext to be used for code compiled with Python's compile, eval, execfile, etc... + + + + Returns true if we should inherit our callers context (true division, etc...), false otherwise + + + Returns the default compiler flags or the flags the user specified. + + + + Gets a scope used for executing new code in optionally replacing the globals and locals dictionaries. + + + + + Set if the function includes a *args argument list. + + + + + Set if the function includes a **kwargs argument dictionary. + + + + + Set if the function is a generator. + + + + + Set if the function was compiled with future division. + + + + + IronPython specific: Set if the function includes nested exception handling and therefore can alter + sys.exc_info(). + + + + + IronPython specific: Set if the function includes a try/finally block. + + + + + Represents a piece of code. This can reference either a CompiledCode + object or a Function. The user can explicitly call FunctionCode by + passing it into exec or eval. + + + + + This is both the lock that is held while enumerating the threads or updating the thread accounting + information. It's also a marker CodeList which is put in place when we are enumerating the thread + list and all additions need to block. + + This lock is also acquired whenever we need to calculate how a function's delegate should be created + so that we don't race against sys.settrace/sys.setprofile. + + + + + Constructor used to create a FunctionCode for code that's been serialized to disk. + + Code constructed this way cannot be interpreted or debugged using sys.settrace/sys.setprofile. + + Function codes created this way do support recursion enforcement and are therefore registered in the global function code registry. + + + + + Constructor to create a FunctionCode at runtime. + + Code constructed this way supports both being interpreted and debugged. When necessary the code will + be re-compiled or re-interpreted for that specific purpose. + + Function codes created this way do support recursion enforcement and are therefore registered in the global function code registry. + + the initial delegate provided here should NOT be the actual code. It should always be a delegate which updates our Target lazily. + + + + + Registers the current function code in our global weak list of all function codes. + + The weak list can be enumerated with GetAllCode(). + + Ultimately there are 3 types of threads we care about races with: + 1. Other threads which are registering function codes + 2. Threads calling sys.settrace which require the world to stop and get updated + 3. Threads running cleanup (thread pool thread, or call to gc.collect). + + The 1st two must have perfect synchronization. We cannot have a thread registering + a new function which another thread is trying to update all of the functions in the world. Doing + so would mean we could miss adding tracing to a thread. + + But the cleanup thread can run in parallel to either registrying or sys.settrace. The only + thing it needs to take a lock for is updating our accounting information about the + number of code objects are alive. + + + + + Enumerates all function codes for updating the current type of targets we generate. + + While enumerating we hold a lock so that users cannot change sys.settrace/sys.setprofile + until the lock is released. + + + + + Creates a FunctionCode object for exec/eval/execfile'd/compile'd code. + + The code is then executed in a specific CodeContext by calling the .Call method. + + If the code is being used for compile (vs. exec/eval/execfile) then it needs to be + registered incase our tracing mode changes. + + + + + Called the 1st time a function is invoked by our OriginalCallTarget* methods + over in PythonCallTargets. This computes the real delegate which needs to be + created for the function. Usually this means starting off interpretering. It + also involves adding the wrapper function for recursion enforcement. + + Because this can race against sys.settrace/setprofile we need to take our + _ThreadIsEnumeratingAndAccountingLock to ensure no one is actively changing all + of the live functions. + + + + + Updates the delegate based upon current Python context settings for recursion enforcement + and for tracing. + + + + + Called to set the initial target delegate when the user has passed -X:Debug to enable + .NET style debugging. + + + + + Gets the LambdaExpression for tracing. + + If this is a generator function code then the lambda gets tranformed into the correct generator code. + + + + + Gets the correct final LambdaExpression for this piece of code. + + This is either just _lambda or _lambda re-written to be a generator expression. + + + + + Returns a list of variable names which are accessed from nested functions. + + + + + Returns the byte code. IronPython does not implement this and always + returns an empty string for byte code. + + + + + Returns a list of constants used by the function. + + The first constant is the doc string, or None if no doc string is provided. + + IronPython currently does not include any other constants than the doc string. + + + + + Returns the filename that the code object was defined in. + + + + + Returns the 1st line number of the code object. + + + + + Returns a set of flags for the function. + + 0x04 is set if the function used *args + 0x08 is set if the function used **args + 0x20 is set if the function is a generator + + + + + Returns a list of free variables (variables accessed + from an outer scope). This does not include variables + accessed in the global scope. + + + + + Returns a mapping between byte code and line numbers. IronPython does + not implement this because byte code is not available. + + + + + Returns the name of the code (function name, class name, or <module>). + + + + + Returns a list of global variable names accessed by the code. + + + + + Returns the number of local varaibles defined in the function. + + + + + Returns the stack size. IronPython does not implement this + because byte code is not supported. + + + + + Extremely light weight linked list of weak references used for tracking + all of the FunctionCode objects which get created and need to be updated + for purposes of recursion enforcement or tracing. + + + + + General conversion routine TryConvert - tries to convert the object to the desired type. + Try to avoid using this method, the goal is to ultimately remove it! + + + + + This function tries to convert an object to IEnumerator, or wraps it into an adapter + Do not use this function directly. It is only meant to be used by Ops.GetEnumerator. + + + + + This function tries to convert an object to IEnumerator, or wraps it into an adapter + Do not use this function directly. It is only meant to be used by Ops.GetEnumerator. + + + + + Attempts to convert value into a index usable for slicing and return the integer + value. If the conversion fails false is returned. + + If throwOverflowError is true then BigInteger's outside the normal range of integers will + result in an OverflowError. + + + + + Attempts to convert value into a index usable for slicing and return the integer + value. If the conversion fails false is returned. + + If throwOverflowError is true then BigInteger's outside the normal range of integers will + result in an OverflowError. + + + + + Converts a value to int ignoring floats + + + + + Note: + IEnumerator innerEnum = Dictionary<K,V>.KeysCollections.GetEnumerator(); + innerEnum.MoveNext() will throw InvalidOperation even if the values get changed, + which is supported in python + + + + + Note: + IEnumerator innerEnum = Dictionary<K,V>.KeysCollections.GetEnumerator(); + innerEnum.MoveNext() will throw InvalidOperation even if the values get changed, + which is supported in python + + + + + Note: + IEnumerator innerEnum = Dictionary<K,V>.KeysCollections.GetEnumerator(); + innerEnum.MoveNext() will throw InvalidOperation even if the values get changed, + which is supported in python + + + + + Provides both helpers for implementing Python dictionaries as well + as providing public methods that should be exposed on all dictionary types. + + Currently these are published on IDictionary<object, object> + + + + + Creates a DLR OverloadDoc object which describes information about this overload. + + The method to document + The name of the method if it should override the name in the MethodBase + Parameters to skip at the end - used for removing the value on a setter method + true to include self on instance methods + + + + Converts a Type object into a string suitable for lookup in the help file. All generic types are + converted down to their generic type definition. + + + + + Gets the XPathDocument for the specified assembly, or null if one is not available. + + + + + Gets the Xml documentation for the specified MethodBase. + + + + + Gets the Xml documentation for the specified Type. + + + + + Gets the Xml documentation for the specified Field. + + + + + Gets the Xml documentation for the specified Field. + + + + + Converts the XML as stored in the config file into a human readable string. + + + + + True iff the thread is currently inside the generator (ie, invoking the _next delegate). + This can be used to enforce that a generator does not call back into itself. + Pep255 says that a generator should throw a ValueError if called reentrantly. + + + + + We cache the GeneratorFinalizer of generators that were closed on the user + thread, and did not get finalized on the finalizer thread. We can then reuse + the object. Reusing objects with a finalizer is good because it reduces + the load on the GC's finalizer queue. + + + + + Fields set by Throw() to communicate an exception to the yield point. + These are plumbed through the generator to become parameters to Raise(...) invoked + at the yield suspension point in the generator. + + + + + Value sent by generator.send(). + Since send() could send an exception, we need to keep this different from throwable's value. + + + + + See PEP 342 (http://python.org/dev/peps/pep-0342/) for details of new methods on Generator. + Full signature including default params for throw is: + throw(type, value=None, traceback=None) + Use multiple overloads to resolve the default parameters. + + + + + Throw(...) is like Raise(...) being called from the yield point within the generator. + Note it must come from inside the generator so that the traceback matches, and so that it can + properly cooperate with any try/catch/finallys inside the generator body. + + If the generator catches the exception and yields another value, that is the return value of g.throw(). + + + + + send() was added in Pep342. It sends a result back into the generator, and the expression becomes + the result of yield when used as an expression. + + + + + Close introduced in Pep 342. + + + + + Core implementation of IEnumerator.MoveNext() + + + + + Core implementation of Python's next() method. + + + + + Helper called from PythonOps after the yield statement + Keepin this in a helper method: + - reduces generated code size + - allows better coupling with PythonGenerator.Throw() + - avoids throws from emitted code (which can be harder to debug). + + + + + + Called to throw an exception set by Throw(). + + + + + Gets the name of the function that produced this generator object. + + + + + True if the generator has finished (is "closed"), else false. + Python language spec mandates that calling Next on a closed generator gracefully throws a StopIterationException. + This can never be reset. + + + + + True if the generator can set sys exc info and therefore needs exception save/restore. + + + + + Importer class - used for importing modules. Used by Ops and __builtin__ + Singleton living on Python engine. + + + + + Gateway into importing ... called from Ops. Performs the initial import of + a module and returns the module. + + + + + Gateway into importing ... called from Ops. Performs the initial import of + a module and returns the module. This version returns light exceptions instead of throwing. + + + + + Gateway into importing ... called from Ops. This is called after + importing the module and is used to return individual items from + the module. The outer modules dictionary is then updated with the + result. + + + + + Called by the __builtin__.__import__ functions (general importing) and ScriptEngine (for site.py) + + level indiciates whether to perform absolute or relative imports. + -1 indicates both should be performed + 0 indicates only absolute imports should be performed + Positive numbers indicate the # of parent directories to search relative to the calling module + + + + + Interrogates the importing module for __name__ and __path__, which determine + whether the imported module (whose name is 'name') is being imported as nested + module (__path__ is present) or as sibling. + + For sibling import, the full name of the imported module is parent.sibling + For nested import, the full name of the imported module is parent.module.nested + where parent.module is the mod.__name__ + + + the globals dictionary + Name of the module to be imported + Output - full name of the module being imported + Path to use to search for "full" + the import level for relaive imports + the parent module + the global __package__ value + + + + + Given the parent module name looks up the __path__ property. + + + + + Trys to get an existing module and if that fails fall backs to searching + + + + + Attempts to load a module from sys.meta_path as defined in PEP 302. + + The meta_path provides a list of importer objects which can be used to load modules before + searching sys.path but after searching built-in modules. + + + + + Given a user defined importer object as defined in PEP 302 tries to load a module. + + First the find_module(fullName, path) is invoked to get a loader, then load_module(fullName) is invoked + + + + + Finds a user defined importer for the given path or returns null if no importer + handles this path. + + + + + Creates a new list with the data in the array and a size + the same as the length of the array. The array is held + onto and may be mutated in the future by the list. + + params array to use for lists storage + + + + Gets a reasonable size for the addition of two arrays. We round + to a power of two so that we usually have some extra space if + the resulting array gets added to. + + + + + Non-thread safe adder, should only be used by internal callers that + haven't yet exposed their list. + + + + + Compares the two specified keys + + + + + Supports __index__ on arbitrary types, also prevents __float__ + + + + + we need to lock both objects (or copy all of one's data w/ it's lock held, and + then compare, which is bad). Therefore we have a strong order for locking on + the two objects based upon the hash code or object identity in case of a collision + + + + + Summary description for ConstantValue. + + + + + Multiply two object[] arrays - slow version, we need to get the type, etc... + + + + + Multiply two object[] arrays - internal version used for objects backed by arrays + + + + + Add two arrays - internal versions for objects backed by arrays + + + + + + + + + + We override the behavior of equals, compare and hashcode to make + chars seem as much like strings as possible. In Python there is no + difference between these types. + + + + + Helper class that all custom type descriptor implementations call for + the bulk of their implementation. + + + + + Returns the digits for the format spec, no sign is included. + + + + + InstanceOps contains methods that get added to CLS types depending on what + methods and constructors they define. These have not been added directly to + PythonType since they need to be added conditionally. + + Possibilities include: + + __new__, one of 3 __new__ sets can be added: + DefaultNew - This is the __new__ used for a PythonType (list, dict, object, etc...) that + has only 1 default public constructor that takes no parameters. These types are + mutable types, and __new__ returns a new instance of the type, and __init__ can be used + to re-initialize the types. This __new__ allows an unlimited number of arguments to + be passed if a non-default __init__ is also defined. + + NonDefaultNew - This is used when a type has more than one constructor, or only has one + that takes more than zero parameters. This __new__ does not allow an arbitrary # of + extra arguments. + + DefaultNewCls - This is the default new used for CLS types that have only a single ctor + w/ an arbitray number of arguments. This constructor allows setting of properties + based upon an extra set of kw-args, e.g.: System.Windows.Forms.Button(Text='abc'). It + is only used on non-Python types. + + __init__: + For types that do not define __init__ we have an __init__ function that takes an + unlimited number of arguments and does nothing. All types share the same reference + to 1 instance of this. + + next: Defined when a type is an enumerator to expose the Python iter protocol. + + + repr: Added for types that override ToString + + get: added for types that implement IDescriptor + + + + + __dir__(self) -> Returns the list of members defined on a foreign IDynamicMetaObjectProvider. + + + + + Provides the implementation of __enter__ for objects which implement IDisposable. + + + + + Provides the implementation of __exit__ for objects which implement IDisposable. + + + + + Determines if a type member can be imported. This is used to treat static types like modules. + + + + + Implements __contains__ for types implementing IEnumerable of T. + + + + + Implements __contains__ for types implementing IEnumerable + + + + + Implements __contains__ for types implementing IEnumerable of T. + + + + + Implements __contains__ for types implementing IEnumerable + + + + + 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. + + + + + Contains Python extension methods that are added to object + + + + Types for which the pickle module has built-in support (from PEP 307 case 2) + + + + __class__, a custom slot so that it works for both objects and types. + + + + + Removes an attribute from the provided member + + + + + Returns the hash code of the given object + + + + + Gets the specified attribute from the object without running any custom lookup behavior + (__getattr__ and __getattribute__) + + + + + Initializes the object. The base class does nothing. + + + + + Initializes the object. The base class does nothing. + + + + + Initializes the object. The base class does nothing. + + + + + Creates a new instance of the type + + + + + Creates a new instance of the type + + + + + Creates a new instance of the type + + + + + Runs the pickle protocol + + + + + Runs the pickle protocol + + + + + Runs the pickle protocol + + + + + Returns the code representation of the object. The default implementation returns + a string which consists of the type and a unique numerical identifier. + + + + + Sets an attribute on the object without running any custom object defined behavior. + + + + + Returns the number of bytes of memory required to allocate the object. + + + + + Returns a friendly string representation of the object. + + + + + Return a dict that maps slot names to slot values, but only include slots that have been assigned to. + Looks up slots in base types as well as the current type. + + Sort-of Python equivalent (doesn't look up base slots, while the real code does): + return dict([(slot, getattr(self, slot)) for slot in type(self).__slots__ if hasattr(self, slot)]) + + Return null if the object has no __slots__, or empty dict if it has __slots__ but none are initialized. + + + + + Implements the default __reduce_ex__ method as specified by PEP 307 case 2 (new-style instance, protocol 0 or 1) + + + + + Returns the closest base class (in terms of MRO) that isn't defined in Python code + + + + + Implements the default __reduce_ex__ method as specified by PEP 307 case 3 (new-style instance, protocol 2) + + + + + Contains functions that are called directly from + generated code to perform low-level runtime functionality. + + + + + Creates a new dictionary extracting the keys and values from the + provided data array. Keys/values are adjacent in the array with + the value coming first. + + + + + Creates a new dictionary extracting the keys and values from the + provided data array. Keys/values are adjacent in the array with + the value coming first. + + + + + Wraps up all the semantics of multiplying sequences so that all of our sequences + don't duplicate the same logic. When multiplying sequences we need to deal with + only multiplying by valid sequence types (ints, not floats), support coercion + to integers if the type supports it, not multiplying by None, and getting the + right semantics for multiplying by negative numbers and 1 (w/ and w/o subclasses). + + This function assumes that it is only called for case where count is not implicitly + coercible to int so that check is skipped. + + + + + Supports calling of functions that require an explicit 'this' + Currently, we check if the function object implements the interface + that supports calling with 'this'. If not, the 'this' object is dropped + and a normal call is made. + + + + + Called from generated code emitted by NewTypeMaker. + + + + + Handles the descriptor protocol for user-defined objects that may implement __get__ + + + + + Handles the descriptor protocol for user-defined objects that may implement __set__ + + + + + Handles the descriptor protocol for user-defined objects that may implement __delete__ + + + + + Python runtime helper for raising assertions. Used by AssertStatement. + + Object representing the assertion message + + + + Python runtime helper to create instance of Python List object. + + New instance of List + + + + Python runtime helper to create a populated instance of Python List object. + + + + + Python runtime helper to create a populated instance of Python List object w/o + copying the array contents. + + + + + Python runtime helper to create a populated instance of Python List object. + + List is populated by arbitrary user defined object. + + + + + Python runtime helper to create an instance of Python List object. + + List has the initial provided capacity. + + + + + Python runtime helper to create an instance of Tuple + + + + + + + Python runtime helper to create an instance of Tuple + + + + + + Python Runtime Helper for enumerator unpacking (tuple assignments, ...) + Creates enumerator from the input parameter e, and then extracts + expected number of values, returning them as array + + If the input is a Python tuple returns the tuples underlying data array. Callers + should not mutate the resulting tuple. + + The code context of the AST getting enumerator values. + object to enumerate + expected number of objects to extract from the enumerator + + array of objects (.Lengh == expected) if exactly expected objects are in the enumerator. + Otherwise throws exception + + + + + Python runtime helper to create instance of Slice object + + Start of the slice. + End of the slice. + Step of the slice. + Slice + + + + Prints newline into default standard output + + + + + Prints newline into specified destination. Sets softspace property to false. + + + + + Prints value into default standard output with Python comma semantics. + + + + + Prints value into specified destination with Python comma semantics. + + + + + Called from generated code when we are supposed to print an expression value + + + + + Called from generated code for: + + import spam.eggs + + + + + Python helper method called from generated code for: + + import spam.eggs as ham + + + + + Called from generated code for: + + from spam import eggs1, eggs2 + + + + + Imports one element from the module in the context of: + + from module import a, b, c, d + + Called repeatedly for all elements being imported (a, b, c, d above) + + + + + Called from generated code for: + + from spam import * + + + + + Unqualified exec statement support. + A Python helper which will be called for the statement: + + exec code + + + + + Qualified exec statement support, + Python helper which will be called for the statement: + + exec code in globals [, locals ] + + + + + Called from generated code at the start of a catch block. + + + + + Get an exception tuple for the "current" exception. This is used for sys.exc_info() + + + + + Get an exception tuple for a given exception. This is like the inverse of MakeException. + + the code context + the exception to create a tuple for. + a tuple of (type, value, traceback) + This is called directly by the With statement so that it can get an exception tuple + in its own private except handler without disturbing the thread-wide sys.exc_info(). + + + + helper function for re-raised exceptions. + + + + + helper function for non-re-raise exceptions. + + type is the type of exception to throw or an instance. If it + is an instance then value should be null. + + If type is a type then value can either be an instance of type, + a Tuple, or a single value. This case is handled by EC.CreateThrowable. + + + + + Extracts an argument from either the dictionary or params + + + + + Creates a new array the values set to Uninitialized.Instance. The array + is large enough to hold for all of the slots allocated for the type and + its sub types. + + + + + Helper to determine if the value is a simple numeric type (int or big int or bool) - used for OldInstance + deprecated form of slicing. + + + + + Helper to determine if the type is a simple numeric type (int or big int or bool) - used for OldInstance + deprecated form of slicing. + + + + + Helper to determine if the type is a simple numeric type (int or big int or bool) but not a subclass + + + + + For slicing. Fixes up a BigInteger and returns an integer w/ the length of the + object added if the value is negative. + + + + + For slicing. Gets the length of the object, used to only get the length once. + + + + + Helper method for DynamicSite rules that check the version of their dynamic object + TODO - Remove this method for more direct field accesses + + + + + + + + Called from generated code. Gets a builtin function and the BuiltinFunctionData associated + with the object. Tests to see if the function is bound and has the same data for the generated + rule. + + + + + Convert object to a given type. This code is equivalent to NewTypeMaker.EmitConvertFromObject + except that it happens at runtime instead of compile time. + + + + + Provides access to AppDomain.DefineDynamicAssembly which cannot be called from a DynamicMethod + + + + + Generates a new delegate type. The last type in the array is the return type. + + + + + Generates a new delegate type. The last type in the array is the return type. + + + + + Provides the entry point for a compiled module. The stub exe calls into InitializeModule which + does the actual work of adding references and importing the main module. Upon completion it returns + the exit code that the program reported via SystemExit or 0. + + + + + Provides the entry point for a compiled module. The stub exe calls into InitializeModule which + does the actual work of adding references and importing the main module. Upon completion it returns + the exit code that the program reported via SystemExit or 0. + + + + + Called from generated code, helper to remove a name + + + + + Called from generated code, helper to do name lookup + + + + + Called from generated code, helper to do name assignment + + + + + Returns an IntPtr in the proper way to CPython - an int or a Python long + + + + + Create at TypeError exception for when Raise() can't create the exception requested. + + original type of exception requested + a TypeEror exception + + + + Gets a list of DynamicStackFrames for the given exception. These stack frames + can be programmatically inspected to understand the frames the exception crossed + through including Python frames. + + Dynamic stack frames are not preserved when an exception crosses an app domain + boundary. + + + + + Helper clas for calls to unicode(...). We generate code which checks if unicode + is str and if it is we redirect those calls to the unicode function defined on this + class. + + + + + ExtensibleString is the base class that is used for types the user defines + that derive from string. It carries along with it the string's value and + our converter recognizes it as a string. + + + + + StringOps is the static class that contains the methods defined on strings, i.e. 'abc' + + Here we define all of the methods that a Python user would see when doing dir('abc'). + If the user is running in a CLS aware context they will also see all of the methods + defined in the CLS System.String type. + + + + + Returns a copy of this string converted to uppercase + + + + + return true if self is a titlecased string and there is at least one + character in self; also, uppercase characters may only follow uncased + characters (e.g. whitespace) and lowercase characters only cased ones. + return false otherwise. + + + + + Return a string which is the concatenation of the strings + in the sequence seq. The separator between elements is the + string providing this method + + + + + Replaces each replacement field in the string with the provided arguments. + + replacement_field = "{" field_name ["!" conversion] [":" format_spec] "}" + field_name = (identifier | integer) ("." identifier | "[" element_index "]")* + + format_spec: [[fill]align][sign][#][0][width][,][.precision][type] + + Conversion can be 'r' for repr or 's' for string. + + + + + Replaces each replacement field in the string with the provided arguments. + + replacement_field = "{" field_name ["!" conversion] [":" format_spec] "}" + field_name = (identifier | integer) ("." identifier | "[" element_index "]")* + + format_spec: [[fill]align][sign][#][0][width][.precision][type] + + Conversion can be 'r' for repr or 's' for string. + + + + + Gets the starting offset checking to see if the incoming bytes already include a preamble. + + + + When encoding or decoding strings if an error occurs CPython supports several different + behaviors, in addition it supports user-extensible behaviors as well. For the default + behavior we're ok - both of us support throwing and replacing. For custom behaviors + we define a single fallback for decoding and encoding that calls the python function to do + the replacement. + + When we do the replacement we call the provided handler w/ a UnicodeEncodeError or UnicodeDecodeError + object which contains: + encoding (string, the encoding the user requested) + end (the end of the invalid characters) + object (the original string being decoded) + reason (the error, e.g. 'unexpected byte code', not sure of others) + start (the start of the invalid sequence) + + The decoder returns a tuple of (unicode, int) where unicode is the replacement string + and int is an index where encoding should continue. + + + + Indexer for generic parameter resolution. We bind to one of the generic versions + available in this type collision. A user can also do someType[()] to force to + bind to the non-generic version, but we will always present the non-generic version + when no bindings are available. + + + + + Object.ToString() displays the CLI type name. But we want to display the class name (e.g. + '<foo object at 0x000000000000002C>' unless we've overridden __repr__ but not __str__ in + which case we'll display the result of __repr__. + + + + + Provides a debug view for user defined types. This class is declared as public + because it is referred to from generated code. You should not use this class. + + + + + A DynamicMetaObject which is just used to support custom conversions to COM. + + + + + A marker interface so we can recognize and access sequence members on our array objects. + + + + + List of unary operators which we have sites for to enable fast dispatch that + doesn't collide with other operators. + + + + + Sets the mode to text or binary. Returns true if previously set to text, false if previously set to binary. + + + + + Truncates the file to the current length as indicated by tell(). + + + + + Truncates the file to the specified length. + + + + + + Provides storage of IronPython specific data in the DLR Scope ScopeExtension. + + This enables IronPython to track code compilation flags such as from __future__ + flags and import clr flags across multiple executions of user-provided scopes. + + + + + Provides human readable names for how Python maps the various DLR NarrowingLevel's. + + + + + No narrowing conversions are performed + + + + + Double/Single to Decimal + PythonTuple to Array + Generic conversions + BigInteger to Int64 + + + + + Numeric conversions excluding from floating point values + Boolean conversions + Delegate conversions + Enumeration conversions + + + + + Enables Python protocol conversions (__int__, etc...) + + + + + Provides dictionary based storage which is backed by a Scope object. + + + + + Mutable set class + + + + + Appends an IEnumerable to an existing set + + + + + Immutable set class + + + + + Iterator over sets + + + + + Gets the indices for the deprecated __getslice__, __setslice__, __delslice__ functions + + This form is deprecated in favor of using __getitem__ w/ a slice object as an index. This + form also has subtly different mechanisms for fixing the slice index before calling the function. + + If an index is negative and __len__ is not defined on the object than an AttributeError + is raised. + + + + + StringFormatter provides Python's % style string formatting services. + + + + + Read a possible mapping key for %(key)s. + + The key name enclosed between the '%(key)s', + or null if there are no paranthesis such as '%s'. + + + + AppendBase appends an integer at the specified radix doing all the + special forms for Python. We have a copy and paste version of this + for BigInteger below that should be kept in sync. + + + + + BigInteger version of AppendBase. Should be kept in sync w/ AppendBase + + + + + public class to get optimized + + + + + Returns detailed call statistics. Not implemented in IronPython and always returns None. + + + + + Handles output of the expression statement. + Prints the value and sets the __builtin__._ + + + + + Provides a CustomTracker which handles special fields which have custom + behavior on get/set. + + + + + Provides custom, versioned, dictionary access for instances. Used for both + new-style and old-style instances. + + Each class can allocate a version for instance storage using the + CustomInstanceDictionaryStorage.AllocateInstance method. The version allocated + is dependent upon the names which are likely to appear in the instance + dictionary. Currently these names are calculated by collecting the names + that are assigned to during the __init__ method and combining these with + all such names in the types MRO. + + When creating the dictionary for storing instance values the class can then create + a PythonDictionary backed by a CustomInstanceDictionaryStorage with it's + version. When doing a get/set optimized code can then be produced that + verifies we have CustomInstanceDictionaryStorage and it has the + correct version. If we have a matching dictionary then gets/sets can turn + into simple array accesses rather than dictionary gets/sets. For programs + which access a large number of instance variables this can dramatically + speed up the program. + + TODO: Should we attempt to unify all versions which share the same keys? + + + + + Interface used for things which can convert to delegates w/o code gen. Currently + this is just non-overloaded builtin functions and bound builtin functions. Avoiding + the code gen is not only nice for compilation but it also enables delegates to be added + in C# and removed in Python. + + + + + Represents a set of attributes that different functions can have. + + + + No flags have been set + + + This is a function w/ no instance pointer + + + This is a method that requires an instance + + + Built-in functions can encapsulate both methods and functions, in which case both bits are set + + + True is the function/method should be visible from pure-Python code + + + True if this is a __r*__ method for a CLS overloaded operator method + + + + This method represents a binary operator method for a CLS overloaded operator method. + + Being a binary operator causes the following special behaviors to kick in: + A failed binding at call time returns NotImplemented instead of raising an exception + A reversed operator will automatically be created if: + 1. The parameters are both of the instance type + 2. The parameters are in reversed order (other, this) + + This enables simple .NET operator methods to be mapped into the Python semantics. + + + + + A method declared on a built-in module + + + + + OperatorMapping provides a mapping from DLR operators to their associated .NET methods. + + + + + Given an operator returns the OperatorMapping associated with the operator or null + + + + + The operator the OperatorMapping provides info for. + + + + + The primary method name associated with the method. This method name is + usally in the form of op_Operator (e.g. op_Addition). + + + + + The secondary method name associated with the method. This method name is + usually a standard .NET method name with pascal casing (e.g. Add). + + + + + The return type that must match for the alternate operator to be valid. + + This is available alternate operators don't have special names and therefore + could be confused for a normal method which isn't fulfilling the contract. + + + + + This helper type lets us build a fake ParameterInfo object with a specific type and name + to pass along to methods that expect ParameterInfos. This is currently found useful + for the NewTypeMaker code and may be useful in other situations as well. + + + + + Cached CallSites. User types are cached on the PythonType and System types are cached on the + PythonContext to avoid cross-runtime contamination due to the binder on the site. + + + + + Represents a PythonType. Instances of PythonType are created via PythonTypeBuilder. + + + + + Used in copy_reg which is the only consumer of __flags__ in the standard library. + + Set if the type is user defined + + + + + Set if the type has __abstractmethods__ defined + + + + + Implements fast binding for user defined types. This ensures that common highly dynamic + scenarios will run fast (for instance creating new types repeatedly and only creating a limited + number of instances of them). It also gives better code sharing amongst different subclasses + of the same types and improved startup time due to reduced code generation. + + + + + Provides delegates that will invoke a parameterless type ctor. The first key provides + the dictionary for a specific type, the 2nd key provides the delegate for a specific + call site type used in conjunction w/ our IFastInvokable implementation. + + + + + Shared built-in functions for creating instances of user defined types. Because all + types w/ the same UnderlyingSystemType share the same constructors these can be + shared across multiple types. + + + + + Creates a new type for a user defined type. The name, base classes (a tuple of type + objects), and a dictionary of members is provided. + + + + + Creates a new type for a user defined type. The name, base classes (a tuple of type + objects), and a dictionary of members is provided. + + + + + Creates a new PythonType object which is backed by the specified .NET type for + storage. The type is considered a system type which can not be modified + by the user. + + + + + + Creates a new PythonType which is a subclass of the specified PythonType. + + Used for runtime defined new-style classes which require multiple inheritance. The + primary example of this is the exception system. + + + + + Creates a new PythonType which is a subclass of the specified PythonTypes. + + Used for runtime defined new-style classes which require multiple inheritance. The + primary example of this is the exception system. + + + + + Creates a new PythonType which is a subclass of the specified PythonTypes. + + Used for runtime defined new-style classes which require multiple inheritance. The + primary example of this is the exception system. + + + + + Creates a new PythonType which is a subclass of the specified PythonType. + + Used for runtime defined new-style classes which require multiple inheritance. The + primary example of this is the exception system. + + + + + Creates a new PythonType which is a subclass of the specified PythonTypes. + + Used for runtime defined new-style classes which require multiple inheritance. The + primary example of this is the exception system. + + + + + Creates a new PythonType which is a subclass of the specified PythonTypes. + + Used for runtime defined new-style classes which require multiple inheritance. The + primary example of this is the exception system. + + + + + Creates a new PythonType object which represents an Old-style class. + + + + + Returns true if the specified object is an instance of this type. + + + + + Gets the dynamic type that corresponds with the provided static type. + + Returns null if no type is available. TODO: In the future this will + always return a PythonType created by the DLR. + + + + + + + Sets the python type that corresponds with the provided static type. + + This is used for built-in types which have a metaclass. Currently + only used by ctypes. + + + + + Allocates the storage for the instance running the .NET constructor. This provides + the creation functionality for __new__ implementations. + + + + + Allocates the storage for the instance running the .NET constructor. This provides + the creation functionality for __new__ implementations. + + + + + Allocates the storage for the instance running the .NET constructor. This provides + the creation functionality for __new__ implementations. + + + + + Allocates the storage for the instance running the .NET constructor. This provides + the creation functionality for __new__ implementations. + + + + + Allocates the storage for the instance running the .NET constructor. This provides + the creation functionality for __new__ implementations. + + + + + Allocates the storage for the instance running the .NET constructor. This provides + the creation functionality for __new__ implementations. + + + + + Returns true if this type is a subclass of other + + + + + Looks up a slot on the dynamic type + + + + + Searches the resolution order for a slot matching by name + + + + + Searches the resolution order for a slot matching by name. + + Includes searching for methods in old-style classes + + + + + Internal helper to add a new slot to the type + + + + + + + Gets a value from a dynamic type and any sub-types. Values are stored in slots (which serve as a level of + indirection). This searches the types resolution order and returns the first slot that + contains the value. + + + + + Attempts to lookup a member w/o using the customizer. Equivelent to object.__getattribute__ + but it doens't throw an exception. + + + + + + Gets a value from a dynamic type and any sub-types. Values are stored in slots (which serve as a level of + indirection). This searches the types resolution order and returns the first slot that + contains the value. + + + + + Attempts to lookup a member w/o using the customizer. + + + + + + Sets a value on an instance. If a slot is available in the most derived type the slot + is set there, otherwise the value is stored directly in the instance. + + + + + Attempst to set a value w/o going through the customizer. + + This enables languages to provide the "base" implementation for setting attributes + so that the customizer can call back here. + + + + + Returns a list of all slot names for the type and any subtypes. + + The context that is doing the inquiry of InvariantContext.Instance. + + + + Returns a list of all slot names for the type, any subtypes, and the instance. + + The context that is doing the inquiry of InvariantContext.Instance. + the instance to get instance members from, or null. + + + + Adds members from a user defined type. + + + + + Adds members from a user defined type instance + + + + + Gets the .NET type which is used for instances of the Python type. + + When overridden by a metaclass enables a customization of the .NET type which + is used for instances of the Python type. Meta-classes can construct custom + types at runtime which include new .NET methods, fields, custom attributes or + other features to better interoperate with .NET. + + + + + Initializes a PythonType that represents a standard .NET type. The same .NET type + can be shared with the Python type system. For example object, string, int, + etc... are all the same types. + + + + + Creates a __new__ method for the type. If the type defines interesting constructors + then the __new__ method will call that. Otherwise if it has only a single argless + + + + + This will return a unique integer for every version of every type in the system. + This means that DynamicSite code can generate a check to see if it has the correct + PythonType and version with a single integer compare. + + TODO - This method and related code should fail gracefully on overflow. + + + + + Internal helper function to add a subtype + + + + + Returns a CLR WeakReference object to this PythonType that can be shared + between anyone who needs a weak reference to the type. + + + + + Gets the name of the dynamic type + + + + + Gets the resolution order used for attribute lookup + + + + + Gets the underlying system type that is backing this type. All instances of this + type are an instance of the underlying system type. + + + + + Gets the extension type for this type. The extension type provides + a .NET type which can be inherited from to extend sealed classes + or value types which Python allows inheritance from. + + + + + Gets the base types from which this type inherits. + + + + + True if the type is a system type. A system type is a type which represents an + underlying .NET type and not a subtype of one of these types. + + + + + Gets a list of weak references to all the subtypes of this class. May return null + if there are no subtypes of the class. + + + + + Base class for doing fast type invoke binding. Subclasses are created using + reflection once during the binding. The subclasses can then proceed to do + the binding w/o using reflection. Otherwise we'd have lots more reflection + calls which would slow the binding up. + + + + + Gets or creates delegate for calling the constructor function. + + + + + The type has a ctor which does not accept PythonTypes. This is used + for user defined types which implement __clrtype__ + + + + + Used when a type overrides __new__ with a Python function or other object + that can return an arbitrary value. If the return value is not the same type + as the type which had __new__ then we need to lookup __init__ on the type + and invoke it. Also handles initialization for finalization when __del__ + is defined for the same reasons. + + + + + target is the newly initialized value. + args are the arguments to be passed to __init__ + + + + + Couples a MemberGroup and the name which produces the member group together + + + + + Represents an ops-extension which adds a new slot. The slot can have arbitrary + get/set behavior above and beyond normal .NET methods or properties. This is + typically in regards to how it processes access from instances or subtypes. + + + + + Provides a slot object for the dictionary to allow setting of the dictionary. + + + + + Calculates the method resolution order for a Python class + the rules are: + If A is a subtype of B, then A has precedence (A > B) + If C appears before D in the list of bases then C > D + If E > F in one __mro__ then E > F in all __mro__'s for our subtype + + class A(object): pass + class B(object): pass + class C(B): pass + class N(A,B,C): pass # illegal + + This is because: + C.__mro__ == (C, B, object) + N.__mro__ == (N, A, B, C, object) + which would conflict, but: + + N(B,A) is ok (N, B, a, object) + N(C, B, A) is ok (N, C, B, A, object) + + Calculates a C3 MRO as described in "The Python 2.3 Method Resolution Order" + plus support for old-style classes. + + We build up a list of our base classes MRO's plus our base classes themselves. + We go through the list in order. Look at the 1st class in the current list, and + if it's not the non-first class in any other list then remove it from all the lists + and append it to the mro. Otherwise continue to the next list. If all the classes at + the start are no-good then the MRO is bad and we throw. + + For old-style classes if the old-style class is the only one in the list of bases add + it as a depth-first old-style MRO, otherwise compute a new-style mro for all the classes + and use that. + + + + + + + + + Returns the dictionary used to store state for this object + + + + + Python module. Stores classes, functions, and data. Usually a module + is created by importing a file or package from disk. But a module can also + be directly created by calling the module type and providing a name or + optionally a documentation string. + + + + + Creates a new module backed by a Scope. Used for creating modules for foreign Scope's. + + + + + Creates a new PythonModule with the specified dictionary. + + Used for creating modules for builtin modules which don't have any code associated with them. + + + + + Represents a member of a user-defined type which defines __slots__. The names listed in + __slots__ have storage allocated for them with the type and provide fast get/set access. + + + + + Gets the index into the object array to be used for the slot storage. + + + + + Helpers for interacting w/ .NET types. This includes: + + Member resolution via GetMember/GetMembers. This performs a member lookup which includes the registered + extension types in the PythonBinder. Internally the class has many MemberResolver's which provide + the various resolution behaviors. + + Cached member access - this is via static classes such as Object and provides various MemberInfo's so we're + not constantly looking up via reflection. + + + + list of resolvers which we run to resolve items + + + + Gets the statically known member from the type with the specific name. Searches the entire type hierarchy to find the specified member. + + + + + Gets all the statically known members from the specified type. Searches the entire type hierarchy to get all possible members. + + The result may include multiple resolution. It is the callers responsibility to only treat the 1st one by name as existing. + + + + + Gets the statically known member from the type with the specific name. Searches only the specified type to find the member. + + + + + Gets all the statically known members from the specified type. Searches only the specified type to find the members. + + The result may include multiple resolution. It is the callers responsibility to only treat the 1st one by name as existing. + + + + + Creates the resolver table which includes all the possible resolutions. + + + + + + Provides a resolution for __str__. + + + + + Provides a resolution for __repr__ + + + + + Helper to see if the type explicitly overrides the method. This ignores members + defined on object. + + + + + Provides a resolution for __hash__, first looking for IStructuralEquatable.GetHashCode, + then IValueEquality.GetValueHashCode. + + + + + Provides a resolution for __new__. For standard .NET types __new__ resolves to their + constructor. For Python types they inherit __new__ from their base class. + + TODO: Can we just always fallback to object.__new__? If not why not? + + + + + Provides a resolution for next + + + + + Provides a resolution for __len__ + + + + + Provides a resolution for __iter__ + + + + + Looks for an Equals overload defined on the type and if one is present binds __ne__ to an + InstanceOps helper. + + + + + Provides an implementation of __contains__. We can pull contains from: + ICollection of T which defines Contains directly + IList which defines Contains directly + IDictionary which defines Contains directly + IDictionary of K,V which defines Contains directly + IEnumerable of K which we have an InstaceOps helper for + IEnumerable which we have an instance ops helper for + IEnumerator of K which we have an InstanceOps helper for + IEnumerator which we have an instance ops helper for + + String is ignored here because it defines __contains__ via extension methods already. + + The lookup is well ordered and not dependent upon the order of values returned by reflection. + + + + + Helper for IEnumerable/IEnumerator __contains__ + + + + + Primary worker for getting the member(s) associated with a single name. Can be called with different MemberBinder's to alter the + scope of the search. + + + + + Primary worker for returning a list of all members in a type. Can be called with different MemberBinder's to alter the scope + of the search. + + + + + Helper to get a MemberGroup for methods declared on InstanceOps + + + + + Helper to get the proper typecasting method, according to the following precedence rules: + + 1. Strongest (most specific) declaring type + 2. Strongest (most specific) parameter type + 3. Type of conversion + i. Implicit + ii. Explicit + 4. Return type (order specified in toTypes) + + + + + Helper for creating a typecast resolver + + + + + Helper for creating __getitem__/__setitem__ resolvers + + false for a getter, true for a setter + + + + Filters out methods which are present on standard .NET types but shouldn't be there in Python + + + + + When private binding is enabled we can have a collision between the private Event + and private field backing the event. We filter this out and favor the event. + + This matches the v1.0 behavior of private binding. + + + + + Filters down to include only protected methods + + + + + If an operator is a reverisble operator (e.g. addition) then we need to filter down to just the forward/reverse + versions of the .NET method. For example consider: + + String.op_Multiplication(int, string) + String.op_Multiplication(string, int) + + If this method were defined on string it defines that you can do: + 2 * 'abc' + or: + 'abc' * 2 + + either of which will produce 'abcabc'. The 1st form is considered the reverse form because it is declared on string + but takes a non-string for the 1st argument. The 2nd is considered the forward form because it takes a string as the + 1st argument. + + When dynamically dispatching for 2 * 'abc' we'll first try __mul__ on int, which will fail with a string argument. Then we'll try + __rmul__ on a string which will succeed and dispatch to the (int, string) overload. + + For multiplication in this case it's not too interesting because it's commutative. For addition this might be more interesting + if, for example, we had unicode and ASCII strings. In that case Unicode strings would define addition taking both unicode and + ASCII strings in both forms. + + + + + Checks to see if the parameter type and the declaring type are compatible to determine + if an operator is forward or reverse. + + + + + Checks to see if this is an operator method which Python recognizes. For example + op_Comma is not recognized by Python and therefore should exposed to the user as + a method that is callable by name. + + + + + Provides a resolution for __complex__ + + + + + Provides a resolution for __float__ + + + + + Provides a resolution for __int__ + + + + + Provides a resolution for __long__ + + + + + Provides a resolution for __getitem__ + + + + + Provides a resolution for __setitem__ + + + + + Abstract class used for resolving members. This provides two methods of member look. The first is looking + up a single member by name. The other is getting all of the members. + + There are various subclasses of this which have different methods of resolving the members. The primary + function of the resolvers are to provide the name->value lookup. They also need to provide a simple name + enumerator. The enumerator is kept simple because it's allowed to return duplicate names as well as return + names of members that don't exist. The base MemberResolver will then verify their existance as well as + filter duplicates. + + + + + Looks up an individual member and returns a MemberGroup with the given members. + + + + + Returns a list of members that exist on the type. The ResolvedMember structure indicates both + the name and provides the MemberGroup. + + + + + Returns a list of possible members which could exist. ResolveMember needs to be called to verify their existance. Duplicate + names can also be returned. + + + + + One off resolver for various special methods which are known by name. A delegate is provided to provide the actual member which + will be resolved. + + + + + Standard resolver for looking up .NET members. Uses reflection to get the members by name. + + + + + Resolves methods mapped to __eq__ and __ne__ from: + 1. IStructuralEquatable.Equals + 2. IValueEquality.Equals (CLR2 only) + + + + + Resolves methods mapped to __gt__, __lt__, __ge__, __le__, as well as providing an alternate resolution + for __eq__ and __ne__, from the comparable type's CompareTo method. + + This should be run after the EqualityResolver. + + + + + Resolves methods mapped to __*__ methods automatically from the .NET operator. + + + + + Filters alternative methods out that don't match the expected signature and therefore + are just sharing a common method name. + + + + + Removes Object.Equals methods as we never return these for PythonOperationKind. + + + + + Provides bindings to private members when that global option is enabled. + + + + + Provides resolutions for protected members that haven't yet been + subclassed by NewTypeMaker. + + + + + Base class used for resolving a name into a member on the type. + + + + + Gets an instance op method for the given type and name. + + Instance ops methods appaer on the base most class that's required to expose it. So + if we have: Array[int], Array, object we'd only add an instance op method to Array and + Array[int] inherits it. It's obviously not on object because if it was there we'd just + put the method in ObjectOps. + + Therefore the different binders expose this at the appropriate times. + + + + + MemberBinder which searches the entire type hierarchy and their extension types to find a member. + + + + + MemberBinder which searches only the current type and it's extension types to find a member. + + + + + BuiltinFunction represents any standard CLR function exposed to Python. + This is used for both methods on standard Python types such as list or tuple + and for methods from arbitrary .NET assemblies. + + All calls are made through the optimizedTarget which is created lazily. + + TODO: Back BuiltinFunction's by MethodGroup's. + + + + + Creates a new builtin function for a static .NET function. This is used for module methods + and well-known __new__ methods. + + + + + Creates a built-in function for a .NET method declared on a type. + + + + + Creates a bound built-in function. The instance may be null for built-in functions + accessed for None. + + + + + Returns a BuiltinFunction bound to the provided type arguments. Returns null if the binding + cannot be performed. + + + + + Returns a descriptor for the built-in function if one is + neededed + + + + + Makes a test for the built-in function against the private _data + which is unique per built-in function. + + + + + Helper for generating the call to a builtin function. This is used for calls from built-in method + descriptors and built-in functions w/ and w/o a bound instance. + + This provides all sorts of common checks on top of the call while the caller provides a delegate + to do the actual call. The common checks include: + check for generic-only methods + reversed operator support + transforming arguments so the default binder can understand them (currently user defined mapping types to PythonDictionary) + returning NotImplemented from binary operators + Warning when calling certain built-in functions + + + The call binder we're doing the call for + An expression which points to the code context + the meta object for the built in function + true if we're calling with an instance + The arguments being passed to the function + A restriction for the built-in function, method desc, etc... + A delegate to perform the actual call to the method. + + + + Gets the target methods that we'll be calling. + + + + + True if the method should be visible to non-CLS opt-in callers + + + + + Provides (for reflected methods) a mapping from a signature to the exact target + which takes this signature. + signature with syntax like the following: + someClass.SomeMethod.Overloads[str, int]("Foo", 123) + + + + + Gets the overload dictionary for the logical function. These overloads + are never bound to an instance. + + + + + Returns the instance used for binding. This differs on module functions implemented + using instance methods so the built-in functions there don't expose the instance. + + + + + A custom built-in function which supports indexing + + + + + Use indexing on generic methods to provide a new reflected method with targets bound with + the supplied type arguments. + + + + + The unbound representation of an event property + + + + + BoundEvent is the object that gets returned when the user gets an event object. An + BoundEvent tracks where the event was received from and is used to verify we get + a proper add when dealing w/ statics events. + + + + + Represents a ReflectedProperty created for an extension method. Logically the property is an + instance property but the method implementing it is static. + + + + + Base class for properties backed by methods. These include our slot properties, + indexers, and normal properties. This class provides the storage of these as well + as the storage of our optimized getter/setter methods, documentation for the property, + etc... + + + + + Convenience function for users to call directly + + + + + This function can be used to set a field on a value type without emitting a warning. Otherwise it is provided only to have symmetry with properties which have GetValue/SetValue for supporting explicitly implemented interfaces. + + Setting fields on value types usually warns because it can silently fail to update the value you expect. For example consider this example where Point is a value type with the public fields X and Y: + + arr = System.Array.CreateInstance(Point, 10) + arr[0].X = 42 + print arr[0].X + + prints 0. This is because reading the value from the array creates a copy of the value. Setting the value then mutates the copy and the array does not get updated. The same problem exists when accessing members of a class. + + + + + Provides access to non-default .NET indexers (aka properties w/ parameters). + + C# doesn't support these, but both COM and VB.NET do. The types dictionary + gets populated w/a ReflectedGetterSetter indexer which is a descriptor. Getting + the descriptor returns a bound indexer. The bound indexer supports indexing. + We support multiple indexer parameters via expandable tuples. + + + + + Convenience function for users to call directly + + + + + Convenience function for users to call directly + + + + + True if generating code for gets can result in more optimal accesses. + + + + + single finalizable instance used to track and deliver all the + callbacks for a single object that has been weakly referenced by + one or more references and proxies. The reference to this object + is held in objects that implement IWeakReferenceable. + + + + + Finalizable object used to hook up finalization calls for OldInstances. + + We create one of these each time an object w/ a finalizer gets created. The + only reference to this object is the instance so when that goes out of context + this does as well and this will get finalized. + + + + + Marks a method/field/property as being a wrapper descriptor. A wrapper desriptor + is a member defined on PythonType but is available both for type and other + instances of type. For example type.__bases__. + + + + diff --git a/packages/IronPython.2.7.4/lib/Net45/Microsoft.Dynamic.dll b/packages/IronPython.2.7.4/lib/Net45/Microsoft.Dynamic.dll new file mode 100644 index 0000000000..405e3ba921 Binary files /dev/null and b/packages/IronPython.2.7.4/lib/Net45/Microsoft.Dynamic.dll differ diff --git a/packages/IronPython.2.7.4/lib/Net45/Microsoft.Dynamic.xml b/packages/IronPython.2.7.4/lib/Net45/Microsoft.Dynamic.xml new file mode 100644 index 0000000000..323ac43bc8 --- /dev/null +++ b/packages/IronPython.2.7.4/lib/Net45/Microsoft.Dynamic.xml @@ -0,0 +1,6534 @@ + + + + Microsoft.Dynamic + + + + + Binds named arguments to the parameters. Returns a permutation of indices that captures the relationship between + named arguments and their corresponding parameters. Checks for duplicate and unbound named arguments. + + Ensures that for all i: namedArgs[i] binds to parameters[args.Length + bindingPermutation[i]] + + + + + The number of arguments not counting the collapsed ones. + + + + + Gets the total number of visible arguments passed to the call site including collapsed ones. + + + + + ArgBuilder provides an argument value used by the MethodBinder. One ArgBuilder exists for each + physical parameter defined on a method. + + Contrast this with ParameterWrapper which represents the logical argument passed to the method. + + + + + Provides the Expression which provides the value to be passed to the argument. + If null is returned the argument is skipped (not passed to the callee). + + + + + Provides an Expression which will update the provided value after a call to the method. May + return null if no update is required. + + + + + If the argument produces a return value (e.g. a ref or out value) this provides + the additional value to be returned. + + + + + The number of actual arguments consumed by this builder. + + + + + Returns the type required for the argument or null if the ArgBuilder + does not consume a type. + + + + + An assignable value that is passed to a byref parameter + After the call it will contain the updated value + + + + + Indicates the specific type of failure, if any, from binding to a method. + + + + + The binding succeeded. Only one method was applicable or had the best conversion. + + + + + More than one method was applicable for the provided parameters and no method was considered the best. + + + + + There are no overloads that match the number of parameters required for the call + + + + + None of the target method(s) can successfully be called. The failure can be due to: + 1. Arguments could not be successfully converted for the call + 2. Keyword arguments could not be assigned to positional arguments + 3. Keyword arguments could be assigned but would result in an argument being assigned + multiple times (keyword and positional arguments conflit or dupliate keyword arguments). + + + + + Actual arguments cannot be constructed. + + + + + No method is callable. For example, all methods have an unbound generic parameter. + + + + + Encapsulates the result of an attempt to bind to one or methods using the OverloadResolver. + + Users should first check the Result property to see if the binding was successful or + to determine the specific type of failure that occured. If the binding was successful + MakeExpression can then be called to create an expression which calls the method. + If the binding was a failure callers can then create a custom error message based upon + the reason the call failed. + + + + + Creates a new BindingTarget when the method binding has succeeded. + + + + + Creates a new BindingTarget when the method binding has failed due to an incorrect argument count + + + + + Creates a new BindingTarget when the method binding has failued due to + one or more parameters which could not be converted. + + + + + Creates a new BindingTarget when the match was ambiguous + + + + + Other failure. + + + + + Gets an Expression which calls the binding target if the method binding succeeded. + + Throws InvalidOperationException if the binding failed. + + + + + Gets the result of the attempt to bind. + + + + + Returns the method if the binding succeeded, or null if no method was applicable. + + + + + Returns the selected overload if the binding succeeded, or null if no one was applicable. + + + + + Gets the name of the method as supplied to the OverloadResolver. + + + + + Returns the MethodTarget if the binding succeeded, or null if no method was applicable. + + + + + Returns the methods which don't have any matches or null if Result == BindingResult.AmbiguousMatch + + + + + Returns the methods and their associated conversion failures if Result == BindingResult.CallFailure. + + + + + Returns the acceptable number of arguments which can be passed to the method if Result == BindingResult.IncorrectArgumentCount. + + + + + Returns the total number of arguments provided to the call. 0 if the call succeeded or failed for a reason other + than argument count mismatch. + + + + + Gets the MetaObjects which we originally did binding against in their restricted form. + + The members of the array correspond to each of the arguments. All members of the array + have a value. + + + + + Returns the return type of the binding, or null if no method was applicable. + + + + + Returns the NarrowingLevel of the method if the call succeeded. If the call + failed returns NarrowingLevel.None. + + + + + Returns true if the binding was succesful, false if it failed. + + This is an alias for BindingTarget.Result == BindingResult.Success. + + + + + Creates a ReturnBuilder + + the type the ReturnBuilder will leave on the stack + + + + Represents the reason why a call to a specific method could not be performed by the OverloadResolver. + + The reason for the failure is specified by the CallFailureReason property. Once this property + has been consulted the other properties can be consulted for more detailed information regarding + the failure. + + If reason is ConversionFailure the ConversionResults property will be non-null. + If reason is UnassignableKeyword the KeywordArguments property will be non-null and include + the keywords which could not be assigned. + If reason is DuplicateKeyword the KeywordArguments property will be non-null and include + the keywords which were duplicated (either by the keywords themselves or by positional + arguments). + + MethodTarget is always set and indicates the method which failed to bind. + + + + + Gets the MethodTarget which the call failed for. + + + + + Gets the reason for the call failure which determines the other + properties of the CallFailure which should be consulted. + + + + + Gets a list of ConversionResult's for each parameter indicating + whether the conversion was successful or failed and the types + being converted. + + + + + Gets the list of keyword arguments that were either dupliated or + unassignable. + + + + + Default value, their was no CallFailure. + + + + + One of more parameters failed to be converted + + + + + One or more keyword arguments could not be successfully assigned to a positional argument + + + + + One or more keyword arguments were duplicated or would have taken the spot of a + provided positional argument. + + + + + Type arguments could not be inferred + + + + + Represents a collection of MethodCandidate's which all accept the + same number of logical parameters. For example a params method + and a method with 3 parameters would both be a CandidateSet for 3 parameters. + + + + + Represents information about a failure to convert an argument from one + type to another. + + + + + Value of the argument or null if it is not available. + + + + + Argument actual type or its limit type if the value not known. + DynamicNull if the argument value is null. + + + + + ArgBuilder which provides a default parameter value for a method call. + + + + + Provides binding and overload resolution to .NET methods. + + MethodBinder's can be used for: + generating new AST code for calling a method + calling a method via reflection at runtime + (not implemented) performing an abstract call + + MethodBinder's support default arguments, optional arguments, by-ref (in and out), and keyword arguments. + + Implementation Details: + + The MethodBinder works by building up a CandidateSet for each number of effective arguments that can be + passed to a set of overloads. For example a set of overloads such as: + foo(object a, object b, object c) + foo(int a, int b) + + would have 2 target sets - one for 3 parameters and one for 2 parameters. For parameter arrays + we fallback and create the appropriately sized CandidateSet on demand. + + Each CandidateSet consists of a set of MethodCandidate's. Each MethodCandidate knows the flattened + parameters that could be received. For example for a function such as: + foo(params int[] args) + + When this method is in a CandidateSet of size 3 the MethodCandidate takes 3 parameters - all of them + ints; if it's in a CandidateSet of size 4 it takes 4 parameters. Effectively a MethodCandidate is + a simplified view that allows all arguments to be treated as required positional arguments. + + Each MethodCandidate in turn refers to a MethodTarget. The MethodTarget is composed of a set + of ArgBuilder's and a ReturnBuilder which know how to consume the positional arguments and pass + them to the appropriate argument of the destination method. This includes routing keyword + arguments to the correct position, providing the default values for optional arguments, etc... + + After binding is finished the MethodCandidates are thrown away and a BindingTarget is returned. + The BindingTarget indicates whether the binding was successful and if not any additional information + that should be reported to the user about the failed binding. It also exposes the MethodTarget which + allows consumers to get the flattened list of required parameters for the call. MethodCandidates + are not exposed and are an internal implementation detail of the MethodBinder. + + + + + Resolves a method overload and returns back a BindingTarget. + + The BindingTarget can then be tested for the success or particular type of + failure that prevents the method from being called. If successfully bound the BindingTarget + contains a list of argument meta-objects with additional restrictions that ensure the selection + of the particular overload. + + + + + Checks to see if the language allows named arguments to be bound to instance fields or + properties and turned into setters. By default this is only allowed on contructors. + + + + + Gets an expression that evaluates to the result of GetByRefArray operation. + + + + + Allow to bind an array/dictionary instance or a null reference to params array/dictionary parameter. + + + + + Called before arguments binding. + + + A bitmask that indicates (set bits) the parameters that were mapped by this method. + A default mapping will be constructed for the remaining parameters (cleared bits). + + + + + Return null if arguments cannot be constructed and overload resolution should produce an error. + + + + + Determines whether given overloads are overloaded on index-th parameter (the types of the index-th parameters are the same). + + + + + Selects the best (of two) candidates for conversion from actualType + + + + + Provides ordering for two parameter types if there is no conversion between the two parameter types. + + + + + The method is called each time an item of lazily splatted argument is needed. + + + + + The number of actual arguments consumed by this builder. + + + + + ArgBuilder which provides a value for a keyword argument. + + The KeywordArgBuilder calculates its position at emit time using it's initial + offset within the keyword arguments, the number of keyword arguments, and the + total number of arguments provided by the user. It then delegates to an + underlying ArgBuilder which only receives the single correct argument. + + Delaying the calculation of the position to emit time allows the method binding to be + done without knowing the exact the number of arguments provided by the user. Hence, + the method binder can be dependent only on the set of method overloads and keyword names, + but not the user arguments. While the number of user arguments could be determined + upfront, the current MethodBinder does not have this design. + + + + + The underlying builder should expect a single parameter as KeywordArgBuilder is responsible + for calculating the correct parameter to use + + + + + + Updates fields/properties of the returned value with unused keyword parameters. + + + + + MethodCandidate represents the different possible ways of calling a method or a set of method overloads. + A single method can result in multiple MethodCandidates. Some reasons include: + - Every optional parameter or parameter with a default value will result in a candidate + - The presence of ref and out parameters will add a candidate for languages which want to return the updated values as return values. + - ArgumentKind.List and ArgumentKind.Dictionary can result in a new candidate per invocation since the list might be different every time. + + Each MethodCandidate represents the parameter type for the candidate using ParameterWrapper. + + + + + Builds a new MethodCandidate which takes count arguments and the provided list of keyword arguments. + + The basic idea here is to figure out which parameters map to params or a dictionary params and + fill in those spots w/ extra ParameterWrapper's. + + + + + Narrowing conversions are conversions that cannot be proved to always succeed, conversions that are + known to possibly lose information, and conversions across domains of types sufficiently different + to merit narrowing notation like casts. + + Its upto every language to define the levels for conversions. The narrowling levels can be used by + for method overload resolution, where the overload is based on the parameter types (and not the number + of parameters). + + + + + Conversions at this level do not do any narrowing. Typically, this will include + implicit numeric conversions, Type.IsAssignableFrom, StringBuilder to string, etc. + + + + + Language defined prefered narrowing conversion. First level that introduces narrowing + conversions. + + + + + Language defined preferred narrowing conversion. Second level that introduces narrowing + conversions and should have more conversions than One. + + + + + Language defined preferred narrowing conversion. Third level that introduces narrowing + conversions and should have more conversions that Two. + + + + + A somewhat meaningful conversion is possible, but it will quite likely be lossy. + For eg. BigInteger to an Int32, Boolean to Int32, one-char string to a char, + larger number type to a smaller numeric type (where there is no overflow), etc + + + + + Builds the argument for an out argument when not passed a StrongBox. The out parameter + is returned as an additional return value. + + + + + Defines a method overload abstraction for the purpose of overload resolution. + It provides the overload resolver the metadata it needs to perform the resolution. + + + WARNING: This is a temporary API that will undergo breaking changes in future versions. + + + + + Null for constructors. + + + + + The method arity can vary, i.e. the method has params array or params dict parameters. + + + + + Represents a method overload that is bound to a . + + + Not thread safe. + WARNING: This is a temporary API that will undergo breaking changes in future versions. + + + + + Maps out parameters to return args and ref parameters to ones that don't accept StrongBox. + + + + + ParameterWrapper represents the logical view of a parameter. For eg. the byref-reduced signature + of a method with byref parameters will be represented using a ParameterWrapper of the underlying + element type, since the logical view of the byref-reduced signature is that the argument will be + passed by value (and the updated value is included in the return value). + + Contrast this with ArgBuilder which represents the real physical argument passed to the method. + + + + + ParameterInfo is not available. + + + + + Creates a parameter that represents an expanded item of params-array. + + + + + True if the wrapper represents a params-array parameter (false for parameters created by expansion of a params-array). + + + + + True if the wrapper represents a params-dict parameter (false for parameters created by expansion of a params-dict). + + + + + Builds the parameter for a params dictionary argument - this collects all the extra name/value + pairs provided to the function into a SymbolDictionary which is passed to the function. + + + + + An argument that the user wants to explicitly pass by-reference (with copy-in copy-out semantics). + The user passes a StrongBox[T] object whose value will get updated when the call returns. + + + + + SimpleArgBuilder produces the value produced by the user as the argument value. It + also tracks information about the original parameter and is used to create extended + methods for params arrays and param dictionary functions. + + + + + Parameter info is not available for this argument. + + + + + Type and whether the parameter is a params-array or params-dictionary is derived from info. + + + + + True if there are restrictions beyond just simple type restrictions + + + + + Builds a parameter for a reference argument when a StrongBox has not been provided. The + updated return value is returned as one of the resulting return values. + + + + + Gets the generic arguments for method based upon the constraints discovered during + type inference. Returns null if not all generic arguments had their types inferred. + + + + + Creates a new set of arg builders for the given generic method definition which target the new + parameters. + + + + + Creates a new list of ParameterWrappers for the generic method replacing the old parameters with the new ones. + + + + + Gets the generic type arguments sorted so that the type arguments + that are depended upon by other type arguments are sorted before + their dependencies. + + + + + Checks to see if the x type parameter is dependent upon the y type parameter. + + + + + Builds a mapping based upon generic parameter constraints between related generic + parameters. This is then used to sort the generic parameters so that we can process + the least dependent parameters first. For example given the method: + + void Foo{T0, T1}(T0 x, T1 y) where T0 : T1 + + We need to first infer the type information for T1 before we infer the type information + for T0 so that we can ensure the constraints are correct. + + + + + Returns a mapping from generic type parameter to the input DMOs which map to it. + + + + + Adds any additional ArgumentInputs entries for the given object and parameter type. + + + + + Walks the nested generic hierarchy to construct all of the generic parameters referred + to by this type. For example if getting the generic parameters for the x parameter on + the method: + + void Foo{T0, T1}(Dictionary{T0, T1} x); + + We would add both typeof(T0) and typeof(T1) to the list of generic arguments. + + + + + Provides generic type inference for a single parameter. + + + For example: + M{T}(T x) + M{T}(IList{T} x) + M{T}(ref T x) + M{T}(T[] x) + M{T}(ref Dictionary{T,T}[] x) + + + + + Provides generic type inference for a single parameter. + + + For example: + M{T}(T x) + M{T}(IList{T} x) + M{T}(ref T x) + M{T}(T[] x) + M{T}(ref Dictionary{T,T}[] x) + + + + + Checks if the constraints are violated by the given input for the specified generic method parameter. + + This method must be supplied with a mapping for any dependent generic method type parameters which + this one can be constrained to. For example for the signature "void Foo{T0, T1}(T0 x, T1 y) where T0 : T1". + we cannot know if the constraints are violated unless we know what we have calculated T1 to be. + + + + + Finds all occurences of genericParameter in openType and the corresponding concrete types in closedType. + Returns true iff all occurences of the generic parameter in the open type correspond to the same concrete type in the closed type + and this type satisfies given constraints. Returns the concrete type in match if so. + + + + + Maps a single type parameter to the possible parameters and DynamicMetaObjects + we can get inference from. For example for the signature: + + void Foo{T0, T1}(T0 x, T1 y, IList{T1} z); + + We would have one ArgumentInput for T0 which holds onto the DMO providing the argument + value for x. We would also have one ArgumentInput for T1 which holds onto the 2 DMOs + for y and z. Associated with y would be a GenericParameterInferer and associated with + z would be a ConstructedParameterInferer. + + + + + Implemented by DynamicMetaObject subclasses when the associated object + can participate in generic method type inference. This interface + is used when the inference engine is attempting to perform type inference + for a parameter which is typed to a delegate type. + + + + + Returns the type inferred for parameterType when performing + inference for a conversion to delegateType. + + + + + Provides information about the result of a custom object which dynamically + infers back types. + + Currently only used for invokable objects to feedback the types for a delegate + type. + + + + + Determines the result of a conversion action. The result can either result in an exception, a value that + has been successfully converted or default(T), or a true/false result indicating if the value can be converted. + + + + + Attempts to perform available implicit conversions and throws if there are no available conversions. + + + + + Attempst to perform available implicit and explicit conversions and throws if there are no available conversions. + + + + + Attempts to perform available implicit conversions and returns default(ReturnType) if no conversions can be performed. + + If the return type of the rule is a value type then the return value will be zero-initialized. If the return type + of the rule is object or another class then the return type will be null (even if the conversion is to a value type). + This enables ImplicitTry to be used to do TryConvertTo even if the type is value type (and the difference between + null and a real value can be distinguished). + + + + + Attempts to perform available implicit and explicit conversions and returns default(ReturnType) if no conversions + can be performed. + + If the return type of the rule is a value type then the return value will be zero-initialized. If the return type + of the rule is object or another class then the return type will be null (even if the conversion is to a value type). + This enables ExplicitTry to be used to do TryConvertTo even if the type is value type (and the difference between + null and a real value can be distinguished). + + + + + Provides binding semantics for a language. This include conversions as well as support + for producing rules for actions. These optimized rules are used for calling methods, + performing operators, and getting members using the ActionBinder's conversion semantics. + + + + + Provides binding semantics for a language. This include conversions as well as support + for producing rules for actions. These optimized rules are used for calling methods, + performing operators, and getting members using the ActionBinder's conversion semantics. + + + + + Converts an object at runtime into the specified type. + + + + + Determines if a conversion exists from fromType to toType at the specified narrowing level. + toNotNullable is true if the target variable doesn't allow null values. + + + + + Provides ordering for two parameter types if there is no conversion between the two parameter types. + + + + + Converts the provided expression to the given type. The expression is safe to evaluate multiple times. + + + + + Gets the members that are visible from the provided type of the specified name. + + The default implemetnation first searches the type, then the flattened heirachy of the type, and then + registered extension methods. + + + + + Called when a set is attempting to assign to a field or property from a derived class through the base class. + + The default behavior is to allow the assignment. + + + + + Creates an ErrorInfo object when a static property is accessed from an instance member. The default behavior is throw + an exception indicating that static members properties be accessed via an instance. Languages can override this to + customize the exception, message, or to produce an ErrorInfo object which reads or writes to the property being accessed. + + The static property being accessed through an instance + True if the user is assigning to the property, false if the user is reading from the property + The parameters being used to access the property. This includes the instance as the first entry, any index parameters, and the + value being assigned as the last entry if isAssignment is true. + + + + + Provides a way for the binder to provide a custom error message when lookup fails. Just + doing this for the time being until we get a more robust error return mechanism. + + Deprecated, use the non-generic version instead + + + + + Gets the extension members of the given name from the provided type. Base classes are also + searched for their extension members. Once any of the types in the inheritance hierarchy + provide an extension member the search is stopped. + + + + + Gets the extension members of the given name from the provided type. Subclasses of the + type and their extension members are not searched. + + + + + Provides an opportunity for languages to replace all MemberTracker's with their own type. + + Alternatlely a language can expose MemberTracker's directly. + + The member which is being returned to the user. + Tthe type which the memberTrack was accessed from + + + + + Determines if the binder should allow access to non-public members. + + By default the binder does not allow access to non-public members. Base classes + can inherit and override this value to customize whether or not private binding + is available. + + + + + Creates the MetaObject for indexing directly into arrays or indexing into objects which have + default members. Returns null if we're not an indexing operation. + + + + + Creates the MetaObject for indexing directly into arrays or indexing into objects which have + default members. Returns null if we're not an indexing operation. + + + + + Creates the meta object for the rest of the operations: comparisons and all other + ExpressionType. If the operation cannot be completed a MetaObject which indicates an + error will be returned. + + + + + Creates the meta object for the rest of the operations: comparisons and all other + ExpressionType. If the operation cannot be completed a MetaObject which indicates an + error will be returned. + + + + + Produces a rule for comparing a value to null - supports comparing object references and nullable types. + + + + + Checks if the conversion is to object and produces a target if it is. + + + + + Checks if any conversions are available and if so builds the target for that conversion. + + + + + Checks if the conversion can be handled by a simple cast. + + + + + Checks if the conversion can be handled by calling a user-defined conversion method. + + + + + Helper that checkes both types to see if either one defines the specified conversion + method. + + + + + Checks if any of the members of the MemberGroup provide the applicable conversion and + if so uses it to build a conversion rule. + + + + + Checks if the conversion is to applicable by extracting the value from Extensible of T. + + + + + Checks if there's an implicit numeric conversion for primitive data types. + + + + + Checks if there's a conversion to/from Nullable of T. + + + + + Checks to see if there's a conversion of null to a reference type + + + + + Helper to produce an error when a conversion cannot occur + + + + + Helper to produce a rule which just boxes a value type + + + + + Helper to produce a conversion rule by calling the helper method to do the convert + + + + + Helper to produce a conversion rule by calling the helper method to do the convert + + + + + Helper to produce a conversion rule by calling the method to do the convert. This version takes the parameter + to be passed to the conversion function and we call it w/ our own value or w/ our Extensible.Value. + + + + + Helper to wrap explicit conversion call into try/catch incase it throws an exception. If + it throws the default value is returned. + + + + + Helper to produce a rule when no conversion is required (the strong type of the expression + input matches the type we're converting to or has an implicit conversion at the IL level) + + + + + Helper to produce a rule when no conversion is required from an extensible type's + underlying storage to the type we're converting to. The type of extensible type + matches the type we're converting to or has an implicit conversion at the IL level. + + + + + Helper to extract the value from an Extensible of T + + + + + Helper to convert a null value to nullable of T + + + + + Helper to produce the rule for converting T to Nullable of T + + + + + Helper to produce the rule for converting T to Nullable of T + + + + + Returns a value which indicates failure when a OldConvertToAction of ImplicitTry or + ExplicitTry. + + + + + Helper to extract the Value of an Extensible of T from the + expression being converted. + + + + + Helper that checks if fromType is an Extensible of T or a subtype of + Extensible of T and if so returns the T. Otherwise it returns fromType. + + This is used to treat extensible types the same as their underlying types. + + + + + Creates a target which returns null for a reference type. + + + + if a member-injector is defined-on or registered-for this type call it + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + Returns a DynamicMetaObject which represents the value that will be returned when the member is accessed. + + The returned DynamicMetaObject may be strongly typed to a value type which needs boxing before being + returned from a standard DLR GetMemberBinder. The language is responsible for performing any boxing + so that it has an opportunity to perform custom boxing. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + Provides overload resolution and method binding for any calls which need to be performed for the GetMember. + + + Returns a DynamicMetaObject which represents the value that will be returned when the member is accessed. + + The returned DynamicMetaObject may be strongly typed to a value type which needs boxing before being + returned from a standard DLR GetMemberBinder. The language is responsible for performing any boxing + so that it has an opportunity to perform custom boxing. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + An OverloadResolverFactory which can be used for performing overload resolution and method binding. + + + True if the operation should return Operation.Failed on failure, false if it + should return the exception produced by MakeMissingMemberError. + + + The meta object to be used if the get results in an error. + + + Returns a DynamicMetaObject which represents the value that will be returned when the member is accessed. + + The returned DynamicMetaObject may be strongly typed to a value type which needs boxing before being + returned from a standard DLR GetMemberBinder. The language is responsible for performing any boxing + so that it has an opportunity to perform custom boxing. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + True if the operation should return Operation.Failed on failure, false if it + should return the exception produced by MakeMissingMemberError. + + + The meta object to be used if the get results in an error. + + + Returns a DynamicMetaObject which represents the value that will be returned when the member is accessed. + + The returned DynamicMetaObject may be strongly typed to a value type which needs boxing before being + returned from a standard DLR GetMemberBinder. The language is responsible for performing any boxing + so that it has an opportunity to perform custom boxing. + + + + if a member-injector is defined-on or registered-for this type call it + + + + Provides default binding for performing a call on the specified meta objects. + + The signature describing the call + The meta object to be called. + + Additional meta objects are the parameters for the call as specified by the CallSignature in the CallAction. + + A MetaObject representing the call or the error. + + + + Provides default binding for performing a call on the specified meta objects. + + The signature describing the call + The meta object to be called. + + Additional meta objects are the parameters for the call as specified by the CallSignature in the CallAction. + + Overload resolver factory. + A MetaObject representing the call or the error. + + + + Provides default binding for performing a call on the specified meta objects. + + The signature describing the call + The meta object to be called. + + Additional meta objects are the parameters for the call as specified by the CallSignature in the CallAction. + + Overload resolver factory. + The result should the object be uncallable. + A MetaObject representing the call or the error. + + + + Gets a TargetInfo object for performing a call on this object. + + If this object is a delegate we bind to the Invoke method. + If this object is a MemberGroup or MethodGroup we bind to the methods in the member group. + If this object is a BoundMemberTracker we bind to the methods with the bound instance. + If the underlying type has defined an operator Call method we'll bind to that method. + + + + + Binds to the methods in a method group. + + + + + Binds to the methods in a member group. + + TODO: We should really only have either MemberGroup or MethodGroup, not both. + + + + + Binds to the BoundMemberTracker and uses the instance in the tracker and restricts + based upon the object instance type. + + + + + Binds to the Invoke method on a delegate if this is a delegate type. + + + + + Attempts to bind to an operator Call method. + + + + + Performs binding against a set of overloaded methods using the specified arguments. The arguments are + consumed as specified by the CallSignature object. + + Overload resolver. + The methods to be called + A meta object which results from the call. + + + + Performs binding against a set of overloaded methods using the specified arguments. The arguments are + consumed as specified by the CallSignature object. + + Overload resolver. + The methods to be called + The name of the method or null to use the name from targets. + A meta object which results from the call. + + + + Performs binding against a set of overloaded methods using the specified arguments. The arguments are + consumed as specified by the CallSignature object. + + Overload resolver. + The methods to be called + Additional restrictions which should be applied to the resulting MetaObject. + A meta object which results from the call. + + + + Performs binding against a set of overloaded methods using the specified arguments. The arguments are + consumed as specified by the CallSignature object. + + Overload resolver. + The methods to be called + Additional restrictions which should be applied to the resulting MetaObject. + The name of the method or null to use the name from targets. + A meta object which results from the call. + + + + Performs binding against a set of overloaded methods using the specified arguments. The arguments are + consumed as specified by the CallSignature object. + + TODO. + TODO. + Overload resolver. + The methods to be called + Additional restrictions which should be applied to the resulting MetaObject. + The resulting binding target which can be used for producing error information. + The name of the method or null to use the name from targets. + A meta object which results from the call. + + + + Makes test for param arrays and param dictionary parameters. + + + + + Pulls out the right argument to build the splat test. MakeParamsTest makes the actual test. + + + + + Builds the restrictions for calling with a splatted argument array. Ensures that the + argument is still an ICollection of object and that it has the same number of arguments. + + + + + Builds the restrictions for calling with keyword arguments. The restrictions include + tests on the individual keys of the dictionary to ensure they have the same names. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + The value being assigned to the target member. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + The value being assigned to the target member. + + + Provides overload resolution and method binding for any calls which need to be performed for the SetMember. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + The value being assigned to the target member. + + + Provides a DynamicMetaObject that is to be used as the result if the member cannot be set. If null then then a language + specific error code is provided by ActionBinder.MakeMissingMemberErrorForAssign which can be overridden by the language. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + The value being assigned to the target member. + + + Provides overload resolution and method binding for any calls which need to be performed for the SetMember. + + + Provides a DynamicMetaObject that is to be used as the result if the member cannot be set. If null then then a language + specific error code is provided by ActionBinder.MakeMissingMemberErrorForAssign which can be overridden by the language. + + + + if a member-injector is defined-on or registered-for this type call it + + + + Provides a way for the binder to provide a custom error message when lookup fails. Just + doing this for the time being until we get a more robust error return mechanism. + + + + + Called when the user is accessing a protected or private member on a get. + + The default implementation allows access to the fields or properties using reflection. + + + + + Provides a way for the binder to provide a custom error message when lookup fails. Just + doing this for the time being until we get a more robust error return mechanism. + + + + + Helper class for flowing information about the GetMember request. + + + + + Helper class for flowing information about the GetMember request. + + + + + Encapsulates information about the target of the call. This includes an implicit instance for the call, + the methods that we'll be calling as well as any restrictions required to perform the call. + + + + + A MetaObject which was produced as the result of a failed binding. + + + + + Interceptor prototype. The interceptor is a call site binder that wraps + a real call site binder and can perform arbitrary operations on the expression + trees that the wrapped binder produces: + * Dumping the trees + * Additional rewriting + * Static compilation + * ... + + + + + Returns true if the method should not be displayed in the stack frame. + + + + + Specifies the action for which the default binder is requesting a member. + + + + + If the number of items added to the builder is greater than 4 returns a read-only collection builder containing all the items. + Returns null otherwise. + + + + + Returns null if no expression was added into the builder. + If only a single expression was added returns it. + Otherwise returns a containing the expressions added to the builder. + + + + + Wrapping a tree in this node enables jumps from finally blocks + It does this by generating control-flow logic in the tree + + Reducing this node requires a full tree walk of its body + (but not nested lambdas) + + WARNING: this node cannot contain jumps across blocks, because it + assumes any unknown jumps are jumps to an outer scope. + + + + + Factory methods. + + + + + Determines whether specified expression type represents an assignment. + + + True if the expression type represents an assignment. + + + Note that some other nodes can also assign to variables, members or array items: + MemberInit, NewArrayInit, Call with ref params, New with ref params, Dynamic with ref params. + + + + + Determines if the left child of the given expression is read or written to or both. + + + + + Converts an expression to a void type. + + An to convert to void. + An that has the property equal to and the and property set to void. + + + + Returns an expression that boxes a given value. Uses boxed objects cache for Int32 and Boolean types. + + + + + Creates a generator with type IEnumerable{T}, where T is the label.Type + + + + + + + + Null coalescing expression + {result} ::= ((tmp = {_left}) == null) ? {right} : tmp + '??' operator in C#. + + + + + True coalescing expression. + {result} ::= IsTrue(tmp = {left}) ? {right} : tmp + Generalized AND semantics. + + + + + False coalescing expression. + {result} ::= IsTrue(tmp = {left}) ? tmp : {right} + Generalized OR semantics. + + + + + True coalescing expression. + {result} ::= IsTrue(tmp = {left}) ? {right} : tmp + Generalized AND semantics. + + + + + False coalescing expression. + {result} ::= IsTrue(tmp = {left}) ? tmp : {right} + Generalized OR semantics. + + + + + Wraps the given value in a WeakReference and returns a tree that will retrieve + the value from the WeakReference. + + + + + Creates new instance of the LambdaBuilder with the specified name and return type. + + Return type of the lambda being built. + Name for the lambda being built. + new LambdaBuilder instance + + + + The helper to create the AST method call node. Will add conversions (Utils.Convert) + to parameters and instance if necessary. + + + + + The helper to create the AST method call node. Will add conversions (Utils.Convert) + to parameters and instance if necessary. + + + + + The complex call helper to create the AST method call node. + Will add conversions (Expression.Convert()), deals with default parameter values and params arrays. + + + + + The purpose of this rewriter is simple: ETs do not allow jumps (break, continue, return, goto) + that would go through a finally/fault. So we replace them with code that instead stores a flag, + and then jumps to the end of the finally/fault. At the end of the try-finally, we emit a switch + that then jumps to the correct label. + + A few things that make this more complicated: + + 1. If a finally contains a jump out, then jumps in the try/catch need to be replaced as well. + It's to support cases like this: + # returns 234 + def foo(): + try: return 123 + finally: return 234 + + We need to replace the "return 123" because after it jumps, we'll go to the finally, which + might decide to jump again, but once the IL finally exits, it ignores the finally jump and + keeps going with the original jump. The moral of the story is: if any jumps in finally are + rewritten, try/catch jumps must be also. + + 2. To generate better code, we only have one state variable, so if we have to jump out of + multiple finallys we just keep jumping. It looks sort of like this: + foo: + try { ... } finally { + try { ... } finally { + ... + if (...) { + // was: goto foo; + $flow = 1; goto endInnerFinally; + } + ... + endInnerFinally: + } + switch ($flow) { + case 1: goto endOuterFinally; + } + ... + endOuterFinally: + } + switch ($flow) { + case 1: $flow = 0; goto foo; + } + ... + + + + + + Implemented by expressions which can provide a version which is aware of light exceptions. + + Normally these expressions will simply reduce to a version which throws a real exception. + When the expression is used inside of a region of code which supports light exceptions + the light exception re-writer will call ReduceForLightExceptions. The expression can + then return a new expression which can return a light exception rather than throwing + a real .NET exception. + + + + + Implemented by binders which support light exceptions. Dynamic objects + binding against a binder which implements this interface can check + SupportsLightThrow to see if the binder currently supports safely + returning a light exception. Light exceptions can be created with + LightException.Throw. + + Binders also need to implement GetlightBinder. This method + returns a new call site binder which may return light exceptions if + the binder supports them. + + + + + Gets a binder which will support light exception if one is + available. + + + + + Returns true if a callsite binding against this binder can + return light exceptions. + + + + + Provides a method call to a method which may return light exceptions. + + The call is to a method which supports light exceptions. When reducing + an additional check and throw is added. When a block code of is re-written + for light exceptions this instead reduces to not throw a .NET exception. + + + + + Expression which produces a light exception value. This should be constructed + with the expression which creates the exception and this method will then call + a helper method which wraps the exception in our internal light exception class. + + + + + Used by compilers to provide additional debug information about LambdaExpression to DebugContext + + + + + Implemented by compilers to allow the traceback engine to get additional information. + + + + + Provides services to compilers for instrumenting code with tracebacks. + + + + + Creates a new instance of DebugContext + + + + + Transforms a LambdaExpression to a debuggable LambdaExpression + + + + + Transforms a LambdaExpression to a debuggable LambdaExpression + + + + + Resets a state associated with a source file that's maintained in the DebugContext + + + + + Threads + + + + + Hook + + + + + // This method is called from the generator to update the frame with generator's locals + + + + + Remaps the frame's state to use the generator for execution. + + Int32.MaxValue to map to latest version + + + + Thread + + + + + FrameOrder + + + + + Variables + + + + + CurrentSequencePointIndex + + + + + DebuggableLambdaBuilder is used to transform a DLR expression tree into a debuggable lambda expression. + + + + + Used to wrap a lambda that was already a generator prior to transform. + + + + + Used to rewrite expressions containing DebugInfoExpressions. + + + + + Combines source file and span. Also provides Contains and Intersects functionality. + + + + + Implementation of IDebugRuntimeVariables, which wraps IRuntimeVariables + FunctionInfo/DebugMarker + + + + + IDebugRuntimeVariables is used to wrap IRuntimeVariables and add properties for retrieving + FunctionInfo and DebugMarker from debuggable labmdas. + + + + + Default implementation of BaseDebugThread, which uses DLR's RuntimeVariablesExpression for lifting locals. + + + + + Default implementation of IDebugThreadFactory, which uses DLR's RuntimeVariablesExpression for lifting locals. + + + + + IDebugThreadFactory is used to abstract how frames and local variables are maintained at run/debug time. + + + + + GetTraceLocations + + + + + + SequencePoints + + + + + Name + + + + + CustomPayload + + + + + Callback that is fired by the traceback engine + + + + + Used to extract locals information from expressions. + + + + + Strongly-typed and parameterized string factory. + + + + + Implements IRuntimeVariables in a way that preserves scoping within the lambda. + + + + + TraceSession + + + + + Used to provide information about locals/parameters at debug time. + + + + + Type + + + + + Name + + + + + Parameter + + + + + Caches type member lookup. + + + When enumerating members (methods, properties, events) of a type (declared or inherited) Reflection enumerates all + runtime members of the type and its base types and caches the result. + When looking for a member of a specific name Reflection still enumerates all and filters out those that don't match the name. + That's inefficient when looking for members of multiple names one by one. + Instead we build a map of name to member list and then answer subsequent queries by simply looking up the dictionary. + + + + + Provides services for loading XAML and binding events to dynamic language code definitions. + + + + + Loads XAML from the specified stream and returns the deserialized object. Any event handlers + are bound to methods defined in the provided Scope and converted using the provided DynamicOperations + object. + + + + + Loads XAML from the specified filename and returns the deserialized object. Any event handlers + are bound to methods defined in the provided Scope and converted using the provided DynamicOperations + object. + + + + + Loads XAML from the specified XmlReader and returns the deserialized object. Any event handlers + are bound to methods defined in the provided Scope and converted using the provided DynamicOperations + object. + + + + + Loads XAML from the specified TextReader and returns the deserialized object. Any event handlers + are bound to methods defined in the provided Scope and converted using the provided DynamicOperations + object. + + + + + Loads XAML from the specified XamlXmlReader and returns the deserialized object. Any event handlers + are bound to methods defined in the provided Scope and converted using the provided DynamicOperations + object. + + + + + Dummy, should never be called + + + + + Returns the list of x:Name'd objects that we saw and should set on the root object. + + + + + Marks a method which may return a light exception. Such + methods need to have their return value checked and the exception + will need to be thrown if the caller is not light exception aware. + + + + + Internal re-writer class which creates code which is light exception aware. + + + + + Adds light exception handling to the provided expression which + is light exception aware. + + + + + Class used to be avoid overhead of creating expression trees when we're usually + + + + + Provides support for light exceptions. These exceptions are propagated by + returning an instance of a private wrapper class containing the exception. Code + which is aware of light exceptions will branch to apporiate exception handling + blocks when in a try and otherwise return the value up the stack. This avoids + using the underlying CLR exception mechanism with overhead such as creating stack + traces. + + When a light exception reaches the boundary of code which is not light exception + aware the caller must check to see if a light exception is being thrown and if + so raise a .NET exception. + + This class provides methods for re-writing expression trees to support light exceptions, + methods to create light throw objects, check if an object is a light + throw object, and turn such an object back into a .NET Exception which can be thrown. + + Light exceptions also don't build up stack traces or interoperate with filter blocks + via 2-pass exception handling. + + + + + Rewrites the provided expression to support light exceptions. + + Calls to the returned expression, if not from other light-weight aware calls, + need to call GetLightException on return to see if an exception was thrown + and if so throw it. + + + + + Returns a new expression which will lazily reduce to a light + expression re-written version of the same expression. + + + + + Returns a new expression which is re-written for light exceptions + but will throw an exception if it escapes the expression. If this + expression is part of a larger experssion which is later re-written + for light exceptions then it will propagate the light exception up. + + + + + Returns an object which represents a light exception. + + + + + Returns an object which represents a light exception. + + + + + Returns an object which represents a light exception. + + + + + If the binder supports light exceptions then a light exception throwing expression is returned. + + Otherwise a normal throwing expression is returned. + + + + + If the binder supports light exceptions then a light exception throwing expression is returned. + + Otherwise a normal throwing expression is returned. + + + + + Throws the exception if the value represents a light exception + + + + + Wraps the expression in a check and rethrow. + + + + + Checks to see if the provided value is a light exception. + + + + + Gets the light exception from an object which may contain a light + exception. Returns null if the object is not a light exception. + + Used for throwing the exception at non-light exception boundaries. + + + + + Returns true if the call site binder is a light exception binder and supports + light throws. Returns false otherwise. + + + + + + + Sealed wrapper class to indicate something is a light exception. + + + + + Stores information needed to emit debugging symbol information for a + source file, in particular the file name and unique language identifier + + + + + The source file name + + + + + Returns the language's unique identifier, if any + + + + + Returns the language vendor's unique identifier, if any + + + + + ArgBuilder provides an argument value used by the MethodBinder. One ArgBuilder exists for each + physical parameter defined on a method. + + Contrast this with ParameterWrapper which represents the logical argument passed to the method. + + + + + Provides the Expression which provides the value to be passed to the argument. + + + + + Provides the Expression which provides the value to be passed to the argument. + This method is called when result is intended to be used ByRef. + + + + + Provides an Expression which will update the provided value after a call to the method. + May return null if no update is required. + + + + + SimpleArgBuilder produces the value produced by the user as the argument value. It + also tracks information about the original parameter and is used to create extended + methods for params arrays and param dictionary functions. + + + + + Provides the implementation of performing AddAssign and SubtractAssign binary operations. + + The binder provided by the call site. + The handler for the operation. + The result of the operation. + true if the operation is complete, false if the call site should determine behavior. + + + + Adds a handler to an event. + + The handler to be added. + The original event with handler added. + + + + Removes handler from the event. + + The handler to be removed. + The original event with handler removed. + + + + Provides helper methods to bind COM objects dynamically. + + + + + Determines if an object is a COM object. + + The object to test. + true if the object is a COM object, false otherwise. + + + + Tries to perform binding of the dynamic get member operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + The new representing the result of the binding. + true if member evaluation may be delayed. + true if operation was bound successfully; otherwise, false. + + + + Tries to perform binding of the dynamic get member operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + The new representing the result of the binding. + true if operation was bound successfully; otherwise, false. + + + + Tries to perform binding of the dynamic set member operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + The representing the value for the set member operation. + The new representing the result of the binding. + true if operation was bound successfully; otherwise, false. + + + + Tries to perform binding of the dynamic invoke operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + An array of instances - arguments to the invoke member operation. + The new representing the result of the binding. + true if operation was bound successfully; otherwise, false. + + + + Tries to perform binding of the dynamic invoke member operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + An array of instances - arguments to the invoke member operation. + The new representing the result of the binding. + true if operation was bound successfully; otherwise, false. + + + + Tries to perform binding of the dynamic get index operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + An array of instances - arguments to the invoke member operation. + The new representing the result of the binding. + true if operation was bound successfully; otherwise, false. + + + + Tries to perform binding of the dynamic set index operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + An array of instances - arguments to the invoke member operation. + The representing the value for the set index operation. + The new representing the result of the binding. + true if operation was bound successfully; otherwise, false. + + + + Tries to perform binding of the dynamic Convert operation. + + An instance of the that represents the details of the dynamic operation. + The target of the dynamic operation. + The new representing the result of the binding. + true if operation was bound successfully; otherwise, false. + + + + Gets the member names associated with the object. + This function can operate only with objects for which returns true. + + The object for which member names are requested. + The collection of member names. + + + + Gets the member names of the data-like members associated with the object. + This function can operate only with objects for which returns true. + + The object for which member names are requested. + The collection of member names. + + + + Gets the data-like members and associated data for an object. + This function can operate only with objects for which returns true. + + The object for which data members are requested. + The enumeration of names of data members for which to retrieve values. + The collection of pairs that represent data member's names and their data. + + + + Special binder that indicates special semantics for COM GetMember operation. + + + + + This class implements an event sink for a particular RCW. + Unlike the implementation of events in TlbImp'd assemblies, + we will create only one event sink per RCW (theoretically RCW might have + several ComEventSink evenk sinks - but all these implement different source intefaces). + Each ComEventSink contains a list of ComEventSinkMethod objects - which represent + a single method on the source interface an a multicast delegate to redirect + the calls. Notice that we are chaining multicast delegates so that same + ComEventSinkMedhod can invoke multiple event handlers). + + ComEventSink implements an IDisposable pattern to Unadvise from the connection point. + Typically, when RCW is finalized the corresponding Dispose will be triggered by + ComEventSinksContainer finalizer. Notice that lifetime of ComEventSinksContainer + is bound to the lifetime of the RCW. + + + + + Contains a methods DISPID (in a string formatted of "[DISPID=N]" + and a chained list of delegates to invoke + + + + + ComEventSinkProxy class is responsible for handling QIs for sourceIid + on instances of ComEventSink. + + Background: When a COM even sink advises to a connection point it is + supposed to hand over the dispinterface. Now, some hosts will trust + the COM client to pass the correct pointer, but some will not. + E.g. Excel's implementation of Connection Points will not cause a + QI on the pointer that has been passed, however Word will QI the + pointer to return the required interface. + + ComEventSink does not, strongly speaking, implements the interface + that it claims to implement - it is just "faking" it by using IReflect. + Thus, Word's QIs on the pointer passed to ICP::Advise would fail. To + prevent this we take advangate of RealProxy's ability of + "dressing up" like other classes and hence successfully respond to QIs + for interfaces that it does not really support( it is OK to say + "I implement this interface" for event sinks only since the common + practice is to use IDistpach.Invoke when calling into event sinks). + + + + + ComEventSinksContainer is just a regular list with a finalizer. + This list is usually attached as a custom data for RCW object and + is finalized whenever RCW is finalized. + + + + + Layout of the IDispatch vtable + + + + + Invokes the object. If it falls back, just produce an error. + + + + + Splats the arguments to another nested dynamic site, which does the + real invocation of the IDynamicMetaObjectProvider. + + + + + Create a stub for the target of the optimized lopop. + + + + + + Gets expressions to access all the arguments. This includes the instance argument. + + + + + This is a helper class for runtime-callable-wrappers of COM instances. We create one instance of this type + for every generic RCW instance. + + + + + The runtime-callable wrapper + + + + + This is the factory method to get the ComObject corresponding to an RCW + + + + + + The parameter description of a method defined in a type library + + + + + Creates a representation for the paramter of a COM method + + + + + Creates a representation for the return value of a COM method + TODO: Return values should be represented by a different type + + + + + DBNull.Value if there is no default value + + + + + Look for typeinfo using IDispatch.GetTypeInfo + + + + Some COM objects just dont expose typeinfo. In these cases, this method will return null. + Some COM objects do intend to expose typeinfo, but may not be able to do so if the type-library is not properly + registered. This will be considered as acceptable or as an error condition depending on throwIfMissingExpectedTypeInfo + + + + + This method should be called when typeinfo is not available for an object. The function + will check if the typeinfo is expected to be missing. This can include error cases where + the same error is guaranteed to happen all the time, on all machines, under all circumstances. + In such cases, we just have to operate without the typeinfo. + + However, if accessing the typeinfo is failing in a transient way, we might want to throw + an exception so that we will eagerly predictably indicate the problem. + + + + + This class contains methods that either cannot be expressed in C#, or which require writing unsafe code. + Callers of these methods need to use them extremely carefully as incorrect use could cause GC-holes + and other problems. + + + + + + Ensure that "value" is a local variable in some caller's frame. So converting + the byref to an IntPtr is a safe operation. Alternatively, we could also allow + allowed "value" to be a pinned object. + + + + + We will emit an indirect call to an unmanaged function pointer from the vtable of the given interface pointer. + This approach can take only ~300 instructions on x86 compared with ~900 for Marshal.Release. We are relying on + the JIT-compiler to do pinvoke-stub-inlining and calling the pinvoke target directly. + + + + + We will emit an indirect call to an unmanaged function pointer from the vtable of the given IDispatch interface pointer. + It is not possible to express this in C#. Using an indirect pinvoke call allows us to do our own marshalling. + We can allocate the Variant arguments cheaply on the stack. We are relying on the JIT-compiler to do + pinvoke-stub-inlining and calling the pinvoke target directly. + The alternative of calling via a managed interface declaration of IDispatch would have a performance + penalty of going through a CLR stub that would have to re-push the arguments on the stack, etc. + Marshal.GetDelegateForFunctionPointer could be used here, but its too expensive (~2000 instructions on x86). + + + + + Cached information from a TLB. Only information that is required is saved. CoClasses are used + for event hookup. Enums are stored for accessing symbolic names from scripts. + + + + + Reads the latest registered type library for the corresponding GUID, + reads definitions of CoClass'es and Enum's from this library + and creates a IDynamicMetaObjectProvider that allows to instantiate coclasses + and get actual values for the enums. + + Type Library Guid + ComTypeLibDesc object + + + + Gets an ITypeLib object from OLE Automation compatible RCW , + reads definitions of CoClass'es and Enum's from this library + and creates a IDynamicMetaObjectProvider that allows to instantiate coclasses + and get actual values for the enums. + + OLE automation compatible RCW + ComTypeLibDesc object + + + + This represents a bound dispmember on a IDispatch object. + + + + + Strongly-typed and parameterized string factory. + + + Strongly-typed and parameterized string factory. + + + + + A string like "Unexpected VarEnum {0}." + + + + + A string like "Error while invoking {0}." + + + + + A string like "Error while invoking {0}." + + + + + A string like "Error while invoking {0}. Named arguments are not supported." + + + + + A string like "Error while invoking {0}." + + + + + A string like "Could not convert argument {0} for call to {1}." + + + + + A string like "Error while invoking {0}. A required parameter was omitted." + + + + + A string like "IDispatch::GetIDsOfNames behaved unexpectedly for {0}." + + + + + A string like "Could not get dispatch ID for {0} (error: {1})." + + + + + A string like "There are valid conversions from {0} to {1}." + + + + + A string like "Variant.GetAccessor cannot handle {0}." + + + + + A string like "Cannot access member {1} declared on type {0} because the type contains generic parameters." + + + + + A string like "Type '{0}' is missing or cannot be loaded." + + + + + A string like "static property "{0}" of "{1}" can only be read through a type, not an instance" + + + + + A string like "static property "{0}" of "{1}" can only be assigned to through a type, not an instance" + + + + + A string like "Type parameter is {0}. Expected a delegate." + + + + + A string like "Cannot cast from type '{0}' to type '{1}" + + + + + A string like "unknown member type: '{0}'. " + + + + + A string like "The operation requires a non-generic type for {0}, but this represents generic types only" + + + + + A string like "Invalid operation: '{0}'" + + + + + A string like "Cannot create default value for type {0}." + + + + + A string like "Unhandled convert: {0}" + + + + + A string like "{0}.{1} has no publiclly visible method." + + + + + A string like "Extension type {0} must be public." + + + + + A string like "Invalid type of argument {0}; expecting {1}." + + + + + A string like "Field {0} is read-only" + + + + + A string like "Property {0} is read-only" + + + + + A string like "Expected event from {0}.{1}, got event from {2}.{3}." + + + + + A string like "expected bound event, got {0}." + + + + + A string like "Expected type {0}, got {1}." + + + + + A string like "can only write to member {0}." + + + + + A string like "Invalid stream type: {0}." + + + + + A string like "can't add another casing for identifier {0}" + + + + + A string like "can't add new identifier {0}" + + + + + A string like "Type '{0}' doesn't provide a suitable public constructor or its implementation is faulty: {1}" + + + + + A string like "Cannot emit constant {0} ({1})" + + + + + A string like "No implicit cast from {0} to {1}" + + + + + A string like "No explicit cast from {0} to {1}" + + + + + A string like "name '{0}' not defined" + + + + + A string like "Cannot create instance of {0} because it contains generic parameters" + + + + + A string like "Non-verifiable assembly generated: {0}:\nAssembly preserved as {1}\nError text:\n{2}\n" + + + + + A string like "COM object is expected." + + + + + A string like "Cannot perform call." + + + + + A string like "COM object does not support events." + + + + + A string like "COM object does not support specified source interface." + + + + + A string like "Marshal.SetComObjectData failed." + + + + + A string like "This method exists only to keep the compiler happy." + + + + + A string like "ResolveComReference.CannotRetrieveTypeInformation." + + + + + A string like "Attempting to wrap an unsupported enum type." + + + + + A string like "Attempting to pass an event handler of an unsupported type." + + + + + A string like "Method precondition violated" + + + + + A string like "Invalid argument value" + + + + + A string like "Non-empty string required" + + + + + A string like "Non-empty collection required" + + + + + A string like "must by an Exception instance" + + + + + A string like "Type of test must be bool" + + + + + A string like "Type of the expression must be bool" + + + + + A string like "Empty string is not a valid path." + + + + + A string like "Invalid delegate type (Invoke method not found)." + + + + + A string like "expected only static property" + + + + + A string like "Property doesn't exist on the provided type" + + + + + A string like "Field doesn't exist on provided type" + + + + + A string like "Type doesn't have constructor with a given signature" + + + + + A string like "Type doesn't have a method with a given name." + + + + + A string like "Type doesn't have a method with a given name and signature." + + + + + A string like "Count must be non-negative." + + + + + A string like "arrayType must be an array type" + + + + + A string like "Either code or target must be specified." + + + + + A string like "RuleBuilder can only be used with delegates whose first argument is CallSite." + + + + + A string like "no instance for call." + + + + + A string like "Missing Test." + + + + + A string like "Missing Target." + + + + + A string like "Finally already defined." + + + + + A string like "Can not have fault and finally." + + + + + A string like "Fault already defined." + + + + + A string like "Global/top-level local variable names must be unique." + + + + + A string like "Generating code from non-serializable CallSiteBinder." + + + + + A string like "pecified path is invalid." + + + + + A string like "Dictionaries are not hashable." + + + + + A string like "language already registered." + + + + + A string like "The method or operation is not implemented." + + + + + A string like "No exception." + + + + + A string like "Already initialized." + + + + + A string like "CreateScopeExtension must return a scope extension." + + + + + A string like "Invalid number of parameters for the service." + + + + + A string like "Cannot change non-caching value." + + + + + A string like "No code to compile." + + + + + A string like "Queue empty." + + + + + A string like "Enumeration has not started. Call MoveNext." + + + + + A string like "Enumeration already finished." + + + + + A string like "Invalid output directory." + + + + + A string like "Invalid assembly name or file extension." + + + + + A string like "No default value for a given type." + + + + + A string like "Specified language provider type is not registered." + + + + + A string like "can't read from property" + + + + + A string like "can't write to property" + + + + + Strongly-typed and parameterized exception factory. + + + Strongly-typed and parameterized exception factory. + + + + + ArgumentException with message like "COM object does not support events." + + + + + ArgumentException with message like "COM object does not support specified source interface." + + + + + InvalidOperationException with message like "Marshal.SetComObjectData failed." + + + + + InvalidOperationException with message like "This method exists only to keep the compiler happy." + + + + + InvalidOperationException with message like "Unexpected VarEnum {0}." + + + + + System.Reflection.TargetParameterCountException with message like "Error while invoking {0}." + + + + + MissingMemberException with message like "Error while invoking {0}." + + + + + ArgumentException with message like "Error while invoking {0}. Named arguments are not supported." + + + + + OverflowException with message like "Error while invoking {0}." + + + + + ArgumentException with message like "Could not convert argument {0} for call to {1}." + + + + + ArgumentException with message like "Error while invoking {0}. A required parameter was omitted." + + + + + InvalidOperationException with message like "ResolveComReference.CannotRetrieveTypeInformation." + + + + + ArgumentException with message like "IDispatch::GetIDsOfNames behaved unexpectedly for {0}." + + + + + InvalidOperationException with message like "Attempting to wrap an unsupported enum type." + + + + + InvalidOperationException with message like "Attempting to pass an event handler of an unsupported type." + + + + + MissingMemberException with message like "Could not get dispatch ID for {0} (error: {1})." + + + + + System.Reflection.AmbiguousMatchException with message like "There are valid conversions from {0} to {1}." + + + + + NotImplementedException with message like "Variant.GetAccessor cannot handle {0}." + + + + + ArgumentException with message like "Either code or target must be specified." + + + + + InvalidOperationException with message like "Type parameter is {0}. Expected a delegate." + + + + + InvalidOperationException with message like "Cannot cast from type '{0}' to type '{1}" + + + + + InvalidOperationException with message like "unknown member type: '{0}'. " + + + + + InvalidOperationException with message like "RuleBuilder can only be used with delegates whose first argument is CallSite." + + + + + InvalidOperationException with message like "no instance for call." + + + + + InvalidOperationException with message like "Missing Test." + + + + + InvalidOperationException with message like "Missing Target." + + + + + TypeLoadException with message like "The operation requires a non-generic type for {0}, but this represents generic types only" + + + + + ArgumentException with message like "Invalid operation: '{0}'" + + + + + InvalidOperationException with message like "Finally already defined." + + + + + InvalidOperationException with message like "Can not have fault and finally." + + + + + InvalidOperationException with message like "Fault already defined." + + + + + ArgumentException with message like "Cannot create default value for type {0}." + + + + + ArgumentException with message like "Unhandled convert: {0}" + + + + + InvalidOperationException with message like "{0}.{1} has no publiclly visible method." + + + + + ArgumentException with message like "Global/top-level local variable names must be unique." + + + + + ArgumentException with message like "Generating code from non-serializable CallSiteBinder." + + + + + ArgumentException with message like "pecified path is invalid." + + + + + ArgumentTypeException with message like "Dictionaries are not hashable." + + + + + InvalidOperationException with message like "language already registered." + + + + + NotImplementedException with message like "The method or operation is not implemented." + + + + + InvalidOperationException with message like "No exception." + + + + + ArgumentException with message like "Extension type {0} must be public." + + + + + InvalidOperationException with message like "Already initialized." + + + + + InvalidImplementationException with message like "CreateScopeExtension must return a scope extension." + + + + + ArgumentException with message like "Invalid number of parameters for the service." + + + + + ArgumentException with message like "Invalid type of argument {0}; expecting {1}." + + + + + ArgumentException with message like "Cannot change non-caching value." + + + + + MissingMemberException with message like "Field {0} is read-only" + + + + + MissingMemberException with message like "Property {0} is read-only" + + + + + ArgumentException with message like "Expected event from {0}.{1}, got event from {2}.{3}." + + + + + ArgumentTypeException with message like "expected bound event, got {0}." + + + + + ArgumentTypeException with message like "Expected type {0}, got {1}." + + + + + MemberAccessException with message like "can only write to member {0}." + + + + + InvalidOperationException with message like "No code to compile." + + + + + ArgumentException with message like "Invalid stream type: {0}." + + + + + InvalidOperationException with message like "Queue empty." + + + + + InvalidOperationException with message like "Enumeration has not started. Call MoveNext." + + + + + InvalidOperationException with message like "Enumeration already finished." + + + + + InvalidOperationException with message like "can't add another casing for identifier {0}" + + + + + InvalidOperationException with message like "can't add new identifier {0}" + + + + + ArgumentException with message like "Invalid output directory." + + + + + ArgumentException with message like "Invalid assembly name or file extension." + + + + + ArgumentException with message like "Cannot emit constant {0} ({1})" + + + + + ArgumentException with message like "No implicit cast from {0} to {1}" + + + + + ArgumentException with message like "No explicit cast from {0} to {1}" + + + + + MissingMemberException with message like "name '{0}' not defined" + + + + + ArgumentException with message like "No default value for a given type." + + + + + ArgumentException with message like "Specified language provider type is not registered." + + + + + InvalidOperationException with message like "can't read from property" + + + + + InvalidOperationException with message like "can't write to property" + + + + + ArgumentException with message like "Cannot create instance of {0} because it contains generic parameters" + + + + + System.Security.VerificationException with message like "Non-verifiable assembly generated: {0}:\nAssembly preserved as {1}\nError text:\n{2}\n" + + + + + This is similar to ComTypes.EXCEPINFO, but lets us do our own custom marshaling + + + + + An object that implements IDispatch + + This currently has the following issues: + 1. If we prefer ComObjectWithTypeInfo over IDispatchComObject, then we will often not + IDispatchComObject since implementations of IDispatch often rely on a registered type library. + If we prefer IDispatchComObject over ComObjectWithTypeInfo, users get a non-ideal experience. + 2. IDispatch cannot distinguish between properties and methods with 0 arguments (and non-0 + default arguments?). So obj.foo() is ambiguous as it could mean invoking method foo, + or it could mean invoking the function pointer returned by property foo. + We are attempting to find whether we need to call a method or a property by examining + the ITypeInfo associated with the IDispatch. ITypeInfo tell's use what parameters the method + expects, is it a method or a property, what is the default property of the object, how to + create an enumerator for collections etc. + 3. IronPython processes the signature and converts ref arguments into return values. + However, since the signature of a DispMethod is not available beforehand, this conversion + is not possible. There could be other signature conversions that may be affected. How does + VB6 deal with ref arguments and IDispatch? + + We also support events for IDispatch objects: + Background: + COM objects support events through a mechanism known as Connect Points. + Connection Points are separate objects created off the actual COM + object (this is to prevent circular references between event sink + and event source). When clients want to sink events generated by + COM object they would implement callback interfaces (aka source + interfaces) and hand it over (advise) to the Connection Point. + + Implementation details: + When IDispatchComObject.TryGetMember request is received we first check + whether the requested member is a property or a method. If this check + fails we will try to determine whether an event is requested. To do + so we will do the following set of steps: + 1. Verify the COM object implements IConnectionPointContainer + 2. Attempt to find COM object's coclass's description + a. Query the object for IProvideClassInfo interface. Go to 3, if found + b. From object's IDispatch retrieve primary interface description + c. Scan coclasses declared in object's type library. + d. Find coclass implementing this particular primary interface + 3. Scan coclass for all its source interfaces. + 4. Check whether to any of the methods on the source interfaces matches + the request name + + Once we determine that TryGetMember requests an event we will return + an instance of BoundDispEvent class. This class has InPlaceAdd and + InPlaceSubtract operators defined. Calling InPlaceAdd operator will: + 1. An instance of ComEventSinksContainer class is created (unless + RCW already had one). This instance is hanged off the RCW in attempt + to bind the lifetime of event sinks to the lifetime of the RCW itself, + meaning event sink will be collected once the RCW is collected (this + is the same way event sinks lifetime is controlled by PIAs). + Notice: ComEventSinksContainer contains a Finalizer which will go and + unadvise all event sinks. + Notice: ComEventSinksContainer is a list of ComEventSink objects. + 2. Unless we have already created a ComEventSink for the required + source interface, we will create and advise a new ComEventSink. Each + ComEventSink implements a single source interface that COM object + supports. + 3. ComEventSink contains a map between method DISPIDs to the + multicast delegate that will be invoked when the event is raised. + 4. ComEventSink implements IReflect interface which is exposed as + custom IDispatch to COM consumers. This allows us to intercept calls + to IDispatch.Invoke and apply custom logic - in particular we will + just find and invoke the multicast delegate corresponding to the invoked + dispid. + + + + + ArgBuilder which always produces null. + + + + + If a managed user type (as opposed to a primitive type or a COM object) is passed as an argument to a COM call, we need + to determine the VarEnum type we will marshal it as. We have the following options: + 1. Raise an exception. Languages with their own version of primitive types would not be able to call + COM methods using the language's types (for eg. strings in IronRuby are not System.String). An explicit + cast would be needed. + 2. We could marshal it as VT_DISPATCH. Then COM code will be able to access all the APIs in a late-bound manner, + but old COM components will probably malfunction if they expect a primitive type. + 3. We could guess which primitive type is the closest match. This will make COM components be as easily + accessible as .NET methods. + 4. We could use the type library to check what the expected type is. However, the type library may not be available. + + VarEnumSelector implements option # 3 + + + + + Gets the managed type that an object needs to be coverted to in order for it to be able + to be represented as a Variant. + + In general, there is a many-to-many mapping between Type and VarEnum. However, this method + returns a simple mapping that is needed for the current implementation. The reason for the + many-to-many relation is: + 1. Int32 maps to VT_I4 as well as VT_ERROR, and Decimal maps to VT_DECIMAL and VT_CY. However, + this changes if you throw the wrapper types into the mix. + 2. There is no Type to represent COM types. __ComObject is a private type, and Object is too + general. + + + + + Creates a family of COM types such that within each family, there is a completely non-lossy + conversion from a type to an earlier type in the family. + + + + + Get the (one representative type for each) primitive type families that the argument can be converted to + + + + + If there is more than one type family that the argument can be converted to, we will throw a + AmbiguousMatchException instead of randomly picking a winner. + + + + + Is there a unique primitive type that has the best conversion for the argument + + + + + Get the COM Variant type that argument should be marshaled as for a call to COM + + + + + Variant is the basic COM type for late-binding. It can contain any other COM data type. + This type definition precisely matches the unmanaged data layout so that the struct can be passed + to and from COM calls. + + + + + Primitive types are the basic COM types. It includes valuetypes like ints, but also reference types + like BStrs. It does not include composite types like arrays and user-defined COM types (IUnknown/IDispatch). + + + + + Get the managed object representing the Variant. + + + + + + Release any unmanaged memory associated with the Variant + + + + + + VariantBuilder handles packaging of arguments into a Variant for a call to IDispatch.Invoke + + + + + Provides a simple expression which enables embedding FieldBuilder's + in an AST before the type is complete. + + + + + Used to dispatch a single interactive command. It can be used to control things like which Thread + the command is executed on, how long the command is allowed to execute, etc + + + + + Supports detecting the remote runtime being killed, and starting up a new one. + + Threading model: + + ConsoleRestartManager creates a separate thread on which to create and execute the consoles. + There are usually atleast three threads involved: + + 1. Main app thread: Instantiates ConsoleRestartManager and accesses its APIs. This thread has to stay + responsive to user input and so the ConsoleRestartManager APIs cannot be long-running or blocking. + Since the remote runtime process can terminate asynchronously, the current RemoteConsoleHost can + change at any time (if auto-restart is enabled). The app should typically not care which instance of + RemoteConsoleHost is currently being used. The flowchart of this thread is: + Create ConsoleRestartManager + ConsoleRestartManager.Start + Loop: + Respond to user input | Send user input to console for execution | BreakExecution | RestartConsole | GetMemberNames + ConsoleRestartManager.Terminate + TODO: Currently, BreakExecution and GetMemberNames are called by the main thread synchronously. + Since they execute code in the remote runtime, they could take arbitrarily long. We should change + this so that the main app thread can never be blocked indefinitely. + + 2. Console thread: Dedicated thread for creating RemoteConsoleHosts and executing code (which could + take a long time or block indefinitely). + Wait for ConsoleRestartManager.Start to be called + Loop: + Create RemoteConsoleHost + Wait for signal for: + Execute code | RestartConsole | Process.Exited + + 3. CompletionPort async callbacks: + Process.Exited | Process.OutputDataReceived | Process.ErrorDataReceived + + 4. Finalizer thred + Some objects may have a Finalize method (which possibly calls Dispose). Not many (if any) types + should have a Finalize method. + + + + + + Accessing _remoteConsoleHost from a thread other than console thread can result in race. + If _remoteConsoleHost is accessed while holding _accessLock, it is guaranteed to be + null or non-disposed. + + + + + This is created on the "creating thread", and goes on standby. Start needs to be called for activation. + + A host might want one of two behaviors: + 1. Keep the REPL loop alive indefinitely, even when a specific instance of the RemoteConsoleHost terminates normally + 2. Close the REPL loop when an instance of the RemoteConsoleHost terminates normally, and restart the loop + only if the instance terminates abnormally. + + + + Needs to be called for activation. + + + + + Request (from another thread) the console REPL loop to terminate + + + + + This allows the RemoteConsoleHost to abort a long-running operation. The RemoteConsoleHost itself + does not know which ThreadPool thread might be processing the remote call, and so it needs + cooperation from the remote runtime server. + + + + + Since OnOutputDataReceived is sent async, it can arrive late. The remote console + cannot know if all output from the current command has been received. So + RemoteCommandDispatcher writes out a marker to indicate the end of the output + + + + + Aborts the current active call to Execute by doing Thread.Abort + + true if a Thread.Abort was actually called. false if there is no active call to Execute + + + + Customize the CommandLine for remote scenarios + + + + + Command line hosting service. + + + + + Executes the comand line - depending upon the options provided we will + either run a single file, a single command, or enter the interactive loop. + + + + + Runs the command line. Languages can override this to provide custom behavior other than: + 1. Running a single command + 2. Running a file + 3. Entering the interactive console loop. + + + + + + Runs the specified filename + + + + + Starts the interactive loop. Performs any initialization necessary before + starting the loop and then calls RunInteractiveLoop to start the loop. + + Returns the exit code when the interactive loop is completed. + + + + + Runs the interactive loop. Repeatedly parse and run interactive actions + until an exit code is received. If any exceptions are unhandled displays + them to the console + + + + + Attempts to run a single interaction and handle any language-specific + exceptions. Base classes can override this and call the base implementation + surrounded with their own exception handling. + + Returns null if successful and execution should continue, or an exit code. + + + + + Parses a single interactive command or a set of statements and executes it. + + Returns null if successful and execution should continue, or the appropiate exit code. + + We check if the code read is an interactive command or statements is by checking for NewLine + If the code contains NewLine, it's a set of statements (most probably from SendToConsole) + If the code does not contain a NewLine, it's an interactive command typed by the user at the prompt + + + + + Private helper function to see if we should treat the current input as a blank link. + + We do this if we only have auto-indent text. + + + + + Read a statement, which can potentially be a multiple-line statement suite (like a class declaration). + + Should the console session continue, or did the user indicate + that it should be terminated? + Expression to evaluate. null for empty input + + + + Gets the next level for auto-indentation + + + + + Scope is not remotable, and this only works in the same AppDomain. + + + + + CommandDispatcher to ensure synchronize output from the remote runtime + + + + + ConsoleHost where the ScriptRuntime is hosted in a separate process (referred to as the remote runtime server) + + The RemoteConsoleHost spawns the remote runtime server and specifies an IPC channel name to use to communicate + with each other. The remote runtime server creates and initializes a ScriptRuntime and a ScriptEngine, and publishes + it over the specified IPC channel at a well-known URI. Note that the RemoteConsoleHost cannot easily participate + in the initialization of the ScriptEngine as classes like LanguageContext are not remotable. + + The RemoteConsoleHost then starts the interactive loop and executes commands on the ScriptEngine over the remoting channel. + The RemoteConsoleHost listens to stdout of the remote runtime server and echos it locally to the user. + + + + + Core functionality to implement an interactive console. This should be derived for concrete implementations + + + + + Request (from another thread) the console REPL loop to terminate + + The caller can specify the exitCode corresponding to the event triggering + the termination. This will be returned from CommandLine.Run + + + + To be called from entry point. + + + + + Console Host entry-point .exe name. + + + + + Allows the console to customize the environment variables, working directory, etc. + + At the least, processInfo.FileName should be initialized + + + + Aborts the current active call to Execute by doing Thread.Abort + + true if a Thread.Abort was actually called. false if there is no active call to Execute + + + + Called if the remote runtime process exits by itself. ie. without the remote console killing it. + + + + + The remote runtime server uses this class to publish an initialized ScriptEngine and ScriptRuntime + over a remoting channel. + + + + + Publish objects so that the host can use it, and then block indefinitely (until the input stream is open). + + Note that we should publish only one object, and then have other objects be accessible from it. Publishing + multiple objects can cause problems if the client does a call like "remoteProxy1(remoteProxy2)" as remoting + will not be able to know if the server object for both the proxies is on the same server. + + The IPC channel that the remote console expects to use to communicate with the ScriptEngine + A intialized ScriptScope that is ready to start processing script commands + + + Instruction can't be created due to insufficient privileges. + + + Instruction can't be created due to insufficient privileges. + + + + Gets the next type or null if no more types are available. + + + + + Uses reflection to create new instance of the appropriate ReflectedCaller + + + + + Fast creation works if we have a known primitive types for the entire + method siganture. If we have any non-primitive types then FastCreate + falls back to SlowCreate which works for all types. + + Fast creation is fast because it avoids using reflection (MakeGenericType + and Activator.CreateInstance) to create the types. It does this through + calling a series of generic methods picking up each strong type of the + signature along the way. When it runs out of types it news up the + appropriate CallInstruction with the strong-types that have been built up. + + One relaxation is that for return types which are non-primitive types + we can fallback to object due to relaxed delegates. + + + + + The number of arguments including "this" for instance methods. + + + + + This instruction implements a goto expression that can jump out of any expression. + It pops values (arguments) from the evaluation stack that the expression tree nodes in between + the goto expression and the target label node pushed and not consumed yet. + A goto expression can jump into a node that evaluates arguments only if it carries + a value and jumps right after the first argument (the carried value will be used as the first argument). + Goto can jump into an arbitrary child of a BlockExpression since the block doesn’t accumulate values + on evaluation stack as its child expressions are being evaluated. + + Goto needs to execute any finally blocks on the way to the target label. + + { + f(1, 2, try { g(3, 4, try { goto L } finally { ... }, 6) } finally { ... }, 7, 8) + L: ... + } + + The goto expression here jumps to label L while having 4 items on evaluation stack (1, 2, 3 and 4). + The jump needs to execute both finally blocks, the first one on stack level 4 the + second one on stack level 2. So, it needs to jump the first finally block, pop 2 items from the stack, + run second finally block and pop another 2 items from the stack and set instruction pointer to label L. + + Goto also needs to rethrow ThreadAbortException iff it jumps out of a catch handler and + the current thread is in "abort requested" state. + + + + + The first instruction of finally block. + + + + + The last instruction of finally block. + + + + + The last instruction of a catch exception handler. + + + + + The last instruction of a fault exception handler. + + + + + Implements dynamic call site with many arguments. Wraps the arguments into . + + + + + Contains compiler state corresponding to a LabelTarget + See also LabelScopeInfo. + + + + + Returns true if we can jump into this node + + + + + Attaches a cookie to the last emitted instruction. + + + + Instruction can't be created due to insufficient privileges. + + + + Manages creation of interpreted delegates. These delegates will get + compiled if they are executed often enough. + + + + + Used by LightLambda to get the compiled delegate. + + + + + Create a compiled delegate for the LightLambda, and saves it so + future calls to Run will execute the compiled code instead of + interpreting. + + + + + true if the compiled delegate has the same type as the lambda; + false if the type was changed for interpretation. + + + + + Provides notification that the LightLambda has been compiled. + + + + + A simple forth-style stack machine for executing Expression trees + without the need to compile to IL and then invoke the JIT. This trades + off much faster compilation time for a slower execution performance. + For code that is only run a small number of times this can be a + sweet spot. + + The core loop in the interpreter is the RunInstructions method. + + + + + Runs instructions within the given frame. + + + Interpreted stack frames are linked via Parent reference so that each CLR frame of this method corresponds + to an interpreted stack frame in the chain. It is therefore possible to combine CLR stack traces with + interpreted stack traces by aligning interpreted frames to the frames of this method. + Each group of subsequent frames of Run method corresponds to a single interpreted frame. + + + + + Visits a LambdaExpression, replacing the constants with direct accesses + to their StrongBox fields. This is very similar to what + ExpressionQuoter does for LambdaCompiler. + + Also inserts debug information tracking similar to what the interpreter + would do. + + + + + Local variable mapping. + + + + + The variable that holds onto the StrongBox{object}[] closure from + the interpreter + + + + + A stack of variables that are defined in nested scopes. We search + this first when resolving a variable in case a nested scope shadows + one of our variable instances. + + + + + Walks the lambda and produces a higher order function, which can be + used to bind the lambda to a closure array from the interpreter. + + The lambda to bind. + Variables which are being accessed defined in the outer scope. + A delegate that can be called to produce a delegate bound to the passed in closure array. + + + + Provides a list of variables, supporing read/write of the values + + + + + Gets a copy of the local variables which are defined in the current scope. + + + + + + Checks to see if the given variable is defined within the current local scope. + + + + + Gets the variables which are defined in an outer scope and available within the current scope. + + + + + Tracks where a variable is defined and what range of instructions it's used in + + + + + A single interpreted frame might be represented by multiple subsequent Interpreter.Run CLR frames. + This method filters out the duplicate CLR frames. + + + + + arbitrary precision integers + + + + + Calculates the natural logarithm of the BigInteger. + + + + + Calculates log base 10 of a BigInteger. + + + + + Return the value of this BigInteger as a little-endian twos-complement + byte array, using the fewest number of bytes possible. If the value is zero, + return an array of one byte whose element is 0x00. + + + + + Return the sign of this BigInteger: -1, 0, or 1. + + + + + Wraps all arguments passed to a dynamic site with more arguments than can be accepted by a Func/Action delegate. + The binder generating a rule for such a site should unwrap the arguments first and then perform a binding to them. + + + + + Provides support for converting objects to delegates using the DLR binders + available by the provided language context. + + Primarily this supports converting objects implementing IDynamicMetaObjectProvider + to the appropriate delegate type. + + If the provided object is already a delegate of the appropriate type then the + delegate will simply be returned. + + + + Table of dynamically generated delegates which are shared based upon method signature. + + + + Creates a delegate with a given signature that could be used to invoke this object from non-dynamic code (w/o code context). + A stub is created that makes appropriate conversions/boxing and calls the object. + The stub should be executed within a context of this object's language. + + The converted delegate. + The object is either a subclass of Delegate but not the requested type or does not implement IDynamicMetaObjectProvider. + + + + Represents the type of a null value. + + + + + Private constructor is never called since 'null' is the only valid instance. + + + + + These are some generally useful helper methods. Currently the only methods are those to + cached boxed representations of commonly used primitive types so that they can be shared. + This is useful to most dynamic languages that use object as a universal type. + + The methods in RuntimeHelepers are caleld by the generated code. From here the methods may + dispatch to other parts of the runtime to get bulk of the work done, but the entry points + should be here. + + + + + Used by prologue code that is injected in lambdas to ensure that delegate signature matches what + lambda body expects. Such code typically unwraps subset of the params array manually, + but then passes the rest in bulk if lambda body also expects params array. + + This calls ArrayUtils.ShiftLeft, but performs additional checks that + ArrayUtils.ShiftLeft assumes. + + + + + A singleton boxed boolean true. + + + + + A singleton boxed boolean false. + + + + + Gets a singleton boxed value for the given integer if possible, otherwise boxes the integer. + + The value to box. + The boxed value. + + + + Helper method to create an instance. Work around for Silverlight where Activator.CreateInstance + is SecuritySafeCritical. + + TODO: Why can't we just emit the right thing for default(T)? + It's always null for reference types and it's well defined for value types + + + + + EventInfo.EventHandlerType getter is marked SecuritySafeCritical in CoreCLR + This method is to get to the property without using Reflection + + + + + + + Provides the test to see if an interpreted call site should switch over to being compiled. + + + + + A parameterless generator, that is of type IEnumerable, IEnumerable{T}, + IEnumerator, or IEnumerator{T}. Its body can contain a series of + YieldExpressions. Each call into MoveNext on the enumerator reenters + the generator, and executes until it reaches a YieldReturn or YieldBreak + expression + + + + + The label used by YieldBreak and YieldReturn expressions to yield + from this generator + + + + + The body of the generator, which can contain YieldBreak and + YieldReturn expressions + + + + + Indicates whether the lhs instances are preserved when assignments + are made to expressions containing yields. + + + + + When finding a yield return or yield break, this rewriter flattens out + containing blocks, scopes, and expressions with stack state. All + scopes encountered have their variables promoted to the generator's + closure, so they survive yields. + + + + + Makes an assignment to this variable. Pushes the assignment as far + into the right side as possible, to allow jumps into it. + + + + + Returns true if the expression remains constant no matter when it is evaluated. + + + + + Represents either a YieldBreak or YieldReturn in a GeneratorExpression + If Value is non-null, it's a YieldReturn; otherwise it's a YieldBreak + and executing it will stop enumeration of the generator, causing + MoveNext to return false. + + + + + The value yieled from this expression, if it is a yield return + + + + + The label used to yield from this generator + + + + + Tests to see if the expression is a constant with the given value. + + The expression to examine + The constant value to check for. + true/false + + + + Tests to see if the expression is a constant with the given value. + + The expression to examine + The constant value to check for. + true/false + + + + Begins a catch block. + + + + + Begins an exception block for a filtered exception. + + + + + Begins an exception block for a non-filtered exception. + + + + + + Begins an exception fault block + + + + + Begins a finally block + + + + + Ends an exception block. + + + + + Begins a lexical scope. + + + + + Ends a lexical scope. + + + + + Declares a local variable of the specified type. + + + + + Declares a local variable of the specified type, optionally + pinning the object referred to by the variable. + + + + + Declares a new label. + + + + + Marks the label at the current position. + + + + + Emits an instruction. + + + + + Emits an instruction with a byte argument. + + + + + Emits an instruction with the metadata token for the specified contructor. + + + + + Emits an instruction with a double argument. + + + + + Emits an instruction with the metadata token for the specified field. + + + + + Emits an instruction with a float argument. + + + + + Emits an instruction with an int argument. + + + + + Emits an instruction with a label argument. + + + + + Emits an instruction with multiple target labels (switch). + + + + + Emits an instruction with a reference to a local variable. + + + + + Emits an instruction with a long argument. + + + + + Emits an instruction with the metadata token for a specified method. + + + + + Emits an instruction with a signed byte argument. + + + + + Emits an instruction with a short argument. + + + + + Emits an instruction with a signature token. + + + + + Emits an instruction with a string argument. + + + + + Emits an instruction with the metadata token for a specified type argument. + + + + + Emits a call or a virtual call to the varargs method. + + + + + Emits an unmanaged indirect call instruction. + + + + + Emits a managed indirect call instruction. + + + + + Marks a sequence point. + + + + + Specifies the namespace to be used in evaluating locals and watches for the + current active lexical scope. + + + + + Emits a Ldind* instruction for the appropriate type + + + + + Emits a Stind* instruction for the appropriate type. + + + + + Emits a Stelem* instruction for the appropriate type. + + + + + Boxes the value of the stack. No-op for reference types. Void is + converted to a null reference. For almost all value types this + method will box them in the standard way. Int32 and Boolean are + handled with optimized conversions that reuse the same object for + small values. For Int32 this is purely a performance optimization. + For Boolean this is use to ensure that True and False are always + the same objects. + + + + + Emits an array of constant values provided in the given list. + The array is strongly typed. + + + + + Emits an array of values of count size. The items are emitted via the callback + which is provided with the current item index to emit. + + + + + Emits an array construction code. + The code assumes that bounds for all dimensions + are already emitted. + + + + + Emits default(T) + Semantics match C# compiler behavior + + + + + A simple dictionary of queues, keyed off a particular type + This is useful for storing free lists of variables + + + + + Directory where snippet assembly will be saved if SaveSnippets is set. + + + + + Save snippets to an assembly (see also SnippetsDirectory, SnippetsFileName). + + + + + Gets the Compiler associated with the Type Initializer (cctor) creating it if necessary. + + + + + A tree rewriter which will find dynamic sites which consume dynamic sites and + turn them into a single combo dynamic site. The combo dynamic site will then run the + individual meta binders and produce the resulting code in a single dynamic site. + + + + + A reducible node which we use to generate the combo dynamic sites. Each time we encounter + a dynamic site we replace it with a ComboDynamicSiteExpression. When a child of a dynamic site + turns out to be a ComboDynamicSiteExpression we will then merge the child with the parent updating + the binding mapping info. If any of the inputs cause side effects then we'll stop the combination. + + + + + A binder which can combine multiple binders into a single dynamic site. The creator + of this needs to perform the mapping of parameters, constants, and sub-site expressions + and provide a List of BinderMappingInfo representing this data. From there the ComboBinder + just processes the list to create the resulting code. + + + + + Provides a mapping for inputs of combo action expressions. The input can map + to either an input of the new dynamic site, an input of a previous DynamicExpression, + or a ConstantExpression which has been pulled out of the dynamic site arguments. + + + + + Contains the mapping information for a single Combo Binder. This includes the original + meta-binder and the mapping of parameters, sub-sites, and constants into the binding. + + + + + Builds up a series of conditionals when the False clause isn't yet known. We can + keep appending conditions and if true's. Each subsequent true branch becomes the + false branch of the previous condition and body. Finally a non-conditional terminating + branch must be added. + + + + + Adds a new conditional and body. The first call this becomes the top-level + conditional, subsequent calls will have it added as false statement of the + previous conditional. + + + + + Adds the non-conditional terminating node. + + + + + Adds the non-conditional terminating node. + + + + + Gets the resulting meta object for the full body. FinishCondition + must have been called. + + + + + Adds a variable which will be scoped at the level of the final expression. + + + + + Marks a method as not having side effects. used by the combo binder + to allow calls to methods. + + + + + OperatorInfo provides a mapping from DLR ExpressionType to their associated .NET methods. + + + + + Given an operator returns the OperatorInfo associated with the operator or null + + + + + The operator the OperatorInfo provides info for. + + + + + The primary method name associated with the method. This method name is + usally in the form of op_Operator (e.g. op_Addition). + + + + + The secondary method name associated with the method. This method name is + usually a standard .NET method name with pascal casing (e.g. Add). + + + + + The builder for creating the LambdaExpression node. + + Since the nodes require that parameters and variables are created + before hand and then passed to the factories creating LambdaExpression + this builder keeps track of the different pieces and at the end creates + the LambdaExpression. + + TODO: This has some functionality related to CodeContext that should be + removed, in favor of languages handling their own local scopes + + + + + Creates a parameter on the lambda with a given name and type. + + Parameters maintain the order in which they are created, + however custom ordering is possible via direct access to + Parameters collection. + + + + + Creates a parameter on the lambda with a given name and type. + + Parameters maintain the order in which they are created, + however custom ordering is possible via direct access to + Parameters collection. + + + + + adds existing parameter to the lambda. + + Parameters maintain the order in which they are created, + however custom ordering is possible via direct access to + Parameters collection. + + + + + Creates a hidden parameter on the lambda with a given name and type. + + Parameters maintain the order in which they are created, + however custom ordering is possible via direct access to + Parameters collection. + + + + + Creates a params array argument on the labmda. + + The params array argument is added to the signature immediately. Before the lambda is + created, the builder validates that it is still the last (since the caller can modify + the order of parameters explicitly by maniuplating the parameter list) + + + + + Creates a local variable with specified name and type. + TODO: simplify by pushing logic into callers + + + + + Creates a local variable with specified name and type. + TODO: simplify by pushing logic into callers + + + + + Creates a temporary variable with specified name and type. + + + + + Adds the temporary variable to the list of variables maintained + by the builder. This is useful in cases where the variable is + created outside of the builder. + + + + + Creates the LambdaExpression from the builder. + After this operation, the builder can no longer be used to create other instances. + + Desired type of the lambda. + New LambdaExpression instance. + + + + Creates the LambdaExpression from the builder. + After this operation, the builder can no longer be used to create other instances. + + New LambdaExpression instance. + + + + Creates the generator LambdaExpression from the builder. + After this operation, the builder can no longer be used to create other instances. + + New LambdaExpression instance. + + + + Fixes up lambda body and parameters to match the signature of the given delegate if needed. + + + + + + Validates that the builder has enough information to create the lambda. + + + + + The name of the lambda. + Currently anonymous/unnamed lambdas are not allowed. + + + + + Return type of the lambda being created. + + + + + List of lambda's local variables for direct manipulation. + + + + + List of lambda's parameters for direct manipulation + + + + + The params array argument, if any. + + + + + The body of the lambda. This must be non-null. + + + + + The generated lambda should have dictionary of locals + instead of allocating them directly on the CLR stack. + + + + + The scope is visible (default). Invisible if false. + + + + + marks a field, class, or struct as being safe to have statics which can be accessed + from multiple runtimes. + + Static fields which are not read-only or marked with this attribute will be flagged + by a test which looks for state being shared between runtimes. Before applying this + attribute you should ensure that it is safe to share the state. This is typically + state which is lazy initialized or state which is caching values which are identical + in all runtimes and are immutable. + + + + + This class is useful for quickly collecting performance counts for expensive + operations. Usually this means operations involving either reflection or + code gen. Long-term we need to see if this can be plugged better into the + standard performance counter architecture. + + + + + temporary categories for quick investigation, use a custom key if you + need to track multiple items, and if you want to keep it then create + a new Categories entry and rename all your temporary entries. + + + + + Represents the context that is flowed for doing Compiler. Languages can derive + from this class to provide additional contextual information. + + + + + Source unit currently being compiled in the CompilerContext + + + + + Current error sink. + + + + + Sink for parser callbacks (e.g. brace matching, etc.). + + + + + Compiler specific options. + + + + + Indicates that a DynamicMetaObject might be convertible to a CLR type. + + + + + Gets custom data to be serialized when saving script codes to disk. + + + + + Indicates that a MetaObject is already representing a restricted type. Useful + when we're already restricted to a known type but this isn't captured in + the type info (e.g. the type is not sealed). + + + + + Returns Microsoft.Scripting.Runtime.DynamicNull if the object contains a null value, + otherwise, returns self.LimitType + + + + + Returns Microsoft.Scripting.Runtime.DynamicNull if the object contains a null value, + otherwise, returns self.RuntimeType + + + + + ScriptCode is an instance of compiled code that is bound to a specific LanguageContext + but not a specific ScriptScope. The code can be re-executed multiple times in different + scopes. Hosting API counterpart for this class is CompiledCode. + + + + + This takes an assembly name including extension and saves the provided ScriptCode objects into the assembly. + + The provided script codes can constitute code from multiple languages. The assemblyName can be either a fully qualified + or a relative path. The DLR will simply save the assembly to the desired location. The assembly is created by the DLR and + if a file already exists than an exception is raised. + + The DLR determines the internal format of the ScriptCode and the DLR can feel free to rev this as appropriate. + + + + + This will take an assembly object which the user has loaded and return a new set of ScriptCode’s which have + been loaded into the provided ScriptDomainManager. + + If the language associated with the ScriptCode’s has not already been loaded the DLR will load the + LanguageContext into the ScriptDomainManager based upon the saved LanguageContext type. + + If the LanguageContext or the version of the DLR the language was compiled against is unavailable a + TypeLoadException will be raised unless policy has been applied by the administrator to redirect bindings. + + + + + Sets the current position inside current token or one character behind it. + + + + + Sets the current position inside current token or one character behind it. + A relative displacement with respect to the current position in the token is specified. + + + + + Marks token end. Enables to read the current token. + + + + + Marks token start. It means the buffer can drop the current token. + Can be called even if no token has been read yet. + + + + + Reads till the end of line and returns the character that stopped the reading. + The returned character is not skipped. + + + + + Resizes an array to a speficied new size and copies a portion of the original array into its beginning. + + + + + Helper class to remove methods w/ identical signatures. Used for GetDefaultMembers + which returns members from all types in the hierarchy. + + + + + Handles input and output for the console. It is comparable to System.IO.TextReader, + System.IO.TextWriter, System.Console, etc + + + + + Read a single line of interactive input, or a block of multi-line statements. + + An event-driven GUI console can implement this method by creating a thread that + blocks and waits for an event indicating that input is available + + The indentation level to be used for the current suite of a compound statement. + The console can ignore this argument if it does not want to support auto-indentation + null if the input stream has been closed. A string with a command to execute otherwise. + It can be a multi-line string which should be processed as block of statements + + + + + + + + name == null means that the argument doesn't specify an option; the value contains the entire argument + name == "" means that the option name is empty (argument separator); the value is null then + + + + + Literal script command given using -c option + + + + + Filename to execute passed on the command line options. + + + + + Only print the version of the script interpreter and exit + + + + On error. + + + + The console input buffer. + + + + + Current position - index into the input buffer + + + + + The number of white-spaces displayed for the auto-indenation of the current line + + + + + Length of the output currently rendered on screen. + + + + + Command history + + + + + Tab options available in current context + + + + + Cursort anchor - position of cursor when the routine was called + + + + + The command line that this console is attached to. + + + + + Displays the next option in the option list, + or beeps if no options available for current input prefix. + If no input prefix, simply print tab. + + + + + + + Handle the enter key. Adds the current input (if not empty) to the history. + + + The input string. + + + + Class managing the command history. + + + + + List of available options + + + + + Cursor position management + + + + + Beginning position of the cursor - top coordinate. + + + + + Beginning position of the cursor - left coordinate. + + + + + Implementation of the complex number data type. + + + + + Helper methods that calls are generated to from the default DLR binders. + + + + + Helper function to combine an object array with a sequence of additional parameters that has been splatted for a function call. + + + + + EventInfo.EventHandlerType getter is marked SecuritySafeCritical in CoreCLR + This method is to get to the property without using Reflection + + + + + + + Implements explicit casts supported by the runtime. + + + Implements explicit casts supported by the runtime. + + + + + Explicitly casts the object to a given type (and returns it as object) + + + + + Used as the value for the ScriptingRuntimeHelpers.GetDelegate method caching system + + + + + Generates stub to receive the CLR call and then call the dynamic language code. + + + + + Used as the key for the LanguageContext.GetDelegate method caching system + + + + + A useful interface for taking slices of numeric arrays, inspired by Python's Slice objects. + + + + + The starting index of the slice or null if no first index defined + + + + + The ending index of the slice or null if no ending index defined + + + + + The length of step to take + + + + + Given an ID returns the object associated with that ID. + + + + + Gets a unique ID for an object + + + + + Goes over the hashtable and removes empty entries + + + + + Weak-ref wrapper caches the weak reference, our hash code, and the object ID. + + + + + WrapperComparer treats Wrapper as transparent envelope + + + + + Internal class which binds a LanguageContext, StreamContentProvider, and Encoding together to produce + a TextContentProvider which reads binary data with the correct language semantics. + + + + + Creates a dictionary of locals in this scope + + + + + Abstract base class used for optimized thread-safe dictionaries which have a set + of pre-defined string keys. + + Implementers derive from this class and override the GetExtraKeys, TrySetExtraValue, + and TryGetExtraValue methods. When looking up a value first the extra keys will be + searched using the optimized Try*ExtraValue functions. If the value isn't found there + then the value is stored in the underlying .NET dictionary. + + This dictionary can store object values in addition to string values. It also supports + null keys. + + + + + Gets a list of the extra keys that are cached by the the optimized implementation + of the module. + + + + + Try to set the extra value and return true if the specified key was found in the + list of extra values. + + + + + Try to get the extra value and returns true if the specified key was found in the + list of extra values. Returns true even if the value is Uninitialized. + + + + + Efficiently tracks (line,column) information as text is added, and + collects line mappings between the original and generated source code + so we can generate correct debugging information later + + + + + Marks the current position of the writer as corresponding to the + original location passed in + + the line pragma corresponding to the + current position in the generated code + + + + Provides a dictionary-like object used for caches which holds onto a maximum + number of elements specified at construction time. + + This class is not thread safe. + + + + + Creates a dictionary-like object used for caches. + + The maximum number of elements to store. + + + + Tries to get the value associated with 'key', returning true if it's found and + false if it's not present. + + + + + Adds a new element to the cache, replacing and moving it to the front if the + element is already present. + + + + + Returns the value associated with the given key, or throws KeyNotFoundException + if the key is not present. + + + + + Wraps the provided enumerable into a ReadOnlyCollection{T} + + Copies all of the data into a new array, so the data can't be + changed after creation. The exception is if the enumerable is + already a ReadOnlyCollection{T}, in which case we just return it. + + + + + List optimized for few writes and multiple reads. It provides thread-safe read and write access. + Iteration is not thread-safe by default, but GetCopyForRead allows for iteration + without taking a lock. + + + + + Gets a copy of the contents of the list. The copy will not change even if the original + CopyOnWriteList object is modified. This method should be used to iterate the list in + a thread-safe way if no lock is taken. Iterating on the original list is not guaranteed + to be thread-safe. + + The returned copy should not be modified by the caller. + + + + Returns the list of expressions represented by the instances. + + An array of instances to extract expressions from. + The array of expressions. + + + + Creates an instance of for a runtime value and the expression that represents it during the binding process. + + The runtime value to be represented by the . + An expression to represent this during the binding process. + The new instance of . + + + + Produces an interpreted binding using the given binder which falls over to a compiled + binding after hitCount tries. + + This method should be called whenever an interpreted binding is required. Sometimes it will + return a compiled binding if a previous binding was produced and it's hit count was exhausted. + In this case the binder will not be called back for a new binding - the previous one will + be used. + + The delegate type being used for the call site + The binder used for the call site + The number of calls before the binder should switch to a compiled mode. + The arguments that are passed for the binding (as received in a BindDelegate call) + A delegate which represents the interpreted binding. + + + + Expression which reduces to the normal test but under the interpreter adds a count down + check which enables compiling when the count down is reached. + + + + + Base class for storing information about the binding that a specific rule is applicable for. + + We have a derived generic class but this class enables us to refer to it w/o having the + generic type information around. + + This class tracks both the count down to when we should compile. When we compile we + take the Expression[T] that was used before and compile it. While this is happening + we continue to allow the interpreted code to run. When the compilation is complete we + store a thread static which tells us what binding failed and the current rule is no + longer functional. Finally the language binder will call us again and we'll retrieve + and return the compiled overload. + + + + + A hybrid dictionary which compares based upon object identity. + + + + + Calculates the quotient of two 32-bit signed integers rounded towards negative infinity. + + Dividend. + Divisor. + The quotient of the specified numbers rounded towards negative infinity, or (int)Floor((double)x/(double)y). + is 0. + The caller must check for overflow (x = Int32.MinValue, y = -1) + + + + Calculates the quotient of two 32-bit signed integers rounded towards negative infinity. + + Dividend. + Divisor. + The quotient of the specified numbers rounded towards negative infinity, or (int)Floor((double)x/(double)y). + is 0. + The caller must check for overflow (x = Int64.MinValue, y = -1) + + + + Calculates the remainder of floor division of two 32-bit signed integers. + + Dividend. + Divisor. + The remainder of of floor division of the specified numbers, or x - (int)Floor((double)x/(double)y) * y. + is 0. + + + + Calculates the remainder of floor division of two 32-bit signed integers. + + Dividend. + Divisor. + The remainder of of floor division of the specified numbers, or x - (int)Floor((double)x/(double)y) * y. + is 0. + + + + Behaves like Math.Round(value, MidpointRounding.AwayFromZero) + Needed because CoreCLR doesn't support this particular overload of Math.Round + + + + + Behaves like Math.Round(value, precision, MidpointRounding.AwayFromZero) + However, it works correctly on negative precisions and cases where precision is + outside of the [-15, 15] range. + + (This function is also needed because CoreCLR lacks this overload.) + + + + + Evaluates a polynomial in v0 where the coefficients are ordered in increasing degree + + + + + Evaluates a polynomial in v0 where the coefficients are ordered in increasing degree + if reverse is false, and increasing degree if reverse is true. + + + + + A numerically precise version of sin(v0 * pi) + + + + + A numerically precise version of |sin(v0 * pi)| + + + + + Take the quotient of the 2 polynomials forming the Lanczos approximation + with N=13 and G=13.144565 + + + + + Computes the Gamma function on positive values, using the Lanczos approximation. + Lanczos parameters are N=13 and G=13.144565. + + + + + Computes the Log-Gamma function on positive values, using the Lanczos approximation. + Lanczos parameters are N=13 and G=13.144565. + + + + + Thread safe dictionary that allows lazy-creation where readers will block for + the creation of the lazily created value. Call GetOrCreateValue w/ a key + and a callback function. If the value exists it is returned, if not the create + callback is called (w/o any locks held). The create call back will only be called + once for each key. + + + + + Helper class which stores the published value + + + + + Dictionary[TKey, TValue] is not thread-safe in the face of concurrent reads and writes. SynchronizedDictionary + provides a thread-safe implementation. It holds onto a Dictionary[TKey, TValue] instead of inheriting from + it so that users who need to do manual synchronization can access the underlying Dictionary[TKey, TValue]. + + + + + This returns the raw unsynchronized Dictionary[TKey, TValue]. Users are responsible for locking + on it before accessing it. Also, it should not be arbitrarily handed out to other code since deadlocks + can be caused if other code incorrectly locks on it. + + + + + Provides fast strongly typed thread local storage. This is significantly faster than + Thread.GetData/SetData. + + + + + True if the caller will guarantee that all cleanup happens as the thread + unwinds. + + This is typically used in a case where the thread local is surrounded by + a try/finally block. The try block pushes some state, the finally block + restores the previous state. Therefore when the thread exits the thread + local is back to it's original state. This allows the ThreadLocal object + to not check the current owning thread on retrieval. + + + + + Gets the current value if its not == null or calls the provided function + to create a new value. + + + + + Calls the provided update function with the current value and + replaces the current value with the result of the function. + + + + + Replaces the current value with a new one and returns the old value. + + + + + Gets the StorageInfo for the current thread. + + + + + Called when the fast path storage lookup fails. if we encountered the Empty storage + during the initial fast check then spin until we hit non-empty storage and try the fast + path again. + + + + + Creates the StorageInfo for the thread when one isn't already present. + + + + + Gets or sets the value for the current thread. + + + + + Helper class for storing the value. We need to track if a ManagedThreadId + has been re-used so we also store the thread which owns the value. + + + + + Returns a numerical code of the size of a type. All types get both a horizontal + and vertical code. Types that are lower in both dimensions have implicit conversions + to types that are higher in both dimensions. + + + + + Represents an array that has value equality. + + + + + Simple class for tracking a list of items and enumerating over them. + The items are stored in weak references; if the objects are collected, + they will not be seen when enumerating. + + The type of the collection element. + + + + Similar to Dictionary[TKey,TValue], but it also ensures that the keys will not be kept alive + if the only reference is from this collection. The value will be kept alive as long as the key + is alive. + + This currently has a limitation that the caller is responsible for ensuring that an object used as + a key is not also used as a value in *any* instance of a WeakHash. Otherwise, it will result in the + object being kept alive forever. This effectively means that the owner of the WeakHash should be the + only one who has access to the object used as a value. + + Currently, there is also no guarantee of how long the values will be kept alive even after the keys + get collected. This could be fixed by triggerring CheckCleanup() to be called on every garbage-collection + by having a dummy watch-dog object with a finalizer which calls CheckCleanup(). + + + + + Check if any of the keys have gotten collected + + Currently, there is also no guarantee of how long the values will be kept alive even after the keys + get collected. This could be fixed by triggerring CheckCleanup() to be called on every garbage-collection + by having a dummy watch-dog object with a finalizer which calls CheckCleanup(). + + + + + This class holds onto internal debugging options used in this assembly. + These options can be set via environment variables DLR_{option-name}. + Boolean options map "true" to true and other values to false. + + These options are for internal debugging only, and should not be + exposed through any public APIs. + + + + + Sets the value at the given index for a tuple of the given size. This set supports + walking through nested tuples to get the correct final index. + + + + + Gets the value at the given index for a tuple of the given size. This get + supports walking through nested tuples to get the correct final index. + + + + + Gets the unbound generic Tuple type which has at lease size slots or null if a large enough tuple is not available. + + + + + Creates a generic tuple with the specified types. + + If the number of slots fits within the maximum tuple size then we simply + create a single tuple. If it's greater then we create nested tuples + (e.g. a Tuple`2 which contains a Tuple`128 and a Tuple`8 if we had a size of 136). + + + + + Gets the number of usable slots in the provided Tuple type including slots available in nested tuples. + + + + + Creates a new instance of tupleType with the specified args. If the tuple is a nested + tuple the values are added in their nested forms. + + + + + Gets the values from a tuple including unpacking nested values. + + + + + Gets the series of properties that needs to be accessed to access a logical item in a potentially nested tuple. + + + + + Gets the series of properties that needs to be accessed to access a logical item in a potentially nested tuple. + + + + + Provides an expression for creating a tuple with the specified values. + + + + + TODO: Alternatively, it should be sufficient to remember indices for this, list, dict and block. + + + + + Convention for an individual argument at a callsite. + + Multiple different callsites can match against a single declaration. + Some argument kinds can be "unrolled" into multiple arguments, such as list and dictionary. + + + + + Simple unnamed positional argument. + In Python: foo(1,2,3) are all simple arguments. + + + + + Argument with associated name at the callsite + In Python: foo(a=1) + + + + + Argument containing a list of arguments. + In Python: foo(*(1,2*2,3)) would match 'def foo(a,b,c)' with 3 declared arguments such that (a,b,c)=(1,4,3). + it could also match 'def foo(*l)' with 1 declared argument such that l=(1,4,3) + + + + + Argument containing a dictionary of named arguments. + In Python: foo(**{'a':1, 'b':2}) + + + + + Represents a logical member of a type. The member could either be real concrete member on a type or + an extension member. + + This seperates the "physical" members that .NET knows exist on types from the members that + logically exist on a type. It also provides other abstractions above the level of .NET reflection + such as MemberGroups and NamespaceTracker's. + + It also provides a wrapper around the reflection APIs which cannot be extended from partial trust. + + + + + Gets the expression that creates the value. + + Returns null if it's an error to get the value. The caller can then call GetErrorForGet to get + the correct error Expression (or null if they should provide a default). + + + + + Gets an expression that assigns a value to the left hand side. + + Returns null if it's an error to assign to. The caller can then call GetErrorForSet to + get the correct error Expression (or null if a default error should be provided). + + + + + Gets an expression that assigns a value to the left hand side. + + Returns null if it's an error to assign to. The caller can then call GetErrorForSet to + get the correct error Expression (or null if a default error should be provided). + + + + + Gets an expression that performs a call on the object using the specified arguments. + + Returns null if it's an error to perform the specific operation. The caller can then call + GetErrorsForDoCall to get the correct error Expression (or null if a default error should be provided). + + + + + Returns the error associated with getting the value. + + A null return value indicates that the default error message should be provided by the caller. + + + + + Returns the error associated with accessing this member via a bound instance. + + A null return value indicates that the default error message should be provided by the caller. + + + + + Helper for getting values that have been bound. Called from BoundMemberTracker. Custom member + trackers can override this to provide their own behaviors when bound to an instance. + + + + + Helper for setting values that have been bound. Called from BoundMemberTracker. Custom member + trackers can override this to provide their own behaviors when bound to an instance. + + + + + Helper for setting values that have been bound. Called from BoundMemberTracker. Custom member + trackers can override this to provide their own behaviors when bound to an instance. + + + + + Binds the member tracker to the specified instance rturning a new member tracker if binding + is possible. If binding is not possible the existing member tracker will be returned. For example + binding to a static field results in returning the original MemberTracker. Binding to an instance + field results in a new BoundMemberTracker which will get GetBoundValue/SetBoundValue to pass the + instance through. + + + + + The type of member tracker. + + + + + The logical declaring type of the member. + + + + + The name of the member. + + + + + We ensure we only produce one MemberTracker for each member which logically lives on the declaring type. So + for example if you get a member from a derived class which is declared on the base class it should be the same + as getting the member from the base class. That’s easy enough until you get into extension members – here there + might be one extension member which is being applied to multiple types. Therefore we need to take into account the + extension type when ensuring that we only have 1 MemberTracker ever created. + + + + + Richly represents the signature of a callsite. + + + + + Array of additional meta information about the arguments, such as named arguments. + Null for a simple signature that's just an expression list. eg: foo(a*b,c,d) + + + + + Number of arguments in the signature. + + + + + True if the OldCallAction includes an ArgumentInfo of ArgumentKind.Dictionary or ArgumentKind.Named. + + + + + Gets the number of positional arguments the user provided at the call site. + + + + + All arguments are unnamed and matched by position. + + + + + A custom member tracker which enables languages to plug in arbitrary + members into the lookup process. + + + + + Encapsulates information about the result that should be produced when + a OldDynamicAction cannot be performed. The ErrorInfo can hold one of: + an expression which creates an Exception to be thrown + an expression which produces a value which should be returned + directly to the user and represents an error has occured (for + example undefined in JavaScript) + an expression which produces a value which should be returned + directly to the user but does not actually represent an error. + + ErrorInfo's are produced by an ActionBinder in response to a failed + binding. + + + + + Private constructor - consumers must use static From* factories + to create ErrorInfo objects. + + + + + Creates a new ErrorInfo which represents an exception that should + be thrown. + + + + + Creates a new ErrorInfo which represents a value which should be + returned to the user. + + + + + Crates a new ErrorInfo which represents a value which should be returned + to the user but does not represent an error. + + + + + + + The ErrorInfo expression produces an exception + + + + + The ErrorInfo expression produces a value which represents the error (e.g. undefined) + + + + + The ErrorInfo expression produces a value which is not an error + + + + + Gets the stub list for a COM Object. For COM objects we store the stub list + directly on the object using the Marshal APIs. This allows us to not have + any circular references to deal with via weak references which are challenging + in the face of COM. + + + + + Doesn't need to check PrivateBinding setting: no method that is part of the event is public the entire event is private. + If the code has already a reference to the event tracker instance for a private event its "static-ness" is not influenced + by private-binding setting. + + + + + Holds on a list of delegates hooked to the event. + We need the list because we cannot enumerate the delegates hooked to CLR event and we need to do so in + handler removal (we need to do custom delegate comparison there). If BCL enables the enumeration we could remove this. + + + + + Storage for the handlers - a key value pair of the callable object and the delegate handler. + + + + + Storage for the handlers - a key value pair of the callable object and the delegate handler. + + The delegate handler is closed over the callable object. Therefore as long as the object is alive the + delegate will stay alive and so will the callable object. That means it's fine to have a weak reference + to both of these objects. + + + + + Represents extension method. + + + + + The declaring type of the extension (the type this extension method extends) + + + + + The declaring type of the extension method. Since this is an extension method, + the declaring type is in fact the type this extension method extends, + not Method.DeclaringType + + + + + Represents a logical Property as a member of a Type. This Property can either be a real + concrete Property on a type (implemented with a ReflectedPropertyTracker) or an extension + property (implemented with an ExtensionPropertyTracker). + + + + + MemberGroups are a collection of MemberTrackers which are commonly produced + on-demand to talk about the available members. They can consist of a mix of + different member types or multiple membes of the same type. + + The most common source of MemberGroups is from ActionBinder.GetMember. From here + the DLR will perform binding to the MemberTrackers frequently producing the value + resulted from the user. If the result of the action produces a member it's self + the ActionBinder can provide the value exposed to the user via ReturnMemberTracker. + + ActionBinder provides default functionality for both getting members from a type + as well as exposing the members to the user. Getting members from the type maps + closely to reflection and exposing them to the user exposes the MemberTrackers + directly. + + + + + MethodGroup's represent a unique collection of method's. Typically this + unique set is all the methods which are overloaded by the same name including + methods with different arity. These methods represent a single logically + overloaded element of a .NET type. + + The base DLR binders will produce MethodGroup's when provided with a MemberGroup + which contains only methods. The MethodGroup's will be unique instances per + each unique group of methods. + + + + + Returns a BuiltinFunction bound to the provided type arguments. Returns null if the binding + cannot be performed. + + + + + NamespaceTracker represent a CLS namespace. + + + + + Provides a list of all the members of an instance. + + + + + Loads all the types from all assemblies that contribute to the current namespace (but not child namespaces) + + + + + Populates the tree with nodes for each part of the namespace + + + Full namespace name. It can be null (for top-level types) + + + + + As a fallback, so if the type does exist in any assembly. This would happen if a new type was added + that was not in the hardcoded list of types. + This code is not accurate because: + 1. We dont deal with generic types (TypeCollision). + 2. Previous calls to GetCustomMemberNames (eg. "from foo import *" in Python) would not have included this type. + 3. This does not deal with new namespaces added to the assembly + + + + + This stores all the public non-nested type names in a single namespace and from a single assembly. + This allows inspection of the namespace without eagerly loading all the types. Eagerly loading + types slows down startup, increases working set, and is semantically incorrect as it can trigger + TypeLoadExceptions sooner than required. + + + + + Enables implicit Type to TypeTracker conversions accross dynamic languages. + + + + + Represents the top reflected package which contains extra information such as + all the assemblies loaded and the built-in modules. + + + + + returns the package associated with the specified namespace and + updates the associated module to mark the package as imported. + + + + + Ensures that the assembly is loaded + + + true if the assembly was loaded for the first time. + false if the assembly had already been loaded before + + + + When an (interop) assembly is loaded, we scan it to discover the GUIDs of COM interfaces so that we can + associate the type definition with COM objects with that GUID. + Since scanning all loaded assemblies can be expensive, in the future, we might consider a more explicit + user binder to trigger scanning of COM types. + + + + Specifies that the member is a constructor, representing a ConstructorTracker + + + Specifies that the member is an event, representing a EventTracker + + + Specifies that the member is a field, representing a FieldTracker + + + Specifies that the member is a method, representing a MethodTracker + + + Specifies that the member is a property, representing a PropertyTracker + + + Specifies that the member is a property, representing a TypeTracker + + + Specifies that the member is a namespace, representing a NamespaceTracker + + + Specifies that the member is a group of method overloads, representing a MethodGroup + + + Specifies that the member is a group of types that very by arity, representing a TypeGroup + + + Specifies that the member is a custom meber, represetning a CustomTracker + + + Specifies that the member is a bound to an instance, representing a BoundMemberTracker + + + + A TypeCollision is used when we have a collision between + two types with the same name. Currently this is only possible w/ generic + methods that should logically have arity as a portion of their name. For eg: + System.EventHandler and System.EventHandler[T] + System.Nullable and System.Nullable[T] + System.IComparable and System.IComparable[T] + + The TypeCollision provides an indexer but also is a real type. When used + as a real type it is the non-generic form of the type. + + The indexer allows the user to disambiguate between the generic and + non-generic versions. Therefore users must always provide additional + information to get the generic version. + + + + The merged list so far. Could be null + The new type(s) to add to the merged list + The merged list. Could be a TypeTracker or TypeGroup + + + Gets the arity of generic parameters + + + No non-generic type is represented by this group. + + + + This returns the DeclaringType of all the types in the TypeGroup + + + + + This returns the base name of the TypeGroup (the name shared by all types minus arity) + + + + + This will return the result only for the non-generic type if one exists, and will throw + an exception if all types in the TypeGroup are generic + + + + + This will return the result only for the non-generic type if one exists, and will throw + an exception if all types in the TypeGroup are generic + + + + + True if the MethodBase is method which is going to construct an object + + + + + Returns the System.Type for any object, including null. The type of null + is represented by None.Type and all other objects just return the + result of Object.GetType + + + + + Simply returns a Type[] from calling GetType on each element of args. + + + + + EMITTED + Used by default method binder to check types of splatted arguments. + + + + + Given a MethodInfo which may be declared on a non-public type this attempts to + return a MethodInfo which will dispatch to the original MethodInfo but is declared + on a public type. + + Returns the original method if the method if a public version cannot be found. + + + + + Non-public types can have public members that we find when calling type.GetMember(...). This + filters out the non-visible members by attempting to resolve them to the correct visible type. + + If no correct visible type can be found then the member is not visible and we won't call it. + + + + + Sees if two MemberInfos point to the same underlying construct in IL. This + ignores the ReflectedType property which exists on MemberInfos which + causes direct comparisons to be false even if they are the same member. + + + + + Returns a value which indicates failure when a OldConvertToAction of ImplicitTry or + ExplicitTry. + + + + + Creates an interpreted delegate for the lambda. + + The lambda to compile. + A delegate which can interpret the lambda. + + + + Creates an interpreted delegate for the lambda. + + The lambda to compile. + The number of iterations before the interpreter starts compiling + A delegate which can interpret the lambda. + + + + Creates an interpreted delegate for the lambda. + + The lambda's delegate type. + The lambda to compile. + A delegate which can interpret the lambda. + + + + Creates an interpreted delegate for the lambda. + + The lambda to compile. + The number of iterations before the interpreter starts compiling + A delegate which can interpret the lambda. + + + + Compiles the lambda into a method definition. + + the lambda to compile + A which will be used to hold the lambda's IL. + A parameter that indicates if debugging information should be emitted to a PDB symbol store. + + + + Compiles the LambdaExpression. + + If the lambda is compiled with emitDebugSymbols, it will be + generated into a TypeBuilder. Otherwise, this method is the same as + calling LambdaExpression.Compile() + + This is a workaround for a CLR limitiation: DynamicMethods cannot + have debugging information. + + the lambda to compile + true to generate a debuggable method, false otherwise + the compiled delegate + + + + Compiles the LambdaExpression, emitting it into a new type, and + optionally making it debuggable. + + This is a workaround for a CLR limitiation: DynamicMethods cannot + have debugging information. + + the lambda to compile + Debugging information generator used by the compiler to mark sequence points and annotate local variables. + True if debug symbols (PDBs) are emitted by the . + the compiled delegate + + + + Reduces the provided DynamicExpression into site.Target(site, *args). + + + + + Removes all live objects and places them in static fields of a type. + + + + + Enables an object to be serializable to an Expression tree. The expression tree can then + be emitted into an assembly enabling the de-serialization of the object. + + + + + Serializes constants and dynamic sites so the code can be saved to disk + + + + + The MethodBinder will perform normal method binding. + + + + + The MethodBinder will return the languages definition of NotImplemented if the arguments are + incompatible with the signature. + + + + + The MethodBinder will set properties/fields for unused keyword arguments on the instance + that gets returned from the method. + + + + + The delegate representing the DLR Main function + + + + + An attribute that is applied to saved ScriptCode's to be used to re-create the ScriptCode + from disk. + + + + + Gets names stored in optimized scope. + + + + + Provides a mechanism for providing documentation stored in an assembly as metadata. + + Applying this attribute will enable documentation to be provided to the user at run-time + even if XML Documentation files are unavailable. + + + + + Updates an exception before it's getting re-thrown so + we can present a reasonable stack trace to the user. + + + + + Returns all the stack traces associates with an exception + + + + + Marks a class in the assembly as being an extension type for another type. + + + + + Marks a type in the assembly as being an extension type for another type. + + The type which is being extended + The type which provides the extension members. + + + + The type which contains extension members which are added to the type being extended. + + + + + The type which is being extended by the extension type. + + + + + Not all .NET enumerators throw exceptions if accessed in an invalid state. This type + can be used to throw exceptions from enumerators implemented in IronPython. + + + + + Event args for when a ScriptScope has had its contents changed. + + + + + Creates a new ModuleChangeEventArgs object with the specified name and type. + + + + + Creates a nwe ModuleChangeEventArgs with the specified name, type, and changed value. + + + + + Gets the name of the symbol that has changed. + + + + + Gets the way in which the symbol has changed: Set or Delete. + + + + + The the symbol has been set provides the new value. + + + + + The way in which a module has changed : Set or Delete + + + + + A new value has been set in the module (or a previous value has changed). + + + + + A value has been removed from the module. + + + + + A NullTextContentProvider to be provided when we have a pre-compiled ScriptCode which doesn't + have source code associated with it. + + + + + Singleton instance returned from an operator method when the operator method cannot provide a value. + + + + + Represents an ops-extension method which is added as an operator. + + The name must be a well-formed name such as "Add" that matches the CLS + naming conventions for adding overloads associated with op_* methods. + + + + + Represents an ops-extension method which is used to implement a property. + + + + + Provides a cache of reflection members. Only one set of values is ever handed out per a + specific request. + + + + + TODO: Make me private again + + + + + Indicates an extension method should be added as a static method, not a instance method. + + + + + Converts a generic ICollection of T into an array of T. + + If the collection is already an array of T the original collection is returned. + + + + + Converts a generic ICollection of T into an array of R using a given conversion. + + If the collection is already an array of R the original collection is returned. + + + + + Allows wrapping of proxy types (like COM RCWs) to expose their IEnumerable functionality + which is supported after casting to IEnumerable, even though Reflection will not indicate + IEnumerable as a supported interface + + + + + Requires the specified index to point inside the array. + + Array is null. + Index is outside the array. + + + + Requires the specified index to point inside the array. + + Index is outside the array. + + + + Requires the specified index to point inside the array or at the end + + Array is null. + Index is outside the array. + + + + Requires the specified index to point inside the array or at the end + + Array is null. + Index is outside the array. + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + Offset or count are out of range. + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + Offset or count are out of range. + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + Array is null. + Offset or count are out of range. + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + String is null. + Offset or count are out of range. + + + + Requires the array and all its items to be non-null. + + + + + Requires the enumerable collection and all its items to be non-null. + + + + + Presents a flat enumerable view of multiple dictionaries + + + + + Seeks the first character of a specified line in the text stream. + + The reader. + Line number. The current position is assumed to be line #1. + + Returns true if the line is found, false otherwise. + + + + + Reads characters to a string until end position or a terminator is reached. + Doesn't include the terminator into the resulting string. + Returns null, if the reader is at the end position. + + + + + Reads characters until end position or a terminator is reached. + Returns true if the character has been found (the reader is positioned right behind the character), + false otherwise. + + + + + Creates an open delegate for the given (dynamic)method. + + + + + Creates a closed delegate for the given (dynamic)method. + + + + + Gets a Func of CallSite, object * paramCnt, object delegate type + that's suitable for use in a non-strongly typed call site. + + + + + Returns true if the specified parameter is mandatory, i.e. is not optional and doesn't have a default value. + + + + + Yields all ancestors of the given type including the type itself. + Does not include implemented interfaces. + + + + + Like Type.GetInterfaces, but only returns the interfaces implemented by this type + and not its parents. + + + + + Enumerates extension methods in given assembly. Groups the methods by declaring namespace. + Uses a global cache if is true. + + + + + Binds occurances of generic parameters in against corresponding types in . + Invokes (parameter, type) for each such binding. + Returns false if the is structurally different from or if the binder returns false. + + + + + Determines if a given type matches the type that the method extends. + The match might be non-trivial if the extended type is an open generic type with constraints. + + + + + Splits text and optionally indents first lines - breaks along words, not characters. + + + + + Provides a StreamContentProvider for a stream of content backed by a file on disk. + + + + diff --git a/packages/IronPython.2.7.4/lib/Net45/Microsoft.Scripting.AspNet.dll b/packages/IronPython.2.7.4/lib/Net45/Microsoft.Scripting.AspNet.dll new file mode 100644 index 0000000000..23cdb1ab11 Binary files /dev/null and b/packages/IronPython.2.7.4/lib/Net45/Microsoft.Scripting.AspNet.dll differ diff --git a/packages/IronPython.2.7.4/lib/Net45/Microsoft.Scripting.AspNet.xml b/packages/IronPython.2.7.4/lib/Net45/Microsoft.Scripting.AspNet.xml new file mode 100644 index 0000000000..b543f81049 --- /dev/null +++ b/packages/IronPython.2.7.4/lib/Net45/Microsoft.Scripting.AspNet.xml @@ -0,0 +1,8 @@ + + + + Microsoft.Scripting.AspNet + + + + diff --git a/packages/IronPython.2.7.4/lib/Net45/Microsoft.Scripting.Metadata.dll b/packages/IronPython.2.7.4/lib/Net45/Microsoft.Scripting.Metadata.dll new file mode 100644 index 0000000000..f73855266b Binary files /dev/null and b/packages/IronPython.2.7.4/lib/Net45/Microsoft.Scripting.Metadata.dll differ diff --git a/packages/IronPython.2.7.4/lib/Net45/Microsoft.Scripting.Metadata.xml b/packages/IronPython.2.7.4/lib/Net45/Microsoft.Scripting.Metadata.xml new file mode 100644 index 0000000000..44526e991f --- /dev/null +++ b/packages/IronPython.2.7.4/lib/Net45/Microsoft.Scripting.Metadata.xml @@ -0,0 +1,373 @@ + + + + Microsoft.Scripting.Metadata + + + + + Represents a block in memory. + + + + + Reads data from a memory block. Maintains a position. + + + + + Reads zero terminated sequence of bytes of given maximal length and converts it into an ASCII string. + + + + + Zero terminated, UTF8 encoded sequence of bytes representing a name in metadata (a type name, a member name, etc). + The name is bound to the module it was retrieved from. The module is kept alive until all its metadata names are collected. + Doesn't cache hashcode, byte or character count. + + + + + Gets the module whose metadata tables this instance represents. + Null if the tables reflect unloaded module file. + + + + + Gets the path of the module whose metadata tables this instance represents. + Null for in-memory modules that are not backed by a file. + + The path is not accessible in partial trust. + + + + Returns AssemblyDef for manifest modules, null token otherwise. + + + + + Token is null or represents a row in a metadata table. + + + + + Gets the number of records in the view. + If the view is over an entire table this operation is O(1), + otherwise it might take up to O(log(#records in the table)). + + + + + Module table entry (0x00 tokens). + + + + + TypeRef table entry (0x01 tokens). + + + + + AssemblyRef: + If the target type is defined in a different Assembly from the current module. + TypeRef: + Target type is nested in TypeRef. + ModuleRef: + Target type is defined in another module within the same Assembly as this one. + ModuleDef: + If the target type is defined in the current module (this should not occur in a CLI "compressed metadata" module). + Null token: + There shall be a row in the ExportedType table for this Type - its Implementation field shall contain + a File token or an AssemblyRef token that says where the type is defined. + + + + + TypeDef table entry (0x02 tokens). + + + + + Finds a nesting type-def. The search time is logarithmic in the number of nested types defined in the owning module. + Returns a null token if this is not a nested type-def. + + + + + O(log(#generic parameters in module)) + + + + + Flags field in TypeDef table. + + + + + This typedef represents a container of global functions and fields (manufactured <Module> type). + + + + + Combines Field (0x04 tokens), FieldRVA (0x1d tokens) and Constant (0x0B) table entries. + + + + + O(log(#fields, parameters and properties with default value)). + Returns if the field doesn't have a default value. + + + + + Returns null reference iff the field has no RVA. + If size is 0 the memory block will span over the rest of the data section. + O(log(#fields with RVAs)). + + + + + Finds type-def that declares this field. The search time is logarithmic in the number of types defined in the owning module. + + + + + Flags field in the Field table. + + + + + MethodDef table entry (0x06 tokens). + + + + + Returns a null reference iff the method has no body. + If size is 0 the memory block will span over the rest of the data section. + + + + + Finds type-def that declares this method. The search time is logarithmic in the number of types defined in the owning module. + + + + + O(log(#generic parameters in module)) + + + + + ImplFlags field in the MethodDef table. + + + + + Flags field in the MethodDef table. + + + + + Param table entry (0x08 tokens). + + + + + O(log(#fields, parameters and properties with default value)). + Returns if the field doesn't have a default value. + + + + + Binary searches MethodDef table for a method that declares this parameter. + + + + + Value greater or equal to zero and less than or equal to the number of parameters in owner method. + A value of 0 refers to the owner method's return type; its parameters are then numbered from 1 onwards. + Not all parameters need to have a corresponding ParamDef entry. + + + + + InterfaceImpl table entry (0x09 tokens). + TODO: we might not need this - TypeDef.ImplementedInterfaces might be a special enumerator that directly returns InterfaceType tokens. + + + + + Could be a null token in EnC scenarios. + + + + + TypeDef, TypeRef, or TypeSpec. + + + + + MemberRef table entry (0x0A tokens). + Stores MethodRefs and FieldRefs. + + + + + TypeRef or TypeDef: + If the class that defines the member is defined in another module. + Note that it is unusual, but valid, to use a TypeRef token when the member is defined in this same module, + in which case, its TypeDef token can be used instead. + ModuleRef: + If the member is defined, in another module of the same assembly, as a global function or variable. + MethodDef: + When used to supply a call-site signature for a vararg method that is defined in this module. + The Name shall match the Name in the corresponding MethodDef row. + The Signature shall match the Signature in the target method definition + TypeSpec: + If the member is a member of a generic type + + + + + CustomAttribute table entry (0x0C tokens). + + + + + Any token except the CustomAttribute. + + + + + Returns the value of Type column in the CustomAttribute table. + MethodDef or MemberRef. + + + + + Value blob. + + + + + StandAloneSig table entry (0x11 token). + + + + + Combines information from PropertyMap (0x15), MethodSemantics (0x18) and Property (0x17) tables. + + + + + O(log(#fields, parameters and properties with default value)). + Returns if the field doesn't have a default value. + + + + + Finds type-def that declares this property. The search time is logarithmic in the number of types with properties defined in the owning module. + + + + + Combines information from EventMap (0x15), MethodSemantics (0x18) and Event (0x17) tables. + + + + + Finds type-def that declares this event. The search time is logarithmic in the number of types with events defined in the owning module. + + + + + ModuleRef table entry (0x1A tokens). + + + + + TypeSpec table entry (0x1B tokens). + + + + + Assembly table entry (0x20 tokens). + + + + + Assembly table entry (0x23 tokens). + + + + + File table entry (0x26 tokens). + + + + + ExportedType table entry (0x27 tokens). + + + + + Forwarded type: AssemblyRef + Nested types: ExportedType + Type in another module of this assembly: FileDef + + + + + ManifestResource table entry (0x28 tokens). + + + + + NestedClass table entry (0x29 tokens). + TODO: Don't need if we exposed nested types enumeration on type-def directly and build TypeNesting mapping lazily. + + + + + GenericParam table entry (0x2A tokens). + + + + + Value greater or equal to zero and less than or equal to the number of parameters in owner method/type. + All generic parameters are listed in the table. + + + + + TypeDef or MethodDef. + + + + + GenericParamConstraint table entry (0x2C tokens). + + + + + TypeDef, TypeRef, or TypeSpec. + + + + + MethodSpec table entry (0x2B tokens). + Used when decoding IL instructions. + + + + + MethodDef or MethodRef. + + + + + We need to be able to construct tokens out of byte-code. + + + + diff --git a/packages/IronPython.2.7.4/lib/Net45/Microsoft.Scripting.dll b/packages/IronPython.2.7.4/lib/Net45/Microsoft.Scripting.dll new file mode 100644 index 0000000000..6dce7770f9 Binary files /dev/null and b/packages/IronPython.2.7.4/lib/Net45/Microsoft.Scripting.dll differ diff --git a/packages/IronPython.2.7.4/lib/Net45/Microsoft.Scripting.xml b/packages/IronPython.2.7.4/lib/Net45/Microsoft.Scripting.xml new file mode 100644 index 0000000000..9fd9794e20 --- /dev/null +++ b/packages/IronPython.2.7.4/lib/Net45/Microsoft.Scripting.xml @@ -0,0 +1,3812 @@ + + + + Microsoft.Scripting + + + + + Provides documentation against live objects for use in a REPL window. + + + + + Gets the available members defined on the provided object. + + + + + Gets the overloads available for the provided object if it is invokable. + + + + + Gets the available members on the provided remote object. + + + + + Gets the overloads available for the provided remote object if it is invokable. + + + + + Provides documentation about a member in a live object. + + + + + The name of the member + + + + + The kind of the member if it's known. + + + + + Specifies the type of member. + + + + + Provides documentation for a single overload of an invokable object. + + + + + The name of the invokable object. + + + + + The documentation for the overload or null if no documentation is available. + + + + + The parameters for the invokable object. + + + + + Information about the return value. + + + + + Provides documentation for a single parameter. + + + + + The name of the parameter + + + + + The type name of the parameter or null if no type information is available. + + + + + Provides addition information about the parameter such as if it's a parameter array. + + + + + Gets the documentation string for this parameter or null if no documentation is available. + + + + + Indications extra information about a parameter such as if it's a parameter array. + + + + + This structure represents an immutable integer interval that describes a range of values, from Start to End. + + It is closed on the left and open on the right: [Start .. End). + + + + + Wraps a an IDictionary[object, object] and exposes it as an IDynamicMetaObjectProvider so that + users can access string attributes using member accesses. + + + + + Provides language specific documentation for live objects. + + + + + Helper for storing information about stack frames. + + + + + Exposes a IDictionary[string, object] as a dynamic object. Gets/sets/deletes turn + into accesses on the underlying dictionary. + + + + + Class that represents compiler options. + Note that this class is likely to change when hosting API becomes part of .Net + + + + + This overload will be called when a SourceUnit is not available. This can happen if the code is being executed remotely, + since SourceUnit cannot be marshaled across AppDomains. + + + + + Hosting API counterpart for . + + + + + Executes code in a default scope. + + + + + Execute code within a given scope and returns the result. + + + + + Executes code in in a default scope and converts to a given type. + + + + + Execute code within a given scope and converts result to a given type. + + + + + Executes the code in an empty scope. + Returns an ObjectHandle wrapping the resulting value of running the code. + + + + + Executes the code in the specified scope. + Returns an ObjectHandle wrapping the resulting value of running the code. + + + + + Executes the code in an empty scope. + Returns an ObjectHandle wrapping the resulting value of running the code. + + If an exception is thrown the exception is caught and an ObjectHandle to + the exception is provided. + + + Use this API to handle non-serializable exceptions (exceptions might not be serializable due to security restrictions) + or if an exception serialization loses information. + + + + + Executes the expression in the specified scope and return a result. + Returns an ObjectHandle wrapping the resulting value of running the code. + + If an exception is thrown the exception is caught and an ObjectHandle to + the exception is provided. + + + Use this API to handle non-serializable exceptions (exceptions might not be serializable due to security restrictions) + or if an exception serialization loses information. + + + + + Engine that compiled this code. + + + + + Default scope for this code. + + + + + The host can use this class to track for errors reported during script parsing and compilation. + Hosting API counterpart for . + + + + + Bridges ErrorSink and ErrorListener. + Errors reported by language compilers to ErrorSink are forwarded to the ErrorListener provided by the host. + + + This proxy is created in the scenario when the compiler is processing a single SourceUnit. + Therefore it could maintain one to one mapping from SourceUnit to ScriptSource. + In a case, which shouldn't happen, that the compiler reports an error in a different SourceUnit we just create + a new instance of the ScriptSource each time. + + TODO: Consider compilation of multiple source units and creating a hashtable mapping SourceUnits to ScriptSources + within the context of compilation unit. + + + + + Bridges ErrorListener and ErrorSink. It provides the reverse functionality as ErrorSinkProxyListener + + + + + Stores information needed to setup a language + + + + + Creates a new LanguageSetup + + assembly qualified type name of the language + provider + + + + Creates a new LanguageSetup with the provided options + TODO: remove this overload? + + + + + Creates a new LanguageSetup with the provided options + + + + + Gets an option as a strongly typed value. + + + + + The assembly qualified type name of the language provider + + + + + Display name of the language. If empty, it will be set to the first + name in the Names list. + + + + + Case-insensitive language names. + + + + + Case-insensitive file extension, optionally starts with a dot. + + + + + Option names are case-sensitive. + + + + + ObjectOperations provide a large catalogue of object operations such as member access, conversions, + indexing, and things like addition. There are several introspection and tool support services available + for more advanced hosts. + + You get ObjectOperation instances from ScriptEngine, and they are bound to their engines for the semantics + of the operations. There is a default instance of ObjectOperations you can share across all uses of the + engine. However, very advanced hosts can create new instances. + + + + + Returns true if the object can be called, false if it cannot. + + Even if an object is callable Call may still fail if an incorrect number of arguments or type of arguments are provided. + + + + + Invokes the provided object with the given parameters and returns the result. + + The prefered way of calling objects is to convert the object to a strongly typed delegate + using the ConvertTo methods and then invoking that delegate. + + + + + Invokes a member on the provided object with the given parameters and returns the result. + + + + + Creates a new instance from the provided object using the given parameters, and returns the result. + + + + + Gets the member name from the object obj. Throws an exception if the member does not exist or is write-only. + + + + + Gets the member name from the object obj and converts it to the type T. Throws an exception if the + member does not exist, is write-only, or cannot be converted. + + + + + Gets the member name from the object obj. Returns true if the member is successfully retrieved and + stores the value in the value out param. + + + + + Returns true if the object has a member named name, false if the member does not exist. + + + + + Removes the member name from the object obj. + + + + + Sets the member name on object obj to value. + + + + + Sets the member name on object obj to value. This overload can be used to avoid + boxing and casting of strongly typed members. + + + + + Gets the member name from the object obj. Throws an exception if the member does not exist or is write-only. + + + + + Gets the member name from the object obj and converts it to the type T. Throws an exception if the + member does not exist, is write-only, or cannot be converted. + + + + + Gets the member name from the object obj. Returns true if the member is successfully retrieved and + stores the value in the value out param. + + + + + Returns true if the object has a member named name, false if the member does not exist. + + + + + Removes the member name from the object obj. + + + + + Sets the member name on object obj to value. + + + + + Sets the member name on object obj to value. This overload can be used to avoid + boxing and casting of strongly typed members. + + + + + Converts the object obj to the type T. The conversion will be explicit or implicit depending on + what the langauge prefers. + + + + + Converts the object obj to the type type. The conversion will be explicit or implicit depending on + what the langauge prefers. + + + + + Converts the object obj to the type T. Returns true if the value can be converted, false if it cannot. + + The conversion will be explicit or implicit depending on what the langauge prefers. + + + + + Converts the object obj to the type type. Returns true if the value can be converted, false if it cannot. + + The conversion will be explicit or implicit depending on what the langauge prefers. + + + + + Converts the object obj to the type T including explicit conversions which may lose information. + + + + + Converts the object obj to the type type including explicit conversions which may lose information. + + + + + Converts the object obj to the type T including explicit conversions which may lose information. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type type including explicit conversions which may lose information. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type T including implicit conversions. + + + + + Converts the object obj to the type type including implicit conversions. + + + + + Converts the object obj to the type T including implicit conversions. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type type including implicit conversions. + + Returns true if the value can be converted, false if it cannot. + + + + + Performs a generic unary operation on the specified target and returns the result. + + + + + Performs a generic unary operation on the strongly typed target and returns the value as the specified type + + + + + Performs the generic binary operation on the specified targets and returns the result. + + + + + Peforms the generic binary operation on the specified strongly typed targets and returns + the strongly typed result. + + + + + Performs addition on the specified targets and returns the result. Throws an exception + if the operation cannot be performed. + + + + + Performs subtraction on the specified targets and returns the result. Throws an exception + if the operation cannot be performed. + + + + + Raises the first object to the power of the second object. Throws an exception + if the operation cannot be performed. + + + + + Multiplies the two objects. Throws an exception + if the operation cannot be performed. + + + + + Divides the first object by the second object. Throws an exception + if the operation cannot be performed. + + + + + Performs modulus of the 1st object by the second object. Throws an exception + if the operation cannot be performed. + + + + + Shifts the left object left by the right object. Throws an exception if the + operation cannot be performed. + + + + + Shifts the left object right by the right object. Throws an exception if the + operation cannot be performed. + + + + + Performs a bitwise-and of the two operands. Throws an exception if the operation + cannot be performed. + + + + + Performs a bitwise-or of the two operands. Throws an exception if the operation + cannot be performed. + + + + + Performs a exclusive-or of the two operands. Throws an exception if the operation + cannot be performed. + + + + + Compares the two objects and returns true if the left object is less than the right object. + Throws an exception if hte comparison cannot be performed. + + + + + Compares the two objects and returns true if the left object is greater than the right object. + Throws an exception if hte comparison cannot be performed. + + + + + Compares the two objects and returns true if the left object is less than or equal to the right object. + Throws an exception if hte comparison cannot be performed. + + + + + Compares the two objects and returns true if the left object is greater than or equal to the right object. + Throws an exception if hte comparison cannot be performed. + + + + + Compares the two objects and returns true if the left object is equal to the right object. + Throws an exception if the comparison cannot be performed. + + + + + Compares the two objects and returns true if the left object is not equal to the right object. + Throws an exception if hte comparison cannot be performed. + + + + + Returns a string which describes the object as it appears in source code + + + + + Returns a string representation of the object in a language specific object display format. + + + + + Returns a list of strings which contain the known members of the object. + + + + + Returns a string providing documentation for the specified object. + + + + + Returns a list of signatures applicable for calling the specified object in a form displayable to the user. + + + + + Returns true if the remote object is callable. + + + + + Invokes the specified remote object with the specified remote parameters. + + Though delegates are preferable for calls they may not always be usable for remote objects. + + + + + Invokes the specified remote object with the local parameters which will be serialized + to the remote app domain. + + + + + Creates a new remote instance from the provided remote object using the given parameters, and returns the result. + + + + + Creates a new remote instance from the provided remote object using the given parameters, and returns the result. + + + + + Sets the remote object as a member on the provided remote object. + + + + + Sets the member name on the remote object obj to value. This overload can be used to avoid + boxing and casting of strongly typed members. + + + + + Gets the member name on the remote object. Throws an exception if the member is not defined or + is write-only. + + + + + Gets the member name on the remote object. Throws an exception if the member is not defined or + is write-only. + + + + + Gets the member name on the remote object. Returns false if the member is not defined or + is write-only. + + + + + Tests to see if the member name is defined on the remote object. + + + + + Removes the member from the remote object + + + + + Converts the remote object into the specified type returning a handle to + the new remote object. The conversion will be explicit or implicit depending on + what the langauge prefers. + + + + + Converts the remote object into the specified type returning a handle to + the new remote object. The conversion will be explicit or implicit depending on + what the langauge prefers. + + + + + Converts the remote object into the specified type returning a handle to + the new remote object. Returns true if the value can be converted, + false if it cannot. The conversion will be explicit or implicit depending on + what the langauge prefers. + + + + + Converts the remote object into the specified type returning a handle to + the new remote object. Returns true if the value can be converted, + false if it cannot. The conversion will be explicit or implicit depending on + what the langauge prefers. + + + + + Converts the object obj to the type T including explicit conversions which may lose information. + + + + + Converts the object obj to the type type including explicit conversions which may lose information. + + + + + Converts the object obj to the type T including explicit conversions which may lose information. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type type including explicit conversions which may lose information. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type T including implicit conversions. + + + + + Converts the object obj to the type type including implicit conversions. + + + + + Converts the object obj to the type T including implicit conversions. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type type including implicit conversions. + + Returns true if the value can be converted, false if it cannot. + + + + + Unwraps the remote object and converts it into the specified type before + returning it. + + + + + Performs the specified unary operator on the remote object. + + + + + Performs the specified binary operator on the remote object. + + + + + Adds the two remote objects. Throws an exception if the operation cannot be performed. + + + + + Subtracts the 1st remote object from the second. Throws an exception if the operation cannot be performed. + + + + + Raises the 1st remote object to the power of the 2nd. Throws an exception if the operation cannot be performed. + + + + + Multiplies the two remote objects. Throws an exception if the operation cannot be performed. + + + + + Divides the 1st remote object by the 2nd. Throws an exception if the operation cannot be performed. + + + + + Performs modulus on the 1st remote object by the 2nd. Throws an exception if the operation cannot be performed. + + + + + Shifts the 1st remote object left by the 2nd remote object. Throws an exception if the operation cannot be performed. + + + + + Shifts the 1st remote object right by the 2nd remote object. Throws an exception if the operation cannot be performed. + + + + + Performs bitwise-and on the two remote objects. Throws an exception if the operation cannot be performed. + + + + + Performs bitwise-or on the two remote objects. Throws an exception if the operation cannot be performed. + + + + + Performs exclusive-or on the two remote objects. Throws an exception if the operation cannot be performed. + + + + + Compares the two remote objects and returns true if the 1st is less than the 2nd. Throws an exception if the operation cannot be performed. + + + + + Compares the two remote objects and returns true if the 1st is greater than the 2nd. Throws an exception if the operation cannot be performed. + + + + + Compares the two remote objects and returns true if the 1st is less than or equal to the 2nd. Throws an exception if the operation cannot be performed. + + + + + Compares the two remote objects and returns true if the 1st is greater than or equal to than the 2nd. Throws an exception if the operation cannot be performed. + + + + + Compares the two remote objects and returns true if the 1st is equal to the 2nd. Throws an exception if the operation cannot be performed. + + + + + Compares the two remote objects and returns true if the 1st is not equal to the 2nd. Throws an exception if the operation cannot be performed. + + + + + Returns a string representation of the object in a langauge specific object display format. + + + + + Returns a list of strings which contain the known members of the remote object. + + + + + Returns a string providing documentation for the specified remote object. + + + + + Returns a list of signatures applicable for calling the specified object in a form displayable to the user. + + + + + Helper to unwrap an object - in the future maybe we should validate the current app domain. + + + + + Helper to unwrap multiple objects + + + + + Reads an option whose value is expected to be a collection of non-null strings. + Reaturns a read-only copy of the option's value. + + + + + Dynamically choose between interpreting, simple compilation and compilation + that takes advantage of runtime history. + + + + + The number of iterations before the interpreter starts compiling.s + + + + + Display exception detail (callstack) when exception gets caught + + + + + Whether to gather performance statistics. + + + + + Initial file search paths provided by the host. + + + + + Abstracts system operations that are used by DLR and could potentially be platform specific. + The host can implement its PAL to adapt DLR to the platform it is running on. + For example, the Silverlight host adapts some file operations to work against files on the server. + + + + Invalid path. + + + Invalid path. + + + + Advanced APIs for HAPI providers. These methods should not be used by hosts. + They are provided for other hosting API implementers that would like to leverage existing HAPI and + extend it with language specific functionality, for example. + + + + is a null reference. + is remote. + + + e is a null reference. + is remote. + + + is a null reference. + is remote. + + + is a null reference. + is remote. + + + is a null reference. + is remote. + + + is a null reference. + is remote. + + + is a null reference. + is a null reference. + is a transparent proxy. + + + + Performs a callback in the ScriptEngine's app domain and returns the result. + + + + + Creates a new DocumentationOperations object from the given DocumentationProvider. + + + + + Represents a language in Hosting API. + Hosting API counterpart for . + + + + + Returns a new ObjectOperations object. See the Operations property for why you might want to call this. + + + + + Returns a new ObjectOperations object that inherits any semantics particular to the provided ScriptScope. + + See the Operations property for why you might want to call this. + + + + + Executes an expression. The execution is not bound to any particular scope. + + The engine doesn't support code execution. + is a null reference. + + + + Executes an expression within the specified scope. + + The engine doesn't support code execution. + is a null reference. + is a null reference. + + + + Executes an expression within a new scope and converts result to the given type. + + The engine doesn't support code execution. + is a null reference. + + + + Executes an expression within the specified scope and converts result to the given type. + + The engine doesn't support code execution. + is a null reference. + is a null reference. + + + + Executes content of the specified file in a new scope and returns that scope. + + The engine doesn't support code execution. + is a null reference. + + + + Executes content of the specified file against the given scope. + + The . + The engine doesn't support code execution. + is a null reference. + is a null reference. + + + + Executes the expression in the specified scope and return a result. + Returns an ObjectHandle wrapping the resulting value of running the code. + + + + + Executes the code in an empty scope. + Returns an ObjectHandle wrapping the resulting value of running the code. + + + + + Executes the expression in the specified scope and return a result. + Returns an ObjectHandle wrapping the resulting value of running the code. + + If an exception is thrown the exception is caught and an ObjectHandle to + the exception is provided. + + + Use this API in case the exception is not serializable (for example, due to security restrictions) or its serialization + loses information that you need to access. + + + + + Executes the code in an empty scope. + Returns an ObjectHandle wrapping the resulting value of running the code. + + If an exception is thrown the exception is caught and an ObjectHandle to + the exception is provided. + + + Use this API in case the exception is not serializable (for example, due to security restrictions) or its serialization + loses information that you need to access. + + + + + Creates a new ScriptScope whose storage is an arbitrary object. + + Accesses to the ScriptScope will turn into get, set, and delete members against the object. + + + + + This method returns the ScriptScope in which a ScriptSource of given path was executed. + + The ScriptSource.Path property is the key to finding the ScriptScope. Hosts need + to make sure they create a ScriptSource and set its Path property appropriately. + + GetScope is primarily useful for tools that need to map files to their execution scopes. For example, + an editor and interpreter tool might run a file Foo that imports or requires a file Bar. + + The editor's user might later open the file Bar and want to execute expressions in its context. + The tool would need to find Bar's ScriptScope for setting the appropriate context in its interpreter window. + This method helps with this scenario. + + + + + Return a ScriptSource object from string contents with the current engine as the language binding. + + The default SourceCodeKind is AutoDetect. + + The ScriptSource's Path property defaults to null. + + + + + Return a ScriptSource object from string contents with the current engine as the language binding. + + The ScriptSource's Path property defaults to null. + + + + + Return a ScriptSource object from string contents with the current engine as the language binding. + + The default SourceCodeKind is AutoDetect. + + + + + Return a ScriptSource object from string contents. These are helpers for creating ScriptSources' with the right language binding. + + + + + Return a ScriptSource object from file contents with the current engine as the language binding. + + The path's extension does NOT have to be in ScriptRuntime.GetRegisteredFileExtensions + or map to this language engine with ScriptRuntime.GetEngineByFileExtension. + + The default SourceCodeKind is File. + + The ScriptSource's Path property will be the path argument. + + The encoding defaults to System.Text.Encoding.Default. + + + + + Return a ScriptSource object from file contents with the current engine as the language binding. + + The path's extension does NOT have to be in ScriptRuntime.GetRegisteredFileExtensions + or map to this language engine with ScriptRuntime.GetEngineByFileExtension. + + The default SourceCodeKind is File. + + The ScriptSource's Path property will be the path argument. + + + + + Return a ScriptSource object from file contents with the current engine as the language binding. + + The path's extension does NOT have to be in ScriptRuntime.GetRegisteredFileExtensions + or map to this language engine with ScriptRuntime.GetEngineByFileExtension. + + The ScriptSource's Path property will be the path argument. + + + + + This method returns a ScriptSource object from a System.CodeDom.CodeObject. + This is a factory method for creating a ScriptSources with this language binding. + + The expected CodeDom support is extremely minimal for syntax-independent expression of semantics. + + Languages may do more, but hosts should only expect CodeMemberMethod support, + and only sub nodes consisting of the following: + CodeSnippetStatement + CodeSnippetExpression + CodePrimitiveExpression + CodeMethodInvokeExpression + CodeExpressionStatement (for holding MethodInvoke) + + + + + This method returns a ScriptSource object from a System.CodeDom.CodeObject. + This is a factory method for creating a ScriptSources with this language binding. + + The expected CodeDom support is extremely minimal for syntax-independent expression of semantics. + + Languages may do more, but hosts should only expect CodeMemberMethod support, + and only sub nodes consisting of the following: + CodeSnippetStatement + CodeSnippetExpression + CodePrimitiveExpression + CodeMethodInvokeExpression + CodeExpressionStatement (for holding MethodInvoke) + + + + + This method returns a ScriptSource object from a System.CodeDom.CodeObject. + This is a factory method for creating a ScriptSources with this language binding. + + The expected CodeDom support is extremely minimal for syntax-independent expression of semantics. + + Languages may do more, but hosts should only expect CodeMemberMethod support, + and only sub nodes consisting of the following: + CodeSnippetStatement + CodeSnippetExpression + CodePrimitiveExpression + CodeMethodInvokeExpression + CodeExpressionStatement (for holding MethodInvoke) + + + + + This method returns a ScriptSource object from a System.CodeDom.CodeObject. + This is a factory method for creating a ScriptSources with this language binding. + + The expected CodeDom support is extremely minimal for syntax-independent expression of semantics. + + Languages may do more, but hosts should only expect CodeMemberMethod support, + and only sub nodes consisting of the following: + CodeSnippetStatement + CodeSnippetExpression + CodePrimitiveExpression + CodeMethodInvokeExpression + CodeExpressionStatement (for holding MethodInvoke) + + + + + These methods return ScriptSource objects from stream contents with the current engine as the language binding. + + The default SourceCodeKind is File. + + The encoding defaults to Encoding.Default. + + + + + These methods return ScriptSource objects from stream contents with the current engine as the language binding. + + The default SourceCodeKind is File. + + + + + These methods return ScriptSource objects from stream contents with the current engine as the language binding. + + The encoding defaults to Encoding.Default. + + + + + This method returns a ScriptSource with the content provider supplied with the current engine as the language binding. + + This helper lets you own the content provider so that you can implement a stream over internal host data structures, such as an editor's text representation. + + + + + This method returns a language-specific service. + + It provides a point of extensibility for a language implementation + to offer more functionality than the standard engine members discussed here. + + Commonly available services include: + TokenCategorizer + Provides standardized tokenization of source code + ExceptionOperations + Provides formatting of exception objects. + DocumentationProvidera + Provides documentation for live object. + + + + + Sets the search paths used by the engine for loading files when a script wants + to import or require another file of code. + + The language doesn't allow to set search paths. + + + + Gets the search paths used by the engine for loading files when a script wants + to import or require another file of code. + + + + + Returns a default ObjectOperations for the engine. + + Because an ObjectOperations object caches rules for the types of + objects and operations it processes, using the default ObjectOperations for + many objects could degrade the caching benefits. Eventually the cache for + some operations could degrade to a point where ObjectOperations stops caching and + does a full search for an implementation of the requested operation for the given objects. + + Another reason to create a new ObjectOperations instance is to have it bound + to the specific view of a ScriptScope. Languages may attach per-language + behavior to a ScriptScope which would alter how the operations are performed. + + For simple hosting situations, this is sufficient behavior. + + + + + + + This property returns readon-only LanguageOptions this engine is using. + + + The values are determined during runtime initialization and read-only afterwards. + You can change the settings via a configuration file or explicitly using ScriptRuntimeSetup class. + + + + + This property returns the ScriptRuntime for the context in which this engine executes. + + + + + This property returns the engine's version as a string. The format is language-dependent. + + + + + ScriptHost is collocated with ScriptRuntime in the same app-domain. + The host can implement a derived class to consume some notifications and/or + customize operations like TryGetSourceUnit,ResolveSourceUnit, etc. + + The areguments to the the constructor of the derived class are specified in ScriptRuntimeSetup + instance that enters ScriptRuntime initialization. + + If the host is remote with respect to DLR (i.e. also with respect to ScriptHost) + and needs to access objects living in its app-domain it can pass MarshalByRefObject + as an argument to its ScriptHost subclass constructor. + + + + + The runtime the host is attached to. + + + + + Invoked after the initialization of the associated Runtime is finished. + The host can override this method to perform additional initialization of runtime (like loading assemblies etc.). + + + + + Invoked after a new language is loaded into the Runtime. + The host can override this method to perform additional initialization of language engines. + + + + + Provides hosting to DLR. Forwards DLR requests to the ScriptHost. + + + + + DLR requires any Hosting API provider to implement this class and provide its instance upon Runtime initialization. + DLR calls on it to perform basic host/system dependent operations. + + + + + Abstracts system operations that are used by DLR and could potentially be platform specific. + + + + + Provides host-redirectable IO streams used by DLR languages for default IO. + + + + + Used if the host stores the output as binary data. + + Binary stream to write data to. + Encoding used to convert textual data written to the output by the script. + + + + Used if the host handles both kinds of data (textual and binary) by itself. + + + + + Represents a Dynamic Language Runtime in Hosting API. + Hosting API counterpart for . + + + + + Creates ScriptRuntime in the current app-domain and initialized according to the the specified settings. + Creates an instance of host class specified in the setup and associates it with the created runtime. + Both Runtime and ScriptHost are collocated in the current app-domain. + + + + + Creates a new runtime with languages set up according to the current application configuration + (using System.Configuration). + + + + + Creates ScriptRuntime in the current app-domain and initialized according to the the specified settings. + Creates an instance of host class specified in the setup and associates it with the created runtime. + Both Runtime and ScriptHost are collocated in the specified app-domain. + + + + + + + + + Gets engine for the specified language. + + + + + Looks up the engine for the specified language. If the engine hasn't been created in this Runtime, it is instantiated here. + The method doesn't lock nor send notifications to the host. + + + + + path is empty, contains one or more of the invalid characters defined in GetInvalidPathChars or doesn't have an extension. + + + + path is null + file extension does not map to language engine + language does not have any search paths + file does exist in language's search path + + + + This method walks the assembly's namespaces and name bindings to ScriptRuntime.Globals + to represent the types available in the assembly. Each top-level namespace name gets + bound in Globals to a dynamic object representing the namespace. Within each top-level + namespace object, nested namespace names are bound to dynamic objects representing each + tier of nested namespaces. When this method encounters the same namespace-qualified name, + it merges names together objects representing the namespaces. + + + + + + This property returns the "global object" or name bindings of the ScriptRuntime as a ScriptScope. + + You can set the globals scope, which you might do if you created a ScriptScope with an + IAttributesCollection so that your host could late bind names. + + + + + Stores information needed to setup a ScriptRuntime + + + + + Reads setup from .NET configuration system (.config files). + If there is no configuration available returns an empty setup. + + + + + Reads setup from a specified XML stream. + + + + + Reads setup from a specified XML file. + + + + + The list of language setup information for languages to load into + the runtime + + + + + Indicates that the script runtime is in debug mode. + This means: + + 1) Symbols are emitted for debuggable methods (methods associated with SourceUnit). + 2) Debuggable methods are emitted to non-collectable types (this is due to CLR limitations on dynamic method debugging). + 3) JIT optimization is disabled for all methods + 4) Languages may disable optimizations based on this value. + + + + + Ignore CLR visibility checks + + + + + Can be any derived class of ScriptHost. When set, it allows the + host to override certain methods to control behavior of the runtime + + + + + Option names are case-sensitive. + + + + + Arguments passed to the host type when it is constructed + + + + + A ScriptScope is a unit of execution for code. It consists of a global Scope which + all code executes in. A ScriptScope can have an arbitrary initializer and arbitrary + reloader. + + ScriptScope is not thread safe. Host should either lock when multiple threads could + access the same module or should make a copy for each thread. + + Hosting API counterpart for . + + + + + Gets a value stored in the scope under the given name. + + The specified name is not defined in the scope. + is a null reference. + + + + Gets a value stored in the scope under the given name. + Converts the result to the specified type using the conversion that the language associated with the scope defines. + If no language is associated with the scope, the default CLR conversion is attempted. + + The specified name is not defined in the scope. + is a null reference. + + + + Tries to get a value stored in the scope under the given name. + + is a null reference. + + + + Tries to get a value stored in the scope under the given name. + Converts the result to the specified type using the conversion that the language associated with the scope defines. + If no language is associated with the scope, the default CLR conversion is attempted. + + is a null reference. + + + + Sets the name to the specified value. + + is a null reference. + + + + Gets a handle for a value stored in the scope under the given name. + + The specified name is not defined in the scope. + is a null reference. + + + + Tries to get a handle for a value stored in the scope under the given name. + Returns true if there is such name, false otherwise. + + is a null reference. + + + + Sets the name to the specified value. + + + The value held by the handle isn't from the scope's app-domain and isn't serializable or MarshalByRefObject. + + or is a null reference. + + + + Determines if this context or any outer scope contains the defined name. + + is a null reference. + + + + Removes the variable of the given name from this scope. + + true if the value existed in the scope before it has been removed. + is a null reference. + + + + Gets a list of variable names stored in the scope. + + + + + Gets an array of variable names and their values stored in the scope. + + + + + Gets an engine for the language associated with this scope. + Returns invariant engine if the scope is language agnostic. + + + + + Hosting counterpart for . + + + + + Compile the ScriptSource into CompileCode object that can be executed + repeatedly in its default scope or in other scopes without having to recompile the code. + + Code cannot be compiled. + + + + Errors are reported to the specified listener. + Returns null if the parser cannot compile the code due to errors. + + + + + Errors are reported to the specified listener. + Returns null if the parser cannot compile the code due to error(s). + + + + + Errors are reported to the specified listener. + Returns null if the parser cannot compile the code due to error(s). + + + + + Executes the code in the specified scope. + Returns an object that is the resulting value of running the code. + + When the ScriptSource is a file or statement, the engine decides what is + an appropriate value to return. Some languages return the value produced + by the last expression or statement, but languages that are not expression + based may return null. + + Code cannot be compiled. + + + + Executes the source code. The execution is not bound to any particular scope. + + + + + Executes the code in a specified scope and converts the result to the specified type. + The conversion is language specific. + + + + + Executes the code in an empty scope and converts the result to the specified type. + The conversion is language specific. + + + + + Executes the code in an empty scope. + Returns an ObjectHandle wrapping the resulting value of running the code. + + + + + Executes the code in the specified scope. + Returns an ObjectHandle wrapping the resulting value of running the code. + + + + + Executes the code in an empty scope. + Returns an ObjectHandle wrapping the resulting value of running the code. + + If an exception is thrown the exception is caught and an ObjectHandle to + the exception is provided. + + + Use this API to handle non-serializable exceptions (exceptions might not be serializable due to security restrictions) + or if an exception serialization loses information. + + + + + Executes the expression in the specified scope and return a result. + Returns an ObjectHandle wrapping the resulting value of running the code. + + If an exception is thrown the exception is caught and an ObjectHandle to + the exception is provided. + + + Use this API to handle non-serializable exceptions (exceptions might not be serializable due to security restrictions) + or if an exception serialization loses information. + + + + + Runs a specified code as if it was a program launched from OS command shell. + and returns a process exit code indicating the success or error condition + of executing the code. + + Exact behavior depends on the language. Some languages have a dedicated "exit" exception that + carries the exit code, in which case the exception is cought and the exit code is returned. + The default behavior returns the result of program's execution converted to an integer + using a language specific conversion. + + Code cannot be compiled. + + + + Detects the encoding of the content. + + + An encoding that is used by the reader of the script source to transcode its content to Unicode text. + Null if the content is already textual and no transcoding is performed. + + + Note that the default encoding specified when the script source is created could be overridden by + an encoding that is found in the content preamble (Unicode BOM or a language specific encoding preamble). + In that case the preamble encoding is returned. Otherwise, the default encoding is returned. + + An I/O error occurs. + + + + Reads specified range of lines (or less) from the source unit. + + 1-based number of the first line to fetch. + The number of lines to fetch. + + Which character sequences are considered line separators is language specific. + If language doesn't specify otherwise "\r", "\n", "\r\n" are recognized line separators. + + An I/O error occurs. + + + + Reads a specified line. + + 1-based line number. + Line content. Line separator is not included. + An I/O error occurs. + + Which character sequences are considered line separators is language specific. + If language doesn't specify otherwise "\r", "\n", "\r\n" are recognized line separators. + + + + + Gets script source content. + + Entire content. + An I/O error occurs. + + The result includes language specific preambles (e.g. "#coding:UTF-8" encoding preamble recognized by Ruby), + but not the preamble defined by the content encoding (e.g. BOM). + The entire content of the source unit is encoded by single encoding (if it is read from binary stream). + + + + + Identification of the source unit. Assigned by the host. + The format and semantics is host dependent (could be a path on file system or URL). + null for anonymous script source. + Cannot be an empty string. + + + + + Move the tokenizer past the next token and return its category. + + The token information associated with the token just scanned. + + + + Move the tokenizer past the next token. + + False if the end of stream has been reached, true otherwise. + + + + Get all tokens over a block of the stream. + + + + The scanner should return full tokens. If startLocation + length lands in the middle of a token, the full token + should be returned. + + s + Tokens are read until at least given amount of characters is read or the stream ends. + A enumeration of tokens. + + + + Scan from startLocation to at least startLocation + length. + + Tokens are read until at least given amount of characters is read or the stream ends. + + This method is used to determine state at arbitrary startLocation. + + False if the end of stream has been reached, true otherwise. + + + + The current internal state of the scanner. + + + + + The current startLocation of the scanner. + + + + + Represents a language context. Typically there is at most 1 context + associated with each language, but some languages may use more than one context + to identify code that should be treated differently. Contexts are used during + member and operator lookup. + + + + + Registers a language within the system with the specified name. + + + + + Looks up the context ID for the specified context identifier + + + + + Singleton for each language. + + + + + Must not be called under a lock as it can potentially call a user code. + + The language context's implementation failed to instantiate. + + + + Whether the application is in debug mode. + This means: + + 1) Symbols are emitted for debuggable methods (methods associated with SourceUnit). + 2) Debuggable methods are emitted to non-collectable types (this is due to CLR limitations on dynamic method debugging). + 3) JIT optimization is disabled for all methods + 4) Languages may disable optimizations based on this value. + + + + + Ignore CLR visibility checks. + + + + + ObjectOperations provide a large catalogue of object operations such as member access, conversions, + indexing, and things like addition. There are several introspection and tool support services available + for more advanced hosts. + + You get ObjectOperation instances from ScriptEngine, and they are bound to their engines for the semantics + of the operations. There is a default instance of ObjectOperations you can share across all uses of the + engine. However, very advanced hosts can create new instances. + + + + the number of sites required before we'll try cleaning up the cache... + + + the minimum difference between the average that is required to remove + + + the maximum number we'll remove on a single cache cleanup + + + the number of sites we should clear after if we can't make progress cleaning up otherwise + + + a dictionary of SiteKey's which are used to cache frequently used operations, logically a set + + + the # of sites we had created at the last cleanup + + + the total number of sites we've ever created + + + + Calls the provided object with the given parameters and returns the result. + + The prefered way of calling objects is to convert the object to a strongly typed delegate + using the ConvertTo methods and then invoking that delegate. + + + + + Invokes a member on the provided object with the given parameters and returns the result. + + + + + Invokes a member on the provided object with the given parameters and returns the result. + + + + + Creates a new instance from the provided object using the given parameters, and returns the result. + + + + + Gets the member name from the object obj. Throws an exception if the member does not exist or is write-only. + + + + + Gets the member name from the object obj and converts it to the type T. Throws an exception if the + member does not exist, is write-only, or cannot be converted. + + + + + Gets the member name from the object obj. Returns true if the member is successfully retrieved and + stores the value in the value out param. + + + + + Returns true if the object has a member named name, false if the member does not exist. + + + + + Removes the member name from the object obj. + + + + + Sets the member name on object obj to value. + + + + + Sets the member name on object obj to value. This overload can be used to avoid + boxing and casting of strongly typed members. + + + + + Gets the member name from the object obj. Throws an exception if the member does not exist or is write-only. + + + + + Gets the member name from the object obj and converts it to the type T. The conversion will be explicit or implicit + depending on what the langauge prefers. Throws an exception if the member does not exist, is write-only, or cannot be converted. + + + + + Gets the member name from the object obj. Returns true if the member is successfully retrieved and + stores the value in the value out param. + + + + + Returns true if the object has a member named name, false if the member does not exist. + + + + + Removes the member name from the object obj. Returns true if the member was successfully removed + or false if the member does not exist. + + + + + Sets the member name on object obj to value. + + + + + Sets the member name on object obj to value. This overload can be used to avoid + boxing and casting of strongly typed members. + + + + + Converts the object obj to the type T. The conversion will be explicit or implicit + depending on what the langauge prefers. + + + + + Converts the object obj to the type type. The conversion will be explicit or implicit + depending on what the langauge prefers. + + + + + Converts the object obj to the type T. Returns true if the value can be converted, false if it cannot. + + The conversion will be explicit or implicit depending on what the langauge prefers. + + + + + Converts the object obj to the type type. Returns true if the value can be converted, false if it cannot. + + The conversion will be explicit or implicit depending on what the langauge prefers. + + + + + Convers the object obj to the type T including explicit conversions which may lose information. + + + + + Converts the object obj to the type type including explicit conversions which may lose information. + + + + + Converts the object obj to the type type including explicit conversions which may lose information. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type T. Returns true if the value can be converted, false if it cannot. + + + + + Convers the object obj to the type T including implicit conversions. + + + + + Converts the object obj to the type type including implicit conversions. + + + + + Converts the object obj to the type type including implicit conversions. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type T. Returns true if the value can be converted, false if it cannot. + + + + + Performs a generic unary operation on the strongly typed target and returns the value as the specified type + + + + + Peforms the generic binary operation on the specified strongly typed targets and returns + the strongly typed result. + + + + + Returns a list of strings which contain the known members of the object. + + + + + Returns a string representation of the object in a language specific object display format. + + + + + Gets or creates a dynamic site w/ the specified type parameters for the provided binder. + + + This will either get the site from the cache or create a new site and return it. The cache + may be cleaned if it's gotten too big since the last usage. + + + + + Gets or creates a dynamic site w/ the specified type parameters for the provided binder. + + + This will either get the site from the cache or create a new site and return it. The cache + may be cleaned if it's gotten too big since the last usage. + + + + + Gets or creates a dynamic site w/ the specified type parameters for the provided binder. + + + This will either get the site from the cache or create a new site and return it. The cache + may be cleaned if it's gotten too big since the last usage. + + + + + Gets or creates a dynamic site w/ the specified type parameters for the provided binder. + + + This will either get the site from the cache or create a new site and return it. The cache + may be cleaned if it's gotten too big since the last usage. + + + + + Gets or creates a dynamic site w/ the specified type parameters for the provided binder. + + + This will either get the site from the cache or create a new site and return it. The cache + may be cleaned if it's gotten too big since the last usage. + + + + + Helper to create to get or create the dynamic site - called by the GetSite methods. + + + + + Removes items from the cache that have the lowest usage... + + + + + Helper class for tracking all of our unique dynamic sites and their + usage patterns. We hash on the combination of the binder and site type. + + We also track the hit count and the key holds the site associated w/ the + key. Logically this is a set based upon the binder and site-type but we + store it in a dictionary. + + + + + Singleton LanguageContext which represents a language-neutral LanguageContext + + + + + Provides language specific facilities which are typically called by the runtime. + + + + + Provides access to setting variables in scopes. + + By default this goes through ObjectOperations which can be rather slow. + Languages can override this to provide fast customized access which avoids + ObjectOperations. Languages can provide fast access to commonly used scope + types for that language. Typically this includes ScopeStorage and any other + classes which the language themselves uses for backing of a Scope. + + + + + Provides access to try getting variables in scopes. + + By default this goes through ObjectOperations which can be rather slow. + Languages can override this to provide fast customized access which avoids + ObjectOperations. Languages can provide fast access to commonly used scope + types for that language. Typically this includes ScopeStorage and any other + classes which the language themselves uses for backing of a Scope. + + + + + Provides access to getting variables in scopes and converting the result. + + By default this goes through ObjectOperations which can be rather slow. + Languages can override this to provide fast customized access which avoids + ObjectOperations. Languages can provide fast access to commonly used scope + types for that language. Typically this includes ScopeStorage and any other + classes which the language themselves uses for backing of a Scope. + + + + + Provides access to getting variables in scopes. + + By default this goes through ObjectOperations which can be rather slow. + Languages can override this to provide fast customized access which avoids + ObjectOperations. Languages can provide fast access to commonly used scope + types for that language. Typically this includes ScopeStorage and any other + classes which the language themselves uses for backing of a Scope. + + + + + Provides a text reader for source code that is to be read from a given stream. + + The stream open for reading. The stream must also allow seeking. + An encoding that should be used if the stream doesn't have Unicode or language specific preamble. + the path of the source unit if available + The reader. + An I/O error occurs. + + + + Creates the language specific CompilerOptions object for compilation of code not bound to any particular scope. + The language should flow any relevant options from LanguageContext to the newly created options instance. + + + + + Creates the language specific CompilerOptions object for compilation of code bound to a given scope. + + + + + Parses the source code within a specified compiler context. + The source unit to parse is held on by the context. + + null on failure. + Could also set the code properties and line/file mappings on the source unit. + + + + Creates a conversion binder. + + If explicitCast is true then the binder should do explicit conversions. + If explicitCast is false then the binder should do implicit conversions. + + If explicitCast is null it is up to the language to select the conversions + which closest match their normal behavior. + + + + + Gets the member names associated with the object + By default, only returns IDO names + + + + + Returns a string representation of the object in a language specific object display format. + + Dynamic sites container that could be used for any dynamic dispatches necessary for formatting. + Object to format. + A string representation of object. + + + + Provides the ContextId which includes members that should only be shown for this LanguageContext. + + ContextId's are used for filtering by Scope's. + + + + + Gets the ScriptDomainManager that this LanguageContext is running within. + + + + + Whether the language can parse code and create source units. + + + + + Internal class which binds a LanguageContext, StreamContentProvider, and Encoding together to produce + a TextContentProvider which reads binary data with the correct language semantics. + + + + + Provides a factory to create TextReader's over one source of textual content. + + TextContentProvider's are used when reading from a source which is already decoded + or has a known specific decoding. + + For example a text editor might provide a TextContentProvider whose backing is + an in-memory text buffer that the user can actively edit. + + + + + Creates a new TextReader which is backed by the content the TextContentProvider was created for. + + This method may be called multiple times. For example once to compile the code and again to get + the source code to display error messages. + + + + + This attribute marks a parameter that is not allowed to be null. + It is used by the method binding infrastructure to generate better error + messages and method selection. + + + + + This attribute marks a parameter whose type is an array that is not allowed to have null items. + It is used by the method binding infrastructure to generate better error + messages and method selection. + + + + + This attribute is used to mark a parameter that can accept any keyword parameters that + are not bound to normal arguments. The extra keyword parameters will be + passed in a dictionary which is created for the call. + + Most languages which support params dictionaries will support the following types: + IDictionary<string, anything> + IDictionary<object, anything> + Dictionary<string, anything> + Dictionary<object, anything> + IDictionary + IAttributesCollection (deprecated) + + For languages which don't have language level support the user will be required to + create and populate the dictionary by hand. + + This attribute is the dictionary equivalent of the System.ParamArrayAttribute. + + + public static void KeywordArgFunction([ParamsDictionary]IDictionary<string, object> dict) { + foreach (var v in dict) { + Console.WriteLine("Key: {0} Value: {1}", v.Key, v.Value); + } + } + + Called from Python: + + KeywordArgFunction(a = 2, b = "abc") + + will print: + Key: a Value = 2 + Key: b Value = abc + + + + + Represents a host-provided variables for executable code. The variables are + typically backed by a host-provided dictionary. Languages can also associate per-language + information with the context by using scope extensions. This can be used for tracking + state which is used across multiple executions, for providing custom forms of + storage (for example object keyed access), or other language specific semantics. + + Scope objects are thread-safe as long as their underlying storage is thread safe. + + Script hosts can choose to use thread safe or thread unsafe modules but must be sure + to constrain the code they right to be single-threaded if using thread unsafe + storage. + + + + + Creates a new scope with a new empty thread-safe dictionary. + + + + + Creates a new scope which is backed by an arbitrary object for it's storage. + + + + + + Gets the ScopeExtension associated with the provided ContextId. + + + + + Sets the ScopeExtension to the provided value for the given ContextId. + + The extension can only be set once. The returned value is either the new ScopeExtension + if no value was previously set or the previous value. + + + + + Provides optimized and cacheable support for scope storage. + + This is the default object used for storing values in a scope. + + + + The implementation uses a case-insensitive dictionary which holds + onto ScopeVariableIgnoreCase objects. The SVIC's hold onto ScopeVariable + objects for each possible casing. + + + + + Gets the named value from the scope optionally ignoring case. + + If the named value is not present an InvalidOperationException is raised. + + + + + Attempts to get the named value from the scope optionally ignoring the case. + + Returns true if the value is present, false if it is not. + + + + + Sets the named value in the scope optionally ignoring the case. + + + + + Deletes the named value from the scope optionally ignoring the case. + + + + + Checks if the named value is present in the scope optionally ignoring the case. + + + + + Gets the IScopeVariable for the scope optionally ignoring case. + + The IScopeVariable can be held onto and get/set/deleted without performing + a dictionary lookup on subsequent accesses. + + + + + Gets the ScopeVariable for the scope in a case-sensitive manner. + + The ScopeVariable can be held onto and get/set/deleted without performing + a dictionary lookup on subsequent accesses. + + + + + Gets the ScopeVariableIgnoreCase for the scope in a case-insensitive manner. + + The ScopeVariable can be held onto and get/set/deleted without performing + a dictionary lookup on subsequent accesses. + + + + + Returns all of the member names which currently have values in the scope. + + The list contains all available casings. + + + + + Returns all of the member names and their associated values from the scope. + + The list contains all available casings. + + + + + Provides convenient case-sensitive value access. + + + + + Provides a common interface for accessing both case sensitive and + case insensitive variable storage. + + + + + Atempts to get the value. If a value is assigned it returns true otherwise + it returns false. + + + + + Sets the current value in the scope. + + + + + Removes the current value from the scope. + + + + + True if the scope has a value, false if it does not. + + + + + Boxes the value for storage in a scope. Languages or consumers of the scope + can save this value and use it to get/set the current value in the scope for + commonly accessed values. + + ScopeVariables are case sensitive and will only refer to a single value. + + + + + Atempts to get the value. If a value is assigned it returns true otherwise + it returns false. + + + + + Sets the current value in the scope. + + + + + Removes the current value from the scope. + + + + + True if the scope has a value, false if it does not. + + + + + Boxes the value for storage in a scope. Languages or consumers of the scope + can save this value and use it to get/set the current value in the scope for + commonly accessed values. + + ScopeVariablesIgnoreCase are case insensitive and may access different casings + depending on how other gets/sets occur in the scope. + + + + + Atempts to get the value. If a value is assigned it returns true otherwise + it returns false. + + + + + Sets the current value in the scope. + + + + + Removes the current value from the scope. + + + + + True if the scope has a value, false if it does not. + + + + + ScriptCode is an instance of compiled code that is bound to a specific LanguageContext + but not a specific ScriptScope. The code can be re-executed multiple times in different + scopes. Hosting API counterpart for this class is CompiledCode. + + + + + A collection of environment variables. + + + + + Event for when a host calls LoadAssembly. After hooking this + event languages will need to call GetLoadedAssemblyList to + get any assemblies which were loaded before the language was + loaded. + + + + + Only host should redirect I/O. + + + + + Provides a factory to create streams over one source of binary content. + + StreamContentProvider's are used when opening a file of an unknown encoding. The + StreamContentProvider will be wrapped in a TextContentProvider provided by the language + which can support a language specific way of interpreting the binary data into text. + + For example some languages allow a marker at the beginning of the file which specifies + the encoding of the rest of the file. + + + + + Creates a new Stream which is backed by the content the StreamContentProvider was created for. + + For example if the StreamContentProvider was backing a file then GetStream re-opens the file and returns + the new stream. + + This method may be called multiple times. For example once to compile the code and again to get + the source code to display error messages. + + + + + Move the tokenizer past the next token and return its category. + + The token information associated with the token just scanned. + + + + Move the tokenizer past the next token. + + False if the end of stream has been reached, true otherwise. + + + + Get all tokens over a block of the stream. + + + + The scanner should return full tokens. If startLocation + length lands in the middle of a token, the full token + should be returned. + + + Tokens are read until at least given amount of characters is read or the stream ends. + A enumeration of tokens. + + + + Scan from startLocation to at least startLocation + length. + + The mininum number of characters to process while getting tokens. + + This method is used to determine state at arbitrary startLocation. + + False if the end of stream has been reached, true otherwise. + + + + The current internal state of the scanner. + + + + + The current startLocation of the scanner. + + + + + See also Microsoft.VisualStudio.Package.TokenTriggers. + + + + + Source code is a syntactically correct. + + + + + Source code represents an empty statement/expression. + + + + + Source code is already invalid and no suffix can make it syntactically correct. + + + + + Last token is incomplete. Source code can still be completed correctly. + + + + + Last statement is incomplete. Source code can still be completed correctly. + + + + + Defines a kind of the source code. The parser sets its initial state accordingly. + + + + + The code is an expression. + + + + + The code is a sequence of statements. + + + + + The code is a single statement. + + + + + The code is a content of a file. + + + + + The code is an interactive command. + + + + + The language parser auto-detects the kind. A syntax error is reported if it is not able to do so. + + + + + Source code reader. + + + + + Seeks the first character of a specified line in the text stream. + + Line number. The current position is assumed to be line #1. + + Returns true if the line is found, false otherwise. + + + + + Encoding that is used by the reader to convert binary data read from an underlying binary stream. + Null if the reader is reading from a textual source (not performing any byte to character transcoding). + + + + + Provides a StreamContentProvider for a stream of content backed by a file on disk. + + + + + Represents a location in source code. + + + + + Creates a new source location. + + The index in the source stream the location represents (0-based). + The line in the source stream the location represents (1-based). + The column in the source stream the location represents (1-based). + + + + Compares two specified location values to see if they are equal. + + One location to compare. + The other location to compare. + True if the locations are the same, False otherwise. + + + + Compares two specified location values to see if they are not equal. + + One location to compare. + The other location to compare. + True if the locations are not the same, False otherwise. + + + + Compares two specified location values to see if one is before the other. + + One location to compare. + The other location to compare. + True if the first location is before the other location, False otherwise. + + + + Compares two specified location values to see if one is after the other. + + One location to compare. + The other location to compare. + True if the first location is after the other location, False otherwise. + + + + Compares two specified location values to see if one is before or the same as the other. + + One location to compare. + The other location to compare. + True if the first location is before or the same as the other location, False otherwise. + + + + Compares two specified location values to see if one is after or the same as the other. + + One location to compare. + The other location to compare. + True if the first location is after or the same as the other location, False otherwise. + + + + Compares two specified location values. + + One location to compare. + The other location to compare. + 0 if the locations are equal, -1 if the left one is less than the right one, 1 otherwise. + + + + A location that is valid but represents no location at all. + + + + + An invalid location. + + + + + A minimal valid location. + + + + + The index in the source stream the location represents (0-based). + + + + + The line in the source stream the location represents (1-based). + + + + + The column in the source stream the location represents (1-based). + + + + + Whether the location is a valid location. + + True if the location is valid, False otherwise. + + + + Stores the location of a span of text in a source file. + + + + + Constructs a new span with a specific start and end location. + + The beginning of the span. + The end of the span. + + + + A valid span that represents no location. + + + + + An invalid span. + + + + + Compares two specified Span values to see if they are equal. + + One span to compare. + The other span to compare. + True if the spans are the same, False otherwise. + + + + Compares two specified Span values to see if they are not equal. + + One span to compare. + The other span to compare. + True if the spans are not the same, False otherwise. + + + + The start location of the span. + + + + + The end location of the span. Location of the first character behind the span. + + + + + Length of the span (number of characters inside the span). + + + + + Whether the locations in the span are valid. + + + + + Reads specified range of lines (or less) from the source unit. + Line numbers starts with 1. + + + + + Errors are reported to the specified sink. + Returns null if the parser cannot compile the code due to error(s). + + + + + Executes against a specified scope. + + + + + Executes against a specified scope and reports errors to the given error sink. + + + + + Executes in a new scope created by the language. + + + + + Executes in a new scope created by the language. + + + + + Executes in a new scope created by the language. + + + + + Identification of the source unit. Assigned by the host. + The format and semantics is host dependent (could be a path on file system or URL). + Empty string for anonymous source units. + + + + + LanguageContext of the language of the unit. + + + + + Unmapped span. + + + + + A token marking an end of stream. + + + + + A space, tab, or newline. + + + + + A block comment. + + + + + A single line comment. + + + + + A documentation comment. + + + + + A numeric literal. + + + + + A character literal. + + + + + A string literal. + + + + + A regular expression literal. + + + + + A keyword. + + + + + A directive (e.g. #line). + + + + + A punctuation character that has a specific meaning in a language. + + + + + A token that operates as a separator between two language elements. + + + + + An identifier (variable, $variable, @variable, @@variable, $variable$, function!, function?, [variable], i'variable', ...) + + + + + Braces, parenthesis, brackets. + + + + + Errors. + + + + + Converts a generic ICollection of T into an array of T. + + If the collection is already an array of T the original collection is returned. + + + + + Not all .NET enumerators throw exceptions if accessed in an invalid state. This type + can be used to throw exceptions from enumerators implemented in IronPython. + + + + + Wraps the provided enumerable into a ReadOnlyCollection{T} + + Copies all of the data into a new array, so the data can't be + changed after creation. The exception is if the enumerable is + already a ReadOnlyCollection{T}, in which case we just return it. + + + + + Console input stream (Console.OpenStandardInput) has a bug that manifests itself if reading small amounts of data. + This class wraps the standard input stream with a buffer that ensures that enough data are read from the underlying stream. + + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + Offset or count are out of range. + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + Offset or count are out of range. + + + + Requires the array and all its items to be non-null. + + + + + Requires the enumerable collection and all its items to be non-null. + + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + Array is null. + Offset or count are out of range. + + + + Presents a flat enumerable view of multiple dictionaries + + + + + Strongly-typed and parameterized string factory. + + + + + A string like "Cannot access member {1} declared on type {0} because the type contains generic parameters." + + + + + A string like "Type '{0}' is missing or cannot be loaded." + + + + + A string like "static property "{0}" of "{1}" can only be read through a type, not an instance" + + + + + A string like "static property "{0}" of "{1}" can only be assigned to through a type, not an instance" + + + + + A string like "Type parameter is {0}. Expected a delegate." + + + + + A string like "Cannot cast from type '{0}' to type '{1}" + + + + + A string like "unknown member type: '{0}'. " + + + + + A string like "The operation requires a non-generic type for {0}, but this represents generic types only" + + + + + A string like "Invalid operation: '{0}'" + + + + + A string like "Cannot create default value for type {0}." + + + + + A string like "Unhandled convert: {0}" + + + + + A string like "{0}.{1} has no publiclly visible method." + + + + + A string like "Extension type {0} must be public." + + + + + A string like "Invalid type of argument {0}; expecting {1}." + + + + + A string like "Field {0} is read-only" + + + + + A string like "Property {0} is read-only" + + + + + A string like "Expected event from {0}.{1}, got event from {2}.{3}." + + + + + A string like "expected bound event, got {0}." + + + + + A string like "Expected type {0}, got {1}." + + + + + A string like "can only write to member {0}." + + + + + A string like "Invalid stream type: {0}." + + + + + A string like "can't add another casing for identifier {0}" + + + + + A string like "can't add new identifier {0}" + + + + + A string like "Type '{0}' doesn't provide a suitable public constructor or its implementation is faulty: {1}" + + + + + A string like "Cannot emit constant {0} ({1})" + + + + + A string like "No implicit cast from {0} to {1}" + + + + + A string like "No explicit cast from {0} to {1}" + + + + + A string like "name '{0}' not defined" + + + + + A string like "Cannot create instance of {0} because it contains generic parameters" + + + + + A string like "Non-verifiable assembly generated: {0}:\nAssembly preserved as {1}\nError text:\n{2}\n" + + + + + A string like "Method precondition violated" + + + + + A string like "Invalid argument value" + + + + + A string like "Non-empty string required" + + + + + A string like "Non-empty collection required" + + + + + A string like "must by an Exception instance" + + + + + A string like "Type of test must be bool" + + + + + A string like "Type of the expression must be bool" + + + + + A string like "Empty string is not a valid path." + + + + + A string like "Invalid delegate type (Invoke method not found)." + + + + + A string like "expected only static property" + + + + + A string like "Property doesn't exist on the provided type" + + + + + A string like "Field doesn't exist on provided type" + + + + + A string like "Type doesn't have constructor with a given signature" + + + + + A string like "Type doesn't have a method with a given name." + + + + + A string like "Type doesn't have a method with a given name and signature." + + + + + A string like "Count must be non-negative." + + + + + A string like "arrayType must be an array type" + + + + + A string like "Either code or target must be specified." + + + + + A string like "RuleBuilder can only be used with delegates whose first argument is CallSite." + + + + + A string like "no instance for call." + + + + + A string like "Missing Test." + + + + + A string like "Missing Target." + + + + + A string like "Finally already defined." + + + + + A string like "Can not have fault and finally." + + + + + A string like "Fault already defined." + + + + + A string like "Global/top-level local variable names must be unique." + + + + + A string like "Generating code from non-serializable CallSiteBinder." + + + + + A string like "Specified path is invalid." + + + + + A string like "Dictionaries are not hashable." + + + + + A string like "language already registered." + + + + + A string like "The method or operation is not implemented." + + + + + A string like "No exception." + + + + + A string like "Already initialized." + + + + + A string like "CreateScopeExtension must return a scope extension." + + + + + A string like "Invalid number of parameters for the service." + + + + + A string like "Cannot change non-caching value." + + + + + A string like "No code to compile." + + + + + A string like "Queue empty." + + + + + A string like "Enumeration has not started. Call MoveNext." + + + + + A string like "Enumeration already finished." + + + + + A string like "Invalid output directory." + + + + + A string like "Invalid assembly name or file extension." + + + + + A string like "No default value for a given type." + + + + + A string like "Specified language provider type is not registered." + + + + + A string like "can't read from property" + + + + + A string like "can't write to property" + + + + + Strongly-typed and parameterized exception factory. + + + + + ArgumentException with message like "Either code or target must be specified." + + + + + InvalidOperationException with message like "Type parameter is {0}. Expected a delegate." + + + + + InvalidOperationException with message like "Cannot cast from type '{0}' to type '{1}" + + + + + InvalidOperationException with message like "unknown member type: '{0}'. " + + + + + InvalidOperationException with message like "RuleBuilder can only be used with delegates whose first argument is CallSite." + + + + + InvalidOperationException with message like "no instance for call." + + + + + InvalidOperationException with message like "Missing Test." + + + + + InvalidOperationException with message like "Missing Target." + + + + + TypeLoadException with message like "The operation requires a non-generic type for {0}, but this represents generic types only" + + + + + ArgumentException with message like "Invalid operation: '{0}'" + + + + + InvalidOperationException with message like "Finally already defined." + + + + + InvalidOperationException with message like "Can not have fault and finally." + + + + + InvalidOperationException with message like "Fault already defined." + + + + + ArgumentException with message like "Cannot create default value for type {0}." + + + + + ArgumentException with message like "Unhandled convert: {0}" + + + + + InvalidOperationException with message like "{0}.{1} has no publiclly visible method." + + + + + ArgumentException with message like "Global/top-level local variable names must be unique." + + + + + ArgumentException with message like "Generating code from non-serializable CallSiteBinder." + + + + + ArgumentException with message like "Specified path is invalid." + + + + + ArgumentTypeException with message like "Dictionaries are not hashable." + + + + + InvalidOperationException with message like "language already registered." + + + + + NotImplementedException with message like "The method or operation is not implemented." + + + + + InvalidOperationException with message like "No exception." + + + + + ArgumentException with message like "Extension type {0} must be public." + + + + + InvalidOperationException with message like "Already initialized." + + + + + InvalidImplementationException with message like "CreateScopeExtension must return a scope extension." + + + + + ArgumentException with message like "Invalid number of parameters for the service." + + + + + ArgumentException with message like "Invalid type of argument {0}; expecting {1}." + + + + + ArgumentException with message like "Cannot change non-caching value." + + + + + MissingMemberException with message like "Field {0} is read-only" + + + + + MissingMemberException with message like "Property {0} is read-only" + + + + + ArgumentException with message like "Expected event from {0}.{1}, got event from {2}.{3}." + + + + + ArgumentTypeException with message like "expected bound event, got {0}." + + + + + ArgumentTypeException with message like "Expected type {0}, got {1}." + + + + + MemberAccessException with message like "can only write to member {0}." + + + + + InvalidOperationException with message like "No code to compile." + + + + + ArgumentException with message like "Invalid stream type: {0}." + + + + + InvalidOperationException with message like "Queue empty." + + + + + InvalidOperationException with message like "Enumeration has not started. Call MoveNext." + + + + + InvalidOperationException with message like "Enumeration already finished." + + + + + InvalidOperationException with message like "can't add another casing for identifier {0}" + + + + + InvalidOperationException with message like "can't add new identifier {0}" + + + + + ArgumentException with message like "Invalid output directory." + + + + + ArgumentException with message like "Invalid assembly name or file extension." + + + + + ArgumentException with message like "Cannot emit constant {0} ({1})" + + + + + ArgumentException with message like "No implicit cast from {0} to {1}" + + + + + ArgumentException with message like "No explicit cast from {0} to {1}" + + + + + MissingMemberException with message like "name '{0}' not defined" + + + + + ArgumentException with message like "No default value for a given type." + + + + + ArgumentException with message like "Specified language provider type is not registered." + + + + + InvalidOperationException with message like "can't read from property" + + + + + InvalidOperationException with message like "can't write to property" + + + + + ArgumentException with message like "Cannot create instance of {0} because it contains generic parameters" + + + + + System.Security.VerificationException with message like "Non-verifiable assembly generated: {0}:\nAssembly preserved as {1}\nError text:\n{2}\n" + + + + + Gets a Func of CallSite, object * paramCnt, object delegate type + that's suitable for use in a non-strongly typed call site. + + + + diff --git a/packages/IronPython.2.7.4/lib/Sl5/IronPython.Modules.dll b/packages/IronPython.2.7.4/lib/Sl5/IronPython.Modules.dll new file mode 100644 index 0000000000..bc306686e7 Binary files /dev/null and b/packages/IronPython.2.7.4/lib/Sl5/IronPython.Modules.dll differ diff --git a/packages/IronPython.2.7.4/lib/Sl5/IronPython.Modules.xml b/packages/IronPython.2.7.4/lib/Sl5/IronPython.Modules.xml new file mode 100644 index 0000000000..fc217fc391 --- /dev/null +++ b/packages/IronPython.2.7.4/lib/Sl5/IronPython.Modules.xml @@ -0,0 +1,3704 @@ + + + + IronPython.Modules + + + + + Try to convert IList(Of byte) to byte[] without copying, if possible. + + + + + + + Copy the latest data from the memory buffer. + + This won't always contain data, because comrpessed data is only written after a block is filled. + + + + + + Add data to the input buffer. This manipulates the position of the stream + to make it appear to the BZip2 stream that nothing has actually changed. + + The data to append to the buffer. + + + + Reset the BitWriter. + + + + This is useful when the BitWriter writes into a MemoryStream, and + is used by a BZip2Compressor, which itself is re-used for multiple + distinct data blocks. + + + + + + Write some number of bits from the given value, into the output. + + + + The nbits value should be a max of 25, for safety. For performance + reasons, this method does not check! + + + + + + Write a full 8-bit byte into the output. + + + + + Write four 8-bit bytes into the output. + + + + + Write all available byte-aligned bytes. + + + + This method writes no new output, but flushes any accumulated + bits. At completion, the accumulator may contain up to 7 + bits. + + + This is necessary when re-assembling output from N independent + compressors, one for each of N blocks. The output of any + particular compressor will in general have some fragment of a byte + remaining. This fragment needs to be accumulated into the + parent BZip2OutputStream. + + + + + + Writes all available bytes, and emits padding for the final byte as + necessary. This must be the last method invoked on an instance of + BitWriter. + + + + + Delivers the remaining bits, left-aligned, in a byte. + + + + This is valid only if NumRemainingBits is less than 8; + in other words it is valid only after a call to Flush(). + + + + + Knuth's increments seem to work better than Incerpi-Sedgewick here. + Possibly because the number of elems to sort is usually small, typically + <= 20. + + + + BZip2Compressor writes its compressed data out via a BitWriter. This + is necessary because BZip2 does byte shredding. + + + + + Accept new bytes into the compressor data buffer + + + + This method does the first-level (cheap) run-length encoding, and + stores the encoded data into the rle block. + + + + + + Process one input byte into the block. + + + + + To "process" the byte means to do the run-length encoding. + There are 3 possible return values: + + 0 - the byte was not written, in other words, not + encoded into the block. This happens when the + byte b would require the start of a new run, and + the block has no more room for new runs. + + 1 - the byte was written, and the block is not full. + + 2 - the byte was written, and the block is full. + + + + 0 if the byte was not written, non-zero if written. + + + + Append one run to the output block. + + + + + This compressor does run-length-encoding before BWT and etc. This + method simply appends a run to the output block. The append always + succeeds. The return value indicates whether the block is full: + false (not full) implies that at least one additional run could be + processed. + + + true if the block is now full; otherwise false. + + + + Compress the data that has been placed (Run-length-encoded) into the + block. The compressed data goes into the CompressedBytes array. + + + + Side effects: 1. fills the CompressedBytes array. 2. sets the + AvailableBytesOut property. + + + + + This is the most hammered method of this class. + +

+ This is the version using unrolled loops. +

+
+ + Method "mainQSort3", file "blocksort.c", BZip2 1.0.2 + + + + The number of uncompressed bytes being held in the buffer. + + + + I am thinking this may be useful in a Stream that uses this + compressor class. In the Close() method on the stream it could + check this value to see if anything has been written at all. You + may think the stream could easily track the number of bytes it + wrote, which would eliminate the need for this. But, there is the + case where the stream writes a complete block, and it is full, and + then writes no more. In that case the stream may want to check. + + + + + Array instance identical to sfmap, both are used only + temporarily and independently, so we do not need to allocate + additional memory. + + + + A read-only decorator stream that performs BZip2 decompression on Read. + + + + + Create a BZip2InputStream, wrapping it around the given input Stream. + + + + The input stream will be closed when the BZip2InputStream is closed. + + + The stream from which to read compressed data + + + + Create a BZip2InputStream with the given stream, and + specifying whether to leave the wrapped stream open when + the BZip2InputStream is closed. + + The stream from which to read compressed data + + Whether to leave the input stream open, when the BZip2InputStream closes. + + + + + This example reads a bzip2-compressed file, decompresses it, + and writes the decompressed data into a newly created file. + + + var fname = "logfile.log.bz2"; + using (var fs = File.OpenRead(fname)) + { + using (var decompressor = new Ionic.BZip2.BZip2InputStream(fs)) + { + var outFname = fname + ".decompressed"; + using (var output = File.Create(outFname)) + { + byte[] buffer = new byte[2048]; + int n; + while ((n = decompressor.Read(buffer, 0, buffer.Length)) > 0) + { + output.Write(buffer, 0, n); + } + } + } + } + + + + + + Read data from the stream. + + + + + To decompress a BZip2 data stream, create a BZip2InputStream, + providing a stream that reads compressed data. Then call Read() on + that BZip2InputStream, and the data read will be decompressed + as you read. + + + + A BZip2InputStream can be used only for Read(), not for Write(). + + + + The buffer into which the read data should be placed. + the offset within that data array to put the first byte read. + the number of bytes to read. + the number of bytes actually read + + + + Read a single byte from the stream. + + the byte read from the stream, or -1 if EOF + + + + Flush the stream. + + + + + Calling this method always throws a . + + this is irrelevant, since it will always throw! + this is irrelevant, since it will always throw! + irrelevant! + + + + Calling this method always throws a . + + this is irrelevant, since it will always throw! + + + + Calling this method always throws a . + + this parameter is never used + this parameter is never used + this parameter is never used + + + + Dispose the stream. + + + indicates whether the Dispose method was invoked by user code. + + + + + Close the stream. + + + + + Read n bits from input, right justifying the result. + + + + For example, if you read 1 bit, the result is either 0 + or 1. + + + + The number of bits to read, always between 1 and 32. + + + + Called by createHuffmanDecodingTables() exclusively. + + + Called by recvDecodingTables() exclusively. + + + + Dump the current state of the decompressor, to restore it in case of an error. + This allows the decompressor to be essentially "rewound" and retried when more + data arrives. + + This is only used by IronPython. + + The current state. + + + + Restore the internal compressor state if an error occurred. + + The old state. + + + + Indicates whether the stream can be read. + + + The return value depends on whether the captive stream supports reading. + + + + + Indicates whether the stream supports Seek operations. + + + Always returns false. + + + + + Indicates whether the stream can be written. + + + The return value depends on whether the captive stream supports writing. + + + + + Reading this property always throws a . + + + + + The position of the stream pointer. + + + + Setting this property always throws a . Reading will return the + total number of uncompressed bytes read in. + + + + + Compressor State + + + + Freq table collected to save a pass over the data during + decompression. + + + Initializes the tt array. + + This method is called when the required length of the array is known. + I don't initialize it at construction time to avoid unneccessary + memory allocation when compressing small files. + + + + A write-only decorator stream that compresses data as it is + written using the BZip2 algorithm. + + + + + Constructs a new BZip2OutputStream, that sends its + compressed output to the given output stream. + + + + The destination stream, to which compressed output will be sent. + + + + + This example reads a file, then compresses it with bzip2 file, + and writes the compressed data into a newly created file. + + + var fname = "logfile.log"; + using (var fs = File.OpenRead(fname)) + { + var outFname = fname + ".bz2"; + using (var output = File.Create(outFname)) + { + using (var compressor = new Ionic.BZip2.BZip2OutputStream(output)) + { + byte[] buffer = new byte[2048]; + int n; + while ((n = fs.Read(buffer, 0, buffer.Length)) > 0) + { + compressor.Write(buffer, 0, n); + } + } + } + } + + + + + + Constructs a new BZip2OutputStream with specified blocksize. + + the destination stream. + + The blockSize in units of 100000 bytes. + The valid range is 1..9. + + + + + Constructs a new BZip2OutputStream. + + the destination stream. + + whether to leave the captive stream open upon closing this stream. + + + + + Constructs a new BZip2OutputStream with specified blocksize, + and explicitly specifies whether to leave the wrapped stream open. + + + the destination stream. + + The blockSize in units of 100000 bytes. + The valid range is 1..9. + + + whether to leave the captive stream open upon closing this stream. + + + + + Close the stream. + + + + This may or may not close the underlying stream. Check the + constructors that accept a bool value. + + + + + + Flush the stream. + + + + + Write data to the stream. + + + + + Use the BZip2OutputStream to compress data while writing: + create a BZip2OutputStream with a writable output stream. + Then call Write() on that BZip2OutputStream, providing + uncompressed data as input. The data sent to the output stream will + be the compressed form of the input data. + + + + A BZip2OutputStream can be used only for Write() not for Read(). + + + + + The buffer holding data to write to the stream. + the offset within that data array to find the first byte to write. + the number of bytes to write. + + + + Calling this method always throws a . + + this is irrelevant, since it will always throw! + this is irrelevant, since it will always throw! + irrelevant! + + + + Calling this method always throws a . + + this is irrelevant, since it will always throw! + + + + Calling this method always throws a . + + this parameter is never used + this parameter is never used + this parameter is never used + never returns anything; always throws + + + + The blocksize parameter specified at construction time. + + + + + Indicates whether the stream can be read. + + + The return value is always false. + + + + + Indicates whether the stream supports Seek operations. + + + Always returns false. + + + + + Indicates whether the stream can be written. + + + The return value should always be true, unless and until the + object is disposed and closed. + + + + + Reading this property always throws a . + + + + + The position of the stream pointer. + + + + Setting this property always throws a . Reading will return the + total number of uncompressed bytes written through. + + + + + Computes a CRC-32. The CRC-32 algorithm is parameterized - you + can set the polynomial and enable or disable bit + reversal. This can be used for GZIP, BZip2, or ZIP. + + + This type is used internally by DotNetZip; it is generally not used + directly by applications wishing to create, read, or manipulate zip + archive files. + + + + + Returns the CRC32 for the specified stream. + + The stream over which to calculate the CRC32 + the CRC32 calculation + + + + Returns the CRC32 for the specified stream, and writes the input into the + output stream. + + The stream over which to calculate the CRC32 + The stream into which to deflate the input + the CRC32 calculation + + + + Get the CRC32 for the given (word,byte) combo. This is a + computation defined by PKzip for PKZIP 2.0 (weak) encryption. + + The word to start with. + The byte to combine it with. + The CRC-ized result. + + + + Update the value for the running CRC32 using the given block of bytes. + This is useful when using the CRC32() class in a Stream. + + block of bytes to slurp + starting point in the block + how many bytes within the block to slurp + + + + Process one byte in the CRC. + + the byte to include into the CRC . + + + + Process a run of N identical bytes into the CRC. + + + + This method serves as an optimization for updating the CRC when a + run of identical bytes is found. Rather than passing in a buffer of + length n, containing all identical bytes b, this method accepts the + byte value and the length of the (virtual) buffer - the length of + the run. + + + the byte to include into the CRC. + the number of times that byte should be repeated. + + + + Combines the given CRC32 value with the current running total. + + + This is useful when using a divide-and-conquer approach to + calculating a CRC. Multiple threads can each calculate a + CRC32 on a segment of the data, and then combine the + individual CRC32 values at the end. + + the crc value to be combined with this one + the length of data the CRC value was calculated on + + + + Create an instance of the CRC32 class using the default settings: no + bit reversal, and a polynomial of 0xEDB88320. + + + + + Create an instance of the CRC32 class, specifying whether to reverse + data bits or not. + + + specify true if the instance should reverse data bits. + + + + In the CRC-32 used by BZip2, the bits are reversed. Therefore if you + want a CRC32 with compatibility with BZip2, you should pass true + here. In the CRC-32 used by GZIP and PKZIP, the bits are not + reversed; Therefore if you want a CRC32 with compatibility with + those, you should pass false. + + + + + + Create an instance of the CRC32 class, specifying the polynomial and + whether to reverse data bits or not. + + + The polynomial to use for the CRC, expressed in the reversed (LSB) + format: the highest ordered bit in the polynomial value is the + coefficient of the 0th power; the second-highest order bit is the + coefficient of the 1 power, and so on. Expressed this way, the + polynomial for the CRC-32C used in IEEE 802.3, is 0xEDB88320. + + + specify true if the instance should reverse data bits. + + + + + In the CRC-32 used by BZip2, the bits are reversed. Therefore if you + want a CRC32 with compatibility with BZip2, you should pass true + here for the reverseBits parameter. In the CRC-32 used by + GZIP and PKZIP, the bits are not reversed; Therefore if you want a + CRC32 with compatibility with those, you should pass false for the + reverseBits parameter. + + + + + + Reset the CRC-32 class - clear the CRC "remainder register." + + + + Use this when employing a single instance of this class to compute + multiple, distinct CRCs on multiple, distinct data blocks. + + + + + + Indicates the total number of bytes applied to the CRC. + + + + + Indicates the current CRC for all blocks slurped in. + + + + + A Stream that calculates a CRC32 (a checksum) on all bytes read, + or on all bytes written. + + + + + This class can be used to verify the CRC of a ZipEntry when + reading from a stream, or to calculate a CRC when writing to a + stream. The stream should be used to either read, or write, but + not both. If you intermix reads and writes, the results are not + defined. + + + + This class is intended primarily for use internally by the + DotNetZip library. + + + + + + The default constructor. + + + + Instances returned from this constructor will leave the underlying + stream open upon Close(). The stream uses the default CRC32 + algorithm, which implies a polynomial of 0xEDB88320. + + + The underlying stream + + + + The constructor allows the caller to specify how to handle the + underlying stream at close. + + + + The stream uses the default CRC32 algorithm, which implies a + polynomial of 0xEDB88320. + + + The underlying stream + true to leave the underlying stream + open upon close of the CrcCalculatorStream; false otherwise. + + + + A constructor allowing the specification of the length of the stream + to read. + + + + The stream uses the default CRC32 algorithm, which implies a + polynomial of 0xEDB88320. + + + Instances returned from this constructor will leave the underlying + stream open upon Close(). + + + The underlying stream + The length of the stream to slurp + + + + A constructor allowing the specification of the length of the stream + to read, as well as whether to keep the underlying stream open upon + Close(). + + + + The stream uses the default CRC32 algorithm, which implies a + polynomial of 0xEDB88320. + + + The underlying stream + The length of the stream to slurp + true to leave the underlying stream + open upon close of the CrcCalculatorStream; false otherwise. + + + + A constructor allowing the specification of the length of the stream + to read, as well as whether to keep the underlying stream open upon + Close(), and the CRC32 instance to use. + + + + The stream uses the specified CRC32 instance, which allows the + application to specify how the CRC gets calculated. + + + The underlying stream + The length of the stream to slurp + true to leave the underlying stream + open upon close of the CrcCalculatorStream; false otherwise. + the CRC32 instance to use to calculate the CRC32 + + + + Read from the stream + + the buffer to read + the offset at which to start + the number of bytes to read + the number of bytes actually read + + + + Write to the stream. + + the buffer from which to write + the offset at which to start writing + the number of bytes to write + + + + Flush the stream. + + + + + Seeking is not supported on this stream. This method always throws + + + N/A + N/A + N/A + + + + This method always throws + + + N/A + + + + Closes the stream. + + + + + Gets the total number of bytes run through the CRC32 calculator. + + + + This is either the total number of bytes read, or the total number of + bytes written, depending on the direction of this stream. + + + + + Provides the current CRC for all blocks slurped in. + + + + The running total of the CRC is kept as data is written or read + through the stream. read this property after all reads or writes to + get an accurate CRC for the entire stream. + + + + + + Indicates whether the underlying stream will be left open when the + CrcCalculatorStream is Closed. + + + + Set this at any point before calling . + + + + + + Indicates whether the stream supports reading. + + + + + Indicates whether the stream supports seeking. + + + + Always returns false. + + + + + + Indicates whether the stream supports writing. + + + + + Returns the length of the underlying stream. + + + + + The getter for this property returns the total bytes read. + If you use the setter, it will throw + . + + + + + A write-only decorator stream that compresses data as it is + written using the BZip2 algorithm. This stream compresses by + block using multiple threads. + + + This class performs BZIP2 compression through writing. For + more information on the BZIP2 algorithm, see + . + + + + This class is similar to , + except that this implementation uses an approach that employs multiple + worker threads to perform the compression. On a multi-cpu or multi-core + computer, the performance of this class can be significantly higher than + the single-threaded BZip2OutputStream, particularly for larger streams. + How large? Anything over 10mb is a good candidate for parallel + compression. + + + + The tradeoff is that this class uses more memory and more CPU than the + vanilla BZip2OutputStream. Also, for small files, the + ParallelBZip2OutputStream can be much slower than the vanilla + BZip2OutputStream, because of the overhead associated to using the + thread pool. + + + + + + + Constructs a new ParallelBZip2OutputStream, that sends its + compressed output to the given output stream. + + + + The destination stream, to which compressed output will be sent. + + + + + This example reads a file, then compresses it with bzip2 file, + and writes the compressed data into a newly created file. + + + var fname = "logfile.log"; + using (var fs = File.OpenRead(fname)) + { + var outFname = fname + ".bz2"; + using (var output = File.Create(outFname)) + { + using (var compressor = new Ionic.BZip2.ParallelBZip2OutputStream(output)) + { + byte[] buffer = new byte[2048]; + int n; + while ((n = fs.Read(buffer, 0, buffer.Length)) > 0) + { + compressor.Write(buffer, 0, n); + } + } + } + } + + + + + + Constructs a new ParallelBZip2OutputStream with specified blocksize. + + the destination stream. + + The blockSize in units of 100000 bytes. + The valid range is 1..9. + + + + + Constructs a new ParallelBZip2OutputStream. + + the destination stream. + + whether to leave the captive stream open upon closing this stream. + + + + + Constructs a new ParallelBZip2OutputStream with specified blocksize, + and explicitly specifies whether to leave the wrapped stream open. + + + the destination stream. + + The blockSize in units of 100000 bytes. + The valid range is 1..9. + + + whether to leave the captive stream open upon closing this stream. + + + + + Close the stream. + + + + This may or may not close the underlying stream. Check the + constructors that accept a bool value. + + + + + + Flush the stream. + + + + + Write data to the stream. + + + + + Use the ParallelBZip2OutputStream to compress data while + writing: create a ParallelBZip2OutputStream with a writable + output stream. Then call Write() on that + ParallelBZip2OutputStream, providing uncompressed data as + input. The data sent to the output stream will be the compressed + form of the input data. + + + + A ParallelBZip2OutputStream can be used only for + Write() not for Read(). + + + + + The buffer holding data to write to the stream. + the offset within that data array to find the first byte to write. + the number of bytes to write. + + + + Calling this method always throws a . + + this is irrelevant, since it will always throw! + this is irrelevant, since it will always throw! + irrelevant! + + + + Calling this method always throws a . + + this is irrelevant, since it will always throw! + + + + Calling this method always throws a . + + this parameter is never used + this parameter is never used + this parameter is never used + never returns anything; always throws + + + + The maximum number of concurrent compression worker threads to use. + + + + + This property sets an upper limit on the number of concurrent worker + threads to employ for compression. The implementation of this stream + employs multiple threads from the .NET thread pool, via + ThreadPool.QueueUserWorkItem(), to compress the incoming data by + block. As each block of data is compressed, this stream re-orders the + compressed blocks and writes them to the output stream. + + + + A higher number of workers enables a higher degree of + parallelism, which tends to increase the speed of compression on + multi-cpu computers. On the other hand, a higher number of buffer + pairs also implies a larger memory consumption, more active worker + threads, and a higher cpu utilization for any compression. This + property enables the application to limit its memory consumption and + CPU utilization behavior depending on requirements. + + + + By default, DotNetZip allocates 4 workers per CPU core, subject to the + upper limit specified in this property. For example, suppose the + application sets this property to 16. Then, on a machine with 2 + cores, DotNetZip will use 8 workers; that number does not exceed the + upper limit specified by this property, so the actual number of + workers used will be 4 * 2 = 8. On a machine with 4 cores, DotNetZip + will use 16 workers; again, the limit does not apply. On a machine + with 8 cores, DotNetZip will use 16 workers, because of the limit. + + + + For each compression "worker thread" that occurs in parallel, there is + up to 2mb of memory allocated, for buffering and processing. The + actual number depends on the property. + + + + CPU utilization will also go up with additional workers, because a + larger number of buffer pairs allows a larger number of background + threads to compress in parallel. If you find that parallel + compression is consuming too much memory or CPU, you can adjust this + value downward. + + + + The default value is 16. Different values may deliver better or + worse results, depending on your priorities and the dynamic + performance characteristics of your storage and compute resources. + + + + The application can set this value at any time, but it is effective + only before the first call to Write(), which is when the buffers are + allocated. + + + + + + The blocksize parameter specified at construction time. + + + + + Indicates whether the stream can be read. + + + The return value is always false. + + + + + Indicates whether the stream supports Seek operations. + + + Always returns false. + + + + + Indicates whether the stream can be written. + + + The return value depends on whether the captive stream supports writing. + + + + + Reading this property always throws a . + + + + + The position of the stream pointer. + + + + Setting this property always throws a . Reading will return the + total number of uncompressed bytes written through. + + + + + The total number of bytes written out by the stream. + + + This value is meaningful only after a call to Close(). + + + + + Returns the "random" number at a specific index. + + the index + the random number + + + + Implementes a resource-based meta_path importer as described in PEP 302. + + + + + Instantiates a new meta_path importer using an embedded ZIP resource file. + + + + + + + zip_searchorder defines how we search for a module in the Zip + archive: we first search for a package __init__, then for + non-package .pyc, .pyo and .py entries. The .pyc and .pyo entries + are swapped by initzipimport() if we run in optimized mode. Also, + '/' is replaced by SEP there. + + + + + Given a path to a Zip file and a toc_entry, return the (uncompressed) + data as a new reference. + + + + + + + + Return the code object for the module named by 'fullname' from the + Zip archive as a new reference. + + + + + + + + + + + Given a path to a Zip archive, build a dict, mapping file names + (local to the archive, using SEP as a separator) to toc entries. + + A toc_entry is a tuple: + (__file__, # value to use for __file__, available for all files + compress, # compression kind; 0 for uncompressed + data_size, # size of compressed data on disk + file_size, # size of decompressed data + file_offset, # offset of file header from start of archive + time, # mod time of file (in dos format) + date, # mod data of file (in dos format) + crc, # crc checksum of the data + ) + Directories can be recognized by the trailing SEP in the name, + data_size and file_offset are 0. + + + + + + + Given a (sub)modulename, write the potential file path in the + archive (without extension) to the path buffer. + + + + + + + + Determines the type of module we have (package or module, or not found). + + + + + + + + Provides a StreamContentProvider for a stream of content backed by a file on disk. + + + + + This class represents adler32 checksum algorithm + + + + + This static method returns adler32 checksum of the buffer data + + + + + Implementation of the Deflate compression algorithm. + + + + + Maximum memory level + + + + + Defalult compression method + + + + + Default memory level + + + + + block not completed, need more input or more output + + + + + Block internalFlush performed + + + + + Finish started, need only more output at next deflate + + + + + finish done, accept no more input or output + + + + + preset dictionary flag in zlib header + + + + + The deflate compression method + + + + + The size of the buffer + + + + + repeat previous bit length 3-6 times (2 bits of repeat count) + + + + + repeat a zero length 3-10 times (3 bits of repeat count) + + + + + repeat a zero length 11-138 times (7 bits of repeat count) + + + + + Deflate class congiration table + + + + + Pointer back to this zlib stream + + + + + As the name implies + + + + + Output still pending + + + + + Size of Pending_buf + + + + + Next pending byte to output to the stream + + + + + Number of bytes in the pending buffer + + + + + suppress zlib header and adler32 + + + + + UNKNOWN, BINARY or ASCII + + + + + STORED (for zip only) or DEFLATED + + + + + Value of internalFlush parameter for previous deflate call + + + + + LZ77 Window size (32K by default) + + + + + log2(w_size) (8..16) + + + + + w_size - 1 + + + + + Sliding Window. Input bytes are ReadPos into the second half of the Window, + and move to the first half later to keep a dictionary of at least wSize + bytes. With this organization, matches are limited to a distance of + wSize-MAX_MATCH bytes, but this ensures that IO is always + performed with a length multiple of the block size. Also, it limits + the Window size to 64K, which is quite useful on MSDOS. + To do: use the user input buffer as sliding Window. + + + + + Actual size of Window: 2*wSize, except when the user input buffer is directly used as sliding Window. + + + + + Link to older string with same hash index. To limit the size of this + array to 64K, this link is maintained only for the last 32K strings. + An index in this array is thus a Window index modulo 32K. + + + + + Heads of the hash chains or NIL. + + + + + hash index of string to be inserted + + + + + number of elements in hash table + + + + + log2(hash_size) + + + + + hash_size-1 + + + + + Number of bits by which ins_h must be shifted at each input + step. It must be such that after MIN_MATCH steps, the oldest + byte no longer takes part in the hash key, that is: + hash_shift * MIN_MATCH >= hash_bits + + + + + Window position at the beginning of the current output block. Gets negative when the Window is moved backwards. + + + + + length of best match + + + + + previous match + + + + + set if previous match exists + + + + + start of string to insert + + + + + start of matching string + + + + + number of valid bytes ahead in Window + + + + + Length of the best match at previous step. Matches not greater than this + are discarded. This is used in the lazy match evaluation. + + + + + To speed up deflation, hash chains are never searched beyond this + length. A higher limit improves compression ratio but degrades the speed. + + + + + Attempt to find a better match only when the current match is strictly + smaller than this value. This mechanism is used only for compression + levels >= 4. + + + + + compression level (1..9) + + + + + favor or force Huffman coding + + + + + Use a faster search when the previous match is longer than this + + + + + Stop searching when current match exceeds this + + + + + literal and length tree + + + + + distance tree + + + + + Huffman tree for bit lengths + + + + + Desc for literal tree + + + + + desc for distance tree + + + + + desc for bit length tree + + + + + number of codes at each bit length for an optimal tree + + + + + heap used to build the Huffman trees + + + + + number of elements in the heap + + + + + element of largest frequency + + + + + Depth of each subtree used as tie breaker for trees of equal frequency + + + + + index for literals or lengths + + + + + Size of match buffer for literals/lengths. There are 4 reasons for + limiting lit_bufsize to 64K: + - frequencies can be kept in 16 bit counters + - if compression is not successful for the first block, all input + data is still in the Window so we can still emit a stored block even + when input comes from standard input. (This can also be done for + all blocks if lit_bufsize is not greater than 32K.) + - if compression is not successful for a file smaller than 64K, we can + even emit a stored file instead of a stored block (saving 5 bytes). + This is applicable only for zip (not gzip or zlib). + - creating new Huffman trees less frequently may not provide fast + adaptation to changes in the input data statistics. (Take for + example a binary file with poorly compressible code followed by + a highly compressible string table.) Smaller buffer sizes give + fast adaptation but have of course the overhead of transmitting + trees more frequently. + - I can't count above 4 + + + + + running index in l_buf + + + + + index of pendig_buf + + + + + bit length of current block with optimal trees + + + + + bit length of current block with static trees + + + + + number of string matches in current block + + + + + bit length of EOB code for last block + + + + + Output buffer. bits are inserted starting at the bottom (least + significant bits). + + + + + Number of valid bits in bi_buf. All bits above the last valid bit + are always zero. + + + + + Default constructor + + + + + Initialization + + + + + Initialize the tree data structures for a new zlib stream. + + + + + Initializes block + + + + + Restore the heap property by moving down the tree starting at node k, + exchanging a node with the smallest of its two sons if necessary, stopping + when the heap property is re-established (each father smaller than its + two sons). + + + + + Scan a literal or distance tree to determine the frequencies of the codes + in the bit length tree. + + + + + Construct the Huffman tree for the bit lengths and return the index in + bl_order of the last bit length code to send. + + + + + Send the header for a block using dynamic Huffman trees: the counts, the + lengths of the bit length codes, the literal tree and the distance tree. + IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. + + + + + Send a literal or distance tree in compressed form, using the codes in + bl_tree. + + + + + Output a byte on the stream. + IN assertion: there is enough room in Pending_buf. + + + + + Adds a byte to the buffer + + + + + Send one empty static block to give enough lookahead for inflate. + This takes 10 bits, of which 7 may remain in the bit buffer. + The current inflate code requires 9 bits of lookahead. If the + last two codes for the previous block (real code plus EOB) were coded + on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode + the last real code. In this case we send two empty static blocks instead + of one. (There are no problems if the previous block is stored or fixed.) + To simplify the code, we assume the worst case of last real code encoded + on one bit only. + + + + + Save the match info and tally the frequency counts. Return true if + the current block must be flushed. + + + + + Send the block data compressed using the given Huffman trees + + + + + Set the data type to ASCII or BINARY, using a crude approximation: + binary if more than 20% of the bytes are <= 6 or >= 128, ascii otherwise. + IN assertion: the fields freq of dyn_ltree are set and the total of all + frequencies does not exceed 64K (to fit in an int on 16 bit machines). + + + + + Flush the bit buffer, keeping at most 7 bits in it. + + + + + Flush the bit buffer and align the output on a byte boundary + + + + + Copy a stored block, storing first the length and its + one's complement if requested. + + + + + Flushes block + + + + + Copy without compression as much as possible from the input stream, return + the current block state. + This function does not insert new strings in the dictionary since + uncompressible data is probably not useful. This function is used + only for the level=0 compression option. + NOTE: this function should be optimized to avoid extra copying from + Window to Pending_buf. + + + + + Send a stored block + + + + + Determine the best encoding for the current block: dynamic trees, static + trees or store, and output the encoded block to the zip file. + + + + + Fill the Window when the lookahead becomes insufficient. + Updates strstart and lookahead. + + IN assertion: lookahead less than MIN_LOOKAHEAD + OUT assertions: strstart less than or equal to window_size-MIN_LOOKAHEAD + At least one byte has been ReadPos, or _avail_in == 0; reads are + performed for at least two bytes (required for the zip translate_eol + option -- not supported here). + + + + + Compress as much as possible from the input stream, return the current + block state. + This function does not perform lazy evaluation of matches and inserts + new strings in the dictionary only for unmatched strings or for short + matches. It is used only for the fast compression options. + + + + + Same as above, but achieves better compression. We use a lazy + evaluation for matches: a match is finally adopted only if there is + no better match at the next Window position. + + + + + Finds the longest matching data part + + + + + Deflate algorithm initialization + + ZStream object + Compression level + Window bits + A result code + + + + Initializes deflate algorithm + + ZStream object + Compression level + Operation result result code + + + + Deflate algorithm initialization + + ZStream object + Compression level + Compression method + Window bits + Memory level + Compression strategy + Operation result code + + + + Resets the current state of deflate object + + + + + Finish compression with deflate algorithm + + + + + Sets deflate algorithm parameters + + + + + Sets deflate dictionary + + + + + Performs data compression with the deflate algorithm + + + + + Static constructor initializes config_table + + + + + Compression level + + + + + Number of bytes in the pending buffer + + + + + Output still pending + + + + + Next pending byte to output to the stream + + + + + suppress zlib header and adler32 + + + + + Deflate algorithm configuration parameters class + + + + + reduce lazy search above this match length + + + + + do not perform lazy search above this match length + + + + + quit search above this match length + + + + + Constructor which initializes class inner fields + + + + + current inflate_block mode + + + + + if STORED, bytes left to copy + + + + + table lengths (14 bits) + + + + + index into blens (or border) + + + + + bit lengths of codes + + + + + bit length tree depth + + + + + bit length decoding tree + + + + + if CODES, current state + + + + + true if this block is the last block + + + + + bits in bit buffer + + + + + bit buffer + + + + + single malloc for tree space + + + + + sliding Window + + + + + one byte after sliding Window + + + + + Window ReadPos pointer + + + + + Window WritePos pointer + + + + + need check + + + + + check on output + + + + + Resets this InfBlocks class instance + + + + + Block processing functions + + + + + Frees inner buffers + + + + + Sets dictionary + + + + + Returns true if inflate is currently at the End of a block generated + by Z_SYNC_FLUSH or Z_FULL_FLUSH. + + + + + copy as much as possible from the sliding Window to the output area + + + + + sliding window + + + + + one byte after sliding Window + + + + + Window ReadPos pointer + + + + + Window WritePos pointer + + + + + bits in bit buffer + + + + + bit buffer + + + + + Inflate codes mode + + + + + This class is used by the InfBlocks class + + + + + current inflate_codes mode + + + + + length + + + + + pointer into tree + + + + + current index of the tree + + + + + + + + + + ltree bits decoded per branch + + + + + dtree bits decoded per branch + + + + + literal/length/eob tree + + + + + literal/length/eob tree index + + + + + distance tree + + + + + distance tree index + + + + + Constructor which takes literal, distance trees, corresponding bites decoded for branches, corresponding indexes and a ZStream object + + + + + Constructor which takes literal, distance trees, corresponding bites decoded for branches and a ZStream object + + + + + Block processing method + + An instance of the InfBlocks class + A ZStream object + A result code + + + + Frees allocated resources + + + + + Fast inflate procedure. Called with number of bytes left to WritePos in Window at least 258 + (the maximum string length) and number of input bytes available + at least ten. The ten bytes are six bytes for the longest length/ + distance pair plus four bytes for overloading the bit buffer. + + + + + This enumeration contains modes of inflate processing + + + + + waiting for method byte + + + + + waiting for flag byte + + + + + four dictionary check bytes to go + + + + + three dictionary check bytes to go + + + + + two dictionary check bytes to go + + + + + one dictionary check byte to go + + + + + waiting for inflateSetDictionary + + + + + decompressing blocks + + + + + four check bytes to go + + + + + three check bytes to go + + + + + two check bytes to go + + + + + one check byte to go + + + + + finished check, done + + + + + got an error--stay here + + + + + current inflate mode + + + + + if FLAGS, method byte + + + + + computed check value + + + + + stream check value + + + + + if BAD, inflateSync's marker bytes count + + + + + flag for no wrapper + + + + + log2(Window size) (8..15, defaults to 15) + + + + + current inflate_blocks state + + + + + Resets the Inflate algorithm + + A ZStream object + A result code + + + + Finishes the inflate algorithm processing + + A ZStream object + Operation result code + + + + Initializes the inflate algorithm + + A ZStream object + Window size + Operation result code + + + + Runs inflate algorithm + + A ZStream object + Flush strategy + Operation result code + + + + Sets dictionary for the inflate operation + + A ZStream object + An array of byte - dictionary + Dictionary length + Operation result code + + + + Inflate synchronization + + A ZStream object + Operation result code + + + + Returns true if inflate is currently at the End of a block generated + by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP + implementation to provide an additional safety check. PPP uses Z_SYNC_FLUSH + but removes the length bytes of the resulting empty stored block. When + decompressing, PPP checks that at the End of input packet, inflate is + waiting for these length bytes. + + + + + Contains utility information for the InfTree class + + + + + Given a list of code lengths and a maximum table size, make a set of + tables to decode that set of codes. + + Return (int)ZLibResultCode.Z_OK on success, (int)ZLibResultCode.Z_DATA_ERROR if the given code set is incomplete (the tables are still built in this case), (int)ZLibResultCode.Z_DATA_ERROR if the input is invalid (an over-subscribed set of lengths), or (int)ZLibResultCode.Z_DATA_ERROR if not enough memory. + + + + + Build trees + + + + + Builds dynamic trees + + + + + Build fixed trees + + + + + Bit length codes must not exceed MAX_BL_BITS bits + + + + + This class represents a tree and is used in the Deflate class + + + + + The dynamic tree + + + + + Largest code with non zero frequency + + + + + the corresponding static tree + + + + + Mapping from a distance to a distance code. dist is the distance - 1 and + must not have side effects. _dist_code[256] and _dist_code[257] are never + used. + + + + + Compute the optimal bit lengths for a tree and update the total bit length + for the current block. + IN assertion: the fields freq and dad are set, heap[heap_max] and + above are the tree nodes sorted by increasing frequency. + OUT assertions: the field count is set to the optimal bit length, the + array bl_count contains the frequencies for each bit length. + The length opt_len is updated; static_len is also updated if stree is + not null. + + + + + Construct one Huffman tree and assigns the code bit strings and lengths. + Update the total bit length for the current block. + IN assertion: the field freq is set for all tree elements. + OUT assertions: the fields count and code are set to the optimal bit length + and corresponding code. The length opt_len is updated; static_len is + also updated if stree is not null. The field max_code is set. + + + + + Generate the codes for a given tree and bit counts (which need not be + optimal). + IN assertion: the array bl_count contains the bit length statistics for + the given tree and the field count is set for all tree elements. + OUT assertion: the field code is set for all tree elements of non + zero code length. + + + + + Reverse the first count bits of a code, using straightforward code (a faster + method would use a table) + + + + + The dynamic tree + + + + + Largest code with non zero frequency + + + + + the corresponding static tree + + + + + Some constants for specifying compression levels. Methods which takes a compression level as a parameter expects an integer value from 0 to 9. You can either specify an integer value or use constants for some most widely used compression levels. + + + + + No compression should be used at all. + + + + + Minimal compression, but greatest speed. + + + + + Maximum compression, but slowest. + + + + + Select default compression level (good compression, good speed). + + + + + Compression strategies. The strategy parameter is used to tune the compression algorithm. The strategy parameter only affects the compression ratio but not the correctness of the compressed output even if it is not set appropriately. + + + + + This strategy is designed for filtered data. Data which consists of mostly small values, with random distribution should use Z_FILTERED. With this strategy, less string matching is performed. + + + + + Z_HUFFMAN_ONLY forces Huffman encoding only (no string match) + + + + + The default strategy is the most commonly used. With this strategy, string matching and huffman compression are balanced. + + + + + Flush strategies + + + + + Do not internalFlush data, but just write data as normal to the output buffer. This is the normal way in which data is written to the output buffer. + + + + + Obsolete. You should use Z_SYNC_FLUSH instead. + + + + + All pending output is flushed to the output buffer and the output is aligned on a byte boundary, so that the decompressor can get all input data available so far. + + + + + All output is flushed as with Z_SYNC_FLUSH, and the compression state is reset so that decompression can restart from this point if previous compressed data has been damaged or if random access is desired. Using Z_FULL_FLUSH too often can seriously degrade the compression. ZLib_InflateSync will locate points in the compression string where a full has been performed. + + + + + Notifies the module that the input has now been exhausted. Pending input is processed, pending output is flushed and calls return with Z_STREAM_END if there was enough output space. + + + + + Results of operations in ZLib library + + + + + No failure was encountered, the operation completed without problem. + + + + + No failure was encountered, and the input has been exhausted. + + + + + A preset dictionary is required for decompression of the data. + + + + + An internal error occurred + + + + + The stream structure was inconsistent + + + + + Input data has been corrupted (for decompression). + + + + + Memory allocation failed. + + + + + There was not enough space in the output buffer. + + + + + The version supplied does not match that supported by the ZLib module. + + + + + States of deflate operation + + + + + Data block types, i.e. binary or ascii text + + + + + Helper class + + + + + Max Window size + + + + + preset dictionary flag in zlib header + + + + + The size of the buffer + + + + + Deflate compression method index + + + + + see definition of array dist_code below + + + + + This method returns the literal value received + + The literal to return + The received value + + + + This method returns the literal value received + + The literal to return + The received value + + + + This method returns the literal value received + + The literal to return + The received value + + + + This method returns the literal value received + + The literal to return + The received value + + + + Performs an unsigned bitwise right shift with the specified number + + Number to operate on + Ammount of bits to shift + The resulting number from the shift operation + + + + Performs an unsigned bitwise right shift with the specified number + + Number to operate on + Ammount of bits to shift + The resulting number from the shift operation + + + + Performs an unsigned bitwise right shift with the specified number + + Number to operate on + Ammount of bits to shift + The resulting number from the shift operation + + + + Performs an unsigned bitwise right shift with the specified number + + Number to operate on + Ammount of bits to shift + The resulting number from the shift operation + + + Reads a number of characters from the current source Stream and writes the data to the target array at the specified index. + The source Stream to ReadPos from. + Contains the array of characters ReadPos from the source Stream. + The starting index of the target array. + The maximum number of characters to ReadPos from the source Stream. + The number of characters ReadPos. The number will be less than or equal to count depending on the data available in the source Stream. Returns -1 if the End of the stream is reached. + + + Reads a number of characters from the current source TextReader and writes the data to the target array at the specified index. + The source TextReader to ReadPos from + Contains the array of characteres ReadPos from the source TextReader. + The starting index of the target array. + The maximum number of characters to ReadPos from the source TextReader. + The number of characters ReadPos. The number will be less than or equal to count depending on the data available in the source TextReader. Returns -1 if the End of the stream is reached. + + + + Converts a string to an array of bytes + + The string to be converted + The new array of bytes + + + + Converts an array of bytes to an array of chars + + The array of bytes to convert + The new array of chars + + + + Copies large array which was passed as srcBuf to the Initialize method into the destination array which were passes as destBuff + + The number of bytes copied + + + + ZStream is used to store user data to compress/decompress. + + + + + Maximum memory level + + + + + Next input byte array + + + + + Index of the first byte in the input array. + + + + + Number of bytes available at _next_in + + + + + total nb of input bytes ReadPos so far + + + + + Byte array for the next output block + + + + + Index of the first byte in the _next_out array + + + + + Remaining free space at _next_out + + + + + Total number of bytes in output array + + + + + A string to store operation result message (corresponding to result codes) + + + + + A deflate object to perform data compression + + + + + Inflate object to perform data decompression + + + + + Best guess about the data type: ascii or binary + + + + + A checksum computed with Adler algorithm + + + + + Initializes the internal stream state for decompression. The fields , must be + initialized before by the caller. If is not null and is large + enough (the exact value depends on the compression method), determines the compression + method from the ZLib header and allocates all data structures accordingly; otherwise the allocation will be deferred + to the first call of . + + + inflateInit returns if success, if there was not enough memory, + if the ZLib library version is incompatible with the version assumed by the caller. + is set to null if there is no error message. does not perform any decompression + apart from reading the ZLib header if present: this will be done by . (So and + may be modified, but and are unchanged.) + + + + + This is another version of with an extra parameter. The fields , must be + initialized before by the caller. If is not null and is large enough + (the exact value depends on the compression method), determines the compression method from + the ZLib header and allocates all data structures accordingly; otherwise the allocation will be deferred to the first + call of . + + The windowBits parameter is the base two logarithm of the maximum window size (the size of the history buffer). + It should be in the range 8..15 for this version of the library. The default value is 15 if is used instead. + If a compressed stream with a larger window size is given as input, will return with the error code + instead of trying to allocate a larger window. + + inflateInit returns if success, if there was not enough memory, + if a parameter is invalid (such as a negative memLevel). is set to null + if there is no error message. does not perform any decompression apart from reading the ZLib header + if present: this will be done by . (So and may be modified, + but and are unchanged.) + + + + + This method decompresses as much data as possible, and stops when the input buffer () becomes empty or + the output buffer () becomes full. It may some introduce some output latency (reading input without producing any output) + except when forced to flush. + The detailed semantics are as follows. performs one or both of the following actions: + + + Decompress more input starting at and update and + accordingly. If not all input can be processed (because there is not enough room in the output buffer), is updated and + processing will resume at this point for the next call of . + Provide more output starting at and update and + accordingly. provides as much output as possible, until there is no more input data or no more space in + the output buffer (see below about the parameter). + + + + Flush strategy to use. + + Before the call of , the application should ensure that at least one of the actions is possible, by providing + more input and/or consuming more output, and updating the next_* and avail_* values accordingly. The application can consume the uncompressed + output when it wants, for example when the output buffer is full (avail_out == 0), or after each call of . + If returns and with zero , it must be called again + after making room in the output buffer because there might be more output pending. + If the parameter is set to , flushes + as much output as possible to the output buffer. The flushing behavior of is not specified for values of + the parameter other than and , + but the current implementation actually flushes as much output as possible anyway. + should normally be called until it returns or an error. + However if all decompression is to be performed in a single step (a single call of inflate), the parameter + should be set to . In this case all pending input is processed and all pending output is flushed; + must be large enough to hold all the uncompressed data. (The size of the uncompressed data may have been + saved by the compressor for this purpose.) The next operation on this stream must be to deallocate the decompression + state. The use of is never required, but can be used to inform that a faster + routine may be used for the single call. + If a preset dictionary is needed at this point (see ), sets strm-adler + to the adler32 checksum of the dictionary chosen by the compressor and returns ; otherwise it + sets strm->adler to the adler32 checksum of all output produced so far (that is, bytes) and returns + , or an error code as described below. At the end of the stream, + ) checks that its computed adler32 checksum is equal to that saved by the compressor and returns + only if the checksum is correct. + + + returns if some progress has been made (more input processed or more output produced), + if the end of the compressed data has been reached and all uncompressed output has been produced, + if a preset dictionary is needed at this point, if + the input data was corrupted (input stream not conforming to the ZLib format or incorrect adler32 checksum), + if the stream structure was inconsistent (for example if or + was null), if there was not enough memory, + if no progress is possible or if there was not enough room in the output buffer + when is used. In the case, the application + may then call to look for a good compression block. + + + + + All dynamically allocated data structures for this stream are freed. This function discards any unprocessed input and does not flush any + pending output. + + + inflateEnd returns if success, + if the stream state was inconsistent. In the error case, msg may be set but then points to a static string (which must not be deallocated). + + + + + Skips invalid compressed data until a full flush point (see the description of deflate with Z_FULL_FLUSH) can be found, + or until all available input is skipped. No output is provided. + + + returns if a full flush point has been found, + if no more input was provided, if no flush point has been found, or + if the stream structure was inconsistent. In the success case, the application may save the current + current value of which indicates where valid compressed data was found. In the error case, the application may repeatedly + call , providing more input each time, until success or end of the input data. + + + + + Initializes the decompression dictionary from the given uncompressed byte sequence. This function must be called immediately after a call of if this call returned . The dictionary chosen by the compressor can be determined from the Adler32 value returned by this call of . The compressor and decompresser must use exactly the same dictionary. + + A byte array - a dictionary. + The length of the dictionary. + + inflateSetDictionary returns if success, if a parameter is invalid (such as null dictionary) or the stream state is inconsistent, if the given dictionary doesn't match the expected one (incorrect Adler32 value). inflateSetDictionary does not perform any decompression: this will be done by subsequent calls of . + + + + + Initializes the internal stream state for compression. + + An integer value from 0 to 9 indicating the desired compression level. + + deflateInit returns if success, if there was not enough memory, + if level is not a valid compression level. is set to null if there is + no error message. does not perform any compression: this will be done by . + + + + + Initializes the internal stream state for compression. + + An integer value from 0 to 9 indicating the desired compression level. + The windowBits parameter is the base two logarithm of the window size (the size of the history buffer). It should be in the + range 8..15 for this version of the library. Larger values of this parameter result in better compression at the expense of memory usage. + The default value is 15 if deflateInit is used instead. + + deflateInit returns if success, if there was not enough memory, + if level is not a valid compression level. is set to null if there + is no error message. does not perform any compression: this will be done by . + + + + + Deflate compresses as much data as possible, and stops when the input buffer becomes empty or the + output buffer becomes full. It may introduce some output latency (reading input without producing any output) + except when forced to flush. + The detailed semantics are as follows. deflate performs one or both of the following actions: + + Compress more input starting at and update and accordingly. + If not all input can be processed (because there is not enough room in the output buffer), and + are updated and processing will resume at this point for the next call of . + Provide more output starting at and update and accordingly. + This action is forced if the parameter flush is non zero. Forcing flush frequently degrades the compression ratio, so this parameter should + be set only when necessary (in interactive applications). Some output may be provided even if flush is not set. + + + + The flush strategy to use. + + + Before the call of , the application should ensure that at least one of the actions is possible, by providing + more input and/or consuming more output, and updating or accordingly ; + should never be zero before the call. The application can consume the compressed output when it wants, for example when the output buffer is full + (avail_out == 0), or after each call of . If returns + and with zero , it must be called again after making room in the output buffer because there might be more output pending. + + + If the parameter is set to , all pending output is flushed to the + output buffer and the output is aligned on a byte boundary, so that the decompressor can get all input + data available so far. (In particular is zero after the call if enough output space has been provided before the call.) + Flushing may degrade compression for some compression algorithms and so it should be used only when necessary. + + + If flush is set to , all output is flushed as with , + and the compression state is reset so that decompression can restart from this point if previous compressed data has been damaged or if + random access is desired. Using too often can seriously degrade the compression. + + + + + If deflate returns with == 0, this function must be called again with the same value of the flush + parameter and more output space (updated ), until the flush is complete ( returns with + non-zero ). + + + If the parameter is set to , pending input is processed, pending + output is flushed and deflate returns with if there was enough output space ; + if deflate returns with , this function must be called again with + and more output space (updated ) but no more input data, until it returns with + or an error. After deflate has returned , the only possible operation on the stream is + . + + can be used immediately after if all the compression is to be + done in a single step. In this case, avail_out must be at least 0.1% larger than avail_in plus 12 bytes. If deflate does not return + Z_STREAM_END, then it must be called again as described above. + + + sets strm-> adler to the adler32 checksum of all input read so far (that is, bytes). + + + may update data_type if it can make a good guess about the input data type (Z_ASCII or Z_BINARY). + In doubt, the data is considered binary. This field is only for information purposes and does not affect the compression algorithm in any manner. + + + returns if some progress has been made (more input processed or more output produced), + if all input has been consumed and all output has been produced (only when flush is set to + ), if the stream state was inconsistent (for example if + or was null), if no progress is possible + (for example or was zero). + + + + + + All dynamically allocated data structures for this stream are freed. This function discards any unprocessed input and does not flush any pending + output. + + + deflateEnd returns if success, if the stream state was inconsistent, + if the stream was freed prematurely (some input or output was discarded). In the error case, + may be set but then points to a static string (which must not be deallocated). + + + + + Dynamically update the compression level and compression strategy. The interpretation of level is as in . + This can be used to switch between compression and straight copy of the input data, or to switch to a different kind of input data + requiring a different strategy. If the compression level is changed, the input available so far is compressed with the old level + (and may be flushed); the new level will take effect only at the next call of + + An integer value indicating the desired compression level. + A flush strategy to use. + + Before the call of , the stream state must be set as for a call of , since the + currently available input may have to be compressed and flushed. In particular, must be non-zero. + + + deflateParams returns if success, if the source stream + state was inconsistent or if a parameter was invalid, if was zero. + + + + + Initializes the compression dictionary from the given byte sequence without producing any compressed output. This function must be called + immediately after , before any call of . The compressor and decompressor must use + exactly the same dictionary (see ). + + A byte array - a dictionary. + The length of the dictionary byte array + + + The dictionary should consist of strings (byte sequences) that are likely to be encountered later in the data to be compressed, + with the most commonly used strings preferably put towards the end of the dictionary. Using a dictionary is most useful when the data + to be compressed is short and can be predicted with good accuracy; the data can then be compressed better than with the default empty dictionary. + + Depending on the size of the compression data structures selected by , a part of the dictionary may + in effect be discarded, for example if the dictionary is larger than the window size in . Thus the strings most likely + to be useful should be put at the end of the dictionary, not at the front. + Upon return of this function, adler is set to the Adler32 value of the dictionary; the decompresser may later use this value to determine + which dictionary has been used by the compressor. (The Adler32 value applies to the whole dictionary even if only a subset of the dictionary + is actually used by the compressor.) + + + deflateSetDictionary returns if success, or if a parameter + is invalid (such as null dictionary) or the stream state is inconsistent (for example if has already been + called for this stream or if the compression method is bsort). does not perform any compression: + this will be done by . + + + + + Flush as much pending output as possible. All output goes through this function so some applications may wish to + modify it to avoid allocating a large buffer and copying into it. + + + + + + Read a new buffer from the current input stream, update the adler32 and total number of bytes read. All input goes + through this function so some applications may wish to modify it to avoid allocating a large buffer and copying from it. + + + + + + Frees all inner buffers. + + + + + Adler-32 value for uncompressed data processed so far. + + + + + Best guess about the data type: ascii or binary + + + + + Gets/Sets the next input byte array. + + + + + Index of the first byte in the input array. + + + + + Gets/Sets the number of bytes available in the input buffer. + + + + + Gets/Sets the total number of bytes in the input buffer. + + + + + Gets/Sets the buffer for the next output data. + + + + + Gets/Sets the index of the first byte in the byte array to write to. + + + + + Gets/Sets the remaining free space in the buffer. + + + + + Gets/Sets the total number of bytes in the output array. + + + + + Gets sets the last error message occurred during class operations. + + + + + A deflate object to perform data compression + + + + + Inflate object to perform data decompression + + + + + Exceptions that occur in ZStream + + + + + Default constructor. + + + + + Constructor which takes one parameter - an error message + + + + + Creates an optimized encoding mapping that can be consumed by an optimized version of charmap_encode. + + + + + Decodes the input string using the provided string mapping. + + + + + Encodes the input string with the specified optimized encoding map. + + + + + Optimied encoding mapping that can be consumed by charmap_encode. + + + + + Convert string or bytes into bytes + + + + + Convert most bytearray-like objects into IList of byte + + + + + BytesIO([initializer]) -> object + + Create a buffered I/O implementation using an in-memory bytes + buffer, ready for reading and writing. + + + + + close() -> None. Disable all I/O operations. + + + + + getvalue() -> bytes. + + Retrieve the entire contents of the BytesIO object. + + + + + True if the file is closed. + + + + + Read and decode the next chunk from the buffered reader. Returns true if EOF was + not reached. Places decoded string in _decodedChars. + + + + + Remove all 'b's from mode string to simplify parsing + + + + + Walks the queue calling back to the specified delegate for + each populated index in the queue. + + + + + Throw TypeError with a specified message if object isn't callable. + + + + + Convert object to ushort, throwing ValueError on overflow. + + + + + Interface for "file-like objects" that implement the protocol needed by load() and friends. + This enables the creation of thin wrappers that make fast .NET types and slow Python types look the same. + + + + + Interface for "file-like objects" that implement the protocol needed by dump() and friends. + This enables the creation of thin wrappers that make fast .NET types and slow Python types look the same. + + + + + Call the appropriate reduce method for obj and pickle the object using + the resulting data. Use the first available of + copy_reg.dispatch_table[type(obj)], obj.__reduce_ex__, and obj.__reduce__. + + + + + Pickle the result of a reduce function. + + Only context, obj, func, and reduceCallable are required; all other arguments may be null. + + + + + Write value in pickle decimalnl_short format. + + + + + Write value in pickle float8 format. + + + + + Write value in pickle uint1 format. + + + + + Write value in pickle uint2 format. + + + + + Write value in pickle int4 format. + + + + + Write value in pickle decimalnl_short format. + + + + + Write value in pickle decimalnl_short format. + + + + + Write value in pickle decimalnl_long format. + + + + + Write value in pickle unicodestringnl format. + + + + + Write value in pickle unicodestring4 format. + + + + + Write value in pickle stringnl_noescape_pair format. + + + + + Return true if value is appropriate for formatting in pickle uint1 format. + + + + + Return true if value is appropriate for formatting in pickle uint2 format. + + + + + Return true if value is appropriate for formatting in pickle int4 format. + + + + + Emit a series of opcodes that will set append all items indexed by iter + to the object at the top of the stack. Use APPENDS if possible, but + append no more than BatchSize items at a time. + + + + + Emit a series of opcodes that will set all (key, value) pairs indexed by + iter in the object at the top of the stack. Use SETITEMS if possible, + but append no more than BatchSize items at a time. + + + + + Emit a series of opcodes that will set all (key, value) pairs indexed by + iter in the object at the top of the stack. Use SETITEMS if possible, + but append no more than BatchSize items at a time. + + + + + Find the module for obj and ensure that obj is reachable in that module by the given name. + + Throw PicklingError if any of the following are true: + - The module couldn't be determined. + - The module couldn't be loaded. + - The given name doesn't exist in the module. + - The given name is a different object than obj. + + Otherwise, return the name of the module. + + To determine which module obj lives in, obj.__module__ is used if available. The + module named by obj.__module__ is loaded if needed. If obj has no __module__ + attribute, then each loaded module is searched. If a loaded module has an + attribute with the given name, and that attribute is the same object as obj, + then that module is used. + + + + + Interpret everything from markIndex to the top of the stack as a sequence + of key, value, key, value, etc. Set dict[key] = value for each. Pop + everything from markIndex up when done. + + + + + Used to check the type to see if we can do a comparison. Returns true if we can + or false if we should return NotImplemented. May throw if the type's really wrong. + + + + + Helper function for doing the comparisons. time has no __cmp__ method + + + + + Base class used for iterator wrappers. + + + + + Returns the dialects from the code context. + + + + + + + Populates the given directory w/ the locale information from the given + CultureInfo. + + + + + Error function on real values + + + + + Complementary error function on real values: erfc(x) = 1 - erf(x) + + + + + Gamma function on real values + + + + + Natural log of absolute value of Gamma function + + + + + Checks for the specific permissions, provided by the mode parameter, are available for the provided path. Permissions can be: + + F_OK: Check to see if the file exists + R_OK | W_OK | X_OK: Check for the specific permissions. Only W_OK is respected. + + + + + lstat(path) -> stat result + Like stat(path), but do not follow symbolic links. + + + + + Convert a sequence of args to a string suitable for using to spawn a process. + + + + + Python regular expression module. + + + + + Preparses a regular expression text returning a ParsedRegex class + that can be used for further regular expressions. + + + + + Compiled reg-ex pattern + + + + + Enum which specifies the format type for a compiled struct + + + + + Struct used to store the format and the number of times it should be repeated. + + + + + Provides a dictionary storage implementation whose storage is local to + the thread. + + + + + Represents the date components that we found while parsing the date. Used for zeroing out values + which have different defaults from CPython. Currently we only know that we need to do this for + the year. + + + + + Samples on how to subtype built-in types from C# + + + + + an int variable for demonstration purposes + + + + + an int variable for demonstration purposes + + + + + Returns a new callable object with the provided initial set of arguments + bound to it. Calling the new function then appends to the additional + user provided arguments. + + + + + Creates a new partial object with the provided positional arguments. + + + + + Creates a new partial object with the provided positional and keyword arguments. + + + + + Calls func with the previously provided arguments and more positional arguments. + + + + + Calls func with the previously provided arguments and more positional arguments and keyword arguments. + + + + + Operator method to set arbitrary members on the partial object. + + + + + Operator method to get additional arbitrary members defined on the partial object. + + + + + Operator method to delete arbitrary members defined in the partial object. + + + + + Gets the function which will be called + + + + + Gets the initially provided positional arguments. + + + + + Gets the initially provided keyword arguments or None. + + + + + Gets or sets the dictionary used for storing extra attributes on the partial object. + + + + + Special hash function because IStructuralEquatable.GetHashCode is not allowed to throw. + + + + + Special equals because none of the special cases in Ops.Equals + are applicable here, and the reference equality check breaks some tests. + + + + + gets the object or throws a reference exception + + + + + Special equality function because IStructuralEquatable.Equals is not allowed to throw. + + + + + gets the object or throws a reference exception + + + + + Special equality function because IStructuralEquatable.Equals is not allowed to throw. + + +
+
diff --git a/packages/IronPython.2.7.4/lib/Sl5/IronPython.SQLite.dll b/packages/IronPython.2.7.4/lib/Sl5/IronPython.SQLite.dll new file mode 100644 index 0000000000..a5786bca6c Binary files /dev/null and b/packages/IronPython.2.7.4/lib/Sl5/IronPython.SQLite.dll differ diff --git a/packages/IronPython.2.7.4/lib/Sl5/IronPython.SQLite.xml b/packages/IronPython.2.7.4/lib/Sl5/IronPython.SQLite.xml new file mode 100644 index 0000000000..a58a149621 --- /dev/null +++ b/packages/IronPython.2.7.4/lib/Sl5/IronPython.SQLite.xml @@ -0,0 +1,34 @@ + + + + IronPython.SQLite + + + + * The rest are extensions, not normally found in printf() */ + + + * beginning-of-error-codes */ + + + * previously SQLITE_CONFIG_CHUNKALLOC 12 which is now unused. */ + + + * x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE xF */ + + + + Basic locking strategy for Console/Winform applications + + + + + Locking strategy for Medium Trust. It uses the same trick used in the native code for WIN_CE + which doesn't support LockFileEx as well. + + + + * The methods above are in version 1 of the sqlite_module object. Those + + + diff --git a/packages/IronPython.2.7.4/lib/Sl5/IronPython.dll b/packages/IronPython.2.7.4/lib/Sl5/IronPython.dll new file mode 100644 index 0000000000..4efba6e6a3 Binary files /dev/null and b/packages/IronPython.2.7.4/lib/Sl5/IronPython.dll differ diff --git a/packages/IronPython.2.7.4/lib/Sl5/IronPython.xml b/packages/IronPython.2.7.4/lib/Sl5/IronPython.xml new file mode 100644 index 0000000000..c416788f7d --- /dev/null +++ b/packages/IronPython.2.7.4/lib/Sl5/IronPython.xml @@ -0,0 +1,7319 @@ + + + + IronPython + + + + + Creates a method frame for tracking purposes and enforces recursion + + + + + Removes the frames from generated code for when we're compiling the tracing delegate + which will track the frames it's self. + + + + + Returns true if the node can throw, false otherwise. Used to determine + whether or not we need to update the current dynamic stack info. + + + + + A temporary variable to track if the current line number has been emitted via the fault update block. + + For example consider: + + try: + raise Exception() + except Exception, e: + # do something here + raise + + At "do something here" we need to have already emitted the line number, when we re-raise we shouldn't add it + again. If we handled the exception then we should have set the bool back to false. + + We also sometimes directly check _lineNoUpdated to avoid creating this unless we have nested exceptions. + + + + + A temporary variable to track the current line number + + + + + Fake ScopeStatement for FunctionCode's to hold on to after we have deserialized pre-compiled code. + + + + + Gets or creates the FunctionCode object for this FunctionDefinition. + + + + + Gets the expression for updating the dynamic stack trace at runtime when an + exception is thrown. + + + + + Gets the expression for the actual updating of the line number for stack traces to be available + + + + + Wraps the body of a statement which should result in a frame being available during + exception handling. This ensures the line number is updated as the stack is unwound. + + + + + The variable used to hold out parents closure tuple in our local scope. + + + + + Gets the expression associated with the local CodeContext. If the function + doesn't have a local CodeContext then this is the global context. + + + + + True if this scope accesses a variable from an outer scope. + + + + + True if an inner scope is accessing a variable defined in this scope. + + + + + True if we are forcing the creation of a dictionary for storing locals. + + This occurs for calls to locals(), dir(), vars(), unqualified exec, and + from ... import *. + + + + + True if variables can be set in a late bound fashion that we don't + know about at code gen time - for example via from foo import *. + + This is tracked independently of the ContainsUnqualifiedExec/NeedsLocalsDictionary + + + + + Variables that are bound in an outer scope - but not a global scope + + + + + Variables that are bound to the global scope + + + + + Variables that are referred to from a nested scope and need to be + promoted to cells. + + + + + Provides a place holder for the expression which represents + a FunctionCode. For functions/classes this gets updated after + the AST has been generated because the FunctionCode needs to + know about the tree which gets generated. For modules we + immediately have the value because it always comes in as a parameter. + + + + + Reducible node so that re-writing for profiling does not occur until + after the script code has been completed and is ready to be compiled. + + Without this extra node profiling would force reduction of the node + and we wouldn't have setup our constant access correctly yet. + + + + + A global allocator that puts all of the globals into an array access. The array is an + array of PythonGlobal objects. We then just close over the array for any inner functions. + + Once compiled a RuntimeScriptCode is produced which is closed over the entire execution + environment. + + + + + Specifies the compilation mode which will be used during the AST transformation + + + + + Compilation will proceed in a manner in which the resulting AST can be serialized to disk. + + + + + Compilation will use a type and declare static fields for globals. The resulting type + is uncollectible and therefore extended use of this will cause memory leaks. + + + + + Compilation will use an array for globals. The resulting code will be fully collectible + and once all references are released will be collected. + + + + + Compilation will force all global accesses to do a full lookup. This will also happen for + any unbound local references. This is the slowest form of code generation and is only + used for exec/eval code where we can run against an arbitrary dictionary. + + + + + Implements globals which are backed by a static type, followed by an array if the static types' slots become full. The global + variables are stored in static fields on a type for fast access. The type also includes fields for constants and call sites + so they can be accessed much fasetr. + + We don't generate any code into the type though - DynamicMethod's are much faster for code gen then normal ref emit. + + + Implements globals which are backed by a static type, followed by an array if the static types' slots become full. The global + variables are stored in static fields on a type for fast access. The type also includes fields for constants and call sites + so they can be accessed much fasetr. + + We don't generate any code into the type though - DynamicMethod's are much faster for code gen then normal ref emit. + + + + Ensures the underlying array is long enough to accomodate the given index + The context storage type corresponding to the given index + + + Ensures the underlying array is long enough to accomodate the given index + The constant storage type corresponding to the given index + + + Ensures the underlying array is long enough to accomodate the given index + The global storage type corresponding to the given index + + + Ensures the underlying array is long enough to accomodate the given index + The site storage type corresponding to the given index + + + + Not used. + + + + + Not used. + + + + + PythonWalker class - The Python AST Walker (default result is true) + + + + + Not an actual node. We don't create this, but it's here for compatibility. + + + + + Interface used to mark objects which contain a dictionary of custom attributes that shadow + their existing attributes in a dynamic fashion. + + + + + Ensures that a non-null IDictionary instance is created for CustomAttributes and + returns it. + + + + + Meta-object which allows IPythonExpandable objects to behave like Python objects in their + ability to dynamically add and remove new or existing custom attributes, generally shadowing + existing built-in members. + + Getting: Member accesses first consult the object's CustomAttributes dictionary, then fall + through to the underlying object. + + Setting: Values can be bound to any member name, shadowing any existing attributes except + public non-PythonHidden fields and properties, which will bypass the dictionary. Thus, + it is possible for SetMember to fail, for example if the property is read-only or of + the wrong type. + + Deleting: Any member represented in the dictionary can be deleted, re-exposing the + underlying member if it exists. Any other deletions will fail. + + + + + Provides a way for the binder to provide a custom error message when lookup fails. Just + doing this for the time being until we get a more robust error return mechanism. + + + + + Provides a way for the binder to provide a custom error message when lookup fails. Just + doing this for the time being until we get a more robust error return mechanism. + + + + + Gets the PythonBinder associated with tihs CodeContext + + + + + Performs .NET member resolution. This looks within the given type and also + includes any extension members. Base classes and their extension members are + not searched. + + + + + Performs .NET member resolution. This looks within the given type and also + includes any extension members. Base classes and their extension members are + not searched. + + This version allows PythonType's for protected member resolution. It shouldn't + be called externally for other purposes. + + + + + Performs .NET member resolution. This looks the type and any base types + for members. It also searches for extension members in the type and any base types. + + + + + Gets the member names which are defined in this type and any extension members. + + This search does not include members in any subtypes or their extension members. + + + + + Gets the member names which are defined in the type and any subtypes. + + This search includes members in the type and any subtypes as well as extension + types of the type and its subtypes. + + + + + Creates the initial table of extension types. These are standard extension that we apply + to well known .NET types to make working with them better. Being added to this table does + not make a type a Python type though so that it's members are generally accessible w/o an + import clr and their type is not re-named. + + + + + Creates a table of standard .NET types which are also standard Python types. These types have a standard + set of extension types which are shared between all runtimes. + + + + + Event handler for when our domain manager has an assembly loaded by the user hosting the script + runtime. Here we can gather any information regarding extension methods. + + Currently DLR-style extension methods become immediately available w/o an explicit import step. + + + + + Provides a cache from Type/name -> PythonTypeSlot and also allows access to + all members (and remembering whether all members are cached). + + + + + Writes to a cache the result of a type lookup. Null values are allowed for the slots and they indicate that + the value does not exist. + + + + + Looks up a cached type slot for the specified member and type. This may return true and return a null slot - that indicates + that a cached result for a member which doesn't exist has been stored. Otherwise it returns true if a slot is found or + false if it is not. + + + + + Looks up a cached member group for the specified member and type. This may return true and return a null group - that indicates + that a cached result for a member which doesn't exist has been stored. Otherwise it returns true if a group is found or + false if it is not. + + + + + Checks to see if all members have been populated for the provided type. + + + + + Populates the type with all the provided members and marks the type + as being fully cached. + + The dictionary is used for the internal storage and should not be modified after + providing it to the cache. + + + + + Returns an enumerable object which provides access to all the members of the provided type. + + The caller must check that the type is fully cached and populate the cache if it isn't before + calling this method. + + + + + Implements a built-in module which is instanced per PythonContext. + + Implementers can subclass this type and then have a module which has efficient access + to internal state (this doesn't need to go through PythonContext.GetModuleState). These + modules can also declare module level globals which they'd like to provide efficient + access to by overloading GetGlobalVariableNames. When Initialize is called these + globals are provided and can be cached in the instance for fast global access. + + Just like normal static modules these modules are registered with the PythonModuleAttribute. + + + + + Initializes the module for it's first usage. By default this calls PerformModuleReload with the + the dictionary. + + The CodeContext for the module. + A list of globals which have optimize access. Contains at least all of the global variables reutrned by GetGlobalVariableNames. + + + + Gets a list of variable names which should have optimized storage (instances of PythonGlobal objects). + The module receives the global objects during the Initialize call and can hold onto them for + direct access to global members. + + + + + Called when the user attempts to reload() on your module and by the base class Initialize method. + + This provides an opportunity to allocate any per-module data which is not simply function definitions. + + A common usage here is to create exception objects which are allocated by the module using PythonExceptions.CreateSubType. + + + + + Provides access to the PythonContext which this module was created for. + + + + + Provides access to the CodeContext for the module. Returns null before Initialize() is called. + + + + + Copy on write constant dictionary storage used for dictionaries created with constant items. + + + + + Abstract base class for all PythonDictionary storage. + + Defined as a class instead of an interface for performance reasons. Also not + using IDictionary* for keeping a simple interface. + + Full locking is defined as being on the DictionaryStorage object it's self, + not an internal member. This enables subclasses to provide their own locking + aruond large operations and call lock free functions. + + + + + Adds items from this dictionary into the other dictionary + + + + + Provides fast access to the __path__ attribute if the dictionary storage supports caching it. + + + + + Provides fast access to the __package__ attribute if the dictionary storage supports caching it. + + + + + Provides fast access to the __builtins__ attribute if the dictionary storage supports caching it. + + + + + Provides fast access to the __name__ attribute if the dictionary storage supports caching it. + + + + + Provides fast access to the __import__ attribute if the dictionary storage supports caching it. + + + + + Provides more specific type information for Python dictionaries which are not strongly typed. + + This attribute can be applied to fields, parameters, proeprties, and return values. It can be + inspected to get type information about the types of the keys and values of the expected + dictionary or the returned dictionary. + + + + + Adapts an IDictionary[object, object] for use as a PythonDictionary used for + our debug frames. Also hides the special locals which start with $. + + + + + An interface that is implemented on DynamicMetaObjects. + + This allows objects to opt-into custom conversions when calling + COM APIs. The IronPython binders all call this interface before + doing any COM binding. + + + + + Captures and flows the state of executing code from the generated + Python code into the IronPython runtime. + + + + + Creates a new CodeContext which is backed by the specified Python dictionary. + + + + + Attempts to lookup the provided name in this scope or any outer scope. + + + + + Looks up a global variable. If the variable is not defined in the + global scope then built-ins is consulted. + + + + + Attempts to lookup the variable in the local scope. + + + + + Removes a variable from the local scope. + + + + + Sets a variable in the local scope. + + + + + Gets a variable from the global scope. + + + + + Sets a variable in the global scope. + + + + + Removes a variable from the global scope. + + + + + Returns the dictionary associated with __builtins__ if one is + set or null if it's not available. If __builtins__ is a module + the module's dictionary is returned. + + + + + Gets the module state for top-level code. + + + + + Gets the DLR scope object that corresponds to the global variables of this context. + + + + + Gets the PythonContext which created the CodeContext. + + + + + Gets the dictionary for the global variables from the ModuleContext. + + + + + True if this global context should display CLR members on shared types (for example .ToString on int/bool/etc...) + + False if these attributes should be hidden. + + + + + Gets the dictionary used for storage of local variables. + + + + + Marks a type so that IronPython will not expose the IEnumerable interface out as + __iter__ + + + + + ArgBuilder which provides the CodeContext parameter to a method. + + + + + Small reducable node which just fetches the value from a ClosureCell + object. Like w/ global variables the compiler recognizes these on + sets and turns them into assignments on the python global object. + + + + + Creates the storage for the closure cell. If this is a closure over a parameter it + captures the initial incoming parameter value. + + + + + Reduces the closure cell to a read of the value stored in the cell. + + + + + Assigns a value to the closure cell. + + + + + Removes the current value from the closure cell. + + + + + Gets the expression which points at the closure cell. + + + + + The original expression for the incoming parameter if this is a parameter closure. Otherwise + the value is null. + + + + + Gets the PythonVariable for which this closure expression was created. + + + + + Tracking for variables lifted into closure objects. Used to store information in a function + about the outer variables it accesses. + + + + + When finding a yield return or yield break, this rewriter flattens out + containing blocks, scopes, and expressions with stack state. All + scopes encountered have their variables promoted to the generator's + closure, so they survive yields. + + + + + Spills the right side into a temp, and replaces it with its temp. + Returns the expression that initializes the temp. + + + + + Makes an assignment to this variable. Pushes the assignment as far + into the right side as possible, to allow jumps into it. + + + + + Accesses the property of a tuple. The node can be created first and then the tuple and index + type can be filled in before the tree is actually generated. This enables creation of these + nodes before the tuple type is actually known. + + + + + Represents code which can be lazily compiled. + + The code is created in an AST which provides the Expression of T and + whether or not the code should be interpreted. For non-pre compiled + scenarios the code will not be compiled until the 1st time it is run. + + For pre-compiled scenarios the code is IExpressionSerializable and will + turn into a normal pre-compiled method. + + + + + Marks a type so that IronPython will not expose types which have GetMemberNames + as having a __dir__ method. + + Also suppresses __dir__ on something which implements IDynamicMetaObjectProvider + but is not an IPythonObject. + + + + + Marks a type so that IronPython will not expose the ICollection interface out as + __len__. + + + + + Marks a type so that IronPython will not expose the IDisposable interface out as + __enter__ and __exit__ methods of a context manager. + + + + + Marks a type so that IronPython will not expose the IEnumerable interface out as + __contains__ + + + + + Singleton used for dictionaries which contain no items. + + + + + Represents the set of extension methods which are loaded into a module. + + This set is immutable (as far the external viewer is considered). When a + new extension method set is loaded into a module we create a new ExtensionMethodsSet object. + + Multiple modules which have the same set of extension methods use the same set. + + + + + Returns all of the extension methods with the given name. + + + + + Returns all of the extension methods which are applicable for the given type. + + + + + Tracks the extension types that are loaded for a given assembly. + + We can have either types, namespaces, or a full assembly added as a reference. + + When the user just adds types we just add them to the type hash set. + + When the user adds namespaces we add them to the namespaces hashset. On the + next lookup we'll lazily load the types from that namespace and put them in Types. + + When the user adds assemblies we set the value to the NotYetLoadedButFullAssembly + value. The next load request will load the types from that namespace and put them + in Types. When we do that we'll mark the assembly as FullyLoaded so we don't + have to go through that again if the user adds a namespace. + + + + + Return a copy of this tuple's data array. + + + + + ModuleDictionaryStorage for a built-in module which is bound to a specific instance. + + These modules don't need to use PythonContext.GetModuleState() for storage and therefore + can provide efficient access to internal variables. They can also cache PythonGlobal + objects and provide efficient access to module globals. + + To the end user these modules appear just like any other module. These modules are + implemented by subclassing the BuiltinPythonModule class. + + + + + Enables lazy initialization of module dictionaries. + + + + + Gets all of the extra names and values stored in the dictionary. + + + + + Attemps to sets a value in the extra keys. Returns true if the value is set, false if + the value is not an extra key. + + + + + Attempts to get a value from the extra keys. Returns true if the value is an extra + key and has a value. False if it is not an extra key or doesn't have a value. + + + + + Attempts to remove the key. Returns true if the key is removed, false + if the key was not removed, or null if the key is not an extra key. + + + + + A TypeSlot is an item that gets stored in a type's dictionary. Slots provide an + opportunity to customize access at runtime when a value is get or set from a dictionary. + + + + + Gets the value stored in the slot for the given instance binding it to an instance if one is provided and + the slot binds to instances. + + + + + Sets the value of the slot for the given instance. + + true if the value was set, false if it can't be set + + + + Deletes the value stored in the slot from the instance. + + true if the value was deleted, false if it can't be deleted + + + + Gets an expression which is used for accessing this slot. If the slot lookup fails the error expression + is used again. + + The default implementation just calls the TryGetValue method. Subtypes of PythonTypeSlot can override + this and provide a more optimal implementation. + + + + + True if generating code for gets can result in more optimal accesses. + + + + + True if TryGetValue will always succeed, false if it may fail. + + This is used to optimize away error generation code. + + + + + Defines the internal interface used for accessing weak references and adding finalizers + to user-defined types. + + + + + Gets the current WeakRefTracker for an object that can be used to + append additional weak references. + + + + + Attempts to set the WeakRefTracker for an object. Used on the first + addition of a weak ref tracker to an object. If the object doesn't + support adding weak references then it returns false. + + + + + Sets a WeakRefTracker on an object for the purposes of supporting finalization. + All user types (new-style and old-style) support finalization even if they don't + support weak-references, and therefore this function always succeeds. Note the + slot used to store the WeakRefTracker is still shared between SetWeakRef and + SetFinalizer if a type supports both. + + + + + + Provides a list of all the members of an instance. ie. all the keys in the + dictionary of the object. Note that it can contain objects that are not strings. + + Such keys can be added in IronPython using syntax like: + obj.__dict__[100] = someOtherObject + + This Python specific version also supports filtering based upon the show cls + flag by flowing in the code context. + + + + + Validates that the current self object is usable for this method. + + + + + Marks a class as being hidden from the Python hierarchy. This is applied to the base class + and then all derived types will not see the base class in their hierarchy and will not be + able to access members declaredo on the base class. + + + + + Provides more specific type information for Python lists which are not strongly typed. + + This attribute can be applied to fields, parameters, proeprties, and return values. It can be + inspected to get type information about the types of the values of the expected + list or the returned list. + + + + + Captures the globals and other state of module code. + + + + + Creates a new ModuleContext which is backed by the specified dictionary. + + + + + Creates a new ModuleContext for the specified module. + + + + + Initializes __builtins__ for the module scope. + + + + + Gets the dictionary used for the global variables in the module + + + + + Gets the language context which created this module. + + + + + Gets the DLR Scope object which is associated with the modules dictionary. + + + + + Gets the global CodeContext object which is used for execution of top-level code. + + + + + Gets the module object which this code is executing in. + + This module may or may not be published in sys.modules. For user defined + code typically the module gets published at the start of execution. But if + this ModuleContext is attached to a Scope, or if we've just created a new + module context for executing code it will not be in sys.modules. + + + + + Gets the features that code has been compiled with in the module. + + + + + Gets or sets whether code running in this context should display + CLR members (for example .ToString on objects). + + + + + Cached global value. Created and maintained on a per-language basis. Default + implementation returns a singleton which indicates caching is not occuring. + + + + + Creates a new ModuleGlobalCache with the specified value. + + + + + Event handler for when the value has changed. Language implementors should call this when + the cached value is invalidated. + + + + + True if the ModuleGlobalCache is participating in a caching strategy. + + + + + True if there is currently a value associated with this global variable. False if + it is currently unassigned. + + + + + Gets or sets the current cached value + + + + + Enable true division (1/2 == .5) + + + + + Indicates that .NET methods such as .ToString should be available on Python objects. + + + + + Indicates that the module should be generated in an optimal form which will result + in it being uncollectable. + + + + + Indicates when the module should be executed immedatiately upon creation. + + + + + Enable usage of the with statement + + + + + Enable absolute imports + + + + + Indiciates that __builtins__ should not be set in the module + + + + + Indiciates that when the module is initialized it should set __builtins__ to the __builtin__ module + instead of the __builtin__ dictionary. + + + + + Marks code as being created for exec, eval. Code generated this way will + be capable of running against different scopes and will do lookups at runtime + for free global variables. + + + + + Indiciates that the first line of code should be skipped. + + + + + Enable usage of print as a function for better compatibility with Python 3.0. + + + + + Forces the code to be interpreted rather than compiled + + + + + String Literals should be parsed as Unicode strings + + + + + Include comments in the parse tree + + + + + Generated code should support light exceptions + + + + + Manages the acquisition of profiling data for a single ScriptRuntime + + + + + Get the unique Profiler instance for this ScriptRuntime + + + + + Given a MethodBase, return an index into the array of perf data. Treat each + CLR method as unique. + + + + + Given the unique name of something we're profiling, return an index into the array of perf data. + + + + + Add a new profiler entry. Not all names are unique. + + + + + Gets the current summary of profile data + + + + + Resets the current summary of profile data back to zero + + + + + Adds profiling calls to a Python method. + Calculates both the time spent only in this method + + + + + Wraps a call to a MethodInfo with profiling capture for that MethodInfo + + + + + Encapsulates profiler data to return to clients + + + + + Marks that this built-in method should be treated as external by the profiler. + When placed on a call emitted into a Python method, all the time spent in this + call will still show up in its parent's inclusive time, but will not be + part of its exclusive time. + + + + + Gets the closure tuple from our parent context. + + + + + PythonWalkerNonRecursive class - The Python AST Walker (default result is false) + + + + + Pulls the closure tuple from our function/generator which is flowed into each function call. + + + + + Returns an expression which creates the function object. + + + + + Creates the LambdaExpression which is the actual function body. + + + + + Creates the LambdaExpression which implements the body of the function. + + The functions signature is either "object Function(PythonFunction, ...)" + where there is one object parameter for each user defined parameter or + object Function(PythonFunction, object[]) for functions which take more + than PythonCallTargets.MaxArgs arguments. + + + + + Determines delegate type for the Python function + + + + + Scope for the comprehension. Because scopes are usually statements and comprehensions are expressions + this doesn't actually show up in the AST hierarchy and instead hangs off the comprehension expression. + + + + + Provides globals for when we need to lookup into a dictionary for each global access. + + This is the slowest form of globals and is only used when we need to run against an + arbitrary dictionary given to us by a user. + + + + + Provides a wrapper around "dynamic" expressions which we've opened coded (for optimized code generation). + + This lets us recognize both normal Dynamic and our own Dynamic expressions and apply the combo binder on them. + + + + + A ScriptCode which can be saved to disk. We only create this when called via + the clr.CompileModules API. This ScriptCode does not support running. + + + + + Parameter base class + + + + + Position of the parameter: 0-based index + + + + + Parameter name + + + + + Top-level ast for all Python code. Typically represents a module but could also + be exec or eval code. + + + + + Creates a new PythonAst without a body. ParsingFinished should be called afterwards to set + the body. + + + + + Called when parsing is complete, the body is built, the line mapping and language features are known. + + This is used in conjunction with the constructor which does not take a body. It enables creating + the outer most PythonAst first so that nodes can always have a global parent. This lets an un-bound + tree to still provide it's line information immediately after parsing. When we set the location + of each node during construction we also set the global parent. When we name bind the global + parent gets replaced with the real parent ScopeStatement. + + a mapping of where each line begins + The body of code + The language features which were set during parsing. + + + + Binds an AST and makes it capable of being reduced and compiled. Before calling Bind an AST cannot successfully + be reduced. + + + + + Creates a variable at the global level. Called for known globals (e.g. __name__), + for variables explicitly declared global by the user, and names accessed + but not defined in the lexical scope. + + + + + Reduces the PythonAst to a LambdaExpression of type Type. + + + + + Returns a ScriptCode object for this PythonAst. The ScriptCode object + can then be used to execute the code against it's closed over scope or + to execute it against a different scope. + + + + + Rewrites the tree for performing lookups against globals instead of being bound + against the optimized scope. This is used if the user compiles optimied code and then + runs it against a different scope. + + + + + True division is enabled in this AST. + + + + + True if the with statement is enabled in this AST. + + + + + True if absolute imports are enabled + + + + + True if this is on-disk code which we don't really have an AST for. + + + + + Represents a reference to a name. A PythonReference is created for each name + referred to in a scope (global, class, or function). + + + + + True if the user provided a step parameter (either providing an explicit parameter + or providing an empty step parameter) false if only start and stop were provided. + + + + + The statements under the try-block. + + + + + Array of except (catch) blocks associated with this try. NULL if there are no except blocks. + + + + + The body of the optional Else block for this try. NULL if there is no Else block. + + + + + The body of the optional finally associated with this try. NULL if there is no finally block. + + + + + Transform multiple python except handlers for a try block into a single catch body. + + The variable for the exception in the catch block. + Null if there are no except handlers. Else the statement to go inside the catch handler + + + + Surrounds the body of an except block w/ the appropriate code for maintaining the traceback. + + + + + True iff there is a path in control flow graph on which the variable is used before initialized (assigned or deleted). + + + + + True iff the variable is referred to from the inner scope. + + + + + Local variable. + + Local variables can be referenced from nested lambdas + + + + + Parameter to a LambdaExpression + + Like locals, they can be referenced from nested lambdas + + + + + Global variable + + Should only appear in global (top level) lambda. + + + + + WithStatement is translated to the DLR AST equivalent to + the following Python code snippet (from with statement spec): + + mgr = (EXPR) + exit = mgr.__exit__ # Not calling it yet + value = mgr.__enter__() + exc = True + try: + VAR = value # Only if "as VAR" is present + BLOCK + except: + # The exceptional case is handled here + exc = False + if not exit(*sys.exc_info()): + raise + # The exception is swallowed if exit() returns true + finally: + # The normal and non-local-goto cases are handled here + if exc: + exit(None, None, None) + + + + + + A ScriptCode which has been loaded from an assembly which is saved on disk. + + + + + Creates a fake PythonAst object which is represenative of the on-disk script code. + + + + + Base class for all of our fast get delegates. This holds onto the + delegate and provides the Update function. + + + + + Updates the call site when the current rule is no longer applicable. + + + + + Base class for all of our fast set delegates. This holds onto the + delegate and provides the Update and Optimize functions. + + + + + Updates the call site when the current rule is no longer applicable. + + + + + Provides cached global variable for modules to enable optimized access to + module globals. Both the module global value and the cached value can be held + onto and the cached value can be invalidated by the providing LanguageContext. + + The cached value is provided by the LanguageContext.GetModuleCache API. + + + + + Small reducable node which just fetches the value from a PythonGlobal + object. The compiler recognizes these on sets and turns them into + assignments on the python global object. + + + + + Represents a script code which can be dynamically bound to execute against + arbitrary Scope objects. This is used for code when the user runs against + a particular scope as well as for exec and eval code as well. It is also + used when tracing is enabled. + + + + + Represents a script code which can be consumed at runtime as-is. This code has + no external dependencies and is closed over its scope. + + + + + Helper class for implementing the Python class. + + This is exposed as a service through PythonEngine and the helper class + uses this service to get the correct remoting semantics. + + + + + Marks that the return value of a function might include NotImplemented. + + This is added to an operator method to ensure that all necessary methods are called + if one cannot guarantee that it can perform the comparison. + + + + + Provides support for emitting warnings when built in methods are invoked at runtime. + + + + + Backwards compatible Convert for the old sites that need to flow CodeContext + + + + + Creates a new InvokeBinder which will call with positional splatting. + + The signature of the target site should be object(function), object[], retType + + + + + + + Creates a new InvokeBinder which will call with positional and keyword splatting. + + The signature of the target site should be object(function), object[], dictionary, retType + + + + + Fallback action for performing an invoke from Python. We translate the + CallSignature which supports splatting position and keyword args into + their expanded form. + + + + + Gets the PythonContext which the CallSiteBinder is associated with. + + + + + Fallback action for performing a new() on a foreign IDynamicMetaObjectProvider. used + when call falls back. + + + + + Python's Invoke is a non-standard action. Here we first try to bind through a Python + internal interface (IPythonInvokable) which supports CallSigantures. If that fails + and we have an IDO then we translate to the DLR protocol through a nested dynamic site - + this includes unsplatting any keyword / position arguments. Finally if it's just a plain + old .NET type we use the default binder which supports CallSignatures. + + + + + Interface used to mark objects as being invokable from Python. These objects support + calling with splatted positional and keyword arguments. + + + + + Provides binding logic which is implemented to follow various Python protocols. This includes + things such as calling __call__ to perform calls, calling __nonzero__/__len__ to convert to + bool, calling __add__/__radd__ to do addition, etc... + + This logic gets shared between both the IDynamicMetaObjectProvider implementation for Python objects as well + as the Python sites. This ensures the logic we follow for our builtin types and user defined + types is identical and properly conforming to the various protocols. + + + + + Gets a MetaObject which converts the provided object to a bool using __nonzero__ or __len__ + protocol methods. This code is shared between both our fallback for a site and our MetaObject + for user defined objects. + + + + + Used for conversions to bool + + + + + Creates a rule for the contains operator. This is exposed via "x in y" in + IronPython. It is implemented by calling the __contains__ method on x and + passing in y. + + If a type doesn't define __contains__ but does define __getitem__ then __getitem__ is + called repeatedly in order to see if the object is there. + + For normal .NET enumerables we'll walk the iterator and see if it's present. + + + + + Helper to handle a comparison operator call. Checks to see if the call can + return NotImplemented and allows the caller to modify the expression that + is ultimately returned (e.g. to turn __cmp__ into a bool after a comparison) + + + + + calls __coerce__ for old-style classes and performs the operation if the coercion is successful. + + + + + Makes the comparison rule which returns an int (-1, 0, 1). TODO: Better name? + + + + + Python has three protocols for slicing: + Simple Slicing x[i:j] + Extended slicing x[i,j,k,...] + Long Slice x[start:stop:step] + + The first maps to __*slice__ (get, set, and del). + This takes indexes - i, j - which specify the range of elements to be + returned. In the slice variants both i, j must be numeric data types. + The 2nd and 3rd are both __*item__. + This receives a single index which is either a Tuple or a Slice object (which + encapsulates the start, stop, and step values) + + This is in addition to a simple indexing x[y]. + + For simple slicing and long slicing Python generates Operators.*Slice. For + the extended slicing and simple indexing Python generates a Operators.*Item + action. + + Extended slicing maps to the normal .NET multi-parameter input. + + So our job here is to first determine if we're to call a __*slice__ method or + a __*item__ method. + + + + + Helper to convert all of the arguments to their known types. + + + + + Gets the arguments that need to be provided to __*item__ when we need to pass a slice object. + + + + + Helper to get the symbols for __*item__ and __*slice__ based upon if we're doing + a get/set/delete and the minimum number of arguments required for each of those. + + + + + Checks if a coercion check should be performed. We perform coercion under the following + situations: + 1. Old instances performing a binary operator (excluding rich comparisons) + 2. User-defined new instances calling __cmp__ but only if we wouldn't dispatch to a built-in __coerce__ on the parent type + + This matches the behavior of CPython. + + + + + + Produces an error message for the provided message and type names. The error message should contain + string formatting characters ({0}, {1}, etc...) for each of the type names. + + + + + Delegate for finishing the comparison. This takes in a condition and a return value and needs to update the ConditionalBuilder + with the appropriate resulting body. The condition may be null. + + + + + Base class for calling indexers. We have two subclasses that target built-in functions and user defined callable objects. + + The Callable objects get handed off to ItemBuilder's which then call them with the appropriate arguments. + + + + + Creates a new CallableObject. If BuiltinFunction is available we'll create a BuiltinCallable otherwise + we create a SlotCallable. + + + + + Gets the arguments in a form that should be used for extended slicing. + + Python defines that multiple tuple arguments received (x[1,2,3]) get + packed into a Tuple. For most .NET methods we just want to expand + this into the multiple index arguments. For slots and old-instances + we want to pass in the tuple + + + + + Adds the target of the call to the rule. + + + + + Subclass of Callable for a built-in function. This calls a .NET method performing + the appropriate bindings. + + + + + Callable to a user-defined callable object. This could be a Python function, + a class defining __call__, etc... + + + + + Base class for building a __*item__ or __*slice__ call. + + + + + Derived IndexBuilder for calling __*slice__ methods + + + + + Derived IndexBuilder for calling __*item__ methods. + + + + + Common helpers used by the various binding logic. + + + + + Tries to get the BuiltinFunction for the given name on the type of the provided MetaObject. + + Succeeds if the MetaObject is a BuiltinFunction or BuiltinMethodDescriptor. + + + + + Gets the best CallSignature from a MetaAction. + + The MetaAction should be either a Python InvokeBinder, or a DLR InvokeAction or + CreateAction. For Python we can use a full-fidelity + + + + + + + Transforms an invoke member into a Python GetMember/Invoke. The caller should + verify that the given attribute is not resolved against a normal .NET class + before calling this. If it is a normal .NET member then a fallback InvokeMember + is preferred. + + + + + Determines if the type associated with the first MetaObject is a subclass of the + type associated with the second MetaObject. + + + + + Adds a try/finally which enforces recursion limits around the target method. + + + + + Helper to do fallback for Invoke's so we can handle both StandardAction and Python's + InvokeBinder. + + + + + Converts arguments into a form which can be used for COM interop. + + The argument is only converted if we have an IronPython specific + conversion when calling COM methods. + + + + + Converts a single argument into a form which can be used for COM + interop. + + The argument is only converted if we have an IronPython specific + conversion when calling COM methods. + + + + + Builds up a series of conditionals when the False clause isn't yet known. We can + keep appending conditions and if true's. Each subsequent true branch becomes the + false branch of the previous condition and body. Finally a non-conditional terminating + branch must be added. + + + + + Adds a new conditional and body. The first call this becomes the top-level + conditional, subsequent calls will have it added as false statement of the + previous conditional. + + + + + Adds a new condition to the last added body / condition. + + + + + Adds the non-conditional terminating node. + + + + + Gets the resulting meta object for the full body. FinishCondition + must have been called. + + + + + Adds a variable which will be scoped at the level of the final expression. + + + + + Returns true if no conditions have been added + + + + + Returns true if a final, non-conditional, body has been added. + + + + + Creates a target which creates a new dynamic method which contains a single + dynamic site that invokes the callable object. + + TODO: This should be specialized for each callable object + + + + + Various helpers related to calling Python __*__ conversion methods + + + + + Helper for falling back - if we have a base object fallback to it first (which can + then fallback to the calling site), otherwise fallback to the calling site. + + + + + Helper for falling back - if we have a base object fallback to it first (which can + then fallback to the calling site), otherwise fallback to the calling site. + + + + + Checks to see if this type has __getattribute__ that overrides all other attribute lookup. + + This is more complex then it needs to be. The problem is that when we have a + mixed new-style/old-style class we have a weird __getattribute__ defined. When + we always dispatch through rules instead of PythonTypes it should be easy to remove + this. + + + + + Looks up the associated PythonTypeSlot from the object. Indicates if the result + came from a standard .NET type in which case we will fallback to the sites binder. + + + + + Helper for falling back - if we have a base object fallback to it first (which can + then fallback to the calling site), otherwise fallback to the calling site. + + + + + Helper for falling back - if we have a base object fallback to it first (which can + then fallback to the calling site), otherwise fallback to the calling site. + + + + + Provides the lookup logic for resolving a Python object. Subclasses + provide the actual logic for producing the binding result. Currently + there are two forms of the binding result: one is the DynamicMetaObject + form used for non-optimized bindings. The other is the Func of CallSite, + object, CodeContext, object form which is used for fast binding and + pre-compiled rules. + + + + + GetBinder which produces a DynamicMetaObject. This binder always + successfully produces a DynamicMetaObject which can perform the requested get. + + + + + Makes a rule which calls a user-defined __getattribute__ function and falls back to __getattr__ if that + raises an AttributeError. + + slot is the __getattribute__ method to be called. + + + + + Checks a range of the MRO to perform old-style class lookups if any old-style classes + are present. We will call this twice to produce a search before a slot and after + a slot. + + + + + Helper for falling back - if we have a base object fallback to it first (which can + then fallback to the calling site), otherwise fallback to the calling site. + + + + + Custom dynamic site kinds for simple sites that just take a fixed set of parameters. + + + + + Unary operator. + + Gets various documentation about the object returned as a string + + + + + Unary operator. + + Gets information about the type of parameters, returned as a string. + + + + + Unary operator. + + Checks whether the object is callable or not, returns true if it is. + + + + + Binary operator. + + Checks to see if the instance contains another object. Returns true or false. + + + + + Unary operator. + + Returns the number of items stored in the object. + + + + + Binary operator. + + Compares two instances returning an integer indicating the relationship between them. May + throw if the object types are uncomparable. + + + + + Binary operator. + + Returns both the dividend and quotioent of x / y. + + + + + Unary operator. + + Get the absolute value of the instance. + + + + + Unary operator. + + Gets the positive value of the instance. + + + + + Unary operator. + + Negates the instance and return the new value. + + + + + Unary operator. + + Returns the ones complement of the instance. + + + + + Unary operator. + + Boolean negation + + + + + Unary operator. + + Negation, returns object + + + + + Get enumerator for iteration binder. Returns a KeyValuePair<IEnumerator, IDisposable> + + The IEnumerator is used for iteration. The IDisposable is provided if the object was an + IEnumerable or IEnumerable<T> and is a disposable object. + + + + Operator for performing add + + + Operator for performing sub + + + Operator for performing pow + + + Operator for performing mul + + + Operator for performing floordiv + + + Operator for performing div + + + Operator for performing truediv + + + Operator for performing mod + + + Operator for performing lshift + + + Operator for performing rshift + + + Operator for performing and + + + Operator for performing or + + + Operator for performing xor + + + Operator for performing lt + + + Operator for performing gt + + + Operator for performing le + + + Operator for performing ge + + + Operator for performing eq + + + Operator for performing ne + + + Operator for performing lg + + + Operator for performing in-place add + + + Operator for performing in-place sub + + + Operator for performing in-place pow + + + Operator for performing in-place mul + + + Operator for performing in-place floordiv + + + Operator for performing in-place div + + + Operator for performing in-place truediv + + + Operator for performing in-place mod + + + Operator for performing in-place lshift + + + Operator for performing in-place rshift + + + Operator for performing in-place and + + + Operator for performing in-place or + + + Operator for performing in-place xor + + + Operator for performing reverse add + + + Operator for performing reverse sub + + + Operator for performing reverse pow + + + Operator for performing reverse mul + + + Operator for performing reverse floordiv + + + Operator for performing reverse div + + + Operator for performing reverse truediv + + + Operator for performing reverse mod + + + Operator for performing reverse lshift + + + Operator for performing reverse rshift + + + Operator for performing reverse and + + + Operator for performing reverse or + + + Operator for performing reverse xor + + + Operator for performing reverse divmod + + + + Provides an abstraction for calling something which might be a builtin function or + might be some arbitrary user defined slot. If the object is a builtin function the + call will go directly to the underlying .NET method. If the object is an arbitrary + callable object we will setup a nested dynamic site for performing the additional + dispatch. + + TODO: We could probably do a specific binding to the object if it's another IDyanmicObject. + + + + + Combines two methods, which came from two different binary types, selecting the method which has the best + set of conversions (the conversions which result in the least narrowing). + + + + + Tries to get a MethodBinder associated with the slot for the specified type. + + If a method is found the binder is set and true is returned. + If nothing is found binder is null and true is returned. + If something other than a method is found false is returned. + + TODO: Remove rop + + + + + bytearray(string, encoding[, errors]) -> bytearray + bytearray(iterable) -> bytearray + + Construct a mutable bytearray object from: + - an iterable yielding values in range(256), including: + + a list of integer values + + a bytes, bytearray, buffer, or array object + - a text string encoded using the specified encoding + + bytearray([int]) -> bytearray + + Construct a zero-ititialized bytearray of the specified length. + (default=0) + + + + + return true if self is a titlecased string and there is at least one + character in self; also, uppercase characters may only follow uncased + characters (e.g. whitespace) and lowercase characters only cased ones. + return false otherwise. + + + + + Return a string which is the concatenation of the strings + in the sequence seq. The separator between elements is the + string providing this method + + + + + return true if self is a titlecased string and there is at least one + character in self; also, uppercase characters may only follow uncased + characters (e.g. whitespace) and lowercase characters only cased ones. + return false otherwise. + + + + + Return a string which is the concatenation of the strings + in the sequence seq. The separator between elements is the + string providing this method + + + + + Returns a copy of the internal byte array. + + + System.Byte[] + + + + + This method returns the underlying byte array directly. + It should be used sparingly! + + + System.Byte[] + + + + + Marks a method as being a class method. The PythonType which was used to access + the method will then be passed as the first argument. + + + + + this class contains objecs and static methods used for + .NET/CLS interop with Python. + + + + + Gets the current ScriptDomainManager that IronPython is loaded into. The + ScriptDomainManager can then be used to work with the language portion of the + DLR hosting APIs. + + + + + Use(name) -> module + + Attempts to load the specified module searching all languages in the loaded ScriptRuntime. + + + + + Use(path, language) -> module + + Attempts to load the specified module belonging to a specific language loaded into the + current ScriptRuntime. + + + + + SetCommandDispatcher(commandDispatcher) + + Sets the current command dispatcher for the Python command line. + + The command dispatcher will be called with a delegate to be executed. The command dispatcher + should invoke the target delegate in the desired context. + + A common use for this is to enable running all REPL commands on the UI thread while the REPL + continues to run on a non-UI thread. + + + + + Gets the CLR Type object from a given Python type object. + + + + + Gets the Python type object from a given CLR Type object. + + + + + OBSOLETE: Gets the Python type object from a given CLR Type object. + + Use clr.GetPythonType instead. + + + + + accepts(*types) -> ArgChecker + + Decorator that returns a new callable object which will validate the arguments are of the specified types. + + + + + + + returns(type) -> ReturnChecker + + Returns a new callable object which will validate the return type is of the specified type. + + + + + returns the result of dir(o) as-if "import clr" has not been performed. + + + + + Returns the result of dir(o) as-if "import clr" has been performed. + + + + + Attempts to convert the provided object to the specified type. Conversions that + will be attempted include standard Python conversions as well as .NET implicit + and explicit conversions. + + If the conversion cannot be performed a TypeError will be raised. + + + + + clr.CompileSubclassTypes(assemblyName, *typeDescription) + + Provides a helper for creating an assembly which contains pre-generated .NET + base types for new-style types. + + This assembly can then be AddReferenced or put sys.prefix\DLLs and the cached + types will be used instead of generating the types at runtime. + + This function takes the name of the assembly to save to and then an arbitrary + number of parameters describing the types to be created. Each of those + parameter can either be a plain type or a sequence of base types. + + clr.CompileSubclassTypes(object) -> create a base type for object + clr.CompileSubclassTypes(object, str, System.Collections.ArrayList) -> create + base types for both object and ArrayList. + + clr.CompileSubclassTypes(object, (object, IComparable)) -> create base types for + object and an object which implements IComparable. + + + + + + clr.GetSubclassedTypes() -> tuple + + Returns a tuple of information about the types which have been subclassed. + + This tuple can be passed to clr.CompileSubclassTypes to cache these + types on disk such as: + + clr.CompileSubclassTypes('assembly', *clr.GetSubclassedTypes()) + + + + + Goes through the list of files identifying the relationship between packages + and subpackages. Returns a dictionary with all of the package filenames (minus __init__.py) + mapping to their full name. For example given a structure: + + C:\ + someDir\ + package\ + __init__.py + a.py + b\ + __init.py + c.py + + Returns: + {r'C:\somedir\package' : 'package', r'C:\somedir\package\b', 'package.b'} + + This can then be used for calculating the full module name of individual files + and packages. For example a's full name is "package.a" and c's full name is + "package.b.c". + + + + + Returns a list of profile data. The values are tuples of Profiler.Data objects + + All times are expressed in the same unit of measure as DateTime.Ticks + + + + + Resets all profiler counters back to zero + + + + + Enable or disable profiling for the current ScriptEngine. This will only affect code + that is compiled after the setting is changed; previously-compiled code will retain + whatever setting was active when the code was originally compiled. + + The easiest way to recompile a module is to reload() it. + + + + + Decorator for verifying the arguments to a function are of a specified type. + + + + + Returned value when using clr.accepts/ArgChecker. Validates the argument types and + then calls the original function. + + + + + Decorator for verifying the return type of functions. + + + + + Returned value when using clr.returns/ReturnChecker. Calls the original function and + validates the return type is of a specified type. + + + + + Provides a StreamContentProvider for a stream of content backed by a file on disk. + + + + + Wrapper class used when a user defined type (new-style or old-style) + defines __index__. We provide a conversion from all user defined + types to the Index type so they can be used for determing and method bind + time the most appropriate method to dispatch to. + + + + + New string formatter for 'str'.format(...) calls and support for the Formatter + library via the _formatter_parser / _formatter_field_name_split + methods. + + We parse this format: + + replacement_field = "{" field_name ["!" conversion] [":" format_spec] "}" + field_name = (identifier | integer) ("." attribute_name | "[" element_index "]")* + attribute_name = identifier + element_index = identifier + conversion = "r" | "s" + format_spec = any char, { must be balanced (for computed values), passed to __format__ method on object + + + + + Runs the formatting operation on the given format and keyword arguments + + + + + Gets the formatting information for the given format. This is a list of tuples. The tuples + include: + + text, field name, format spec, conversion + + + + + Parses a field name returning the argument name and an iterable + object which can be used to access the individual attribute + or element accesses. The iterator yields tuples of: + + bool (true if attribute, false if element index), attribute/index value + + + + + Parses the field name including attribute access or element indexing. + + + + + Parses the field name including attribute access or element indexing. + + + + + Converts accessors from our internal structure into a PythonTuple matching how CPython + exposes these + + + + + Parses an identifier and returns it + + + + + Base class used for parsing the format. Subclasss override Text/ReplacementField methods. Those + methods get called when they call Parse and then they can do the appropriate actions for the + format. + + + + + Gets an enumerable object for walking the parsed format. + + TODO: object array? struct? + + + + + Provides an enumerable of the parsed format. The elements of the tuple are: + the text preceding the format information + the field name + the format spec + the conversion + + + + + Handles {{ and }} within the string. Returns true if a double bracket + is found and yields the text + + + + + Parses the conversion character and returns it + + + + + Checks to see if we're at the end of the format. If there's no more characters left we report + the error, otherwise if we hit a } we return true to indicate parsing should stop. + + + + + Parses the format spec string and returns it. + + + + + Parses the field name and returns it. + + + + + Handles parsing the field name and the format spec and returns it. At the parse + level these are basically the same - field names just have more terminating characters. + + The most complex part of parsing them is they both allow nested braces and require + the braces are matched. Strangely though the braces need to be matched across the + combined field and format spec - not within each format. + + + + + Provides the built-in string formatter which is exposed to Python via the str.format API. + + + + + Inspects a format spec to see if it contains nested format specs which + we need to compute. If so runs another string formatter on the format + spec to compute those values. + + + + + Given the field name gets the object from our arguments running + any of the member/index accessors. + + + + + Applies the known built-in conversions to the object if a conversion is + specified. + + + + + Gets the initial object represented by the field name - e.g. the 0 or + keyword name. + + + + + Given the object value runs the accessors in the field name (if any) against the object. + + + + + Encodes all the information about the field name. + + + + + Encodes a single field accessor (.b or [number] or [str]) + + + + + For IList arguments: Marks that the argument is typed to accept a bytes or + bytearray object. This attribute disallows passing a Python list object and + auto-applying our generic conversion. It also enables conversion of a string to + a IList of byte in IronPython 2.6. + + For string arguments: Marks that the argument is typed to accept a bytes object + as well. (2.6 only) + + + + stored for copy_reg module, used for reduce protocol + + + stored for copy_reg module, used for reduce protocol + + + + Creates a new PythonContext not bound to Engine. + + + + + Checks to see if module state has the current value stored already. + + + + + Gets per-runtime state used by a module. The module should have a unique key for + each piece of state it needs to store. + + + + + Sets per-runtime state used by a module. The module should have a unique key for + each piece of state it needs to store. + + + + + Sets per-runtime state used by a module and returns the previous value. The module + should have a unique key for each piece of state it needs to store. + + + + + Sets per-runtime state used by a module and returns the previous value. The module + should have a unique key for each piece of state it needs to store. + + + + + Initializes the sys module on startup. Called both to load and reload sys + + + + + Reads one line keeping track of the # of bytes read + + + + + Returns (and creates if necessary) the PythonService that is associated with this PythonContext. + + The PythonService is used for providing remoted convenience helpers for the DLR hosting APIs. + + + + + Gets the member names associated with the object + TODO: Move "GetMemberNames" functionality into MetaObject implementations + + + + + Gets a SiteLocalStorage when no call site is available. + + + + + Invokes the specified operation on the provided arguments and returns the new resulting value. + + operation is usually a value from StandardOperators (standard CLR/DLR operator) or + OperatorStrings (a Python specific operator) + + + + + Sets the current command dispatcher for the Python command line. The previous dispatcher + is returned. Null can be passed to remove the current command dispatcher. + + The command dispatcher will be called with a delegate to be executed. The command dispatcher + should invoke the target delegate in the desired context. + + A common use for this is to enable running all REPL commands on the UI thread while the REPL + continues to run on a non-UI thread. + + The ipy.exe REPL will call into PythonContext.DispatchCommand to dispatch each execution to + the correct thread. Other REPLs can do the same to support this functionality as well. + + + + + Dispatches the command to the current command dispatcher. If there is no current command + dispatcher the command is executed immediately on the current thread. + + + + + Gets a function which can be used for comparing two values. If cmp is not null + then the comparison will use the provided comparison function. Otherwise + it will use the normal Python semantics. + + If type is null then a generic comparison function is returned. If type is + not null a comparison function is returned that's used for just that type. + + + + + Performs a GC collection including the possibility of freeing weak data structures held onto by the Python runtime. + + + + + + Gets a PythonContext given a DynamicMetaObjectBinder. + + + + + Gets or sets the maximum depth of function calls. Equivalent to sys.getrecursionlimit + and sys.setrecursionlimit. + + + + + Gets or sets the main thread which should be interupted by thread.interrupt_main + + + + + Gets or sets the default encoding for this system state / engine. + + + + + Dictionary from name to type of all known built-in module names. + + + + + Dictionary from type to name of all built-in modules. + + + + + TODO: Remove me, or stop caching built-ins. This is broken if the user changes __builtin__ + + + + Dictionary of error handlers for string codecs. + + + Table of functions used for looking for additional codecs. + + + + Returns a shared code context for the current PythonContext. This shared + context can be used for performing general operations which usually + require a CodeContext. + + + + + Returns an overload resolver for the current PythonContext. The overload + resolver will flow the shared context through as it's CodeContext. + + + + + Returns a shared code context for the current PythonContext. This shared + context can be used for doing lookups which need to occur as if they + happened in a module which has done "import clr". + + + + + A DynamicStackFrame which has Python specific data. Currently this + includes the code context which may provide access to locals and the + function code object which is needed to build frame objects from. + + + + + Gets the code context of the function. + + If the function included a call to locals() or the FullFrames + option is enabled then the code context includes all local variables. + + Null if deserialized. + + + + + Gets the code object for this frame. This is used in creating + the trace back. Null if deserialized. + + + + + Created for a user-defined function. + + + + + Python ctor - maps to function.__new__ + + y = func(x.__code__, globals(), 'foo', None, (a, )) + + + + + Calculates the _compat value which is used for call-compatibility checks + for simple calls. Whenver any of the dependent values are updated this + must be called again. + + The dependent values include: + _nparams - this is readonly, and never requies an update + _defaults - the user can mutate this (func_defaults) and that forces + an update + expand dict/list - based on nparams and flags, both read-only + + Bits are allocated as: + 00003fff - Normal argument count + 0fffb000 - Default count + 10000000 - unused + 20000000 - expand list + 40000000 - expand dict + 80000000 - unused + + Enforce recursion is added at runtime. + + + + + The parent CodeContext in which this function was declared. + + + + + Captures the # of args and whether we have kw / arg lists. This + enables us to share sites for simple calls (calls that don't directly + provide named arguments or the list/dict params). + + + + + Generators w/ exception handling need to have some data stored + on them so that we appropriately set/restore the exception state. + + + + + Returns an ID for the function if one has been assigned, or zero if the + function has not yet required the use of an ID. + + + + + Gets the position for the expand list argument or -1 if the function doesn't have an expand list parameter. + + + + + Gets the position for the expand dictionary argument or -1 if the function doesn't have an expand dictionary parameter. + + + + + Gets the number of normal (not params or kw-params) parameters. + + + + + Gets the number of extra arguments (params or kw-params) + + + + + Gets the collection of command line arguments. + + + + + Should we strip out all doc strings (the -O command line option). + + + + + Should we strip out all doc strings (the -OO command line option). + + + + + List of -W (warning filter) options collected from the command line. + + + + + Enables warnings related to Python 3.0 features. + + + + + Enables 3.0 features that are implemented in IronPython. + + + + + Enables debugging support. When enabled a .NET debugger can be attached + to the process to step through Python code. + + + + + Enables inspect mode. After running the main module the REPL will be started + within that modules context. + + + + + Suppresses addition of the user site directory. This is ignored by IronPython + except for updating sys.flags. + + + + + Disables import site on startup. + + + + + Ignore environment variables that configure the IronPython context. + + + + + Enables the verbose option which traces import statements. This is ignored by IronPython + except for setting sys.flags. + + + + + Sets the maximum recursion depth. Setting to Int32.MaxValue will disable recursion + enforcement. + + + + + Makes available sys._getframe. Local variables will not be available in frames unless the + function calls locals(), dir(), vars(), etc... For ensuring locals are always available use + the FullFrames option. + + + + + Makes available sys._getframe. All locals variables will live on the heap (for a considerable + performance cost) enabling introspection of all code. + + + + + Tracing is always available. Without this option tracing is only enabled when sys.settrace + is called. This means code that was already running before sys.settrace will not be debuggable. + + With this option pdb.set_trace and pdb.post_mortem will always work properly. + + + + + Severity of a warning that indentation is formatted inconsistently. + + + + + The division options (old, new, warn, warnall) + + + + + Forces all code to be compiled in a mode in which the code can be reliably collected by the CLR. + + + + + Enable profiling code + + + + + Returns a regular expression of Python files which should not be emitted in debug mode. + + + + + Gets the CPython version which IronPython will emulate. Currently limited + to either 2.6 or 3.0. + + + + + Marks a member as being hidden from Python code. + + + + + This assembly-level attribute specifies which types in the engine represent built-in Python modules. + + Members of a built-in module type should all be static as an instance is never created. + + + + + Creates a new PythonModuleAttribute that can be used to specify a built-in module that exists + within an assembly. + + The built-in module name + The type that implements the built-in module. + + + + The built-in module name + + + + + The type that implements the built-in module + + + + + Marks a type as being a PythonType for purposes of member lookup, creating instances, etc... + + If defined a PythonType will use __new__ / __init__ when creating instances. This allows the + object to match the native Python behavior such as returning cached values from __new__ or + supporting initialization to run multiple times via __init__. + + The attribute also allows you to specify an alternate type name. This allows the .NET name to + be different from the Python name so they can follow .NET naming conventions. + + Types defining this attribute also don't show CLR methods such as Equals, GetHashCode, etc... until + the user has done an import clr. + + + + + General-purpose storage used for Python sets and frozensets. + + The set storage is thread-safe for multiple readers or writers. + + Mutations to the set involve a simple locking strategy of locking on the SetStorage object + itself to ensure mutual exclusion. + + Reads against the set happen lock-free. When the set is mutated, it adds or removes buckets + in an atomic manner so that the readers will see a consistent picture as if the read + occurred either before or after the mutation. + + + + + Creates a new set storage with no buckets + + + + + Creates a new set storage with no buckets + + + + + Adds a new item to the set, unless an equivalent item is already present + + + + + Static helper which adds the given non-null item with a precomputed hash code. Returns + true if the item was added, false if it was already present in the set. + + + + + Lock-free helper on a non-null item with a pre-calculated hash code. Removes the item + if it is present in the set, otherwise adds it. + + + + + Clears the contents of the set + + + + + Clones the set, returning a new SetStorage object + + + + + Checks to see if the given item exists in the set + + + + + Checks to see if the given item exists in the set, and tries to hash it even + if it is known not to be in the set. + + + + + + + Adds items from this set into the other set + + + + + Removes the first set element in the iteration order. + + true if an item was removed, false if the set was empty + + + + Removes an item from the set and returns true if it was present, otherwise returns + false + + + + + Removes an item from the set and returns true if it was removed. The item will always + be hashed, throwing if it is unhashable - even if the set has no buckets. + + + + + Lock-free helper to remove a non-null item + + + + + Determines whether the current set shares no elements with the given set + + + + + Determines whether the current set is a subset of the given set + + + + + Determines whether the current set is a strict subset of the given set + + + + + Mutates this set to contain its union with 'other'. The caller must lock the current + set if synchronization is desired. + + + + + Mutates this set to contain its intersection with 'other'. The caller must lock the + current set if synchronization is desired. + + + + + Mutates this set to contain its symmetric difference with 'other'. The caller must + lock the current set if synchronization is desired. + + + + + Mutates this set to contain its difference with 'other'. The caller must lock the + current set if synchronization is desired. + + + + + Computes the union of self and other, returning an entirely new set. This method is + thread-safe and makes no modifications to self or other. + + + + + Computes the intersection of self and other, returning an entirely new set. This + method is thread-safe and makes no modifications to self or other. + + + + + Computes the symmetric difference of self and other, returning an entirely new set. + This method is thread-safe and makes no modifications to self or other. + + + + + Computes the difference of self and other, returning an entirely new set. This + method is thread-safe and makes no modifications to self or other. + + + + + Helper to hash the given item w/ support for null + + + + + Helper which ensures that the first argument x requires the least work to enumerate + + + + + A factory which creates a SetStorage object from any Python iterable. It extracts + the underlying storage of a set or frozen set without copying, which is left to the + caller if necessary. + + + + + A factory which creates a SetStorage object from any Python iterable. It extracts + the underlying storage of a set or frozen set without copying, which is left to the + caller if necessary. + Returns true if the given object was a set or frozen set, false otherwise. + + + + + A factory which creates a SetStorage object from any Python iterable. It extracts + the underlying storage of a set or frozen set, copying in the former case, to return + a SetStorage object that is guaranteed not to receive any outside mutations. + + + + + Extracts the SetStorage object from o if it is a set or frozenset and returns true. + Otherwise returns false. + + + + + Creates a hashable set from the given set, or does nothing if the given object + is not a set. + + True if o is a set or frozenset, false otherwise + + + + Returns the number of items currently in the set + + + + + Used to store a single hashed item. + + Bucket is not serializable because it stores the computed hash code, which could change + between serialization and deserialization. + + + + + Provides storage which is flowed into a callers site. The same storage object is + flowed for multiple calls enabling the callee to cache data that can be re-used + across multiple calls. + + Data is a public field so that this works properly with DynamicSite's as the reference + type (and EnsureInitialize) + + + + + Provides a representation and parsing for the default formatting specification. This is used + by object.__format__, int.__format__, long.__format__, and float.__format__ to do the common + format spec parsing. + + The default specification is: + + format_spec = [[fill]align][sign][#][0][width][,][.precision][type] + fill = a character other than } + align = "<" | ">" | "=" | "^" + sign = "+" | "-" | " " + width = integer + precision = integer + type = "b" | "c" | "d" | "e" | "E" | "f" | "F" | "g" | "G" | "n" | "o" | "x" | "X" | "%" + + + + + Parses a format spec and returns a new StringFormatSpec object. + + + + + Optimized storage for setting exc_type, exc_value, and exc_traceback. + + This optimization can go away in Python 3.0 when these attributes are no longer used. + + + + + Marks a type as being a suitable type to be used for user-defined classes. + + The requirements for this are that a type has to follow the patterns + that NewTypeMaker derived types follow. This includes: + The type's constructors must all take PythonType as the 1st parameter + which sets the underlying type for the actual object + The type needs to implement IPythonObject + Dictionary-based storage needs to be provided for setting individual members + Virtual methods exposed to Python need to support checking the types dictionary for invocations + + + + + Base class for helper which creates instances. We have two derived types: One for user + defined types which prepends the type before calling, and one for .NET types which + doesn't prepend the type. + + + + + Contains helper methods for converting C# names into Python names. + + + + + TypeInfo captures the minimal CLI information required by NewTypeMaker for a Python object + that inherits from a CLI type. + + + + + "bases" contains a set of PythonTypes. These can include types defined in Python (say cpy1, cpy2), + CLI types (say cCLI1, cCLI2), and CLI interfaces (say iCLI1, iCLI2). Here are some + examples of how this works: + + (bases) => baseType, {interfaceTypes} + + (cpy1) => System.Object, {} + (cpy1, cpy2) => System.Object, {} + (cpy1, cCLI1, iCLI1, iCLI2) => cCLI1, {iCLI1, iCLI2} + [some type that satisfies the line above] => + cCLI1, {iCLI1, iCLI2} + (cCLI1, cCLI2) => error + + + + + Filters out old-classes and throws if any non-types are included, returning a + yielding the remaining PythonType objects. + + + + + Python class hierarchy is represented using the __class__ field in the object. It does not + use the CLI type system for pure Python types. However, Python types which inherit from a + CLI type, or from a builtin Python type which is implemented in the engine by a CLI type, + do have to use the CLI type system to interoperate with the CLI world. This means that + objects of different Python types, but with the same CLI base type, can use the same CLI type - + they will just have different values for the __class__ field. + + The easiest way to inspect the functionality implemented by NewTypeMaker is to persist the + generated IL using "ipy.exe -X:SaveAssemblies", and then inspect the + persisted IL using ildasm. + + + + + Loads any available new types from the provided assembly and makes them + available via the GetNewType API. + + + + + Is this a type used for instances Python types (and not for the types themselves)? + + + + + Gets the position for the parameter which we are overriding. + + + + + + + + + Defines an interface on the type that forwards all calls + to a helper method in UserType. The method names all will + have Helper appended to them to get the name for UserType. The + UserType version should take 1 extra parameter (self). + + + + + Overrides methods - this includes all accessible virtual methods as well as protected non-virtual members + including statics and non-statics. + + + + + Loads all the incoming arguments and forwards them to mi which + has the same signature and then returns the result + + + + + Emits code to check if the class has overridden this specific + function. For example: + + MyDerivedType.SomeVirtualFunction = ... + or + + class MyDerivedType(MyBaseType): + def SomeVirtualFunction(self, ...): + + + + + + Emit code to convert object to a given type. This code is semantically equivalent + to PythonBinder.EmitConvertFromObject, except this version accepts ILGen whereas + PythonBinder accepts Compiler. The Binder will chagne soon and the two will merge. + + + + + Emits code to check if the class has overridden this specific + function. For example: + + MyDerivedType.SomeVirtualFunction = ... + or + + class MyDerivedType(MyBaseType): + def SomeVirtualFunction(self, ...): + + + + + + Emits the call to lookup a member defined in the user's type. Returns + the local which stores the resulting value and leaves a value on the + stack indicating the success of the lookup. + + + + + Creates a method for doing a base method dispatch. This is used to support + super(type, obj) calls. + + + + + Generates stub to receive the CLR call and then call the dynamic language code. + This code is same as StubGenerator.cs in the Microsoft.Scripting, except it + accepts ILGen instead of Compiler. + + + + + Called from PythonTypeOps - the BuiltinFunction._function lock must be held. + + + + + Same as the DLR ReturnFixer, but accepts lower level constructs, + such as LocalBuilder, ParameterInfos and ILGen. + + + + + Creates a new PythonCompilerOptions with the default language features enabled. + + + + + Creates a new PythonCompilerOptions with the specified language features enabled. + + + + + Creates a new PythonCompilerOptions and enables or disables true division. + + This overload is obsolete, instead you should use the overload which takes a + ModuleOptions. + + + + + Gets or sets the initial indentation. This can be set to allow parsing + partial blocks of code that are already indented. + + For each element of the array there is an additional level of indentation. + Each integer value represents the number of spaces used for the indentation. + + If this value is null then no indentation level is specified. + + + + + Language features initialized on parser construction and possibly updated during parsing. + The code can set the language features (e.g. "from __future__ import division"). + + + + + Parse one or more lines of interactive input + + null if input is not yet valid but could be with more lines + + + + Given the interactive text input for a compound statement, calculate what the + indentation level of the next line should be + + + + + Peek if the next token is a 'yield' and parse a yield expression. Else return null. + + Called w/ yield already eaten. + + A yield expression if present, else null. + + + + Maybe eats a new line token returning true if the token was + eaten. + + Python always tokenizes to have only 1 new line character in a + row. But we also craete NLToken's and ignore them except for + error reporting purposes. This gives us the same errors as + CPython and also matches the behavior of the standard library + tokenize module. This function eats any present NL tokens and throws + them away. + + + + + Eats a new line token throwing if the next token isn't a new line. + + Python always tokenizes to have only 1 new line character in a + row. But we also craete NLToken's and ignore them except for + error reporting purposes. This gives us the same errors as + CPython and also matches the behavior of the standard library + tokenize module. This function eats any present NL tokens and throws + them away. + + + + + Summary description for Token. + + + + + IronPython tokenizer + + + + + Used to create tokenizer for hosting API. + + + + + Returns whether the + + + + + Resizes an array to a speficied new size and copies a portion of the original array into its beginning. + + + + + True if the last characters in the buffer are a backslash followed by a new line indicating + that their is an incompletement statement which needs further input to complete. + + + + + Equality comparer that can compare strings to our current token w/o creating a new string first. + + + + + Provides helpers for interacting with IronPython. + + + + + Creates a new ScriptRuntime with the IronPython scipting engine pre-configured. + + + + + + Creates a new ScriptRuntime with the IronPython scipting engine pre-configured and + additional options. + + + + + Creates a new ScriptRuntime and returns the ScriptEngine for IronPython. If + the ScriptRuntime is required it can be acquired from the Runtime property + on the engine. + + + + + Creates a new ScriptRuntime with the specified options and returns the + ScriptEngine for IronPython. If the ScriptRuntime is required it can be + acquired from the Runtime property on the engine. + + + + + Given a ScriptRuntime gets the ScriptEngine for IronPython. + + + + + Gets a ScriptScope which is the Python sys module for the provided ScriptRuntime. + + + + + Gets a ScriptScope which is the Python sys module for the provided ScriptEngine. + + + + + Gets a ScriptScope which is the Python __builtin__ module for the provided ScriptRuntime. + + + + + Gets a ScriptScope which is the Python __builtin__ module for the provided ScriptEngine. + + + + + Gets a ScriptScope which is the Python clr module for the provided ScriptRuntime. + + + + + Gets a ScriptScope which is the Python clr module for the provided ScriptEngine. + + + + + Imports the Python module by the given name and returns its ScriptSCope. If the + module does not exist an exception is raised. + + + + + Imports the Python module by the given name and returns its ScriptSCope. If the + module does not exist an exception is raised. + + + + + Imports the Python module by the given name and inserts it into the ScriptScope as that name. If the + module does not exist an exception is raised. + + + + + + + Sets sys.exec_prefix, sys.executable and sys.version and adds the prefix to sys.path + + + + + Sets sys.exec_prefix, sys.executable and sys.version and adds the prefix to sys.path + + + + + Enables call tracing for the current thread in this ScriptEngine. + + TracebackDelegate will be called back for each function entry, exit, exception, and line change. + + + + + Enables call tracing for the current thread for the Python engine in this ScriptRuntime. + + TracebackDelegate will be called back for each function entry, exit, exception, and line change. + + + + + Provides nested level debugging support when SetTrace or SetProfile are used. + + This saves the current tracing information and then calls the provided object. + + + + + Provides nested level debugging support when SetTrace or SetProfile are used. + + This saves the current tracing information and then calls the provided object. + + + + + Creates a ScriptRuntimeSetup object which includes the Python script engine with the specified options. + + The ScriptRuntimeSetup object can then be additional configured and used to create a ScriptRuntime. + + + + + Creates a LanguageSetup object which includes the Python script engine with the specified options. + + The LanguageSetup object can be used with other LanguageSetup objects from other languages to + configure a ScriptRuntimeSetup object. + + + + + Creates a new PythonModule with the specified name and published it in sys.modules. + + Returns the ScriptScope associated with the module. + + + + + Creates a new PythonModule with the specified name and filename published it + in sys.modules. + + Returns the ScriptScope associated with the module. + + + + + Creates a new PythonModule with the specified name, filename, and doc string and + published it in sys.modules. + + Returns the ScriptScope associated with the module. + + + + + Gets the list of loaded Python module files names which are available in the provided ScriptEngine. + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to couldn't find member {0}. + + + + + Looks up a localized string similar to default value must be specified here. + + + + + Looks up a localized string similar to duplicate argument '{0}' in function definition. + + + + + Looks up a localized string similar to duplicate keyword argument. + + + + + Looks up a localized string similar to <eof> while reading string. + + + + + Looks up a localized string similar to EOF while scanning triple-quoted string. + + + + + Looks up a localized string similar to EOL while scanning single-quoted string. + + + + + Looks up a localized string similar to expected an indented block. + + + + + Looks up a localized string similar to expected name. + + + + + Looks up a localized string similar to Expecting identifier:. + + + + + Looks up a localized string similar to inconsistent use of tabs and spaces in indentation. + + + + + Looks up a localized string similar to unindent does not match any outer indentation level. + + + + + Looks up a localized string similar to Invalid argument value.. + + + + + Looks up a localized string similar to MakeGenericType on non-generic type. + + + + + Looks up a localized string similar to Invalid parameter collection for the function.. + + + + + Looks up a localized string similar to invalid syntax. + + + + + Looks up a localized string similar to object ({0}) is not creatable w/ keyword arguments. + + + + + Looks up a localized string similar to keywords must come before * args. + + + + + Looks up a localized string similar to type does not have {0} field. + + + + + Looks up a localized string similar to from __future__ imports must occur at the beginning of the file. + + + + + Looks up a localized string similar to 'return' outside function. + + + + + Looks up a localized string similar to 'yield' outside function. + + + + + Looks up a localized string similar to NEWLINE in double-quoted string. + + + + + Looks up a localized string similar to NEWLINE in single-quoted string. + + + + + Looks up a localized string similar to future statement does not support import *. + + + + + Looks up a localized string similar to non-keyword arg after keyword arg. + + + + + Looks up a localized string similar to not a chance. + + + + + Looks up a localized string similar to The method or operation is not implemented.. + + + + + Looks up a localized string similar to only one ** allowed. + + + + + Looks up a localized string similar to only one * allowed. + + + + + Looks up a localized string similar to Context must be PythonCompilerContext. + + + + + Looks up a localized string similar to cannot delete slot. + + + + + Looks up a localized string similar to cannot get slot. + + + + + Looks up a localized string similar to cannot set slot. + + + + + Looks up a localized string similar to static property '{0}' of '{1}' can only be read through a type, not an instance. + + + + + Looks up a localized string similar to static property '{0}' of '{1}' can only be assigned to through a type, not an instance. + + + + + Looks up a localized string similar to no value for this token. + + + + + Looks up a localized string similar to too many versions. + + + + + Looks up a localized string similar to unexpected token '{0}'. + + + + + Looks up a localized string similar to future feature is not defined:. + + + + + The Action used for Python call sites. This supports both splatting of position and keyword arguments. + + When a foreign object is encountered the arguments are expanded into normal position/keyword arguments. + + + + + Python's Invoke is a non-standard action. Here we first try to bind through a Python + internal interface (IPythonInvokable) which supports CallSigantures. If that fails + and we have an IDO then we translate to the DLR protocol through a nested dynamic site - + this includes unsplatting any keyword / position arguments. Finally if it's just a plain + old .NET type we use the default binder which supports CallSignatures. + + + + + Fallback - performs the default binding operation if the object isn't recognized + as being invokable. + + + + + Creates a nested dynamic site which uses the unpacked arguments. + + + + + Translates our CallSignature into a DLR Argument list and gives the simple MetaObject's which are extracted + from the tuple or dictionary parameters being splatted. + + + + + Gets the CallSignature for this invocation which describes how the MetaObject array + is to be mapped. + + + + + General purpose storage used for most PythonDictionarys. + + This dictionary storage is thread safe for multiple readers or writers. + + Mutations to the dictionary involves a simple locking strategy of + locking on the DictionaryStorage object to ensure that only one + mutation happens at a time. + + Reads against the dictionary happen lock free. When the dictionary is mutated + it is either adding or removing buckets in a thread-safe manner so that the readers + will either see a consistent picture as if the read occured before or after the mutation. + + When resizing the dictionary the buckets are replaced atomically so that the reader + sees the new buckets or the old buckets. When reading the reader first reads + the buckets and then calls a static helper function to do the read from the bucket + array to ensure that readers are not seeing multiple bucket arrays. + + + + + Creates a new dictionary storage with no buckets + + + + + Creates a new dictionary storage with no buckets + + + + + Creates a new dictionary geting values/keys from the + items arary + + + + + Creates a new dictionary storage with the given set of buckets + and size. Used when cloning the dictionary storage. + + + + + Adds a new item to the dictionary, replacing an existing one if it already exists. + + + + + Initializes the buckets to their initial capacity, the caller + must check if the buckets are empty first. + + + + + Add helper that works over a single set of buckets. Used for + both the normal add case as well as the resize case. + + + + + Add helper which adds the given key/value (where the key is not null) with + a pre-computed hash code. + + + + + Removes an entry from the dictionary and returns true if the + entry was removed or false. + + + + + Removes an entry from the dictionary and returns true if the + entry was removed or false. The key will always be hashed + so if it is unhashable an exception will be thrown - even + if the dictionary has no buckets. + + + + + Checks to see if the key exists in the dictionary. + + + + + Trys to get the value associated with the given key and returns true + if it's found or false if it's not present. + + + + + Static helper to try and get the value from the dictionary. + + Used so the value lookup can run against a buckets while a writer + replaces the buckets. + + + + + Clears the contents of the dictionary. + + + + + Clones the storage returning a new DictionaryStorage object. + + + + + Helper to hash the given key w/ support for null. + + + + + Returns the number of key/value pairs currently in the dictionary. + + + + + Used to store a single hashed key/value. + + Bucket is not serializable because it stores the computed hash + code which could change between serialization and deserialization. + + + + + The error involved an incomplete statement due to an unexpected EOF. + + + + + The error involved an incomplete token. + + + + + The mask for the actual error values + + + + + The error was a general syntax error + + + + + The error was an indentation error. + + + + + The error was a tab error. + + + + + syntax error shouldn't include a caret (no column offset should be included) + + + + + GeneratorExitException is a standard exception raised by Generator.Close() to allow a caller + to close out a generator. + + GeneratorExit is introduced in Pep342 for Python2.5. + + + + .NET exception thrown when a Python syntax error is related to incorrect indentation. + + + + + Implementation of the Python exceptions module and the IronPython/CLR exception mapping + mechanism. The exception module is the parent module for all Python exception classes + and therefore is built-in to IronPython.dll instead of IronPython.Modules.dll. + + The exception mapping mechanism is exposed as internal surface area available to only + IronPython / IronPython.Modules.dll. The actual exceptions themselves are all public. + + Because the oddity of the built-in exception types all sharing the same physical layout + (see also PythonExceptions.BaseException) some classes are defined as classes w/ their + proper name and some classes are defined as PythonType fields. When a class is defined + for convenience their's also an _TypeName version which is the PythonType. + + + + + Creates a new throwable exception of type type where the type is an new-style exception. + + Used at runtime when creating the exception from a user provided type via the raise statement. + + + + + Creates a throwable exception of type type where the type is an OldClass. + + Used at runtime when creating the exception form a user provided type that's an old class (via the raise statement). + + + + + Returns the CLR exception associated with a Python exception + creating a new exception if necessary + + + + + Given a CLR exception returns the Python exception which most closely maps to the CLR exception. + + + + + Creates a new style Python exception from the .NET exception + + + + + Internal helper to associate a .NET exception and a Python exception. + + + + + Internal helper to get the associated Python exception from a .NET exception. + + + + + Converts the DLR SyntaxErrorException into a Python new-style SyntaxError instance. + + + + + Creates a PythonType for a built-in module. These types are mutable like + normal user types. + + + + + Creates a PythonType for a built-in module. These types are mutable like + normal user types. + + + + + Creates a PythonType for a built-in module, where the type may inherit + from multiple bases. These types are mutable like normal user types. + + + + + Creates a new type for a built-in exception which derives from another Python + type. . These types are built-in and immutable like any other normal type. For + example StandardError.x = 3 is illegal. This isn't for module exceptions which + are like user defined types. thread.error.x = 3 is legal. + + + + + Creates a new type for a built-in exception which is the root concrete type. + + + + + Gets the list of DynamicStackFrames for the current exception. + + + + + Base class for all Python exception objects. + + When users throw exceptions they typically throw an exception which is + a subtype of this. A mapping is maintained between Python exceptions + and .NET exceptions and a corresponding .NET exception is thrown which + is associated with the Python exception. This class represents the + base class for the Python exception hierarchy. + + Users can catch exceptions rooted in either hierarchy. The hierarchy + determines whether the user catches the .NET exception object or the + Python exception object. + + Most built-in Python exception classes are actually instances of the BaseException + class here. This is important because in CPython the exceptions do not + add new members and therefore their layouts are compatible for multiple + inheritance. The exceptions to this rule are the classes which define + their own fields within their type, therefore altering their layout: + EnvironmentError + SyntaxError + IndentationError (same layout as SyntaxError) + TabError (same layout as SyntaxError) + SystemExit + UnicodeDecodeError + UnicodeEncodeError + UnicodeTranslateError + + These exceptions cannot be combined in multiple inheritance, e.g.: + class foo(EnvironmentError, IndentationError): pass + + fails but they can be combined with anything which is just a BaseException: + class foo(UnicodeDecodeError, SystemError): pass + + Therefore the majority of the classes are just BaseException instances with a + custom PythonType object. The specialized ones have their own .NET class + which inherits from BaseException. User defined exceptions likewise inherit + from this and have their own .NET class. + + + + + This interface is used for implementing parts of the IronPython type system. It + is not intended for consumption from user programs. + + + + + Thread-safe dictionary set. Returns the dictionary set or the previous value if already set or + null if the dictionary set isn't supported. + + + + + + + Dictionary replacement. Returns true if replaced, false if the dictionary set isn't supported. + + + + + + + Initializes the Exception object with an unlimited number of arguments + + + + + Returns a tuple of (type, (arg0, ..., argN)) for implementing pickling/copying + + + + + Returns a tuple of (type, (arg0, ..., argN)) for implementing pickling/copying + + + + + Updates the exception's state (dictionary) with the new values + + + + + Provides custom member lookup access that fallbacks to the dictionary + + + + + Provides custom member assignment which stores values in the dictionary + + + + + Provides custom member deletion which deletes values from the dictionary + or allows clearing 'message'. + + + + + Implements __repr__ which returns the type name + the args + tuple code formatted. + + + + + Initializes the Python exception from a .NET exception + + + + + + Helper to get the CLR exception associated w/ this Python exception + creating it if one has not already been created. + + + + + Returns the exception 'message' if only a single argument was provided + during creation or an empty string. + + + + + Gets or sets the arguments used for creating the exception + + + + + Gets the nth member of the args property + + + + + Gets or sets the dictionary which is used for storing members not declared to have space reserved + within the exception object. + + + + + Gets the CLR exception associated w/ this Python exception. Not visible + until a .NET namespace is imported. + + + + + .NET exception that is thrown to signal the end of iteration in Python + + + + + .NET exception that is thrown to shutdown the interpretter and exit the system. + + + + + Result of sys.exit(n) + + + null if the script exited using "sys.exit(int_value)" + null if the script exited using "sys.exit(None)" + x if the script exited using "sys.exit(x)" where isinstance(x, int) == False + + + int_value if the script exited using "sys.exit(int_value)" + 1 otherwise + + + + + .NET Exception thrown when a Python syntax error is related to incorrect tabs. + + + + + Represents a sequence which may have been provided as a set of parameters to an indexer. + + TODO: This should be removed, and all uses of this should go to [SpecialName]object GetItem(..., params object[] keys) + and [SpecialName]void SetItem(..., params object [] keys) or this[params object[]xyz] which is also legal. + + currently this exists for backwards compatibility w/ IronPython's "expandable tuples". + + + + + Provides a MetaObject for instances of Python's old-style classes. + + TODO: Lots of CodeConetxt references, need to move CodeContext onto OldClass and pull it from there. + + + + + Performs the actual work of binding to the function. + + Overall this works by going through the arguments and attempting to bind all the outstanding known + arguments - position arguments and named arguments which map to parameters are easy and handled + in the 1st pass for GetArgumentsForRule. We also pick up any extra named or position arguments which + will need to be passed off to a kw argument or a params array. + + After all the normal args have been assigned to do a 2nd pass in FinishArguments. Here we assign + a value to either a value from the params list, kw-dict, or defaults. If there is ambiguity between + this (e.g. we have a splatted params list, kw-dict, and defaults) we call a helper which extracts them + in the proper order (first try the list, then the dict, then the defaults). + + + + + Makes the test for our rule. + + + + + Makes the test when we just have simple positional arguments. + + + + + Makes the test when we have a keyword argument call or splatting. + + + + + + Gets the array of expressions which correspond to each argument for the function. These + correspond with the function as it's defined in Python and must be transformed for our + delegate type before being used. + + + + + Binds any missing arguments to values from params array, kw dictionary, or default values. + + + + + Creates the argument for the list expansion parameter. + + + + + Adds extra positional arguments to the start of the expanded list. + + + + + Creates the argument for the dictionary expansion parameter. + + + + + Adds an unbound keyword argument into the dictionary. + + + + + + Adds a check to the last parameter (so it's evaluated after we've extracted + all the parameters) to ensure that we don't have any extra params or kw-params + when we don't have a params array or params dict to expand them into. + + + + + Helper function to validate that a named arg isn't duplicated with by + a params list or the dictionary (or both). + + + + + Helper function to get a value (which has no default) from either the + params list or the dictionary (or both). + + + + + Helper function to get the specified variable from the dictionary. + + + + + Helper function to extract the variable from defaults, or to call a helper + to check params / kw-dict / defaults to see which one contains the actual value. + + + + + Helper function to extract from the params list or dictionary depending upon + which one has an available value. + + + + + Helper function to extract the next argument from the params list. + + + + + Fixes up the argument list for the appropriate target delegate type. + + + + + Helper function to get the function argument strongly typed. + + + + + Called when the user is expanding a dictionary - we copy the user + dictionary and verify that it contains only valid string names. + + + + + Called when the user is expanding a params argument + + + + + Called when the user hasn't supplied a dictionary to be expanded but the + function takes a dictionary to be expanded. + + + + + Helper function to create the expression for creating the actual tuple passed through. + + + + + Creates the code to invoke the target delegate function w/ the specified arguments. + + + + + Appends the initialization code for the call to the function if any exists. + + + + + Creating a standard .NET type is easy - we just call it's constructor with the provided + arguments. + + + + + Creating a Python type involves calling __new__ and __init__. We resolve them + and generate calls to either the builtin funcions directly or embed sites which + call the slots at runtime. + + + + + Checks if we have a default new and init - in this case if we have any + arguments we don't allow the call. + + + + + Creates a test which tests the specific version of the type. + + + + + Base class for performing member binding. Derived classes override Add methods + to produce the actual final result based upon what the GetBinderHelper resolves. + + + + + + Provides the normal meta binder binding. + + + + + Provides delegate based fast binding. + + + + + The result type of the operation. + + + + + Looks up __init__ avoiding calls to __getattribute__ and handling both + new-style and old-style classes in the MRO. + + + + + Gets a builtin function for the given declaring type and member infos. + + Given the same inputs this always returns the same object ensuring there's only 1 builtinfunction + for each .NET method. + + This method takes both a cacheName and a pythonName. The cache name is the real method name. The pythonName + is the name of the method as exposed to Python. + + + + + Checks to see if the provided members are always visible for the given type. + + This filters out methods such as GetHashCode and Equals on standard .NET + types that we expose directly as Python types (e.g. object, string, etc...). + + It also filters out the base helper overrides that are added for supporting + super calls on user defined types. + + + + + a function is static if it's a static .NET method and it's defined on the type or is an extension method + with StaticExtensionMethod decoration. + + + + + If we have only interfaces, we'll need to insert object's base + + + + + Simple implementation of ASCII encoding/decoding. The default instance (PythonAsciiEncoding.Instance) is + setup to always convert even values outside of the ASCII range. The EncoderFallback/DecoderFallbacks can + be replaced with versions that will throw exceptions instead though. + + + + + Specialized version because enumerating tuples by Python's definition + doesn't call __getitem__, but filter does! + + + + + Opens a file and returns a new file object. + + name -> the name of the file to open. + mode -> the mode to open the file (r for reading, w for writing, a for appending, default is r). + bufsize -> the size of the buffer to be used (<= 0 indicates to use the default size) + + + + + Creates a new Python file object from a .NET stream object. + + stream -> the stream to wrap in a file object. + + + + + object overload of range - attempts to convert via __int__, and __trunc__ if arg is + an OldInstance + + + + + object overload of range - attempts to convert via __int__, and __trunc__ if arg is + an OldInstance + + + + + Gets the appropriate LanguageContext to be used for code compiled with Python's compile, eval, execfile, etc... + + + + Returns true if we should inherit our callers context (true division, etc...), false otherwise + + + Returns the default compiler flags or the flags the user specified. + + + + Gets a scope used for executing new code in optionally replacing the globals and locals dictionaries. + + + + + Set if the function includes a *args argument list. + + + + + Set if the function includes a **kwargs argument dictionary. + + + + + Set if the function is a generator. + + + + + Set if the function was compiled with future division. + + + + + IronPython specific: Set if the function includes nested exception handling and therefore can alter + sys.exc_info(). + + + + + IronPython specific: Set if the function includes a try/finally block. + + + + + Represents a piece of code. This can reference either a CompiledCode + object or a Function. The user can explicitly call FunctionCode by + passing it into exec or eval. + + + + + This is both the lock that is held while enumerating the threads or updating the thread accounting + information. It's also a marker CodeList which is put in place when we are enumerating the thread + list and all additions need to block. + + This lock is also acquired whenever we need to calculate how a function's delegate should be created + so that we don't race against sys.settrace/sys.setprofile. + + + + + Constructor used to create a FunctionCode for code that's been serialized to disk. + + Code constructed this way cannot be interpreted or debugged using sys.settrace/sys.setprofile. + + Function codes created this way do support recursion enforcement and are therefore registered in the global function code registry. + + + + + Constructor to create a FunctionCode at runtime. + + Code constructed this way supports both being interpreted and debugged. When necessary the code will + be re-compiled or re-interpreted for that specific purpose. + + Function codes created this way do support recursion enforcement and are therefore registered in the global function code registry. + + the initial delegate provided here should NOT be the actual code. It should always be a delegate which updates our Target lazily. + + + + + Registers the current function code in our global weak list of all function codes. + + The weak list can be enumerated with GetAllCode(). + + Ultimately there are 3 types of threads we care about races with: + 1. Other threads which are registering function codes + 2. Threads calling sys.settrace which require the world to stop and get updated + 3. Threads running cleanup (thread pool thread, or call to gc.collect). + + The 1st two must have perfect synchronization. We cannot have a thread registering + a new function which another thread is trying to update all of the functions in the world. Doing + so would mean we could miss adding tracing to a thread. + + But the cleanup thread can run in parallel to either registrying or sys.settrace. The only + thing it needs to take a lock for is updating our accounting information about the + number of code objects are alive. + + + + + Enumerates all function codes for updating the current type of targets we generate. + + While enumerating we hold a lock so that users cannot change sys.settrace/sys.setprofile + until the lock is released. + + + + + Creates a FunctionCode object for exec/eval/execfile'd/compile'd code. + + The code is then executed in a specific CodeContext by calling the .Call method. + + If the code is being used for compile (vs. exec/eval/execfile) then it needs to be + registered incase our tracing mode changes. + + + + + Called the 1st time a function is invoked by our OriginalCallTarget* methods + over in PythonCallTargets. This computes the real delegate which needs to be + created for the function. Usually this means starting off interpretering. It + also involves adding the wrapper function for recursion enforcement. + + Because this can race against sys.settrace/setprofile we need to take our + _ThreadIsEnumeratingAndAccountingLock to ensure no one is actively changing all + of the live functions. + + + + + Updates the delegate based upon current Python context settings for recursion enforcement + and for tracing. + + + + + Called to set the initial target delegate when the user has passed -X:Debug to enable + .NET style debugging. + + + + + Gets the LambdaExpression for tracing. + + If this is a generator function code then the lambda gets tranformed into the correct generator code. + + + + + Gets the correct final LambdaExpression for this piece of code. + + This is either just _lambda or _lambda re-written to be a generator expression. + + + + + Returns a list of variable names which are accessed from nested functions. + + + + + Returns the byte code. IronPython does not implement this and always + returns an empty string for byte code. + + + + + Returns a list of constants used by the function. + + The first constant is the doc string, or None if no doc string is provided. + + IronPython currently does not include any other constants than the doc string. + + + + + Returns the filename that the code object was defined in. + + + + + Returns the 1st line number of the code object. + + + + + Returns a set of flags for the function. + + 0x04 is set if the function used *args + 0x08 is set if the function used **args + 0x20 is set if the function is a generator + + + + + Returns a list of free variables (variables accessed + from an outer scope). This does not include variables + accessed in the global scope. + + + + + Returns a mapping between byte code and line numbers. IronPython does + not implement this because byte code is not available. + + + + + Returns the name of the code (function name, class name, or <module>). + + + + + Returns a list of global variable names accessed by the code. + + + + + Returns the number of local varaibles defined in the function. + + + + + Returns the stack size. IronPython does not implement this + because byte code is not supported. + + + + + Extremely light weight linked list of weak references used for tracking + all of the FunctionCode objects which get created and need to be updated + for purposes of recursion enforcement or tracing. + + + + + General conversion routine TryConvert - tries to convert the object to the desired type. + Try to avoid using this method, the goal is to ultimately remove it! + + + + + This function tries to convert an object to IEnumerator, or wraps it into an adapter + Do not use this function directly. It is only meant to be used by Ops.GetEnumerator. + + + + + This function tries to convert an object to IEnumerator, or wraps it into an adapter + Do not use this function directly. It is only meant to be used by Ops.GetEnumerator. + + + + + Attempts to convert value into a index usable for slicing and return the integer + value. If the conversion fails false is returned. + + If throwOverflowError is true then BigInteger's outside the normal range of integers will + result in an OverflowError. + + + + + Attempts to convert value into a index usable for slicing and return the integer + value. If the conversion fails false is returned. + + If throwOverflowError is true then BigInteger's outside the normal range of integers will + result in an OverflowError. + + + + + Converts a value to int ignoring floats + + + + + Note: + IEnumerator innerEnum = Dictionary<K,V>.KeysCollections.GetEnumerator(); + innerEnum.MoveNext() will throw InvalidOperation even if the values get changed, + which is supported in python + + + + + Note: + IEnumerator innerEnum = Dictionary<K,V>.KeysCollections.GetEnumerator(); + innerEnum.MoveNext() will throw InvalidOperation even if the values get changed, + which is supported in python + + + + + Note: + IEnumerator innerEnum = Dictionary<K,V>.KeysCollections.GetEnumerator(); + innerEnum.MoveNext() will throw InvalidOperation even if the values get changed, + which is supported in python + + + + + Provides both helpers for implementing Python dictionaries as well + as providing public methods that should be exposed on all dictionary types. + + Currently these are published on IDictionary<object, object> + + + + + Creates a DLR OverloadDoc object which describes information about this overload. + + The method to document + The name of the method if it should override the name in the MethodBase + Parameters to skip at the end - used for removing the value on a setter method + true to include self on instance methods + + + + True iff the thread is currently inside the generator (ie, invoking the _next delegate). + This can be used to enforce that a generator does not call back into itself. + Pep255 says that a generator should throw a ValueError if called reentrantly. + + + + + We cache the GeneratorFinalizer of generators that were closed on the user + thread, and did not get finalized on the finalizer thread. We can then reuse + the object. Reusing objects with a finalizer is good because it reduces + the load on the GC's finalizer queue. + + + + + Fields set by Throw() to communicate an exception to the yield point. + These are plumbed through the generator to become parameters to Raise(...) invoked + at the yield suspension point in the generator. + + + + + Value sent by generator.send(). + Since send() could send an exception, we need to keep this different from throwable's value. + + + + + See PEP 342 (http://python.org/dev/peps/pep-0342/) for details of new methods on Generator. + Full signature including default params for throw is: + throw(type, value=None, traceback=None) + Use multiple overloads to resolve the default parameters. + + + + + Throw(...) is like Raise(...) being called from the yield point within the generator. + Note it must come from inside the generator so that the traceback matches, and so that it can + properly cooperate with any try/catch/finallys inside the generator body. + + If the generator catches the exception and yields another value, that is the return value of g.throw(). + + + + + send() was added in Pep342. It sends a result back into the generator, and the expression becomes + the result of yield when used as an expression. + + + + + Close introduced in Pep 342. + + + + + Core implementation of IEnumerator.MoveNext() + + + + + Core implementation of Python's next() method. + + + + + Helper called from PythonOps after the yield statement + Keepin this in a helper method: + - reduces generated code size + - allows better coupling with PythonGenerator.Throw() + - avoids throws from emitted code (which can be harder to debug). + + + + + + Called to throw an exception set by Throw(). + + + + + Gets the name of the function that produced this generator object. + + + + + True if the generator has finished (is "closed"), else false. + Python language spec mandates that calling Next on a closed generator gracefully throws a StopIterationException. + This can never be reset. + + + + + True if the generator can set sys exc info and therefore needs exception save/restore. + + + + + Importer class - used for importing modules. Used by Ops and __builtin__ + Singleton living on Python engine. + + + + + Gateway into importing ... called from Ops. Performs the initial import of + a module and returns the module. + + + + + Gateway into importing ... called from Ops. Performs the initial import of + a module and returns the module. This version returns light exceptions instead of throwing. + + + + + Gateway into importing ... called from Ops. This is called after + importing the module and is used to return individual items from + the module. The outer modules dictionary is then updated with the + result. + + + + + Called by the __builtin__.__import__ functions (general importing) and ScriptEngine (for site.py) + + level indiciates whether to perform absolute or relative imports. + -1 indicates both should be performed + 0 indicates only absolute imports should be performed + Positive numbers indicate the # of parent directories to search relative to the calling module + + + + + Interrogates the importing module for __name__ and __path__, which determine + whether the imported module (whose name is 'name') is being imported as nested + module (__path__ is present) or as sibling. + + For sibling import, the full name of the imported module is parent.sibling + For nested import, the full name of the imported module is parent.module.nested + where parent.module is the mod.__name__ + + + the globals dictionary + Name of the module to be imported + Output - full name of the module being imported + Path to use to search for "full" + the import level for relaive imports + the parent module + the global __package__ value + + + + + Given the parent module name looks up the __path__ property. + + + + + Trys to get an existing module and if that fails fall backs to searching + + + + + Attempts to load a module from sys.meta_path as defined in PEP 302. + + The meta_path provides a list of importer objects which can be used to load modules before + searching sys.path but after searching built-in modules. + + + + + Given a user defined importer object as defined in PEP 302 tries to load a module. + + First the find_module(fullName, path) is invoked to get a loader, then load_module(fullName) is invoked + + + + + Finds a user defined importer for the given path or returns null if no importer + handles this path. + + + + + Creates a new list with the data in the array and a size + the same as the length of the array. The array is held + onto and may be mutated in the future by the list. + + params array to use for lists storage + + + + Gets a reasonable size for the addition of two arrays. We round + to a power of two so that we usually have some extra space if + the resulting array gets added to. + + + + + Non-thread safe adder, should only be used by internal callers that + haven't yet exposed their list. + + + + + Compares the two specified keys + + + + + Supports __index__ on arbitrary types, also prevents __float__ + + + + + we need to lock both objects (or copy all of one's data w/ it's lock held, and + then compare, which is bad). Therefore we have a strong order for locking on + the two objects based upon the hash code or object identity in case of a collision + + + + + Summary description for ConstantValue. + + + + + Multiply two object[] arrays - slow version, we need to get the type, etc... + + + + + Multiply two object[] arrays - internal version used for objects backed by arrays + + + + + Add two arrays - internal versions for objects backed by arrays + + + + + + + + + + We override the behavior of equals, compare and hashcode to make + chars seem as much like strings as possible. In Python there is no + difference between these types. + + + + + Returns the digits for the format spec, no sign is included. + + + + + InstanceOps contains methods that get added to CLS types depending on what + methods and constructors they define. These have not been added directly to + PythonType since they need to be added conditionally. + + Possibilities include: + + __new__, one of 3 __new__ sets can be added: + DefaultNew - This is the __new__ used for a PythonType (list, dict, object, etc...) that + has only 1 default public constructor that takes no parameters. These types are + mutable types, and __new__ returns a new instance of the type, and __init__ can be used + to re-initialize the types. This __new__ allows an unlimited number of arguments to + be passed if a non-default __init__ is also defined. + + NonDefaultNew - This is used when a type has more than one constructor, or only has one + that takes more than zero parameters. This __new__ does not allow an arbitrary # of + extra arguments. + + DefaultNewCls - This is the default new used for CLS types that have only a single ctor + w/ an arbitray number of arguments. This constructor allows setting of properties + based upon an extra set of kw-args, e.g.: System.Windows.Forms.Button(Text='abc'). It + is only used on non-Python types. + + __init__: + For types that do not define __init__ we have an __init__ function that takes an + unlimited number of arguments and does nothing. All types share the same reference + to 1 instance of this. + + next: Defined when a type is an enumerator to expose the Python iter protocol. + + + repr: Added for types that override ToString + + get: added for types that implement IDescriptor + + + + + __dir__(self) -> Returns the list of members defined on a foreign IDynamicMetaObjectProvider. + + + + + Provides the implementation of __enter__ for objects which implement IDisposable. + + + + + Provides the implementation of __exit__ for objects which implement IDisposable. + + + + + Determines if a type member can be imported. This is used to treat static types like modules. + + + + + Implements __contains__ for types implementing IEnumerable of T. + + + + + Implements __contains__ for types implementing IEnumerable + + + + + Implements __contains__ for types implementing IEnumerable of T. + + + + + Implements __contains__ for types implementing IEnumerable + + + + + Contains Python extension methods that are added to object + + + + Types for which the pickle module has built-in support (from PEP 307 case 2) + + + + __class__, a custom slot so that it works for both objects and types. + + + + + Removes an attribute from the provided member + + + + + Returns the hash code of the given object + + + + + Gets the specified attribute from the object without running any custom lookup behavior + (__getattr__ and __getattribute__) + + + + + Initializes the object. The base class does nothing. + + + + + Initializes the object. The base class does nothing. + + + + + Initializes the object. The base class does nothing. + + + + + Creates a new instance of the type + + + + + Creates a new instance of the type + + + + + Creates a new instance of the type + + + + + Runs the pickle protocol + + + + + Runs the pickle protocol + + + + + Runs the pickle protocol + + + + + Returns the code representation of the object. The default implementation returns + a string which consists of the type and a unique numerical identifier. + + + + + Sets an attribute on the object without running any custom object defined behavior. + + + + + Returns the number of bytes of memory required to allocate the object. + + + + + Returns a friendly string representation of the object. + + + + + Return a dict that maps slot names to slot values, but only include slots that have been assigned to. + Looks up slots in base types as well as the current type. + + Sort-of Python equivalent (doesn't look up base slots, while the real code does): + return dict([(slot, getattr(self, slot)) for slot in type(self).__slots__ if hasattr(self, slot)]) + + Return null if the object has no __slots__, or empty dict if it has __slots__ but none are initialized. + + + + + Implements the default __reduce_ex__ method as specified by PEP 307 case 2 (new-style instance, protocol 0 or 1) + + + + + Returns the closest base class (in terms of MRO) that isn't defined in Python code + + + + + Implements the default __reduce_ex__ method as specified by PEP 307 case 3 (new-style instance, protocol 2) + + + + + Contains functions that are called directly from + generated code to perform low-level runtime functionality. + + + + + Creates a new dictionary extracting the keys and values from the + provided data array. Keys/values are adjacent in the array with + the value coming first. + + + + + Creates a new dictionary extracting the keys and values from the + provided data array. Keys/values are adjacent in the array with + the value coming first. + + + + + Wraps up all the semantics of multiplying sequences so that all of our sequences + don't duplicate the same logic. When multiplying sequences we need to deal with + only multiplying by valid sequence types (ints, not floats), support coercion + to integers if the type supports it, not multiplying by None, and getting the + right semantics for multiplying by negative numbers and 1 (w/ and w/o subclasses). + + This function assumes that it is only called for case where count is not implicitly + coercible to int so that check is skipped. + + + + + Supports calling of functions that require an explicit 'this' + Currently, we check if the function object implements the interface + that supports calling with 'this'. If not, the 'this' object is dropped + and a normal call is made. + + + + + Called from generated code emitted by NewTypeMaker. + + + + + Handles the descriptor protocol for user-defined objects that may implement __get__ + + + + + Handles the descriptor protocol for user-defined objects that may implement __set__ + + + + + Handles the descriptor protocol for user-defined objects that may implement __delete__ + + + + + Python runtime helper for raising assertions. Used by AssertStatement. + + Object representing the assertion message + + + + Python runtime helper to create instance of Python List object. + + New instance of List + + + + Python runtime helper to create a populated instance of Python List object. + + + + + Python runtime helper to create a populated instance of Python List object w/o + copying the array contents. + + + + + Python runtime helper to create a populated instance of Python List object. + + List is populated by arbitrary user defined object. + + + + + Python runtime helper to create an instance of Python List object. + + List has the initial provided capacity. + + + + + Python runtime helper to create an instance of Tuple + + + + + + + Python runtime helper to create an instance of Tuple + + + + + + Python Runtime Helper for enumerator unpacking (tuple assignments, ...) + Creates enumerator from the input parameter e, and then extracts + expected number of values, returning them as array + + If the input is a Python tuple returns the tuples underlying data array. Callers + should not mutate the resulting tuple. + + The code context of the AST getting enumerator values. + object to enumerate + expected number of objects to extract from the enumerator + + array of objects (.Lengh == expected) if exactly expected objects are in the enumerator. + Otherwise throws exception + + + + + Python runtime helper to create instance of Slice object + + Start of the slice. + End of the slice. + Step of the slice. + Slice + + + + Prints newline into default standard output + + + + + Prints newline into specified destination. Sets softspace property to false. + + + + + Prints value into default standard output with Python comma semantics. + + + + + Prints value into specified destination with Python comma semantics. + + + + + Called from generated code when we are supposed to print an expression value + + + + + Called from generated code for: + + import spam.eggs + + + + + Python helper method called from generated code for: + + import spam.eggs as ham + + + + + Called from generated code for: + + from spam import eggs1, eggs2 + + + + + Imports one element from the module in the context of: + + from module import a, b, c, d + + Called repeatedly for all elements being imported (a, b, c, d above) + + + + + Called from generated code for: + + from spam import * + + + + + Unqualified exec statement support. + A Python helper which will be called for the statement: + + exec code + + + + + Qualified exec statement support, + Python helper which will be called for the statement: + + exec code in globals [, locals ] + + + + + Called from generated code at the start of a catch block. + + + + + Get an exception tuple for the "current" exception. This is used for sys.exc_info() + + + + + Get an exception tuple for a given exception. This is like the inverse of MakeException. + + the code context + the exception to create a tuple for. + a tuple of (type, value, traceback) + This is called directly by the With statement so that it can get an exception tuple + in its own private except handler without disturbing the thread-wide sys.exc_info(). + + + + helper function for re-raised exceptions. + + + + + helper function for non-re-raise exceptions. + + type is the type of exception to throw or an instance. If it + is an instance then value should be null. + + If type is a type then value can either be an instance of type, + a Tuple, or a single value. This case is handled by EC.CreateThrowable. + + + + + Extracts an argument from either the dictionary or params + + + + + Creates a new array the values set to Uninitialized.Instance. The array + is large enough to hold for all of the slots allocated for the type and + its sub types. + + + + + Helper to determine if the value is a simple numeric type (int or big int or bool) - used for OldInstance + deprecated form of slicing. + + + + + Helper to determine if the type is a simple numeric type (int or big int or bool) - used for OldInstance + deprecated form of slicing. + + + + + Helper to determine if the type is a simple numeric type (int or big int or bool) but not a subclass + + + + + For slicing. Fixes up a BigInteger and returns an integer w/ the length of the + object added if the value is negative. + + + + + For slicing. Gets the length of the object, used to only get the length once. + + + + + Helper method for DynamicSite rules that check the version of their dynamic object + TODO - Remove this method for more direct field accesses + + + + + + + + Called from generated code. Gets a builtin function and the BuiltinFunctionData associated + with the object. Tests to see if the function is bound and has the same data for the generated + rule. + + + + + Convert object to a given type. This code is equivalent to NewTypeMaker.EmitConvertFromObject + except that it happens at runtime instead of compile time. + + + + + Provides access to AppDomain.DefineDynamicAssembly which cannot be called from a DynamicMethod + + + + + Generates a new delegate type. The last type in the array is the return type. + + + + + Generates a new delegate type. The last type in the array is the return type. + + + + + Called from generated code, helper to remove a name + + + + + Called from generated code, helper to do name lookup + + + + + Called from generated code, helper to do name assignment + + + + + Returns an IntPtr in the proper way to CPython - an int or a Python long + + + + + Create at TypeError exception for when Raise() can't create the exception requested. + + original type of exception requested + a TypeEror exception + + + + Gets a list of DynamicStackFrames for the given exception. These stack frames + can be programmatically inspected to understand the frames the exception crossed + through including Python frames. + + Dynamic stack frames are not preserved when an exception crosses an app domain + boundary. + + + + + Helper clas for calls to unicode(...). We generate code which checks if unicode + is str and if it is we redirect those calls to the unicode function defined on this + class. + + + + + ExtensibleString is the base class that is used for types the user defines + that derive from string. It carries along with it the string's value and + our converter recognizes it as a string. + + + + + StringOps is the static class that contains the methods defined on strings, i.e. 'abc' + + Here we define all of the methods that a Python user would see when doing dir('abc'). + If the user is running in a CLS aware context they will also see all of the methods + defined in the CLS System.String type. + + + + + Returns a copy of this string converted to uppercase + + + + + return true if self is a titlecased string and there is at least one + character in self; also, uppercase characters may only follow uncased + characters (e.g. whitespace) and lowercase characters only cased ones. + return false otherwise. + + + + + Return a string which is the concatenation of the strings + in the sequence seq. The separator between elements is the + string providing this method + + + + + Replaces each replacement field in the string with the provided arguments. + + replacement_field = "{" field_name ["!" conversion] [":" format_spec] "}" + field_name = (identifier | integer) ("." identifier | "[" element_index "]")* + + format_spec: [[fill]align][sign][#][0][width][,][.precision][type] + + Conversion can be 'r' for repr or 's' for string. + + + + + Replaces each replacement field in the string with the provided arguments. + + replacement_field = "{" field_name ["!" conversion] [":" format_spec] "}" + field_name = (identifier | integer) ("." identifier | "[" element_index "]")* + + format_spec: [[fill]align][sign][#][0][width][.precision][type] + + Conversion can be 'r' for repr or 's' for string. + + + + + Gets the starting offset checking to see if the incoming bytes already include a preamble. + + + + + Indexer for generic parameter resolution. We bind to one of the generic versions + available in this type collision. A user can also do someType[()] to force to + bind to the non-generic version, but we will always present the non-generic version + when no bindings are available. + + + + + Object.ToString() displays the CLI type name. But we want to display the class name (e.g. + '<foo object at 0x000000000000002C>' unless we've overridden __repr__ but not __str__ in + which case we'll display the result of __repr__. + + + + + Provides a debug view for user defined types. This class is declared as public + because it is referred to from generated code. You should not use this class. + + + + + A DynamicMetaObject which is just used to support custom conversions to COM. + + + + + A marker interface so we can recognize and access sequence members on our array objects. + + + + + List of unary operators which we have sites for to enable fast dispatch that + doesn't collide with other operators. + + + + + Sets the mode to text or binary. Returns true if previously set to text, false if previously set to binary. + + + + + Truncates the file to the current length as indicated by tell(). + + + + + Truncates the file to the specified length. + + + + + + Provides storage of IronPython specific data in the DLR Scope ScopeExtension. + + This enables IronPython to track code compilation flags such as from __future__ + flags and import clr flags across multiple executions of user-provided scopes. + + + + + Provides human readable names for how Python maps the various DLR NarrowingLevel's. + + + + + No narrowing conversions are performed + + + + + Double/Single to Decimal + PythonTuple to Array + Generic conversions + BigInteger to Int64 + + + + + Numeric conversions excluding from floating point values + Boolean conversions + Delegate conversions + Enumeration conversions + + + + + Enables Python protocol conversions (__int__, etc...) + + + + + Provides dictionary based storage which is backed by a Scope object. + + + + + Mutable set class + + + + + Appends an IEnumerable to an existing set + + + + + Immutable set class + + + + + Iterator over sets + + + + + Gets the indices for the deprecated __getslice__, __setslice__, __delslice__ functions + + This form is deprecated in favor of using __getitem__ w/ a slice object as an index. This + form also has subtly different mechanisms for fixing the slice index before calling the function. + + If an index is negative and __len__ is not defined on the object than an AttributeError + is raised. + + + + + StringFormatter provides Python's % style string formatting services. + + + + + Read a possible mapping key for %(key)s. + + The key name enclosed between the '%(key)s', + or null if there are no paranthesis such as '%s'. + + + + AppendBase appends an integer at the specified radix doing all the + special forms for Python. We have a copy and paste version of this + for BigInteger below that should be kept in sync. + + + + + BigInteger version of AppendBase. Should be kept in sync w/ AppendBase + + + + + public class to get optimized + + + + + Returns detailed call statistics. Not implemented in IronPython and always returns None. + + + + + Handles output of the expression statement. + Prints the value and sets the __builtin__._ + + + + + Provides a CustomTracker which handles special fields which have custom + behavior on get/set. + + + + + Provides custom, versioned, dictionary access for instances. Used for both + new-style and old-style instances. + + Each class can allocate a version for instance storage using the + CustomInstanceDictionaryStorage.AllocateInstance method. The version allocated + is dependent upon the names which are likely to appear in the instance + dictionary. Currently these names are calculated by collecting the names + that are assigned to during the __init__ method and combining these with + all such names in the types MRO. + + When creating the dictionary for storing instance values the class can then create + a PythonDictionary backed by a CustomInstanceDictionaryStorage with it's + version. When doing a get/set optimized code can then be produced that + verifies we have CustomInstanceDictionaryStorage and it has the + correct version. If we have a matching dictionary then gets/sets can turn + into simple array accesses rather than dictionary gets/sets. For programs + which access a large number of instance variables this can dramatically + speed up the program. + + TODO: Should we attempt to unify all versions which share the same keys? + + + + + Interface used for things which can convert to delegates w/o code gen. Currently + this is just non-overloaded builtin functions and bound builtin functions. Avoiding + the code gen is not only nice for compilation but it also enables delegates to be added + in C# and removed in Python. + + + + + Represents a set of attributes that different functions can have. + + + + No flags have been set + + + This is a function w/ no instance pointer + + + This is a method that requires an instance + + + Built-in functions can encapsulate both methods and functions, in which case both bits are set + + + True is the function/method should be visible from pure-Python code + + + True if this is a __r*__ method for a CLS overloaded operator method + + + + This method represents a binary operator method for a CLS overloaded operator method. + + Being a binary operator causes the following special behaviors to kick in: + A failed binding at call time returns NotImplemented instead of raising an exception + A reversed operator will automatically be created if: + 1. The parameters are both of the instance type + 2. The parameters are in reversed order (other, this) + + This enables simple .NET operator methods to be mapped into the Python semantics. + + + + + A method declared on a built-in module + + + + + OperatorMapping provides a mapping from DLR operators to their associated .NET methods. + + + + + Given an operator returns the OperatorMapping associated with the operator or null + + + + + The operator the OperatorMapping provides info for. + + + + + The primary method name associated with the method. This method name is + usally in the form of op_Operator (e.g. op_Addition). + + + + + The secondary method name associated with the method. This method name is + usually a standard .NET method name with pascal casing (e.g. Add). + + + + + The return type that must match for the alternate operator to be valid. + + This is available alternate operators don't have special names and therefore + could be confused for a normal method which isn't fulfilling the contract. + + + + + This helper type lets us build a fake ParameterInfo object with a specific type and name + to pass along to methods that expect ParameterInfos. This is currently found useful + for the NewTypeMaker code and may be useful in other situations as well. + + + + + Cached CallSites. User types are cached on the PythonType and System types are cached on the + PythonContext to avoid cross-runtime contamination due to the binder on the site. + + + + + Represents a PythonType. Instances of PythonType are created via PythonTypeBuilder. + + + + + Used in copy_reg which is the only consumer of __flags__ in the standard library. + + Set if the type is user defined + + + + + Set if the type has __abstractmethods__ defined + + + + + Implements fast binding for user defined types. This ensures that common highly dynamic + scenarios will run fast (for instance creating new types repeatedly and only creating a limited + number of instances of them). It also gives better code sharing amongst different subclasses + of the same types and improved startup time due to reduced code generation. + + + + + Provides delegates that will invoke a parameterless type ctor. The first key provides + the dictionary for a specific type, the 2nd key provides the delegate for a specific + call site type used in conjunction w/ our IFastInvokable implementation. + + + + + Shared built-in functions for creating instances of user defined types. Because all + types w/ the same UnderlyingSystemType share the same constructors these can be + shared across multiple types. + + + + + Creates a new type for a user defined type. The name, base classes (a tuple of type + objects), and a dictionary of members is provided. + + + + + Creates a new type for a user defined type. The name, base classes (a tuple of type + objects), and a dictionary of members is provided. + + + + + Creates a new PythonType object which is backed by the specified .NET type for + storage. The type is considered a system type which can not be modified + by the user. + + + + + + Creates a new PythonType which is a subclass of the specified PythonType. + + Used for runtime defined new-style classes which require multiple inheritance. The + primary example of this is the exception system. + + + + + Creates a new PythonType which is a subclass of the specified PythonTypes. + + Used for runtime defined new-style classes which require multiple inheritance. The + primary example of this is the exception system. + + + + + Creates a new PythonType which is a subclass of the specified PythonTypes. + + Used for runtime defined new-style classes which require multiple inheritance. The + primary example of this is the exception system. + + + + + Creates a new PythonType which is a subclass of the specified PythonType. + + Used for runtime defined new-style classes which require multiple inheritance. The + primary example of this is the exception system. + + + + + Creates a new PythonType which is a subclass of the specified PythonTypes. + + Used for runtime defined new-style classes which require multiple inheritance. The + primary example of this is the exception system. + + + + + Creates a new PythonType which is a subclass of the specified PythonTypes. + + Used for runtime defined new-style classes which require multiple inheritance. The + primary example of this is the exception system. + + + + + Creates a new PythonType object which represents an Old-style class. + + + + + Returns true if the specified object is an instance of this type. + + + + + Gets the dynamic type that corresponds with the provided static type. + + Returns null if no type is available. TODO: In the future this will + always return a PythonType created by the DLR. + + + + + + + Sets the python type that corresponds with the provided static type. + + This is used for built-in types which have a metaclass. Currently + only used by ctypes. + + + + + Allocates the storage for the instance running the .NET constructor. This provides + the creation functionality for __new__ implementations. + + + + + Allocates the storage for the instance running the .NET constructor. This provides + the creation functionality for __new__ implementations. + + + + + Allocates the storage for the instance running the .NET constructor. This provides + the creation functionality for __new__ implementations. + + + + + Allocates the storage for the instance running the .NET constructor. This provides + the creation functionality for __new__ implementations. + + + + + Allocates the storage for the instance running the .NET constructor. This provides + the creation functionality for __new__ implementations. + + + + + Allocates the storage for the instance running the .NET constructor. This provides + the creation functionality for __new__ implementations. + + + + + Returns true if this type is a subclass of other + + + + + Looks up a slot on the dynamic type + + + + + Searches the resolution order for a slot matching by name + + + + + Searches the resolution order for a slot matching by name. + + Includes searching for methods in old-style classes + + + + + Internal helper to add a new slot to the type + + + + + + + Gets a value from a dynamic type and any sub-types. Values are stored in slots (which serve as a level of + indirection). This searches the types resolution order and returns the first slot that + contains the value. + + + + + Attempts to lookup a member w/o using the customizer. Equivelent to object.__getattribute__ + but it doens't throw an exception. + + + + + + Gets a value from a dynamic type and any sub-types. Values are stored in slots (which serve as a level of + indirection). This searches the types resolution order and returns the first slot that + contains the value. + + + + + Attempts to lookup a member w/o using the customizer. + + + + + + Sets a value on an instance. If a slot is available in the most derived type the slot + is set there, otherwise the value is stored directly in the instance. + + + + + Attempst to set a value w/o going through the customizer. + + This enables languages to provide the "base" implementation for setting attributes + so that the customizer can call back here. + + + + + Returns a list of all slot names for the type and any subtypes. + + The context that is doing the inquiry of InvariantContext.Instance. + + + + Returns a list of all slot names for the type, any subtypes, and the instance. + + The context that is doing the inquiry of InvariantContext.Instance. + the instance to get instance members from, or null. + + + + Adds members from a user defined type. + + + + + Adds members from a user defined type instance + + + + + Gets the .NET type which is used for instances of the Python type. + + When overridden by a metaclass enables a customization of the .NET type which + is used for instances of the Python type. Meta-classes can construct custom + types at runtime which include new .NET methods, fields, custom attributes or + other features to better interoperate with .NET. + + + + + Initializes a PythonType that represents a standard .NET type. The same .NET type + can be shared with the Python type system. For example object, string, int, + etc... are all the same types. + + + + + Creates a __new__ method for the type. If the type defines interesting constructors + then the __new__ method will call that. Otherwise if it has only a single argless + + + + + This will return a unique integer for every version of every type in the system. + This means that DynamicSite code can generate a check to see if it has the correct + PythonType and version with a single integer compare. + + TODO - This method and related code should fail gracefully on overflow. + + + + + Internal helper function to add a subtype + + + + + Returns a CLR WeakReference object to this PythonType that can be shared + between anyone who needs a weak reference to the type. + + + + + Gets the name of the dynamic type + + + + + Gets the resolution order used for attribute lookup + + + + + Gets the underlying system type that is backing this type. All instances of this + type are an instance of the underlying system type. + + + + + Gets the extension type for this type. The extension type provides + a .NET type which can be inherited from to extend sealed classes + or value types which Python allows inheritance from. + + + + + Gets the base types from which this type inherits. + + + + + True if the type is a system type. A system type is a type which represents an + underlying .NET type and not a subtype of one of these types. + + + + + Gets a list of weak references to all the subtypes of this class. May return null + if there are no subtypes of the class. + + + + + Base class for doing fast type invoke binding. Subclasses are created using + reflection once during the binding. The subclasses can then proceed to do + the binding w/o using reflection. Otherwise we'd have lots more reflection + calls which would slow the binding up. + + + + + Gets or creates delegate for calling the constructor function. + + + + + The type has a ctor which does not accept PythonTypes. This is used + for user defined types which implement __clrtype__ + + + + + Used when a type overrides __new__ with a Python function or other object + that can return an arbitrary value. If the return value is not the same type + as the type which had __new__ then we need to lookup __init__ on the type + and invoke it. Also handles initialization for finalization when __del__ + is defined for the same reasons. + + + + + target is the newly initialized value. + args are the arguments to be passed to __init__ + + + + + Couples a MemberGroup and the name which produces the member group together + + + + + Represents an ops-extension which adds a new slot. The slot can have arbitrary + get/set behavior above and beyond normal .NET methods or properties. This is + typically in regards to how it processes access from instances or subtypes. + + + + + Provides a slot object for the dictionary to allow setting of the dictionary. + + + + + Calculates the method resolution order for a Python class + the rules are: + If A is a subtype of B, then A has precedence (A > B) + If C appears before D in the list of bases then C > D + If E > F in one __mro__ then E > F in all __mro__'s for our subtype + + class A(object): pass + class B(object): pass + class C(B): pass + class N(A,B,C): pass # illegal + + This is because: + C.__mro__ == (C, B, object) + N.__mro__ == (N, A, B, C, object) + which would conflict, but: + + N(B,A) is ok (N, B, a, object) + N(C, B, A) is ok (N, C, B, A, object) + + Calculates a C3 MRO as described in "The Python 2.3 Method Resolution Order" + plus support for old-style classes. + + We build up a list of our base classes MRO's plus our base classes themselves. + We go through the list in order. Look at the 1st class in the current list, and + if it's not the non-first class in any other list then remove it from all the lists + and append it to the mro. Otherwise continue to the next list. If all the classes at + the start are no-good then the MRO is bad and we throw. + + For old-style classes if the old-style class is the only one in the list of bases add + it as a depth-first old-style MRO, otherwise compute a new-style mro for all the classes + and use that. + + + + + + + + + Returns the dictionary used to store state for this object + + + + + Python module. Stores classes, functions, and data. Usually a module + is created by importing a file or package from disk. But a module can also + be directly created by calling the module type and providing a name or + optionally a documentation string. + + + + + Creates a new module backed by a Scope. Used for creating modules for foreign Scope's. + + + + + Creates a new PythonModule with the specified dictionary. + + Used for creating modules for builtin modules which don't have any code associated with them. + + + + + Represents a member of a user-defined type which defines __slots__. The names listed in + __slots__ have storage allocated for them with the type and provide fast get/set access. + + + + + Gets the index into the object array to be used for the slot storage. + + + + + Helpers for interacting w/ .NET types. This includes: + + Member resolution via GetMember/GetMembers. This performs a member lookup which includes the registered + extension types in the PythonBinder. Internally the class has many MemberResolver's which provide + the various resolution behaviors. + + Cached member access - this is via static classes such as Object and provides various MemberInfo's so we're + not constantly looking up via reflection. + + + + list of resolvers which we run to resolve items + + + + Gets the statically known member from the type with the specific name. Searches the entire type hierarchy to find the specified member. + + + + + Gets all the statically known members from the specified type. Searches the entire type hierarchy to get all possible members. + + The result may include multiple resolution. It is the callers responsibility to only treat the 1st one by name as existing. + + + + + Gets the statically known member from the type with the specific name. Searches only the specified type to find the member. + + + + + Gets all the statically known members from the specified type. Searches only the specified type to find the members. + + The result may include multiple resolution. It is the callers responsibility to only treat the 1st one by name as existing. + + + + + Creates the resolver table which includes all the possible resolutions. + + + + + + Provides a resolution for __str__. + + + + + Provides a resolution for __repr__ + + + + + Provides a resolution for __hash__, first looking for IStructuralEquatable.GetHashCode, + then IValueEquality.GetValueHashCode. + + + + + Provides a resolution for __new__. For standard .NET types __new__ resolves to their + constructor. For Python types they inherit __new__ from their base class. + + TODO: Can we just always fallback to object.__new__? If not why not? + + + + + Provides a resolution for next + + + + + Provides a resolution for __len__ + + + + + Provides a resolution for __iter__ + + + + + Looks for an Equals overload defined on the type and if one is present binds __ne__ to an + InstanceOps helper. + + + + + Provides an implementation of __contains__. We can pull contains from: + ICollection of T which defines Contains directly + IList which defines Contains directly + IDictionary which defines Contains directly + IDictionary of K,V which defines Contains directly + IEnumerable of K which we have an InstaceOps helper for + IEnumerable which we have an instance ops helper for + IEnumerator of K which we have an InstanceOps helper for + IEnumerator which we have an instance ops helper for + + String is ignored here because it defines __contains__ via extension methods already. + + The lookup is well ordered and not dependent upon the order of values returned by reflection. + + + + + Helper for IEnumerable/IEnumerator __contains__ + + + + + Primary worker for getting the member(s) associated with a single name. Can be called with different MemberBinder's to alter the + scope of the search. + + + + + Primary worker for returning a list of all members in a type. Can be called with different MemberBinder's to alter the scope + of the search. + + + + + Helper to get a MemberGroup for methods declared on InstanceOps + + + + + Helper to get the proper typecasting method, according to the following precedence rules: + + 1. Strongest (most specific) declaring type + 2. Strongest (most specific) parameter type + 3. Type of conversion + i. Implicit + ii. Explicit + 4. Return type (order specified in toTypes) + + + + + Helper for creating a typecast resolver + + + + + Helper for creating __getitem__/__setitem__ resolvers + + false for a getter, true for a setter + + + + Filters out methods which are present on standard .NET types but shouldn't be there in Python + + + + + When private binding is enabled we can have a collision between the private Event + and private field backing the event. We filter this out and favor the event. + + This matches the v1.0 behavior of private binding. + + + + + Filters down to include only protected methods + + + + + If an operator is a reverisble operator (e.g. addition) then we need to filter down to just the forward/reverse + versions of the .NET method. For example consider: + + String.op_Multiplication(int, string) + String.op_Multiplication(string, int) + + If this method were defined on string it defines that you can do: + 2 * 'abc' + or: + 'abc' * 2 + + either of which will produce 'abcabc'. The 1st form is considered the reverse form because it is declared on string + but takes a non-string for the 1st argument. The 2nd is considered the forward form because it takes a string as the + 1st argument. + + When dynamically dispatching for 2 * 'abc' we'll first try __mul__ on int, which will fail with a string argument. Then we'll try + __rmul__ on a string which will succeed and dispatch to the (int, string) overload. + + For multiplication in this case it's not too interesting because it's commutative. For addition this might be more interesting + if, for example, we had unicode and ASCII strings. In that case Unicode strings would define addition taking both unicode and + ASCII strings in both forms. + + + + + Checks to see if the parameter type and the declaring type are compatible to determine + if an operator is forward or reverse. + + + + + Checks to see if this is an operator method which Python recognizes. For example + op_Comma is not recognized by Python and therefore should exposed to the user as + a method that is callable by name. + + + + + Provides a resolution for __complex__ + + + + + Provides a resolution for __float__ + + + + + Provides a resolution for __int__ + + + + + Provides a resolution for __long__ + + + + + Provides a resolution for __getitem__ + + + + + Provides a resolution for __setitem__ + + + + + Abstract class used for resolving members. This provides two methods of member look. The first is looking + up a single member by name. The other is getting all of the members. + + There are various subclasses of this which have different methods of resolving the members. The primary + function of the resolvers are to provide the name->value lookup. They also need to provide a simple name + enumerator. The enumerator is kept simple because it's allowed to return duplicate names as well as return + names of members that don't exist. The base MemberResolver will then verify their existance as well as + filter duplicates. + + + + + Looks up an individual member and returns a MemberGroup with the given members. + + + + + Returns a list of members that exist on the type. The ResolvedMember structure indicates both + the name and provides the MemberGroup. + + + + + Returns a list of possible members which could exist. ResolveMember needs to be called to verify their existance. Duplicate + names can also be returned. + + + + + One off resolver for various special methods which are known by name. A delegate is provided to provide the actual member which + will be resolved. + + + + + Standard resolver for looking up .NET members. Uses reflection to get the members by name. + + + + + Resolves methods mapped to __eq__ and __ne__ from: + 1. IStructuralEquatable.Equals + 2. IValueEquality.Equals (CLR2 only) + + + + + Resolves methods mapped to __gt__, __lt__, __ge__, __le__, as well as providing an alternate resolution + for __eq__ and __ne__, from the comparable type's CompareTo method. + + This should be run after the EqualityResolver. + + + + + Resolves methods mapped to __*__ methods automatically from the .NET operator. + + + + + Filters alternative methods out that don't match the expected signature and therefore + are just sharing a common method name. + + + + + Removes Object.Equals methods as we never return these for PythonOperationKind. + + + + + Provides bindings to private members when that global option is enabled. + + + + + Provides resolutions for protected members that haven't yet been + subclassed by NewTypeMaker. + + + + + Base class used for resolving a name into a member on the type. + + + + + Gets an instance op method for the given type and name. + + Instance ops methods appaer on the base most class that's required to expose it. So + if we have: Array[int], Array, object we'd only add an instance op method to Array and + Array[int] inherits it. It's obviously not on object because if it was there we'd just + put the method in ObjectOps. + + Therefore the different binders expose this at the appropriate times. + + + + + MemberBinder which searches the entire type hierarchy and their extension types to find a member. + + + + + MemberBinder which searches only the current type and it's extension types to find a member. + + + + + BuiltinFunction represents any standard CLR function exposed to Python. + This is used for both methods on standard Python types such as list or tuple + and for methods from arbitrary .NET assemblies. + + All calls are made through the optimizedTarget which is created lazily. + + TODO: Back BuiltinFunction's by MethodGroup's. + + + + + Creates a new builtin function for a static .NET function. This is used for module methods + and well-known __new__ methods. + + + + + Creates a built-in function for a .NET method declared on a type. + + + + + Creates a bound built-in function. The instance may be null for built-in functions + accessed for None. + + + + + Returns a BuiltinFunction bound to the provided type arguments. Returns null if the binding + cannot be performed. + + + + + Returns a descriptor for the built-in function if one is + neededed + + + + + Makes a test for the built-in function against the private _data + which is unique per built-in function. + + + + + Helper for generating the call to a builtin function. This is used for calls from built-in method + descriptors and built-in functions w/ and w/o a bound instance. + + This provides all sorts of common checks on top of the call while the caller provides a delegate + to do the actual call. The common checks include: + check for generic-only methods + reversed operator support + transforming arguments so the default binder can understand them (currently user defined mapping types to PythonDictionary) + returning NotImplemented from binary operators + Warning when calling certain built-in functions + + + The call binder we're doing the call for + An expression which points to the code context + the meta object for the built in function + true if we're calling with an instance + The arguments being passed to the function + A restriction for the built-in function, method desc, etc... + A delegate to perform the actual call to the method. + + + + Gets the target methods that we'll be calling. + + + + + True if the method should be visible to non-CLS opt-in callers + + + + + Provides (for reflected methods) a mapping from a signature to the exact target + which takes this signature. + signature with syntax like the following: + someClass.SomeMethod.Overloads[str, int]("Foo", 123) + + + + + Gets the overload dictionary for the logical function. These overloads + are never bound to an instance. + + + + + Returns the instance used for binding. This differs on module functions implemented + using instance methods so the built-in functions there don't expose the instance. + + + + + A custom built-in function which supports indexing + + + + + Use indexing on generic methods to provide a new reflected method with targets bound with + the supplied type arguments. + + + + + The unbound representation of an event property + + + + + BoundEvent is the object that gets returned when the user gets an event object. An + BoundEvent tracks where the event was received from and is used to verify we get + a proper add when dealing w/ statics events. + + + + + Represents a ReflectedProperty created for an extension method. Logically the property is an + instance property but the method implementing it is static. + + + + + Base class for properties backed by methods. These include our slot properties, + indexers, and normal properties. This class provides the storage of these as well + as the storage of our optimized getter/setter methods, documentation for the property, + etc... + + + + + Convenience function for users to call directly + + + + + This function can be used to set a field on a value type without emitting a warning. Otherwise it is provided only to have symmetry with properties which have GetValue/SetValue for supporting explicitly implemented interfaces. + + Setting fields on value types usually warns because it can silently fail to update the value you expect. For example consider this example where Point is a value type with the public fields X and Y: + + arr = System.Array.CreateInstance(Point, 10) + arr[0].X = 42 + print arr[0].X + + prints 0. This is because reading the value from the array creates a copy of the value. Setting the value then mutates the copy and the array does not get updated. The same problem exists when accessing members of a class. + + + + + Provides access to non-default .NET indexers (aka properties w/ parameters). + + C# doesn't support these, but both COM and VB.NET do. The types dictionary + gets populated w/a ReflectedGetterSetter indexer which is a descriptor. Getting + the descriptor returns a bound indexer. The bound indexer supports indexing. + We support multiple indexer parameters via expandable tuples. + + + + + Convenience function for users to call directly + + + + + Convenience function for users to call directly + + + + + True if generating code for gets can result in more optimal accesses. + + + + + single finalizable instance used to track and deliver all the + callbacks for a single object that has been weakly referenced by + one or more references and proxies. The reference to this object + is held in objects that implement IWeakReferenceable. + + + + + Finalizable object used to hook up finalization calls for OldInstances. + + We create one of these each time an object w/ a finalizer gets created. The + only reference to this object is the instance so when that goes out of context + this does as well and this will get finalized. + + + + + Marks a method/field/property as being a wrapper descriptor. A wrapper desriptor + is a member defined on PythonType but is available both for type and other + instances of type. For example type.__bases__. + + + + diff --git a/packages/IronPython.2.7.4/lib/Sl5/Microsoft.Dynamic.dll b/packages/IronPython.2.7.4/lib/Sl5/Microsoft.Dynamic.dll new file mode 100644 index 0000000000..82aea72580 Binary files /dev/null and b/packages/IronPython.2.7.4/lib/Sl5/Microsoft.Dynamic.dll differ diff --git a/packages/IronPython.2.7.4/lib/Sl5/Microsoft.Dynamic.xml b/packages/IronPython.2.7.4/lib/Sl5/Microsoft.Dynamic.xml new file mode 100644 index 0000000000..91bd3ac1ef --- /dev/null +++ b/packages/IronPython.2.7.4/lib/Sl5/Microsoft.Dynamic.xml @@ -0,0 +1,5347 @@ + + + + Microsoft.Dynamic + + + + + Binds named arguments to the parameters. Returns a permutation of indices that captures the relationship between + named arguments and their corresponding parameters. Checks for duplicate and unbound named arguments. + + Ensures that for all i: namedArgs[i] binds to parameters[args.Length + bindingPermutation[i]] + + + + + The number of arguments not counting the collapsed ones. + + + + + Gets the total number of visible arguments passed to the call site including collapsed ones. + + + + + ArgBuilder provides an argument value used by the MethodBinder. One ArgBuilder exists for each + physical parameter defined on a method. + + Contrast this with ParameterWrapper which represents the logical argument passed to the method. + + + + + Provides the Expression which provides the value to be passed to the argument. + If null is returned the argument is skipped (not passed to the callee). + + + + + Provides an Expression which will update the provided value after a call to the method. May + return null if no update is required. + + + + + If the argument produces a return value (e.g. a ref or out value) this provides + the additional value to be returned. + + + + + The number of actual arguments consumed by this builder. + + + + + Returns the type required for the argument or null if the ArgBuilder + does not consume a type. + + + + + An assignable value that is passed to a byref parameter + After the call it will contain the updated value + + + + + Indicates the specific type of failure, if any, from binding to a method. + + + + + The binding succeeded. Only one method was applicable or had the best conversion. + + + + + More than one method was applicable for the provided parameters and no method was considered the best. + + + + + There are no overloads that match the number of parameters required for the call + + + + + None of the target method(s) can successfully be called. The failure can be due to: + 1. Arguments could not be successfully converted for the call + 2. Keyword arguments could not be assigned to positional arguments + 3. Keyword arguments could be assigned but would result in an argument being assigned + multiple times (keyword and positional arguments conflit or dupliate keyword arguments). + + + + + Actual arguments cannot be constructed. + + + + + No method is callable. For example, all methods have an unbound generic parameter. + + + + + Encapsulates the result of an attempt to bind to one or methods using the OverloadResolver. + + Users should first check the Result property to see if the binding was successful or + to determine the specific type of failure that occured. If the binding was successful + MakeExpression can then be called to create an expression which calls the method. + If the binding was a failure callers can then create a custom error message based upon + the reason the call failed. + + + + + Creates a new BindingTarget when the method binding has succeeded. + + + + + Creates a new BindingTarget when the method binding has failed due to an incorrect argument count + + + + + Creates a new BindingTarget when the method binding has failued due to + one or more parameters which could not be converted. + + + + + Creates a new BindingTarget when the match was ambiguous + + + + + Other failure. + + + + + Gets an Expression which calls the binding target if the method binding succeeded. + + Throws InvalidOperationException if the binding failed. + + + + + Gets the result of the attempt to bind. + + + + + Returns the method if the binding succeeded, or null if no method was applicable. + + + + + Returns the selected overload if the binding succeeded, or null if no one was applicable. + + + + + Gets the name of the method as supplied to the OverloadResolver. + + + + + Returns the MethodTarget if the binding succeeded, or null if no method was applicable. + + + + + Returns the methods which don't have any matches or null if Result == BindingResult.AmbiguousMatch + + + + + Returns the methods and their associated conversion failures if Result == BindingResult.CallFailure. + + + + + Returns the acceptable number of arguments which can be passed to the method if Result == BindingResult.IncorrectArgumentCount. + + + + + Returns the total number of arguments provided to the call. 0 if the call succeeded or failed for a reason other + than argument count mismatch. + + + + + Gets the MetaObjects which we originally did binding against in their restricted form. + + The members of the array correspond to each of the arguments. All members of the array + have a value. + + + + + Returns the return type of the binding, or null if no method was applicable. + + + + + Returns the NarrowingLevel of the method if the call succeeded. If the call + failed returns NarrowingLevel.None. + + + + + Returns true if the binding was succesful, false if it failed. + + This is an alias for BindingTarget.Result == BindingResult.Success. + + + + + Creates a ReturnBuilder + + the type the ReturnBuilder will leave on the stack + + + + Represents the reason why a call to a specific method could not be performed by the OverloadResolver. + + The reason for the failure is specified by the CallFailureReason property. Once this property + has been consulted the other properties can be consulted for more detailed information regarding + the failure. + + If reason is ConversionFailure the ConversionResults property will be non-null. + If reason is UnassignableKeyword the KeywordArguments property will be non-null and include + the keywords which could not be assigned. + If reason is DuplicateKeyword the KeywordArguments property will be non-null and include + the keywords which were duplicated (either by the keywords themselves or by positional + arguments). + + MethodTarget is always set and indicates the method which failed to bind. + + + + + Gets the MethodTarget which the call failed for. + + + + + Gets the reason for the call failure which determines the other + properties of the CallFailure which should be consulted. + + + + + Gets a list of ConversionResult's for each parameter indicating + whether the conversion was successful or failed and the types + being converted. + + + + + Gets the list of keyword arguments that were either dupliated or + unassignable. + + + + + Default value, their was no CallFailure. + + + + + One of more parameters failed to be converted + + + + + One or more keyword arguments could not be successfully assigned to a positional argument + + + + + One or more keyword arguments were duplicated or would have taken the spot of a + provided positional argument. + + + + + Type arguments could not be inferred + + + + + Represents a collection of MethodCandidate's which all accept the + same number of logical parameters. For example a params method + and a method with 3 parameters would both be a CandidateSet for 3 parameters. + + + + + Represents information about a failure to convert an argument from one + type to another. + + + + + Value of the argument or null if it is not available. + + + + + Argument actual type or its limit type if the value not known. + DynamicNull if the argument value is null. + + + + + ArgBuilder which provides a default parameter value for a method call. + + + + + Provides binding and overload resolution to .NET methods. + + MethodBinder's can be used for: + generating new AST code for calling a method + calling a method via reflection at runtime + (not implemented) performing an abstract call + + MethodBinder's support default arguments, optional arguments, by-ref (in and out), and keyword arguments. + + Implementation Details: + + The MethodBinder works by building up a CandidateSet for each number of effective arguments that can be + passed to a set of overloads. For example a set of overloads such as: + foo(object a, object b, object c) + foo(int a, int b) + + would have 2 target sets - one for 3 parameters and one for 2 parameters. For parameter arrays + we fallback and create the appropriately sized CandidateSet on demand. + + Each CandidateSet consists of a set of MethodCandidate's. Each MethodCandidate knows the flattened + parameters that could be received. For example for a function such as: + foo(params int[] args) + + When this method is in a CandidateSet of size 3 the MethodCandidate takes 3 parameters - all of them + ints; if it's in a CandidateSet of size 4 it takes 4 parameters. Effectively a MethodCandidate is + a simplified view that allows all arguments to be treated as required positional arguments. + + Each MethodCandidate in turn refers to a MethodTarget. The MethodTarget is composed of a set + of ArgBuilder's and a ReturnBuilder which know how to consume the positional arguments and pass + them to the appropriate argument of the destination method. This includes routing keyword + arguments to the correct position, providing the default values for optional arguments, etc... + + After binding is finished the MethodCandidates are thrown away and a BindingTarget is returned. + The BindingTarget indicates whether the binding was successful and if not any additional information + that should be reported to the user about the failed binding. It also exposes the MethodTarget which + allows consumers to get the flattened list of required parameters for the call. MethodCandidates + are not exposed and are an internal implementation detail of the MethodBinder. + + + + + Resolves a method overload and returns back a BindingTarget. + + The BindingTarget can then be tested for the success or particular type of + failure that prevents the method from being called. If successfully bound the BindingTarget + contains a list of argument meta-objects with additional restrictions that ensure the selection + of the particular overload. + + + + + Checks to see if the language allows named arguments to be bound to instance fields or + properties and turned into setters. By default this is only allowed on contructors. + + + + + Gets an expression that evaluates to the result of GetByRefArray operation. + + + + + Allow to bind an array/dictionary instance or a null reference to params array/dictionary parameter. + + + + + Called before arguments binding. + + + A bitmask that indicates (set bits) the parameters that were mapped by this method. + A default mapping will be constructed for the remaining parameters (cleared bits). + + + + + Return null if arguments cannot be constructed and overload resolution should produce an error. + + + + + Determines whether given overloads are overloaded on index-th parameter (the types of the index-th parameters are the same). + + + + + Selects the best (of two) candidates for conversion from actualType + + + + + Provides ordering for two parameter types if there is no conversion between the two parameter types. + + + + + The method is called each time an item of lazily splatted argument is needed. + + + + + The number of actual arguments consumed by this builder. + + + + + ArgBuilder which provides a value for a keyword argument. + + The KeywordArgBuilder calculates its position at emit time using it's initial + offset within the keyword arguments, the number of keyword arguments, and the + total number of arguments provided by the user. It then delegates to an + underlying ArgBuilder which only receives the single correct argument. + + Delaying the calculation of the position to emit time allows the method binding to be + done without knowing the exact the number of arguments provided by the user. Hence, + the method binder can be dependent only on the set of method overloads and keyword names, + but not the user arguments. While the number of user arguments could be determined + upfront, the current MethodBinder does not have this design. + + + + + The underlying builder should expect a single parameter as KeywordArgBuilder is responsible + for calculating the correct parameter to use + + + + + + Updates fields/properties of the returned value with unused keyword parameters. + + + + + MethodCandidate represents the different possible ways of calling a method or a set of method overloads. + A single method can result in multiple MethodCandidates. Some reasons include: + - Every optional parameter or parameter with a default value will result in a candidate + - The presence of ref and out parameters will add a candidate for languages which want to return the updated values as return values. + - ArgumentKind.List and ArgumentKind.Dictionary can result in a new candidate per invocation since the list might be different every time. + + Each MethodCandidate represents the parameter type for the candidate using ParameterWrapper. + + + + + Builds a new MethodCandidate which takes count arguments and the provided list of keyword arguments. + + The basic idea here is to figure out which parameters map to params or a dictionary params and + fill in those spots w/ extra ParameterWrapper's. + + + + + Narrowing conversions are conversions that cannot be proved to always succeed, conversions that are + known to possibly lose information, and conversions across domains of types sufficiently different + to merit narrowing notation like casts. + + Its upto every language to define the levels for conversions. The narrowling levels can be used by + for method overload resolution, where the overload is based on the parameter types (and not the number + of parameters). + + + + + Conversions at this level do not do any narrowing. Typically, this will include + implicit numeric conversions, Type.IsAssignableFrom, StringBuilder to string, etc. + + + + + Language defined prefered narrowing conversion. First level that introduces narrowing + conversions. + + + + + Language defined preferred narrowing conversion. Second level that introduces narrowing + conversions and should have more conversions than One. + + + + + Language defined preferred narrowing conversion. Third level that introduces narrowing + conversions and should have more conversions that Two. + + + + + A somewhat meaningful conversion is possible, but it will quite likely be lossy. + For eg. BigInteger to an Int32, Boolean to Int32, one-char string to a char, + larger number type to a smaller numeric type (where there is no overflow), etc + + + + + Builds the argument for an out argument when not passed a StrongBox. The out parameter + is returned as an additional return value. + + + + + Defines a method overload abstraction for the purpose of overload resolution. + It provides the overload resolver the metadata it needs to perform the resolution. + + + WARNING: This is a temporary API that will undergo breaking changes in future versions. + + + + + Null for constructors. + + + + + The method arity can vary, i.e. the method has params array or params dict parameters. + + + + + Represents a method overload that is bound to a . + + + Not thread safe. + WARNING: This is a temporary API that will undergo breaking changes in future versions. + + + + + Maps out parameters to return args and ref parameters to ones that don't accept StrongBox. + + + + + ParameterWrapper represents the logical view of a parameter. For eg. the byref-reduced signature + of a method with byref parameters will be represented using a ParameterWrapper of the underlying + element type, since the logical view of the byref-reduced signature is that the argument will be + passed by value (and the updated value is included in the return value). + + Contrast this with ArgBuilder which represents the real physical argument passed to the method. + + + + + ParameterInfo is not available. + + + + + Creates a parameter that represents an expanded item of params-array. + + + + + True if the wrapper represents a params-array parameter (false for parameters created by expansion of a params-array). + + + + + True if the wrapper represents a params-dict parameter (false for parameters created by expansion of a params-dict). + + + + + Builds the parameter for a params dictionary argument - this collects all the extra name/value + pairs provided to the function into a SymbolDictionary which is passed to the function. + + + + + An argument that the user wants to explicitly pass by-reference (with copy-in copy-out semantics). + The user passes a StrongBox[T] object whose value will get updated when the call returns. + + + + + SimpleArgBuilder produces the value produced by the user as the argument value. It + also tracks information about the original parameter and is used to create extended + methods for params arrays and param dictionary functions. + + + + + Parameter info is not available for this argument. + + + + + Type and whether the parameter is a params-array or params-dictionary is derived from info. + + + + + True if there are restrictions beyond just simple type restrictions + + + + + Builds a parameter for a reference argument when a StrongBox has not been provided. The + updated return value is returned as one of the resulting return values. + + + + + Gets the generic arguments for method based upon the constraints discovered during + type inference. Returns null if not all generic arguments had their types inferred. + + + + + Creates a new set of arg builders for the given generic method definition which target the new + parameters. + + + + + Creates a new list of ParameterWrappers for the generic method replacing the old parameters with the new ones. + + + + + Gets the generic type arguments sorted so that the type arguments + that are depended upon by other type arguments are sorted before + their dependencies. + + + + + Checks to see if the x type parameter is dependent upon the y type parameter. + + + + + Builds a mapping based upon generic parameter constraints between related generic + parameters. This is then used to sort the generic parameters so that we can process + the least dependent parameters first. For example given the method: + + void Foo{T0, T1}(T0 x, T1 y) where T0 : T1 + + We need to first infer the type information for T1 before we infer the type information + for T0 so that we can ensure the constraints are correct. + + + + + Returns a mapping from generic type parameter to the input DMOs which map to it. + + + + + Adds any additional ArgumentInputs entries for the given object and parameter type. + + + + + Walks the nested generic hierarchy to construct all of the generic parameters referred + to by this type. For example if getting the generic parameters for the x parameter on + the method: + + void Foo{T0, T1}(Dictionary{T0, T1} x); + + We would add both typeof(T0) and typeof(T1) to the list of generic arguments. + + + + + Provides generic type inference for a single parameter. + + + For example: + M{T}(T x) + M{T}(IList{T} x) + M{T}(ref T x) + M{T}(T[] x) + M{T}(ref Dictionary{T,T}[] x) + + + + + Provides generic type inference for a single parameter. + + + For example: + M{T}(T x) + M{T}(IList{T} x) + M{T}(ref T x) + M{T}(T[] x) + M{T}(ref Dictionary{T,T}[] x) + + + + + Checks if the constraints are violated by the given input for the specified generic method parameter. + + This method must be supplied with a mapping for any dependent generic method type parameters which + this one can be constrained to. For example for the signature "void Foo{T0, T1}(T0 x, T1 y) where T0 : T1". + we cannot know if the constraints are violated unless we know what we have calculated T1 to be. + + + + + Finds all occurences of genericParameter in openType and the corresponding concrete types in closedType. + Returns true iff all occurences of the generic parameter in the open type correspond to the same concrete type in the closed type + and this type satisfies given constraints. Returns the concrete type in match if so. + + + + + Maps a single type parameter to the possible parameters and DynamicMetaObjects + we can get inference from. For example for the signature: + + void Foo{T0, T1}(T0 x, T1 y, IList{T1} z); + + We would have one ArgumentInput for T0 which holds onto the DMO providing the argument + value for x. We would also have one ArgumentInput for T1 which holds onto the 2 DMOs + for y and z. Associated with y would be a GenericParameterInferer and associated with + z would be a ConstructedParameterInferer. + + + + + Implemented by DynamicMetaObject subclasses when the associated object + can participate in generic method type inference. This interface + is used when the inference engine is attempting to perform type inference + for a parameter which is typed to a delegate type. + + + + + Returns the type inferred for parameterType when performing + inference for a conversion to delegateType. + + + + + Provides information about the result of a custom object which dynamically + infers back types. + + Currently only used for invokable objects to feedback the types for a delegate + type. + + + + + Determines the result of a conversion action. The result can either result in an exception, a value that + has been successfully converted or default(T), or a true/false result indicating if the value can be converted. + + + + + Attempts to perform available implicit conversions and throws if there are no available conversions. + + + + + Attempst to perform available implicit and explicit conversions and throws if there are no available conversions. + + + + + Attempts to perform available implicit conversions and returns default(ReturnType) if no conversions can be performed. + + If the return type of the rule is a value type then the return value will be zero-initialized. If the return type + of the rule is object or another class then the return type will be null (even if the conversion is to a value type). + This enables ImplicitTry to be used to do TryConvertTo even if the type is value type (and the difference between + null and a real value can be distinguished). + + + + + Attempts to perform available implicit and explicit conversions and returns default(ReturnType) if no conversions + can be performed. + + If the return type of the rule is a value type then the return value will be zero-initialized. If the return type + of the rule is object or another class then the return type will be null (even if the conversion is to a value type). + This enables ExplicitTry to be used to do TryConvertTo even if the type is value type (and the difference between + null and a real value can be distinguished). + + + + + Provides binding semantics for a language. This include conversions as well as support + for producing rules for actions. These optimized rules are used for calling methods, + performing operators, and getting members using the ActionBinder's conversion semantics. + + + + + Provides binding semantics for a language. This include conversions as well as support + for producing rules for actions. These optimized rules are used for calling methods, + performing operators, and getting members using the ActionBinder's conversion semantics. + + + + + Converts an object at runtime into the specified type. + + + + + Determines if a conversion exists from fromType to toType at the specified narrowing level. + toNotNullable is true if the target variable doesn't allow null values. + + + + + Provides ordering for two parameter types if there is no conversion between the two parameter types. + + + + + Converts the provided expression to the given type. The expression is safe to evaluate multiple times. + + + + + Gets the members that are visible from the provided type of the specified name. + + The default implemetnation first searches the type, then the flattened heirachy of the type, and then + registered extension methods. + + + + + Called when a set is attempting to assign to a field or property from a derived class through the base class. + + The default behavior is to allow the assignment. + + + + + Creates an ErrorInfo object when a static property is accessed from an instance member. The default behavior is throw + an exception indicating that static members properties be accessed via an instance. Languages can override this to + customize the exception, message, or to produce an ErrorInfo object which reads or writes to the property being accessed. + + The static property being accessed through an instance + True if the user is assigning to the property, false if the user is reading from the property + The parameters being used to access the property. This includes the instance as the first entry, any index parameters, and the + value being assigned as the last entry if isAssignment is true. + + + + + Provides a way for the binder to provide a custom error message when lookup fails. Just + doing this for the time being until we get a more robust error return mechanism. + + Deprecated, use the non-generic version instead + + + + + Gets the extension members of the given name from the provided type. Base classes are also + searched for their extension members. Once any of the types in the inheritance hierarchy + provide an extension member the search is stopped. + + + + + Gets the extension members of the given name from the provided type. Subclasses of the + type and their extension members are not searched. + + + + + Provides an opportunity for languages to replace all MemberTracker's with their own type. + + Alternatlely a language can expose MemberTracker's directly. + + The member which is being returned to the user. + Tthe type which the memberTrack was accessed from + + + + + Determines if the binder should allow access to non-public members. + + By default the binder does not allow access to non-public members. Base classes + can inherit and override this value to customize whether or not private binding + is available. + + + + + Creates the MetaObject for indexing directly into arrays or indexing into objects which have + default members. Returns null if we're not an indexing operation. + + + + + Creates the MetaObject for indexing directly into arrays or indexing into objects which have + default members. Returns null if we're not an indexing operation. + + + + + Creates the meta object for the rest of the operations: comparisons and all other + ExpressionType. If the operation cannot be completed a MetaObject which indicates an + error will be returned. + + + + + Creates the meta object for the rest of the operations: comparisons and all other + ExpressionType. If the operation cannot be completed a MetaObject which indicates an + error will be returned. + + + + + Produces a rule for comparing a value to null - supports comparing object references and nullable types. + + + + + Checks if the conversion is to object and produces a target if it is. + + + + + Checks if any conversions are available and if so builds the target for that conversion. + + + + + Checks if the conversion can be handled by a simple cast. + + + + + Checks if the conversion can be handled by calling a user-defined conversion method. + + + + + Helper that checkes both types to see if either one defines the specified conversion + method. + + + + + Checks if any of the members of the MemberGroup provide the applicable conversion and + if so uses it to build a conversion rule. + + + + + Checks if the conversion is to applicable by extracting the value from Extensible of T. + + + + + Checks if there's an implicit numeric conversion for primitive data types. + + + + + Checks if there's a conversion to/from Nullable of T. + + + + + Checks to see if there's a conversion of null to a reference type + + + + + Helper to produce an error when a conversion cannot occur + + + + + Helper to produce a rule which just boxes a value type + + + + + Helper to produce a conversion rule by calling the helper method to do the convert + + + + + Helper to produce a conversion rule by calling the helper method to do the convert + + + + + Helper to produce a conversion rule by calling the method to do the convert. This version takes the parameter + to be passed to the conversion function and we call it w/ our own value or w/ our Extensible.Value. + + + + + Helper to wrap explicit conversion call into try/catch incase it throws an exception. If + it throws the default value is returned. + + + + + Helper to produce a rule when no conversion is required (the strong type of the expression + input matches the type we're converting to or has an implicit conversion at the IL level) + + + + + Helper to produce a rule when no conversion is required from an extensible type's + underlying storage to the type we're converting to. The type of extensible type + matches the type we're converting to or has an implicit conversion at the IL level. + + + + + Helper to extract the value from an Extensible of T + + + + + Helper to convert a null value to nullable of T + + + + + Helper to produce the rule for converting T to Nullable of T + + + + + Helper to produce the rule for converting T to Nullable of T + + + + + Returns a value which indicates failure when a OldConvertToAction of ImplicitTry or + ExplicitTry. + + + + + Helper to extract the Value of an Extensible of T from the + expression being converted. + + + + + Helper that checks if fromType is an Extensible of T or a subtype of + Extensible of T and if so returns the T. Otherwise it returns fromType. + + This is used to treat extensible types the same as their underlying types. + + + + + Creates a target which returns null for a reference type. + + + + if a member-injector is defined-on or registered-for this type call it + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + Returns a DynamicMetaObject which represents the value that will be returned when the member is accessed. + + The returned DynamicMetaObject may be strongly typed to a value type which needs boxing before being + returned from a standard DLR GetMemberBinder. The language is responsible for performing any boxing + so that it has an opportunity to perform custom boxing. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + Provides overload resolution and method binding for any calls which need to be performed for the GetMember. + + + Returns a DynamicMetaObject which represents the value that will be returned when the member is accessed. + + The returned DynamicMetaObject may be strongly typed to a value type which needs boxing before being + returned from a standard DLR GetMemberBinder. The language is responsible for performing any boxing + so that it has an opportunity to perform custom boxing. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + An OverloadResolverFactory which can be used for performing overload resolution and method binding. + + + True if the operation should return Operation.Failed on failure, false if it + should return the exception produced by MakeMissingMemberError. + + + The meta object to be used if the get results in an error. + + + Returns a DynamicMetaObject which represents the value that will be returned when the member is accessed. + + The returned DynamicMetaObject may be strongly typed to a value type which needs boxing before being + returned from a standard DLR GetMemberBinder. The language is responsible for performing any boxing + so that it has an opportunity to perform custom boxing. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + True if the operation should return Operation.Failed on failure, false if it + should return the exception produced by MakeMissingMemberError. + + + The meta object to be used if the get results in an error. + + + Returns a DynamicMetaObject which represents the value that will be returned when the member is accessed. + + The returned DynamicMetaObject may be strongly typed to a value type which needs boxing before being + returned from a standard DLR GetMemberBinder. The language is responsible for performing any boxing + so that it has an opportunity to perform custom boxing. + + + + if a member-injector is defined-on or registered-for this type call it + + + + Provides default binding for performing a call on the specified meta objects. + + The signature describing the call + The meta object to be called. + + Additional meta objects are the parameters for the call as specified by the CallSignature in the CallAction. + + A MetaObject representing the call or the error. + + + + Provides default binding for performing a call on the specified meta objects. + + The signature describing the call + The meta object to be called. + + Additional meta objects are the parameters for the call as specified by the CallSignature in the CallAction. + + Overload resolver factory. + A MetaObject representing the call or the error. + + + + Provides default binding for performing a call on the specified meta objects. + + The signature describing the call + The meta object to be called. + + Additional meta objects are the parameters for the call as specified by the CallSignature in the CallAction. + + Overload resolver factory. + The result should the object be uncallable. + A MetaObject representing the call or the error. + + + + Gets a TargetInfo object for performing a call on this object. + + If this object is a delegate we bind to the Invoke method. + If this object is a MemberGroup or MethodGroup we bind to the methods in the member group. + If this object is a BoundMemberTracker we bind to the methods with the bound instance. + If the underlying type has defined an operator Call method we'll bind to that method. + + + + + Binds to the methods in a method group. + + + + + Binds to the methods in a member group. + + TODO: We should really only have either MemberGroup or MethodGroup, not both. + + + + + Binds to the BoundMemberTracker and uses the instance in the tracker and restricts + based upon the object instance type. + + + + + Binds to the Invoke method on a delegate if this is a delegate type. + + + + + Attempts to bind to an operator Call method. + + + + + Performs binding against a set of overloaded methods using the specified arguments. The arguments are + consumed as specified by the CallSignature object. + + Overload resolver. + The methods to be called + A meta object which results from the call. + + + + Performs binding against a set of overloaded methods using the specified arguments. The arguments are + consumed as specified by the CallSignature object. + + Overload resolver. + The methods to be called + The name of the method or null to use the name from targets. + A meta object which results from the call. + + + + Performs binding against a set of overloaded methods using the specified arguments. The arguments are + consumed as specified by the CallSignature object. + + Overload resolver. + The methods to be called + Additional restrictions which should be applied to the resulting MetaObject. + A meta object which results from the call. + + + + Performs binding against a set of overloaded methods using the specified arguments. The arguments are + consumed as specified by the CallSignature object. + + Overload resolver. + The methods to be called + Additional restrictions which should be applied to the resulting MetaObject. + The name of the method or null to use the name from targets. + A meta object which results from the call. + + + + Performs binding against a set of overloaded methods using the specified arguments. The arguments are + consumed as specified by the CallSignature object. + + TODO. + TODO. + Overload resolver. + The methods to be called + Additional restrictions which should be applied to the resulting MetaObject. + The resulting binding target which can be used for producing error information. + The name of the method or null to use the name from targets. + A meta object which results from the call. + + + + Makes test for param arrays and param dictionary parameters. + + + + + Pulls out the right argument to build the splat test. MakeParamsTest makes the actual test. + + + + + Builds the restrictions for calling with a splatted argument array. Ensures that the + argument is still an ICollection of object and that it has the same number of arguments. + + + + + Builds the restrictions for calling with keyword arguments. The restrictions include + tests on the individual keys of the dictionary to ensure they have the same names. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + The value being assigned to the target member. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + The value being assigned to the target member. + + + Provides overload resolution and method binding for any calls which need to be performed for the SetMember. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + The value being assigned to the target member. + + + Provides a DynamicMetaObject that is to be used as the result if the member cannot be set. If null then then a language + specific error code is provided by ActionBinder.MakeMissingMemberErrorForAssign which can be overridden by the language. + + + + + Builds a MetaObject for performing a member get. Supports all built-in .NET members, the OperatorMethod + GetBoundMember, and StrongBox instances. + + + The name of the member to retrieve. This name is not processed by the DefaultBinder and + is instead handed off to the GetMember API which can do name mangling, case insensitive lookups, etc... + + + The MetaObject from which the member is retrieved. + + + The value being assigned to the target member. + + + Provides overload resolution and method binding for any calls which need to be performed for the SetMember. + + + Provides a DynamicMetaObject that is to be used as the result if the member cannot be set. If null then then a language + specific error code is provided by ActionBinder.MakeMissingMemberErrorForAssign which can be overridden by the language. + + + + if a member-injector is defined-on or registered-for this type call it + + + + Provides a way for the binder to provide a custom error message when lookup fails. Just + doing this for the time being until we get a more robust error return mechanism. + + + + + Called when the user is accessing a protected or private member on a get. + + The default implementation allows access to the fields or properties using reflection. + + + + + Provides a way for the binder to provide a custom error message when lookup fails. Just + doing this for the time being until we get a more robust error return mechanism. + + + + + Helper class for flowing information about the GetMember request. + + + + + Helper class for flowing information about the GetMember request. + + + + + Encapsulates information about the target of the call. This includes an implicit instance for the call, + the methods that we'll be calling as well as any restrictions required to perform the call. + + + + + A MetaObject which was produced as the result of a failed binding. + + + + + Interceptor prototype. The interceptor is a call site binder that wraps + a real call site binder and can perform arbitrary operations on the expression + trees that the wrapped binder produces: + * Dumping the trees + * Additional rewriting + * Static compilation + * ... + + + + + Returns true if the method should not be displayed in the stack frame. + + + + + Specifies the action for which the default binder is requesting a member. + + + + + If the number of items added to the builder is greater than 4 returns a read-only collection builder containing all the items. + Returns null otherwise. + + + + + Returns null if no expression was added into the builder. + If only a single expression was added returns it. + Otherwise returns a containing the expressions added to the builder. + + + + + Wrapping a tree in this node enables jumps from finally blocks + It does this by generating control-flow logic in the tree + + Reducing this node requires a full tree walk of its body + (but not nested lambdas) + + WARNING: this node cannot contain jumps across blocks, because it + assumes any unknown jumps are jumps to an outer scope. + + + + + Factory methods. + + + + + Determines whether specified expression type represents an assignment. + + + True if the expression type represents an assignment. + + + Note that some other nodes can also assign to variables, members or array items: + MemberInit, NewArrayInit, Call with ref params, New with ref params, Dynamic with ref params. + + + + + Determines if the left child of the given expression is read or written to or both. + + + + + Converts an expression to a void type. + + An to convert to void. + An that has the property equal to and the and property set to void. + + + + Returns an expression that boxes a given value. Uses boxed objects cache for Int32 and Boolean types. + + + + + Creates a generator with type IEnumerable{T}, where T is the label.Type + + + + + + + + Null coalescing expression + {result} ::= ((tmp = {_left}) == null) ? {right} : tmp + '??' operator in C#. + + + + + True coalescing expression. + {result} ::= IsTrue(tmp = {left}) ? {right} : tmp + Generalized AND semantics. + + + + + False coalescing expression. + {result} ::= IsTrue(tmp = {left}) ? tmp : {right} + Generalized OR semantics. + + + + + True coalescing expression. + {result} ::= IsTrue(tmp = {left}) ? {right} : tmp + Generalized AND semantics. + + + + + False coalescing expression. + {result} ::= IsTrue(tmp = {left}) ? tmp : {right} + Generalized OR semantics. + + + + + Wraps the given value in a WeakReference and returns a tree that will retrieve + the value from the WeakReference. + + + + + Creates new instance of the LambdaBuilder with the specified name and return type. + + Return type of the lambda being built. + Name for the lambda being built. + new LambdaBuilder instance + + + + The helper to create the AST method call node. Will add conversions (Utils.Convert) + to parameters and instance if necessary. + + + + + The helper to create the AST method call node. Will add conversions (Utils.Convert) + to parameters and instance if necessary. + + + + + The complex call helper to create the AST method call node. + Will add conversions (Expression.Convert()), deals with default parameter values and params arrays. + + + + + The purpose of this rewriter is simple: ETs do not allow jumps (break, continue, return, goto) + that would go through a finally/fault. So we replace them with code that instead stores a flag, + and then jumps to the end of the finally/fault. At the end of the try-finally, we emit a switch + that then jumps to the correct label. + + A few things that make this more complicated: + + 1. If a finally contains a jump out, then jumps in the try/catch need to be replaced as well. + It's to support cases like this: + # returns 234 + def foo(): + try: return 123 + finally: return 234 + + We need to replace the "return 123" because after it jumps, we'll go to the finally, which + might decide to jump again, but once the IL finally exits, it ignores the finally jump and + keeps going with the original jump. The moral of the story is: if any jumps in finally are + rewritten, try/catch jumps must be also. + + 2. To generate better code, we only have one state variable, so if we have to jump out of + multiple finallys we just keep jumping. It looks sort of like this: + foo: + try { ... } finally { + try { ... } finally { + ... + if (...) { + // was: goto foo; + $flow = 1; goto endInnerFinally; + } + ... + endInnerFinally: + } + switch ($flow) { + case 1: goto endOuterFinally; + } + ... + endOuterFinally: + } + switch ($flow) { + case 1: $flow = 0; goto foo; + } + ... + + + + + + Implemented by expressions which can provide a version which is aware of light exceptions. + + Normally these expressions will simply reduce to a version which throws a real exception. + When the expression is used inside of a region of code which supports light exceptions + the light exception re-writer will call ReduceForLightExceptions. The expression can + then return a new expression which can return a light exception rather than throwing + a real .NET exception. + + + + + Implemented by binders which support light exceptions. Dynamic objects + binding against a binder which implements this interface can check + SupportsLightThrow to see if the binder currently supports safely + returning a light exception. Light exceptions can be created with + LightException.Throw. + + Binders also need to implement GetlightBinder. This method + returns a new call site binder which may return light exceptions if + the binder supports them. + + + + + Gets a binder which will support light exception if one is + available. + + + + + Returns true if a callsite binding against this binder can + return light exceptions. + + + + + Provides a method call to a method which may return light exceptions. + + The call is to a method which supports light exceptions. When reducing + an additional check and throw is added. When a block code of is re-written + for light exceptions this instead reduces to not throw a .NET exception. + + + + + Expression which produces a light exception value. This should be constructed + with the expression which creates the exception and this method will then call + a helper method which wraps the exception in our internal light exception class. + + + + + Used by compilers to provide additional debug information about LambdaExpression to DebugContext + + + + + Implemented by compilers to allow the traceback engine to get additional information. + + + + + Provides services to compilers for instrumenting code with tracebacks. + + + + + Creates a new instance of DebugContext + + + + + Transforms a LambdaExpression to a debuggable LambdaExpression + + + + + Transforms a LambdaExpression to a debuggable LambdaExpression + + + + + Resets a state associated with a source file that's maintained in the DebugContext + + + + + Threads + + + + + Hook + + + + + // This method is called from the generator to update the frame with generator's locals + + + + + Remaps the frame's state to use the generator for execution. + + Int32.MaxValue to map to latest version + + + + Thread + + + + + FrameOrder + + + + + Variables + + + + + CurrentSequencePointIndex + + + + + DebuggableLambdaBuilder is used to transform a DLR expression tree into a debuggable lambda expression. + + + + + Used to wrap a lambda that was already a generator prior to transform. + + + + + Used to rewrite expressions containing DebugInfoExpressions. + + + + + Combines source file and span. Also provides Contains and Intersects functionality. + + + + + Implementation of IDebugRuntimeVariables, which wraps IRuntimeVariables + FunctionInfo/DebugMarker + + + + + IDebugRuntimeVariables is used to wrap IRuntimeVariables and add properties for retrieving + FunctionInfo and DebugMarker from debuggable labmdas. + + + + + Default implementation of BaseDebugThread, which uses DLR's RuntimeVariablesExpression for lifting locals. + + + + + Default implementation of IDebugThreadFactory, which uses DLR's RuntimeVariablesExpression for lifting locals. + + + + + IDebugThreadFactory is used to abstract how frames and local variables are maintained at run/debug time. + + + + + GetTraceLocations + + + + + + SequencePoints + + + + + Name + + + + + CustomPayload + + + + + Callback that is fired by the traceback engine + + + + + Used to extract locals information from expressions. + + + + + Strongly-typed and parameterized string factory. + + + + + Implements IRuntimeVariables in a way that preserves scoping within the lambda. + + + + + TraceSession + + + + + Used to provide information about locals/parameters at debug time. + + + + + Type + + + + + Name + + + + + Parameter + + + + + Caches type member lookup. + + + When enumerating members (methods, properties, events) of a type (declared or inherited) Reflection enumerates all + runtime members of the type and its base types and caches the result. + When looking for a member of a specific name Reflection still enumerates all and filters out those that don't match the name. + That's inefficient when looking for members of multiple names one by one. + Instead we build a map of name to member list and then answer subsequent queries by simply looking up the dictionary. + + + + + Marks a method which may return a light exception. Such + methods need to have their return value checked and the exception + will need to be thrown if the caller is not light exception aware. + + + + + Internal re-writer class which creates code which is light exception aware. + + + + + Adds light exception handling to the provided expression which + is light exception aware. + + + + + Class used to be avoid overhead of creating expression trees when we're usually + + + + + Provides support for light exceptions. These exceptions are propagated by + returning an instance of a private wrapper class containing the exception. Code + which is aware of light exceptions will branch to apporiate exception handling + blocks when in a try and otherwise return the value up the stack. This avoids + using the underlying CLR exception mechanism with overhead such as creating stack + traces. + + When a light exception reaches the boundary of code which is not light exception + aware the caller must check to see if a light exception is being thrown and if + so raise a .NET exception. + + This class provides methods for re-writing expression trees to support light exceptions, + methods to create light throw objects, check if an object is a light + throw object, and turn such an object back into a .NET Exception which can be thrown. + + Light exceptions also don't build up stack traces or interoperate with filter blocks + via 2-pass exception handling. + + + + + Rewrites the provided expression to support light exceptions. + + Calls to the returned expression, if not from other light-weight aware calls, + need to call GetLightException on return to see if an exception was thrown + and if so throw it. + + + + + Returns a new expression which will lazily reduce to a light + expression re-written version of the same expression. + + + + + Returns a new expression which is re-written for light exceptions + but will throw an exception if it escapes the expression. If this + expression is part of a larger experssion which is later re-written + for light exceptions then it will propagate the light exception up. + + + + + Returns an object which represents a light exception. + + + + + Returns an object which represents a light exception. + + + + + Returns an object which represents a light exception. + + + + + If the binder supports light exceptions then a light exception throwing expression is returned. + + Otherwise a normal throwing expression is returned. + + + + + If the binder supports light exceptions then a light exception throwing expression is returned. + + Otherwise a normal throwing expression is returned. + + + + + Throws the exception if the value represents a light exception + + + + + Wraps the expression in a check and rethrow. + + + + + Checks to see if the provided value is a light exception. + + + + + Gets the light exception from an object which may contain a light + exception. Returns null if the object is not a light exception. + + Used for throwing the exception at non-light exception boundaries. + + + + + Returns true if the call site binder is a light exception binder and supports + light throws. Returns false otherwise. + + + + + + + Sealed wrapper class to indicate something is a light exception. + + + + + Stores information needed to emit debugging symbol information for a + source file, in particular the file name and unique language identifier + + + + + The source file name + + + + + Returns the language's unique identifier, if any + + + + + Returns the language vendor's unique identifier, if any + + + + + Provides a simple expression which enables embedding FieldBuilder's + in an AST before the type is complete. + + + + + Used to dispatch a single interactive command. It can be used to control things like which Thread + the command is executed on, how long the command is allowed to execute, etc + + + + Instruction can't be created due to insufficient privileges. + + + Instruction can't be created due to insufficient privileges. + + + + Gets the next type or null if no more types are available. + + + + + Uses reflection to create new instance of the appropriate ReflectedCaller + + + + + Fast creation works if we have a known primitive types for the entire + method siganture. If we have any non-primitive types then FastCreate + falls back to SlowCreate which works for all types. + + Fast creation is fast because it avoids using reflection (MakeGenericType + and Activator.CreateInstance) to create the types. It does this through + calling a series of generic methods picking up each strong type of the + signature along the way. When it runs out of types it news up the + appropriate CallInstruction with the strong-types that have been built up. + + One relaxation is that for return types which are non-primitive types + we can fallback to object due to relaxed delegates. + + + + + The number of arguments including "this" for instance methods. + + + + + This instruction implements a goto expression that can jump out of any expression. + It pops values (arguments) from the evaluation stack that the expression tree nodes in between + the goto expression and the target label node pushed and not consumed yet. + A goto expression can jump into a node that evaluates arguments only if it carries + a value and jumps right after the first argument (the carried value will be used as the first argument). + Goto can jump into an arbitrary child of a BlockExpression since the block doesn’t accumulate values + on evaluation stack as its child expressions are being evaluated. + + Goto needs to execute any finally blocks on the way to the target label. + + { + f(1, 2, try { g(3, 4, try { goto L } finally { ... }, 6) } finally { ... }, 7, 8) + L: ... + } + + The goto expression here jumps to label L while having 4 items on evaluation stack (1, 2, 3 and 4). + The jump needs to execute both finally blocks, the first one on stack level 4 the + second one on stack level 2. So, it needs to jump the first finally block, pop 2 items from the stack, + run second finally block and pop another 2 items from the stack and set instruction pointer to label L. + + Goto also needs to rethrow ThreadAbortException iff it jumps out of a catch handler and + the current thread is in "abort requested" state. + + + + + The first instruction of finally block. + + + + + The last instruction of finally block. + + + + + The last instruction of a catch exception handler. + + + + + The last instruction of a fault exception handler. + + + + + Implements dynamic call site with many arguments. Wraps the arguments into . + + + + + Contains compiler state corresponding to a LabelTarget + See also LabelScopeInfo. + + + + + Returns true if we can jump into this node + + + + + Attaches a cookie to the last emitted instruction. + + + + Instruction can't be created due to insufficient privileges. + + + + Manages creation of interpreted delegates. These delegates will get + compiled if they are executed often enough. + + + + + Used by LightLambda to get the compiled delegate. + + + + + Create a compiled delegate for the LightLambda, and saves it so + future calls to Run will execute the compiled code instead of + interpreting. + + + + + true if the compiled delegate has the same type as the lambda; + false if the type was changed for interpretation. + + + + + Provides notification that the LightLambda has been compiled. + + + + + A simple forth-style stack machine for executing Expression trees + without the need to compile to IL and then invoke the JIT. This trades + off much faster compilation time for a slower execution performance. + For code that is only run a small number of times this can be a + sweet spot. + + The core loop in the interpreter is the RunInstructions method. + + + + + Runs instructions within the given frame. + + + Interpreted stack frames are linked via Parent reference so that each CLR frame of this method corresponds + to an interpreted stack frame in the chain. It is therefore possible to combine CLR stack traces with + interpreted stack traces by aligning interpreted frames to the frames of this method. + Each group of subsequent frames of Run method corresponds to a single interpreted frame. + + + + + Visits a LambdaExpression, replacing the constants with direct accesses + to their StrongBox fields. This is very similar to what + ExpressionQuoter does for LambdaCompiler. + + Also inserts debug information tracking similar to what the interpreter + would do. + + + + + Local variable mapping. + + + + + The variable that holds onto the StrongBox{object}[] closure from + the interpreter + + + + + A stack of variables that are defined in nested scopes. We search + this first when resolving a variable in case a nested scope shadows + one of our variable instances. + + + + + Walks the lambda and produces a higher order function, which can be + used to bind the lambda to a closure array from the interpreter. + + The lambda to bind. + Variables which are being accessed defined in the outer scope. + A delegate that can be called to produce a delegate bound to the passed in closure array. + + + + Provides a list of variables, supporing read/write of the values + + + + + Gets a copy of the local variables which are defined in the current scope. + + + + + + Checks to see if the given variable is defined within the current local scope. + + + + + Gets the variables which are defined in an outer scope and available within the current scope. + + + + + Tracks where a variable is defined and what range of instructions it's used in + + + + + A single interpreted frame might be represented by multiple subsequent Interpreter.Run CLR frames. + This method filters out the duplicate CLR frames. + + + + + arbitrary precision integers + + + + + Calculates the natural logarithm of the BigInteger. + + + + + Calculates log base 10 of a BigInteger. + + + + + Return the value of this BigInteger as a little-endian twos-complement + byte array, using the fewest number of bytes possible. If the value is zero, + return an array of one byte whose element is 0x00. + + + + + Return the sign of this BigInteger: -1, 0, or 1. + + + + + Wraps all arguments passed to a dynamic site with more arguments than can be accepted by a Func/Action delegate. + The binder generating a rule for such a site should unwrap the arguments first and then perform a binding to them. + + + + + Provides support for converting objects to delegates using the DLR binders + available by the provided language context. + + Primarily this supports converting objects implementing IDynamicMetaObjectProvider + to the appropriate delegate type. + + If the provided object is already a delegate of the appropriate type then the + delegate will simply be returned. + + + + Table of dynamically generated delegates which are shared based upon method signature. + + + + Creates a delegate with a given signature that could be used to invoke this object from non-dynamic code (w/o code context). + A stub is created that makes appropriate conversions/boxing and calls the object. + The stub should be executed within a context of this object's language. + + The converted delegate. + The object is either a subclass of Delegate but not the requested type or does not implement IDynamicMetaObjectProvider. + + + + Represents the type of a null value. + + + + + Private constructor is never called since 'null' is the only valid instance. + + + + + These are some generally useful helper methods. Currently the only methods are those to + cached boxed representations of commonly used primitive types so that they can be shared. + This is useful to most dynamic languages that use object as a universal type. + + The methods in RuntimeHelepers are caleld by the generated code. From here the methods may + dispatch to other parts of the runtime to get bulk of the work done, but the entry points + should be here. + + + + + Used by prologue code that is injected in lambdas to ensure that delegate signature matches what + lambda body expects. Such code typically unwraps subset of the params array manually, + but then passes the rest in bulk if lambda body also expects params array. + + This calls ArrayUtils.ShiftLeft, but performs additional checks that + ArrayUtils.ShiftLeft assumes. + + + + + A singleton boxed boolean true. + + + + + A singleton boxed boolean false. + + + + + Gets a singleton boxed value for the given integer if possible, otherwise boxes the integer. + + The value to box. + The boxed value. + + + + Helper method to create an instance. Work around for Silverlight where Activator.CreateInstance + is SecuritySafeCritical. + + TODO: Why can't we just emit the right thing for default(T)? + It's always null for reference types and it's well defined for value types + + + + + EventInfo.EventHandlerType getter is marked SecuritySafeCritical in CoreCLR + This method is to get to the property without using Reflection + + + + + + + Provides the test to see if an interpreted call site should switch over to being compiled. + + + + + A parameterless generator, that is of type IEnumerable, IEnumerable{T}, + IEnumerator, or IEnumerator{T}. Its body can contain a series of + YieldExpressions. Each call into MoveNext on the enumerator reenters + the generator, and executes until it reaches a YieldReturn or YieldBreak + expression + + + + + The label used by YieldBreak and YieldReturn expressions to yield + from this generator + + + + + The body of the generator, which can contain YieldBreak and + YieldReturn expressions + + + + + Indicates whether the lhs instances are preserved when assignments + are made to expressions containing yields. + + + + + When finding a yield return or yield break, this rewriter flattens out + containing blocks, scopes, and expressions with stack state. All + scopes encountered have their variables promoted to the generator's + closure, so they survive yields. + + + + + Makes an assignment to this variable. Pushes the assignment as far + into the right side as possible, to allow jumps into it. + + + + + Returns true if the expression remains constant no matter when it is evaluated. + + + + + Represents either a YieldBreak or YieldReturn in a GeneratorExpression + If Value is non-null, it's a YieldReturn; otherwise it's a YieldBreak + and executing it will stop enumeration of the generator, causing + MoveNext to return false. + + + + + The value yieled from this expression, if it is a yield return + + + + + The label used to yield from this generator + + + + + Tests to see if the expression is a constant with the given value. + + The expression to examine + The constant value to check for. + true/false + + + + Tests to see if the expression is a constant with the given value. + + The expression to examine + The constant value to check for. + true/false + + + + Begins a catch block. + + + + + Begins an exception block for a filtered exception. + + + + + Begins an exception block for a non-filtered exception. + + + + + + Begins an exception fault block + + + + + Begins a finally block + + + + + Ends an exception block. + + + + + Begins a lexical scope. + + + + + Ends a lexical scope. + + + + + Declares a local variable of the specified type. + + + + + Declares a local variable of the specified type, optionally + pinning the object referred to by the variable. + + + + + Declares a new label. + + + + + Marks the label at the current position. + + + + + Emits an instruction. + + + + + Emits an instruction with a byte argument. + + + + + Emits an instruction with the metadata token for the specified contructor. + + + + + Emits an instruction with a double argument. + + + + + Emits an instruction with the metadata token for the specified field. + + + + + Emits an instruction with a float argument. + + + + + Emits an instruction with an int argument. + + + + + Emits an instruction with a label argument. + + + + + Emits an instruction with multiple target labels (switch). + + + + + Emits an instruction with a reference to a local variable. + + + + + Emits an instruction with a long argument. + + + + + Emits an instruction with the metadata token for a specified method. + + + + + Emits an instruction with a signed byte argument. + + + + + Emits an instruction with a short argument. + + + + + Emits an instruction with a string argument. + + + + + Emits an instruction with the metadata token for a specified type argument. + + + + + Emits a call or a virtual call to the varargs method. + + + + + Marks a sequence point. + + + + + Specifies the namespace to be used in evaluating locals and watches for the + current active lexical scope. + + + + + Emits a Ldind* instruction for the appropriate type + + + + + Emits a Stind* instruction for the appropriate type. + + + + + Emits a Stelem* instruction for the appropriate type. + + + + + Boxes the value of the stack. No-op for reference types. Void is + converted to a null reference. For almost all value types this + method will box them in the standard way. Int32 and Boolean are + handled with optimized conversions that reuse the same object for + small values. For Int32 this is purely a performance optimization. + For Boolean this is use to ensure that True and False are always + the same objects. + + + + + Emits an array of constant values provided in the given list. + The array is strongly typed. + + + + + Emits an array of values of count size. The items are emitted via the callback + which is provided with the current item index to emit. + + + + + Emits an array construction code. + The code assumes that bounds for all dimensions + are already emitted. + + + + + Emits default(T) + Semantics match C# compiler behavior + + + + + A simple dictionary of queues, keyed off a particular type + This is useful for storing free lists of variables + + + + + Directory where snippet assembly will be saved if SaveSnippets is set. + + + + + Save snippets to an assembly (see also SnippetsDirectory, SnippetsFileName). + + + + + Gets the Compiler associated with the Type Initializer (cctor) creating it if necessary. + + + + + A tree rewriter which will find dynamic sites which consume dynamic sites and + turn them into a single combo dynamic site. The combo dynamic site will then run the + individual meta binders and produce the resulting code in a single dynamic site. + + + + + A reducible node which we use to generate the combo dynamic sites. Each time we encounter + a dynamic site we replace it with a ComboDynamicSiteExpression. When a child of a dynamic site + turns out to be a ComboDynamicSiteExpression we will then merge the child with the parent updating + the binding mapping info. If any of the inputs cause side effects then we'll stop the combination. + + + + + A binder which can combine multiple binders into a single dynamic site. The creator + of this needs to perform the mapping of parameters, constants, and sub-site expressions + and provide a List of BinderMappingInfo representing this data. From there the ComboBinder + just processes the list to create the resulting code. + + + + + Provides a mapping for inputs of combo action expressions. The input can map + to either an input of the new dynamic site, an input of a previous DynamicExpression, + or a ConstantExpression which has been pulled out of the dynamic site arguments. + + + + + Contains the mapping information for a single Combo Binder. This includes the original + meta-binder and the mapping of parameters, sub-sites, and constants into the binding. + + + + + Builds up a series of conditionals when the False clause isn't yet known. We can + keep appending conditions and if true's. Each subsequent true branch becomes the + false branch of the previous condition and body. Finally a non-conditional terminating + branch must be added. + + + + + Adds a new conditional and body. The first call this becomes the top-level + conditional, subsequent calls will have it added as false statement of the + previous conditional. + + + + + Adds the non-conditional terminating node. + + + + + Adds the non-conditional terminating node. + + + + + Gets the resulting meta object for the full body. FinishCondition + must have been called. + + + + + Adds a variable which will be scoped at the level of the final expression. + + + + + Marks a method as not having side effects. used by the combo binder + to allow calls to methods. + + + + + OperatorInfo provides a mapping from DLR ExpressionType to their associated .NET methods. + + + + + Given an operator returns the OperatorInfo associated with the operator or null + + + + + The operator the OperatorInfo provides info for. + + + + + The primary method name associated with the method. This method name is + usally in the form of op_Operator (e.g. op_Addition). + + + + + The secondary method name associated with the method. This method name is + usually a standard .NET method name with pascal casing (e.g. Add). + + + + + The builder for creating the LambdaExpression node. + + Since the nodes require that parameters and variables are created + before hand and then passed to the factories creating LambdaExpression + this builder keeps track of the different pieces and at the end creates + the LambdaExpression. + + TODO: This has some functionality related to CodeContext that should be + removed, in favor of languages handling their own local scopes + + + + + Creates a parameter on the lambda with a given name and type. + + Parameters maintain the order in which they are created, + however custom ordering is possible via direct access to + Parameters collection. + + + + + Creates a parameter on the lambda with a given name and type. + + Parameters maintain the order in which they are created, + however custom ordering is possible via direct access to + Parameters collection. + + + + + adds existing parameter to the lambda. + + Parameters maintain the order in which they are created, + however custom ordering is possible via direct access to + Parameters collection. + + + + + Creates a hidden parameter on the lambda with a given name and type. + + Parameters maintain the order in which they are created, + however custom ordering is possible via direct access to + Parameters collection. + + + + + Creates a params array argument on the labmda. + + The params array argument is added to the signature immediately. Before the lambda is + created, the builder validates that it is still the last (since the caller can modify + the order of parameters explicitly by maniuplating the parameter list) + + + + + Creates a local variable with specified name and type. + TODO: simplify by pushing logic into callers + + + + + Creates a local variable with specified name and type. + TODO: simplify by pushing logic into callers + + + + + Creates a temporary variable with specified name and type. + + + + + Adds the temporary variable to the list of variables maintained + by the builder. This is useful in cases where the variable is + created outside of the builder. + + + + + Creates the LambdaExpression from the builder. + After this operation, the builder can no longer be used to create other instances. + + Desired type of the lambda. + New LambdaExpression instance. + + + + Creates the LambdaExpression from the builder. + After this operation, the builder can no longer be used to create other instances. + + New LambdaExpression instance. + + + + Creates the generator LambdaExpression from the builder. + After this operation, the builder can no longer be used to create other instances. + + New LambdaExpression instance. + + + + Fixes up lambda body and parameters to match the signature of the given delegate if needed. + + + + + + Validates that the builder has enough information to create the lambda. + + + + + The name of the lambda. + Currently anonymous/unnamed lambdas are not allowed. + + + + + Return type of the lambda being created. + + + + + List of lambda's local variables for direct manipulation. + + + + + List of lambda's parameters for direct manipulation + + + + + The params array argument, if any. + + + + + The body of the lambda. This must be non-null. + + + + + The generated lambda should have dictionary of locals + instead of allocating them directly on the CLR stack. + + + + + The scope is visible (default). Invisible if false. + + + + + marks a field, class, or struct as being safe to have statics which can be accessed + from multiple runtimes. + + Static fields which are not read-only or marked with this attribute will be flagged + by a test which looks for state being shared between runtimes. Before applying this + attribute you should ensure that it is safe to share the state. This is typically + state which is lazy initialized or state which is caching values which are identical + in all runtimes and are immutable. + + + + + This class is useful for quickly collecting performance counts for expensive + operations. Usually this means operations involving either reflection or + code gen. Long-term we need to see if this can be plugged better into the + standard performance counter architecture. + + + + + temporary categories for quick investigation, use a custom key if you + need to track multiple items, and if you want to keep it then create + a new Categories entry and rename all your temporary entries. + + + + + Represents the context that is flowed for doing Compiler. Languages can derive + from this class to provide additional contextual information. + + + + + Source unit currently being compiled in the CompilerContext + + + + + Current error sink. + + + + + Sink for parser callbacks (e.g. brace matching, etc.). + + + + + Compiler specific options. + + + + + LanguageContext implementation. + + + + + Default display name. + + + + + Default file extensions. + + + + + Default names for the language. + + + + + Indicates that a DynamicMetaObject might be convertible to a CLR type. + + + + + Gets custom data to be serialized when saving script codes to disk. + + + + + Indicates that a MetaObject is already representing a restricted type. Useful + when we're already restricted to a known type but this isn't captured in + the type info (e.g. the type is not sealed). + + + + + Returns Microsoft.Scripting.Runtime.DynamicNull if the object contains a null value, + otherwise, returns self.LimitType + + + + + Returns Microsoft.Scripting.Runtime.DynamicNull if the object contains a null value, + otherwise, returns self.RuntimeType + + + + + ScriptCode is an instance of compiled code that is bound to a specific LanguageContext + but not a specific ScriptScope. The code can be re-executed multiple times in different + scopes. Hosting API counterpart for this class is CompiledCode. + + + + + This takes an assembly name including extension and saves the provided ScriptCode objects into the assembly. + + The provided script codes can constitute code from multiple languages. The assemblyName can be either a fully qualified + or a relative path. The DLR will simply save the assembly to the desired location. The assembly is created by the DLR and + if a file already exists than an exception is raised. + + The DLR determines the internal format of the ScriptCode and the DLR can feel free to rev this as appropriate. + + + + + This will take an assembly object which the user has loaded and return a new set of ScriptCode’s which have + been loaded into the provided ScriptDomainManager. + + If the language associated with the ScriptCode’s has not already been loaded the DLR will load the + LanguageContext into the ScriptDomainManager based upon the saved LanguageContext type. + + If the LanguageContext or the version of the DLR the language was compiled against is unavailable a + TypeLoadException will be raised unless policy has been applied by the administrator to redirect bindings. + + + + + Sets the current position inside current token or one character behind it. + + + + + Sets the current position inside current token or one character behind it. + A relative displacement with respect to the current position in the token is specified. + + + + + Marks token end. Enables to read the current token. + + + + + Marks token start. It means the buffer can drop the current token. + Can be called even if no token has been read yet. + + + + + Reads till the end of line and returns the character that stopped the reading. + The returned character is not skipped. + + + + + Resizes an array to a speficied new size and copies a portion of the original array into its beginning. + + + + + Helper class to remove methods w/ identical signatures. Used for GetDefaultMembers + which returns members from all types in the hierarchy. + + + + On error. + + + + Implementation of the complex number data type. + + + + + Helper methods that calls are generated to from the default DLR binders. + + + + + Helper function to combine an object array with a sequence of additional parameters that has been splatted for a function call. + + + + + EventInfo.EventHandlerType getter is marked SecuritySafeCritical in CoreCLR + This method is to get to the property without using Reflection + + + + + + + Implements explicit casts supported by the runtime. + + + Implements explicit casts supported by the runtime. + + + + + Explicitly casts the object to a given type (and returns it as object) + + + + + Used as the value for the ScriptingRuntimeHelpers.GetDelegate method caching system + + + + + Generates stub to receive the CLR call and then call the dynamic language code. + + + + + Used as the key for the LanguageContext.GetDelegate method caching system + + + + + A useful interface for taking slices of numeric arrays, inspired by Python's Slice objects. + + + + + The starting index of the slice or null if no first index defined + + + + + The ending index of the slice or null if no ending index defined + + + + + The length of step to take + + + + + Given an ID returns the object associated with that ID. + + + + + Gets a unique ID for an object + + + + + Goes over the hashtable and removes empty entries + + + + + Weak-ref wrapper caches the weak reference, our hash code, and the object ID. + + + + + WrapperComparer treats Wrapper as transparent envelope + + + + + Internal class which binds a LanguageContext, StreamContentProvider, and Encoding together to produce + a TextContentProvider which reads binary data with the correct language semantics. + + + + + Creates a dictionary of locals in this scope + + + + + Abstract base class used for optimized thread-safe dictionaries which have a set + of pre-defined string keys. + + Implementers derive from this class and override the GetExtraKeys, TrySetExtraValue, + and TryGetExtraValue methods. When looking up a value first the extra keys will be + searched using the optimized Try*ExtraValue functions. If the value isn't found there + then the value is stored in the underlying .NET dictionary. + + This dictionary can store object values in addition to string values. It also supports + null keys. + + + + + Gets a list of the extra keys that are cached by the the optimized implementation + of the module. + + + + + Try to set the extra value and return true if the specified key was found in the + list of extra values. + + + + + Try to get the extra value and returns true if the specified key was found in the + list of extra values. Returns true even if the value is Uninitialized. + + + + + Provides a dictionary-like object used for caches which holds onto a maximum + number of elements specified at construction time. + + This class is not thread safe. + + + + + Creates a dictionary-like object used for caches. + + The maximum number of elements to store. + + + + Tries to get the value associated with 'key', returning true if it's found and + false if it's not present. + + + + + Adds a new element to the cache, replacing and moving it to the front if the + element is already present. + + + + + Returns the value associated with the given key, or throws KeyNotFoundException + if the key is not present. + + + + + Wraps the provided enumerable into a ReadOnlyCollection{T} + + Copies all of the data into a new array, so the data can't be + changed after creation. The exception is if the enumerable is + already a ReadOnlyCollection{T}, in which case we just return it. + + + + + List optimized for few writes and multiple reads. It provides thread-safe read and write access. + Iteration is not thread-safe by default, but GetCopyForRead allows for iteration + without taking a lock. + + + + + Gets a copy of the contents of the list. The copy will not change even if the original + CopyOnWriteList object is modified. This method should be used to iterate the list in + a thread-safe way if no lock is taken. Iterating on the original list is not guaranteed + to be thread-safe. + + The returned copy should not be modified by the caller. + + + + Returns the list of expressions represented by the instances. + + An array of instances to extract expressions from. + The array of expressions. + + + + Creates an instance of for a runtime value and the expression that represents it during the binding process. + + The runtime value to be represented by the . + An expression to represent this during the binding process. + The new instance of . + + + + Produces an interpreted binding using the given binder which falls over to a compiled + binding after hitCount tries. + + This method should be called whenever an interpreted binding is required. Sometimes it will + return a compiled binding if a previous binding was produced and it's hit count was exhausted. + In this case the binder will not be called back for a new binding - the previous one will + be used. + + The delegate type being used for the call site + The binder used for the call site + The number of calls before the binder should switch to a compiled mode. + The arguments that are passed for the binding (as received in a BindDelegate call) + A delegate which represents the interpreted binding. + + + + Expression which reduces to the normal test but under the interpreter adds a count down + check which enables compiling when the count down is reached. + + + + + Base class for storing information about the binding that a specific rule is applicable for. + + We have a derived generic class but this class enables us to refer to it w/o having the + generic type information around. + + This class tracks both the count down to when we should compile. When we compile we + take the Expression[T] that was used before and compile it. While this is happening + we continue to allow the interpreted code to run. When the compilation is complete we + store a thread static which tells us what binding failed and the current rule is no + longer functional. Finally the language binder will call us again and we'll retrieve + and return the compiled overload. + + + + + A hybrid dictionary which compares based upon object identity. + + + + + Calculates the quotient of two 32-bit signed integers rounded towards negative infinity. + + Dividend. + Divisor. + The quotient of the specified numbers rounded towards negative infinity, or (int)Floor((double)x/(double)y). + is 0. + The caller must check for overflow (x = Int32.MinValue, y = -1) + + + + Calculates the quotient of two 32-bit signed integers rounded towards negative infinity. + + Dividend. + Divisor. + The quotient of the specified numbers rounded towards negative infinity, or (int)Floor((double)x/(double)y). + is 0. + The caller must check for overflow (x = Int64.MinValue, y = -1) + + + + Calculates the remainder of floor division of two 32-bit signed integers. + + Dividend. + Divisor. + The remainder of of floor division of the specified numbers, or x - (int)Floor((double)x/(double)y) * y. + is 0. + + + + Calculates the remainder of floor division of two 32-bit signed integers. + + Dividend. + Divisor. + The remainder of of floor division of the specified numbers, or x - (int)Floor((double)x/(double)y) * y. + is 0. + + + + Behaves like Math.Round(value, MidpointRounding.AwayFromZero) + Needed because CoreCLR doesn't support this particular overload of Math.Round + + + + + Behaves like Math.Round(value, precision, MidpointRounding.AwayFromZero) + However, it works correctly on negative precisions and cases where precision is + outside of the [-15, 15] range. + + (This function is also needed because CoreCLR lacks this overload.) + + + + + Evaluates a polynomial in v0 where the coefficients are ordered in increasing degree + + + + + Evaluates a polynomial in v0 where the coefficients are ordered in increasing degree + if reverse is false, and increasing degree if reverse is true. + + + + + A numerically precise version of sin(v0 * pi) + + + + + A numerically precise version of |sin(v0 * pi)| + + + + + Take the quotient of the 2 polynomials forming the Lanczos approximation + with N=13 and G=13.144565 + + + + + Computes the Gamma function on positive values, using the Lanczos approximation. + Lanczos parameters are N=13 and G=13.144565. + + + + + Computes the Log-Gamma function on positive values, using the Lanczos approximation. + Lanczos parameters are N=13 and G=13.144565. + + + + + Thread safe dictionary that allows lazy-creation where readers will block for + the creation of the lazily created value. Call GetOrCreateValue w/ a key + and a callback function. If the value exists it is returned, if not the create + callback is called (w/o any locks held). The create call back will only be called + once for each key. + + + + + Helper class which stores the published value + + + + + Dictionary[TKey, TValue] is not thread-safe in the face of concurrent reads and writes. SynchronizedDictionary + provides a thread-safe implementation. It holds onto a Dictionary[TKey, TValue] instead of inheriting from + it so that users who need to do manual synchronization can access the underlying Dictionary[TKey, TValue]. + + + + + This returns the raw unsynchronized Dictionary[TKey, TValue]. Users are responsible for locking + on it before accessing it. Also, it should not be arbitrarily handed out to other code since deadlocks + can be caused if other code incorrectly locks on it. + + + + + Provides fast strongly typed thread local storage. This is significantly faster than + Thread.GetData/SetData. + + + + + True if the caller will guarantee that all cleanup happens as the thread + unwinds. + + This is typically used in a case where the thread local is surrounded by + a try/finally block. The try block pushes some state, the finally block + restores the previous state. Therefore when the thread exits the thread + local is back to it's original state. This allows the ThreadLocal object + to not check the current owning thread on retrieval. + + + + + Gets the current value if its not == null or calls the provided function + to create a new value. + + + + + Calls the provided update function with the current value and + replaces the current value with the result of the function. + + + + + Replaces the current value with a new one and returns the old value. + + + + + Gets the StorageInfo for the current thread. + + + + + Called when the fast path storage lookup fails. if we encountered the Empty storage + during the initial fast check then spin until we hit non-empty storage and try the fast + path again. + + + + + Creates the StorageInfo for the thread when one isn't already present. + + + + + Gets or sets the value for the current thread. + + + + + Helper class for storing the value. We need to track if a ManagedThreadId + has been re-used so we also store the thread which owns the value. + + + + + Returns a numerical code of the size of a type. All types get both a horizontal + and vertical code. Types that are lower in both dimensions have implicit conversions + to types that are higher in both dimensions. + + + + + Represents an array that has value equality. + + + + + Simple class for tracking a list of items and enumerating over them. + The items are stored in weak references; if the objects are collected, + they will not be seen when enumerating. + + The type of the collection element. + + + + Similar to Dictionary[TKey,TValue], but it also ensures that the keys will not be kept alive + if the only reference is from this collection. The value will be kept alive as long as the key + is alive. + + This currently has a limitation that the caller is responsible for ensuring that an object used as + a key is not also used as a value in *any* instance of a WeakHash. Otherwise, it will result in the + object being kept alive forever. This effectively means that the owner of the WeakHash should be the + only one who has access to the object used as a value. + + Currently, there is also no guarantee of how long the values will be kept alive even after the keys + get collected. This could be fixed by triggerring CheckCleanup() to be called on every garbage-collection + by having a dummy watch-dog object with a finalizer which calls CheckCleanup(). + + + + + Check if any of the keys have gotten collected + + Currently, there is also no guarantee of how long the values will be kept alive even after the keys + get collected. This could be fixed by triggerring CheckCleanup() to be called on every garbage-collection + by having a dummy watch-dog object with a finalizer which calls CheckCleanup(). + + + + + This class holds onto internal debugging options used in this assembly. + These options can be set via environment variables DLR_{option-name}. + Boolean options map "true" to true and other values to false. + + These options are for internal debugging only, and should not be + exposed through any public APIs. + + + + + Sets the value at the given index for a tuple of the given size. This set supports + walking through nested tuples to get the correct final index. + + + + + Gets the value at the given index for a tuple of the given size. This get + supports walking through nested tuples to get the correct final index. + + + + + Gets the unbound generic Tuple type which has at lease size slots or null if a large enough tuple is not available. + + + + + Creates a generic tuple with the specified types. + + If the number of slots fits within the maximum tuple size then we simply + create a single tuple. If it's greater then we create nested tuples + (e.g. a Tuple`2 which contains a Tuple`128 and a Tuple`8 if we had a size of 136). + + + + + Gets the number of usable slots in the provided Tuple type including slots available in nested tuples. + + + + + Creates a new instance of tupleType with the specified args. If the tuple is a nested + tuple the values are added in their nested forms. + + + + + Gets the values from a tuple including unpacking nested values. + + + + + Gets the series of properties that needs to be accessed to access a logical item in a potentially nested tuple. + + + + + Gets the series of properties that needs to be accessed to access a logical item in a potentially nested tuple. + + + + + Provides an expression for creating a tuple with the specified values. + + + + + TODO: Alternatively, it should be sufficient to remember indices for this, list, dict and block. + + + + + Convention for an individual argument at a callsite. + + Multiple different callsites can match against a single declaration. + Some argument kinds can be "unrolled" into multiple arguments, such as list and dictionary. + + + + + Simple unnamed positional argument. + In Python: foo(1,2,3) are all simple arguments. + + + + + Argument with associated name at the callsite + In Python: foo(a=1) + + + + + Argument containing a list of arguments. + In Python: foo(*(1,2*2,3)) would match 'def foo(a,b,c)' with 3 declared arguments such that (a,b,c)=(1,4,3). + it could also match 'def foo(*l)' with 1 declared argument such that l=(1,4,3) + + + + + Argument containing a dictionary of named arguments. + In Python: foo(**{'a':1, 'b':2}) + + + + + Represents a logical member of a type. The member could either be real concrete member on a type or + an extension member. + + This seperates the "physical" members that .NET knows exist on types from the members that + logically exist on a type. It also provides other abstractions above the level of .NET reflection + such as MemberGroups and NamespaceTracker's. + + It also provides a wrapper around the reflection APIs which cannot be extended from partial trust. + + + + + Gets the expression that creates the value. + + Returns null if it's an error to get the value. The caller can then call GetErrorForGet to get + the correct error Expression (or null if they should provide a default). + + + + + Gets an expression that assigns a value to the left hand side. + + Returns null if it's an error to assign to. The caller can then call GetErrorForSet to + get the correct error Expression (or null if a default error should be provided). + + + + + Gets an expression that assigns a value to the left hand side. + + Returns null if it's an error to assign to. The caller can then call GetErrorForSet to + get the correct error Expression (or null if a default error should be provided). + + + + + Gets an expression that performs a call on the object using the specified arguments. + + Returns null if it's an error to perform the specific operation. The caller can then call + GetErrorsForDoCall to get the correct error Expression (or null if a default error should be provided). + + + + + Returns the error associated with getting the value. + + A null return value indicates that the default error message should be provided by the caller. + + + + + Returns the error associated with accessing this member via a bound instance. + + A null return value indicates that the default error message should be provided by the caller. + + + + + Helper for getting values that have been bound. Called from BoundMemberTracker. Custom member + trackers can override this to provide their own behaviors when bound to an instance. + + + + + Helper for setting values that have been bound. Called from BoundMemberTracker. Custom member + trackers can override this to provide their own behaviors when bound to an instance. + + + + + Helper for setting values that have been bound. Called from BoundMemberTracker. Custom member + trackers can override this to provide their own behaviors when bound to an instance. + + + + + Binds the member tracker to the specified instance rturning a new member tracker if binding + is possible. If binding is not possible the existing member tracker will be returned. For example + binding to a static field results in returning the original MemberTracker. Binding to an instance + field results in a new BoundMemberTracker which will get GetBoundValue/SetBoundValue to pass the + instance through. + + + + + The type of member tracker. + + + + + The logical declaring type of the member. + + + + + The name of the member. + + + + + We ensure we only produce one MemberTracker for each member which logically lives on the declaring type. So + for example if you get a member from a derived class which is declared on the base class it should be the same + as getting the member from the base class. That’s easy enough until you get into extension members – here there + might be one extension member which is being applied to multiple types. Therefore we need to take into account the + extension type when ensuring that we only have 1 MemberTracker ever created. + + + + + Richly represents the signature of a callsite. + + + + + Array of additional meta information about the arguments, such as named arguments. + Null for a simple signature that's just an expression list. eg: foo(a*b,c,d) + + + + + Number of arguments in the signature. + + + + + True if the OldCallAction includes an ArgumentInfo of ArgumentKind.Dictionary or ArgumentKind.Named. + + + + + Gets the number of positional arguments the user provided at the call site. + + + + + All arguments are unnamed and matched by position. + + + + + A custom member tracker which enables languages to plug in arbitrary + members into the lookup process. + + + + + Encapsulates information about the result that should be produced when + a OldDynamicAction cannot be performed. The ErrorInfo can hold one of: + an expression which creates an Exception to be thrown + an expression which produces a value which should be returned + directly to the user and represents an error has occured (for + example undefined in JavaScript) + an expression which produces a value which should be returned + directly to the user but does not actually represent an error. + + ErrorInfo's are produced by an ActionBinder in response to a failed + binding. + + + + + Private constructor - consumers must use static From* factories + to create ErrorInfo objects. + + + + + Creates a new ErrorInfo which represents an exception that should + be thrown. + + + + + Creates a new ErrorInfo which represents a value which should be + returned to the user. + + + + + Crates a new ErrorInfo which represents a value which should be returned + to the user but does not represent an error. + + + + + + + The ErrorInfo expression produces an exception + + + + + The ErrorInfo expression produces a value which represents the error (e.g. undefined) + + + + + The ErrorInfo expression produces a value which is not an error + + + + + Doesn't need to check PrivateBinding setting: no method that is part of the event is public the entire event is private. + If the code has already a reference to the event tracker instance for a private event its "static-ness" is not influenced + by private-binding setting. + + + + + Holds on a list of delegates hooked to the event. + We need the list because we cannot enumerate the delegates hooked to CLR event and we need to do so in + handler removal (we need to do custom delegate comparison there). If BCL enables the enumeration we could remove this. + + + + + Storage for the handlers - a key value pair of the callable object and the delegate handler. + + The delegate handler is closed over the callable object. Therefore as long as the object is alive the + delegate will stay alive and so will the callable object. That means it's fine to have a weak reference + to both of these objects. + + + + + Represents extension method. + + + + + The declaring type of the extension (the type this extension method extends) + + + + + The declaring type of the extension method. Since this is an extension method, + the declaring type is in fact the type this extension method extends, + not Method.DeclaringType + + + + + Represents a logical Property as a member of a Type. This Property can either be a real + concrete Property on a type (implemented with a ReflectedPropertyTracker) or an extension + property (implemented with an ExtensionPropertyTracker). + + + + + MemberGroups are a collection of MemberTrackers which are commonly produced + on-demand to talk about the available members. They can consist of a mix of + different member types or multiple membes of the same type. + + The most common source of MemberGroups is from ActionBinder.GetMember. From here + the DLR will perform binding to the MemberTrackers frequently producing the value + resulted from the user. If the result of the action produces a member it's self + the ActionBinder can provide the value exposed to the user via ReturnMemberTracker. + + ActionBinder provides default functionality for both getting members from a type + as well as exposing the members to the user. Getting members from the type maps + closely to reflection and exposing them to the user exposes the MemberTrackers + directly. + + + + + MethodGroup's represent a unique collection of method's. Typically this + unique set is all the methods which are overloaded by the same name including + methods with different arity. These methods represent a single logically + overloaded element of a .NET type. + + The base DLR binders will produce MethodGroup's when provided with a MemberGroup + which contains only methods. The MethodGroup's will be unique instances per + each unique group of methods. + + + + + Returns a BuiltinFunction bound to the provided type arguments. Returns null if the binding + cannot be performed. + + + + + NamespaceTracker represent a CLS namespace. + + + + + Provides a list of all the members of an instance. + + + + + Loads all the types from all assemblies that contribute to the current namespace (but not child namespaces) + + + + + Populates the tree with nodes for each part of the namespace + + + Full namespace name. It can be null (for top-level types) + + + + + As a fallback, so if the type does exist in any assembly. This would happen if a new type was added + that was not in the hardcoded list of types. + This code is not accurate because: + 1. We dont deal with generic types (TypeCollision). + 2. Previous calls to GetCustomMemberNames (eg. "from foo import *" in Python) would not have included this type. + 3. This does not deal with new namespaces added to the assembly + + + + + This stores all the public non-nested type names in a single namespace and from a single assembly. + This allows inspection of the namespace without eagerly loading all the types. Eagerly loading + types slows down startup, increases working set, and is semantically incorrect as it can trigger + TypeLoadExceptions sooner than required. + + + + + Enables implicit Type to TypeTracker conversions accross dynamic languages. + + + + + Represents the top reflected package which contains extra information such as + all the assemblies loaded and the built-in modules. + + + + + returns the package associated with the specified namespace and + updates the associated module to mark the package as imported. + + + + + Ensures that the assembly is loaded + + + true if the assembly was loaded for the first time. + false if the assembly had already been loaded before + + + + When an (interop) assembly is loaded, we scan it to discover the GUIDs of COM interfaces so that we can + associate the type definition with COM objects with that GUID. + Since scanning all loaded assemblies can be expensive, in the future, we might consider a more explicit + user binder to trigger scanning of COM types. + + + + Specifies that the member is a constructor, representing a ConstructorTracker + + + Specifies that the member is an event, representing a EventTracker + + + Specifies that the member is a field, representing a FieldTracker + + + Specifies that the member is a method, representing a MethodTracker + + + Specifies that the member is a property, representing a PropertyTracker + + + Specifies that the member is a property, representing a TypeTracker + + + Specifies that the member is a namespace, representing a NamespaceTracker + + + Specifies that the member is a group of method overloads, representing a MethodGroup + + + Specifies that the member is a group of types that very by arity, representing a TypeGroup + + + Specifies that the member is a custom meber, represetning a CustomTracker + + + Specifies that the member is a bound to an instance, representing a BoundMemberTracker + + + + A TypeCollision is used when we have a collision between + two types with the same name. Currently this is only possible w/ generic + methods that should logically have arity as a portion of their name. For eg: + System.EventHandler and System.EventHandler[T] + System.Nullable and System.Nullable[T] + System.IComparable and System.IComparable[T] + + The TypeCollision provides an indexer but also is a real type. When used + as a real type it is the non-generic form of the type. + + The indexer allows the user to disambiguate between the generic and + non-generic versions. Therefore users must always provide additional + information to get the generic version. + + + + The merged list so far. Could be null + The new type(s) to add to the merged list + The merged list. Could be a TypeTracker or TypeGroup + + + Gets the arity of generic parameters + + + No non-generic type is represented by this group. + + + + This returns the DeclaringType of all the types in the TypeGroup + + + + + This returns the base name of the TypeGroup (the name shared by all types minus arity) + + + + + This will return the result only for the non-generic type if one exists, and will throw + an exception if all types in the TypeGroup are generic + + + + + This will return the result only for the non-generic type if one exists, and will throw + an exception if all types in the TypeGroup are generic + + + + + True if the MethodBase is method which is going to construct an object + + + + + Returns the System.Type for any object, including null. The type of null + is represented by None.Type and all other objects just return the + result of Object.GetType + + + + + Simply returns a Type[] from calling GetType on each element of args. + + + + + EMITTED + Used by default method binder to check types of splatted arguments. + + + + + Given a MethodInfo which may be declared on a non-public type this attempts to + return a MethodInfo which will dispatch to the original MethodInfo but is declared + on a public type. + + Returns the original method if the method if a public version cannot be found. + + + + + Non-public types can have public members that we find when calling type.GetMember(...). This + filters out the non-visible members by attempting to resolve them to the correct visible type. + + If no correct visible type can be found then the member is not visible and we won't call it. + + + + + Sees if two MemberInfos point to the same underlying construct in IL. This + ignores the ReflectedType property which exists on MemberInfos which + causes direct comparisons to be false even if they are the same member. + + + + + Returns a value which indicates failure when a OldConvertToAction of ImplicitTry or + ExplicitTry. + + + + + Creates an interpreted delegate for the lambda. + + The lambda to compile. + A delegate which can interpret the lambda. + + + + Creates an interpreted delegate for the lambda. + + The lambda to compile. + The number of iterations before the interpreter starts compiling + A delegate which can interpret the lambda. + + + + Creates an interpreted delegate for the lambda. + + The lambda's delegate type. + The lambda to compile. + A delegate which can interpret the lambda. + + + + Creates an interpreted delegate for the lambda. + + The lambda to compile. + The number of iterations before the interpreter starts compiling + A delegate which can interpret the lambda. + + + + Compiles the lambda into a method definition. + + the lambda to compile + A which will be used to hold the lambda's IL. + A parameter that indicates if debugging information should be emitted to a PDB symbol store. + + + + Compiles the LambdaExpression. + + If the lambda is compiled with emitDebugSymbols, it will be + generated into a TypeBuilder. Otherwise, this method is the same as + calling LambdaExpression.Compile() + + This is a workaround for a CLR limitiation: DynamicMethods cannot + have debugging information. + + the lambda to compile + true to generate a debuggable method, false otherwise + the compiled delegate + + + + Compiles the LambdaExpression, emitting it into a new type, and + optionally making it debuggable. + + This is a workaround for a CLR limitiation: DynamicMethods cannot + have debugging information. + + the lambda to compile + Debugging information generator used by the compiler to mark sequence points and annotate local variables. + True if debug symbols (PDBs) are emitted by the . + the compiled delegate + + + + Reduces the provided DynamicExpression into site.Target(site, *args). + + + + + Removes all live objects and places them in static fields of a type. + + + + + Enables an object to be serializable to an Expression tree. The expression tree can then + be emitted into an assembly enabling the de-serialization of the object. + + + + + Serializes constants and dynamic sites so the code can be saved to disk + + + + + The MethodBinder will perform normal method binding. + + + + + The MethodBinder will return the languages definition of NotImplemented if the arguments are + incompatible with the signature. + + + + + The MethodBinder will set properties/fields for unused keyword arguments on the instance + that gets returned from the method. + + + + + The delegate representing the DLR Main function + + + + + An attribute that is applied to saved ScriptCode's to be used to re-create the ScriptCode + from disk. + + + + + Gets names stored in optimized scope. + + + + + Provides a mechanism for providing documentation stored in an assembly as metadata. + + Applying this attribute will enable documentation to be provided to the user at run-time + even if XML Documentation files are unavailable. + + + + + Updates an exception before it's getting re-thrown so + we can present a reasonable stack trace to the user. + + + + + Returns all the stack traces associates with an exception + + + + + Marks a class in the assembly as being an extension type for another type. + + + + + Marks a type in the assembly as being an extension type for another type. + + The type which is being extended + The type which provides the extension members. + + + + The type which contains extension members which are added to the type being extended. + + + + + The type which is being extended by the extension type. + + + + + Not all .NET enumerators throw exceptions if accessed in an invalid state. This type + can be used to throw exceptions from enumerators implemented in IronPython. + + + + + Event args for when a ScriptScope has had its contents changed. + + + + + Creates a new ModuleChangeEventArgs object with the specified name and type. + + + + + Creates a nwe ModuleChangeEventArgs with the specified name, type, and changed value. + + + + + Gets the name of the symbol that has changed. + + + + + Gets the way in which the symbol has changed: Set or Delete. + + + + + The the symbol has been set provides the new value. + + + + + The way in which a module has changed : Set or Delete + + + + + A new value has been set in the module (or a previous value has changed). + + + + + A value has been removed from the module. + + + + + A NullTextContentProvider to be provided when we have a pre-compiled ScriptCode which doesn't + have source code associated with it. + + + + + Singleton instance returned from an operator method when the operator method cannot provide a value. + + + + + Represents an ops-extension method which is added as an operator. + + The name must be a well-formed name such as "Add" that matches the CLS + naming conventions for adding overloads associated with op_* methods. + + + + + Represents an ops-extension method which is used to implement a property. + + + + + Provides a cache of reflection members. Only one set of values is ever handed out per a + specific request. + + + + + TODO: Make me private again + + + + + Indicates an extension method should be added as a static method, not a instance method. + + + + + Converts a generic ICollection of T into an array of T. + + If the collection is already an array of T the original collection is returned. + + + + + Converts a generic ICollection of T into an array of R using a given conversion. + + If the collection is already an array of R the original collection is returned. + + + + + Allows wrapping of proxy types (like COM RCWs) to expose their IEnumerable functionality + which is supported after casting to IEnumerable, even though Reflection will not indicate + IEnumerable as a supported interface + + + + + Requires the specified index to point inside the array. + + Array is null. + Index is outside the array. + + + + Requires the specified index to point inside the array. + + Index is outside the array. + + + + Requires the specified index to point inside the array or at the end + + Array is null. + Index is outside the array. + + + + Requires the specified index to point inside the array or at the end + + Array is null. + Index is outside the array. + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + Offset or count are out of range. + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + Offset or count are out of range. + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + Array is null. + Offset or count are out of range. + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + String is null. + Offset or count are out of range. + + + + Requires the array and all its items to be non-null. + + + + + Requires the enumerable collection and all its items to be non-null. + + + + + Presents a flat enumerable view of multiple dictionaries + + + + + Strongly-typed and parameterized string factory. + + + + + A string like "Cannot access member {1} declared on type {0} because the type contains generic parameters." + + + + + A string like "Type '{0}' is missing or cannot be loaded." + + + + + A string like "static property "{0}" of "{1}" can only be read through a type, not an instance" + + + + + A string like "static property "{0}" of "{1}" can only be assigned to through a type, not an instance" + + + + + A string like "Type parameter is {0}. Expected a delegate." + + + + + A string like "Cannot cast from type '{0}' to type '{1}" + + + + + A string like "unknown member type: '{0}'. " + + + + + A string like "The operation requires a non-generic type for {0}, but this represents generic types only" + + + + + A string like "Invalid operation: '{0}'" + + + + + A string like "Cannot create default value for type {0}." + + + + + A string like "Unhandled convert: {0}" + + + + + A string like "{0}.{1} has no publiclly visible method." + + + + + A string like "Extension type {0} must be public." + + + + + A string like "Invalid type of argument {0}; expecting {1}." + + + + + A string like "Field {0} is read-only" + + + + + A string like "Property {0} is read-only" + + + + + A string like "Expected event from {0}.{1}, got event from {2}.{3}." + + + + + A string like "expected bound event, got {0}." + + + + + A string like "Expected type {0}, got {1}." + + + + + A string like "can only write to member {0}." + + + + + A string like "Invalid stream type: {0}." + + + + + A string like "can't add another casing for identifier {0}" + + + + + A string like "can't add new identifier {0}" + + + + + A string like "Type '{0}' doesn't provide a suitable public constructor or its implementation is faulty: {1}" + + + + + A string like "Cannot emit constant {0} ({1})" + + + + + A string like "No implicit cast from {0} to {1}" + + + + + A string like "No explicit cast from {0} to {1}" + + + + + A string like "name '{0}' not defined" + + + + + A string like "Cannot create instance of {0} because it contains generic parameters" + + + + + A string like "Non-verifiable assembly generated: {0}:\nAssembly preserved as {1}\nError text:\n{2}\n" + + + + + A string like "Method precondition violated" + + + + + A string like "Invalid argument value" + + + + + A string like "Non-empty string required" + + + + + A string like "Non-empty collection required" + + + + + A string like "must by an Exception instance" + + + + + A string like "Type of test must be bool" + + + + + A string like "Type of the expression must be bool" + + + + + A string like "Empty string is not a valid path." + + + + + A string like "Invalid delegate type (Invoke method not found)." + + + + + A string like "expected only static property" + + + + + A string like "Property doesn't exist on the provided type" + + + + + A string like "Field doesn't exist on provided type" + + + + + A string like "Type doesn't have constructor with a given signature" + + + + + A string like "Type doesn't have a method with a given name." + + + + + A string like "Type doesn't have a method with a given name and signature." + + + + + A string like "Count must be non-negative." + + + + + A string like "arrayType must be an array type" + + + + + A string like "Either code or target must be specified." + + + + + A string like "RuleBuilder can only be used with delegates whose first argument is CallSite." + + + + + A string like "no instance for call." + + + + + A string like "Missing Test." + + + + + A string like "Missing Target." + + + + + A string like "Finally already defined." + + + + + A string like "Can not have fault and finally." + + + + + A string like "Fault already defined." + + + + + A string like "Global/top-level local variable names must be unique." + + + + + A string like "Generating code from non-serializable CallSiteBinder." + + + + + A string like "pecified path is invalid." + + + + + A string like "Dictionaries are not hashable." + + + + + A string like "language already registered." + + + + + A string like "The method or operation is not implemented." + + + + + A string like "No exception." + + + + + A string like "Already initialized." + + + + + A string like "CreateScopeExtension must return a scope extension." + + + + + A string like "Invalid number of parameters for the service." + + + + + A string like "Cannot change non-caching value." + + + + + A string like "No code to compile." + + + + + A string like "Queue empty." + + + + + A string like "Enumeration has not started. Call MoveNext." + + + + + A string like "Enumeration already finished." + + + + + A string like "Invalid output directory." + + + + + A string like "Invalid assembly name or file extension." + + + + + A string like "No default value for a given type." + + + + + A string like "Specified language provider type is not registered." + + + + + A string like "can't read from property" + + + + + A string like "can't write to property" + + + + + Strongly-typed and parameterized exception factory. + + + + + ArgumentException with message like "Either code or target must be specified." + + + + + InvalidOperationException with message like "Type parameter is {0}. Expected a delegate." + + + + + InvalidOperationException with message like "Cannot cast from type '{0}' to type '{1}" + + + + + InvalidOperationException with message like "unknown member type: '{0}'. " + + + + + InvalidOperationException with message like "RuleBuilder can only be used with delegates whose first argument is CallSite." + + + + + InvalidOperationException with message like "no instance for call." + + + + + InvalidOperationException with message like "Missing Test." + + + + + InvalidOperationException with message like "Missing Target." + + + + + TypeLoadException with message like "The operation requires a non-generic type for {0}, but this represents generic types only" + + + + + ArgumentException with message like "Invalid operation: '{0}'" + + + + + InvalidOperationException with message like "Finally already defined." + + + + + InvalidOperationException with message like "Can not have fault and finally." + + + + + InvalidOperationException with message like "Fault already defined." + + + + + ArgumentException with message like "Cannot create default value for type {0}." + + + + + ArgumentException with message like "Unhandled convert: {0}" + + + + + InvalidOperationException with message like "{0}.{1} has no publiclly visible method." + + + + + ArgumentException with message like "Global/top-level local variable names must be unique." + + + + + ArgumentException with message like "Generating code from non-serializable CallSiteBinder." + + + + + ArgumentException with message like "pecified path is invalid." + + + + + ArgumentTypeException with message like "Dictionaries are not hashable." + + + + + InvalidOperationException with message like "language already registered." + + + + + NotImplementedException with message like "The method or operation is not implemented." + + + + + InvalidOperationException with message like "No exception." + + + + + ArgumentException with message like "Extension type {0} must be public." + + + + + InvalidOperationException with message like "Already initialized." + + + + + InvalidImplementationException with message like "CreateScopeExtension must return a scope extension." + + + + + ArgumentException with message like "Invalid number of parameters for the service." + + + + + ArgumentException with message like "Invalid type of argument {0}; expecting {1}." + + + + + ArgumentException with message like "Cannot change non-caching value." + + + + + MissingMemberException with message like "Field {0} is read-only" + + + + + MissingMemberException with message like "Property {0} is read-only" + + + + + ArgumentException with message like "Expected event from {0}.{1}, got event from {2}.{3}." + + + + + ArgumentTypeException with message like "expected bound event, got {0}." + + + + + ArgumentTypeException with message like "Expected type {0}, got {1}." + + + + + MemberAccessException with message like "can only write to member {0}." + + + + + InvalidOperationException with message like "No code to compile." + + + + + ArgumentException with message like "Invalid stream type: {0}." + + + + + InvalidOperationException with message like "Queue empty." + + + + + InvalidOperationException with message like "Enumeration has not started. Call MoveNext." + + + + + InvalidOperationException with message like "Enumeration already finished." + + + + + InvalidOperationException with message like "can't add another casing for identifier {0}" + + + + + InvalidOperationException with message like "can't add new identifier {0}" + + + + + ArgumentException with message like "Invalid output directory." + + + + + ArgumentException with message like "Invalid assembly name or file extension." + + + + + ArgumentException with message like "Cannot emit constant {0} ({1})" + + + + + ArgumentException with message like "No implicit cast from {0} to {1}" + + + + + ArgumentException with message like "No explicit cast from {0} to {1}" + + + + + MissingMemberException with message like "name '{0}' not defined" + + + + + ArgumentException with message like "No default value for a given type." + + + + + ArgumentException with message like "Specified language provider type is not registered." + + + + + InvalidOperationException with message like "can't read from property" + + + + + InvalidOperationException with message like "can't write to property" + + + + + ArgumentException with message like "Cannot create instance of {0} because it contains generic parameters" + + + + + System.Security.VerificationException with message like "Non-verifiable assembly generated: {0}:\nAssembly preserved as {1}\nError text:\n{2}\n" + + + + + Seeks the first character of a specified line in the text stream. + + The reader. + Line number. The current position is assumed to be line #1. + + Returns true if the line is found, false otherwise. + + + + + Reads characters to a string until end position or a terminator is reached. + Doesn't include the terminator into the resulting string. + Returns null, if the reader is at the end position. + + + + + Reads characters until end position or a terminator is reached. + Returns true if the character has been found (the reader is positioned right behind the character), + false otherwise. + + + + + Creates an open delegate for the given (dynamic)method. + + + + + Creates a closed delegate for the given (dynamic)method. + + + + + Gets a Func of CallSite, object * paramCnt, object delegate type + that's suitable for use in a non-strongly typed call site. + + + + + Returns true if the specified parameter is mandatory, i.e. is not optional and doesn't have a default value. + + + + + Yields all ancestors of the given type including the type itself. + Does not include implemented interfaces. + + + + + Like Type.GetInterfaces, but only returns the interfaces implemented by this type + and not its parents. + + + + + Enumerates extension methods in given assembly. Groups the methods by declaring namespace. + Uses a global cache if is true. + + + + + Binds occurances of generic parameters in against corresponding types in . + Invokes (parameter, type) for each such binding. + Returns false if the is structurally different from or if the binder returns false. + + + + + Determines if a given type matches the type that the method extends. + The match might be non-trivial if the extended type is an open generic type with constraints. + + + + + Splits text and optionally indents first lines - breaks along words, not characters. + + + + + Provides a StreamContentProvider for a stream of content backed by a file on disk. + + + + diff --git a/packages/IronPython.2.7.4/lib/Sl5/Microsoft.Scripting.Silverlight.dll b/packages/IronPython.2.7.4/lib/Sl5/Microsoft.Scripting.Silverlight.dll new file mode 100644 index 0000000000..fe20570c0e Binary files /dev/null and b/packages/IronPython.2.7.4/lib/Sl5/Microsoft.Scripting.Silverlight.dll differ diff --git a/packages/IronPython.2.7.4/lib/Sl5/Microsoft.Scripting.dll b/packages/IronPython.2.7.4/lib/Sl5/Microsoft.Scripting.dll new file mode 100644 index 0000000000..1d7eccad71 Binary files /dev/null and b/packages/IronPython.2.7.4/lib/Sl5/Microsoft.Scripting.dll differ diff --git a/packages/IronPython.2.7.4/lib/Sl5/Microsoft.Scripting.xml b/packages/IronPython.2.7.4/lib/Sl5/Microsoft.Scripting.xml new file mode 100644 index 0000000000..4bd1981ebb --- /dev/null +++ b/packages/IronPython.2.7.4/lib/Sl5/Microsoft.Scripting.xml @@ -0,0 +1,3313 @@ + + + + Microsoft.Scripting + + + + + Provides documentation against live objects for use in a REPL window. + + + + + Gets the available members defined on the provided object. + + + + + Gets the overloads available for the provided object if it is invokable. + + + + + Provides documentation about a member in a live object. + + + + + The name of the member + + + + + The kind of the member if it's known. + + + + + Specifies the type of member. + + + + + Provides documentation for a single overload of an invokable object. + + + + + The name of the invokable object. + + + + + The documentation for the overload or null if no documentation is available. + + + + + The parameters for the invokable object. + + + + + Information about the return value. + + + + + Provides documentation for a single parameter. + + + + + The name of the parameter + + + + + The type name of the parameter or null if no type information is available. + + + + + Provides addition information about the parameter such as if it's a parameter array. + + + + + Gets the documentation string for this parameter or null if no documentation is available. + + + + + Indications extra information about a parameter such as if it's a parameter array. + + + + + This structure represents an immutable integer interval that describes a range of values, from Start to End. + + It is closed on the left and open on the right: [Start .. End). + + + + + Wraps a an IDictionary[object, object] and exposes it as an IDynamicMetaObjectProvider so that + users can access string attributes using member accesses. + + + + + Provides language specific documentation for live objects. + + + + + Helper for storing information about stack frames. + + + + + Exposes a IDictionary[string, object] as a dynamic object. Gets/sets/deletes turn + into accesses on the underlying dictionary. + + + + + The Default Parameter Value Attribute. + + + + + The constructor + + The value. + + + + Class that represents compiler options. + Note that this class is likely to change when hosting API becomes part of .Net + + + + + This overload will be called when a SourceUnit is not available. This can happen if the code is being executed remotely, + since SourceUnit cannot be marshaled across AppDomains. + + + + + Hosting API counterpart for . + + + + + Executes code in a default scope. + + + + + Execute code within a given scope and returns the result. + + + + + Executes code in in a default scope and converts to a given type. + + + + + Execute code within a given scope and converts result to a given type. + + + + + Engine that compiled this code. + + + + + Default scope for this code. + + + + + The host can use this class to track for errors reported during script parsing and compilation. + Hosting API counterpart for . + + + + + Bridges ErrorSink and ErrorListener. + Errors reported by language compilers to ErrorSink are forwarded to the ErrorListener provided by the host. + + + This proxy is created in the scenario when the compiler is processing a single SourceUnit. + Therefore it could maintain one to one mapping from SourceUnit to ScriptSource. + In a case, which shouldn't happen, that the compiler reports an error in a different SourceUnit we just create + a new instance of the ScriptSource each time. + + TODO: Consider compilation of multiple source units and creating a hashtable mapping SourceUnits to ScriptSources + within the context of compilation unit. + + + + + Bridges ErrorListener and ErrorSink. It provides the reverse functionality as ErrorSinkProxyListener + + + + + Stores information needed to setup a language + + + + + Creates a new LanguageSetup + + assembly qualified type name of the language + provider + + + + Creates a new LanguageSetup with the provided options + TODO: remove this overload? + + + + + Creates a new LanguageSetup with the provided options + + + + + Gets an option as a strongly typed value. + + + + + The assembly qualified type name of the language provider + + + + + Display name of the language. If empty, it will be set to the first + name in the Names list. + + + + + Case-insensitive language names. + + + + + Case-insensitive file extension, optionally starts with a dot. + + + + + Option names are case-sensitive. + + + + + ObjectOperations provide a large catalogue of object operations such as member access, conversions, + indexing, and things like addition. There are several introspection and tool support services available + for more advanced hosts. + + You get ObjectOperation instances from ScriptEngine, and they are bound to their engines for the semantics + of the operations. There is a default instance of ObjectOperations you can share across all uses of the + engine. However, very advanced hosts can create new instances. + + + + + Returns true if the object can be called, false if it cannot. + + Even if an object is callable Call may still fail if an incorrect number of arguments or type of arguments are provided. + + + + + Invokes the provided object with the given parameters and returns the result. + + The prefered way of calling objects is to convert the object to a strongly typed delegate + using the ConvertTo methods and then invoking that delegate. + + + + + Invokes a member on the provided object with the given parameters and returns the result. + + + + + Creates a new instance from the provided object using the given parameters, and returns the result. + + + + + Gets the member name from the object obj. Throws an exception if the member does not exist or is write-only. + + + + + Gets the member name from the object obj and converts it to the type T. Throws an exception if the + member does not exist, is write-only, or cannot be converted. + + + + + Gets the member name from the object obj. Returns true if the member is successfully retrieved and + stores the value in the value out param. + + + + + Returns true if the object has a member named name, false if the member does not exist. + + + + + Removes the member name from the object obj. + + + + + Sets the member name on object obj to value. + + + + + Sets the member name on object obj to value. This overload can be used to avoid + boxing and casting of strongly typed members. + + + + + Gets the member name from the object obj. Throws an exception if the member does not exist or is write-only. + + + + + Gets the member name from the object obj and converts it to the type T. Throws an exception if the + member does not exist, is write-only, or cannot be converted. + + + + + Gets the member name from the object obj. Returns true if the member is successfully retrieved and + stores the value in the value out param. + + + + + Returns true if the object has a member named name, false if the member does not exist. + + + + + Removes the member name from the object obj. + + + + + Sets the member name on object obj to value. + + + + + Sets the member name on object obj to value. This overload can be used to avoid + boxing and casting of strongly typed members. + + + + + Converts the object obj to the type T. The conversion will be explicit or implicit depending on + what the langauge prefers. + + + + + Converts the object obj to the type type. The conversion will be explicit or implicit depending on + what the langauge prefers. + + + + + Converts the object obj to the type T. Returns true if the value can be converted, false if it cannot. + + The conversion will be explicit or implicit depending on what the langauge prefers. + + + + + Converts the object obj to the type type. Returns true if the value can be converted, false if it cannot. + + The conversion will be explicit or implicit depending on what the langauge prefers. + + + + + Converts the object obj to the type T including explicit conversions which may lose information. + + + + + Converts the object obj to the type type including explicit conversions which may lose information. + + + + + Converts the object obj to the type T including explicit conversions which may lose information. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type type including explicit conversions which may lose information. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type T including implicit conversions. + + + + + Converts the object obj to the type type including implicit conversions. + + + + + Converts the object obj to the type T including implicit conversions. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type type including implicit conversions. + + Returns true if the value can be converted, false if it cannot. + + + + + Performs a generic unary operation on the specified target and returns the result. + + + + + Performs a generic unary operation on the strongly typed target and returns the value as the specified type + + + + + Performs the generic binary operation on the specified targets and returns the result. + + + + + Peforms the generic binary operation on the specified strongly typed targets and returns + the strongly typed result. + + + + + Performs addition on the specified targets and returns the result. Throws an exception + if the operation cannot be performed. + + + + + Performs subtraction on the specified targets and returns the result. Throws an exception + if the operation cannot be performed. + + + + + Raises the first object to the power of the second object. Throws an exception + if the operation cannot be performed. + + + + + Multiplies the two objects. Throws an exception + if the operation cannot be performed. + + + + + Divides the first object by the second object. Throws an exception + if the operation cannot be performed. + + + + + Performs modulus of the 1st object by the second object. Throws an exception + if the operation cannot be performed. + + + + + Shifts the left object left by the right object. Throws an exception if the + operation cannot be performed. + + + + + Shifts the left object right by the right object. Throws an exception if the + operation cannot be performed. + + + + + Performs a bitwise-and of the two operands. Throws an exception if the operation + cannot be performed. + + + + + Performs a bitwise-or of the two operands. Throws an exception if the operation + cannot be performed. + + + + + Performs a exclusive-or of the two operands. Throws an exception if the operation + cannot be performed. + + + + + Compares the two objects and returns true if the left object is less than the right object. + Throws an exception if hte comparison cannot be performed. + + + + + Compares the two objects and returns true if the left object is greater than the right object. + Throws an exception if hte comparison cannot be performed. + + + + + Compares the two objects and returns true if the left object is less than or equal to the right object. + Throws an exception if hte comparison cannot be performed. + + + + + Compares the two objects and returns true if the left object is greater than or equal to the right object. + Throws an exception if hte comparison cannot be performed. + + + + + Compares the two objects and returns true if the left object is equal to the right object. + Throws an exception if the comparison cannot be performed. + + + + + Compares the two objects and returns true if the left object is not equal to the right object. + Throws an exception if hte comparison cannot be performed. + + + + + Returns a string which describes the object as it appears in source code + + + + + Returns a string representation of the object in a language specific object display format. + + + + + Returns a list of strings which contain the known members of the object. + + + + + Returns a string providing documentation for the specified object. + + + + + Returns a list of signatures applicable for calling the specified object in a form displayable to the user. + + + + + Reads an option whose value is expected to be a collection of non-null strings. + Reaturns a read-only copy of the option's value. + + + + + Dynamically choose between interpreting, simple compilation and compilation + that takes advantage of runtime history. + + + + + The number of iterations before the interpreter starts compiling.s + + + + + Display exception detail (callstack) when exception gets caught + + + + + Whether to gather performance statistics. + + + + + Initial file search paths provided by the host. + + + + + Abstracts system operations that are used by DLR and could potentially be platform specific. + The host can implement its PAL to adapt DLR to the platform it is running on. + For example, the Silverlight host adapts some file operations to work against files on the server. + + + + Invalid path. + + + Invalid path. + + + + Advanced APIs for HAPI providers. These methods should not be used by hosts. + They are provided for other hosting API implementers that would like to leverage existing HAPI and + extend it with language specific functionality, for example. + + + + is a null reference. + is remote. + + + e is a null reference. + is remote. + + + is a null reference. + is remote. + + + is a null reference. + is remote. + + + is a null reference. + is remote. + + + is a null reference. + is remote. + + + is a null reference. + is a null reference. + is a transparent proxy. + + + + Performs a callback in the ScriptEngine's app domain and returns the result. + + + + + Creates a new DocumentationOperations object from the given DocumentationProvider. + + + + + Represents a language in Hosting API. + Hosting API counterpart for . + + + + + Returns a new ObjectOperations object. See the Operations property for why you might want to call this. + + + + + Returns a new ObjectOperations object that inherits any semantics particular to the provided ScriptScope. + + See the Operations property for why you might want to call this. + + + + + Executes an expression. The execution is not bound to any particular scope. + + The engine doesn't support code execution. + is a null reference. + + + + Executes an expression within the specified scope. + + The engine doesn't support code execution. + is a null reference. + is a null reference. + + + + Executes an expression within a new scope and converts result to the given type. + + The engine doesn't support code execution. + is a null reference. + + + + Executes an expression within the specified scope and converts result to the given type. + + The engine doesn't support code execution. + is a null reference. + is a null reference. + + + + Executes content of the specified file in a new scope and returns that scope. + + The engine doesn't support code execution. + is a null reference. + + + + Executes content of the specified file against the given scope. + + The . + The engine doesn't support code execution. + is a null reference. + is a null reference. + + + + Creates a new ScriptScope whose storage is an arbitrary object. + + Accesses to the ScriptScope will turn into get, set, and delete members against the object. + + + + + This method returns the ScriptScope in which a ScriptSource of given path was executed. + + The ScriptSource.Path property is the key to finding the ScriptScope. Hosts need + to make sure they create a ScriptSource and set its Path property appropriately. + + GetScope is primarily useful for tools that need to map files to their execution scopes. For example, + an editor and interpreter tool might run a file Foo that imports or requires a file Bar. + + The editor's user might later open the file Bar and want to execute expressions in its context. + The tool would need to find Bar's ScriptScope for setting the appropriate context in its interpreter window. + This method helps with this scenario. + + + + + Return a ScriptSource object from string contents with the current engine as the language binding. + + The default SourceCodeKind is AutoDetect. + + The ScriptSource's Path property defaults to null. + + + + + Return a ScriptSource object from string contents with the current engine as the language binding. + + The ScriptSource's Path property defaults to null. + + + + + Return a ScriptSource object from string contents with the current engine as the language binding. + + The default SourceCodeKind is AutoDetect. + + + + + Return a ScriptSource object from string contents. These are helpers for creating ScriptSources' with the right language binding. + + + + + Return a ScriptSource object from file contents with the current engine as the language binding. + + The path's extension does NOT have to be in ScriptRuntime.GetRegisteredFileExtensions + or map to this language engine with ScriptRuntime.GetEngineByFileExtension. + + The default SourceCodeKind is File. + + The ScriptSource's Path property will be the path argument. + + The encoding defaults to System.Text.Encoding.Default. + + + + + Return a ScriptSource object from file contents with the current engine as the language binding. + + The path's extension does NOT have to be in ScriptRuntime.GetRegisteredFileExtensions + or map to this language engine with ScriptRuntime.GetEngineByFileExtension. + + The default SourceCodeKind is File. + + The ScriptSource's Path property will be the path argument. + + + + + Return a ScriptSource object from file contents with the current engine as the language binding. + + The path's extension does NOT have to be in ScriptRuntime.GetRegisteredFileExtensions + or map to this language engine with ScriptRuntime.GetEngineByFileExtension. + + The ScriptSource's Path property will be the path argument. + + + + + These methods return ScriptSource objects from stream contents with the current engine as the language binding. + + The default SourceCodeKind is File. + + The encoding defaults to Encoding.Default. + + + + + These methods return ScriptSource objects from stream contents with the current engine as the language binding. + + The default SourceCodeKind is File. + + + + + These methods return ScriptSource objects from stream contents with the current engine as the language binding. + + The encoding defaults to Encoding.Default. + + + + + This method returns a ScriptSource with the content provider supplied with the current engine as the language binding. + + This helper lets you own the content provider so that you can implement a stream over internal host data structures, such as an editor's text representation. + + + + + This method returns a language-specific service. + + It provides a point of extensibility for a language implementation + to offer more functionality than the standard engine members discussed here. + + Commonly available services include: + TokenCategorizer + Provides standardized tokenization of source code + ExceptionOperations + Provides formatting of exception objects. + DocumentationProvidera + Provides documentation for live object. + + + + + Sets the search paths used by the engine for loading files when a script wants + to import or require another file of code. + + The language doesn't allow to set search paths. + + + + Gets the search paths used by the engine for loading files when a script wants + to import or require another file of code. + + + + + Returns a default ObjectOperations for the engine. + + Because an ObjectOperations object caches rules for the types of + objects and operations it processes, using the default ObjectOperations for + many objects could degrade the caching benefits. Eventually the cache for + some operations could degrade to a point where ObjectOperations stops caching and + does a full search for an implementation of the requested operation for the given objects. + + Another reason to create a new ObjectOperations instance is to have it bound + to the specific view of a ScriptScope. Languages may attach per-language + behavior to a ScriptScope which would alter how the operations are performed. + + For simple hosting situations, this is sufficient behavior. + + + + + + + This property returns readon-only LanguageOptions this engine is using. + + + The values are determined during runtime initialization and read-only afterwards. + You can change the settings via a configuration file or explicitly using ScriptRuntimeSetup class. + + + + + This property returns the ScriptRuntime for the context in which this engine executes. + + + + + This property returns the engine's version as a string. The format is language-dependent. + + + + + ScriptHost is collocated with ScriptRuntime in the same app-domain. + The host can implement a derived class to consume some notifications and/or + customize operations like TryGetSourceUnit,ResolveSourceUnit, etc. + + The areguments to the the constructor of the derived class are specified in ScriptRuntimeSetup + instance that enters ScriptRuntime initialization. + + If the host is remote with respect to DLR (i.e. also with respect to ScriptHost) + and needs to access objects living in its app-domain it can pass MarshalByRefObject + as an argument to its ScriptHost subclass constructor. + + + + + The runtime the host is attached to. + + + + + Invoked after the initialization of the associated Runtime is finished. + The host can override this method to perform additional initialization of runtime (like loading assemblies etc.). + + + + + Invoked after a new language is loaded into the Runtime. + The host can override this method to perform additional initialization of language engines. + + + + + Provides hosting to DLR. Forwards DLR requests to the ScriptHost. + + + + + DLR requires any Hosting API provider to implement this class and provide its instance upon Runtime initialization. + DLR calls on it to perform basic host/system dependent operations. + + + + + Abstracts system operations that are used by DLR and could potentially be platform specific. + + + + + Provides host-redirectable IO streams used by DLR languages for default IO. + + + + + Used if the host stores the output as binary data. + + Binary stream to write data to. + Encoding used to convert textual data written to the output by the script. + + + + Used if the host handles both kinds of data (textual and binary) by itself. + + + + + Represents a Dynamic Language Runtime in Hosting API. + Hosting API counterpart for . + + + + + Creates ScriptRuntime in the current app-domain and initialized according to the the specified settings. + Creates an instance of host class specified in the setup and associates it with the created runtime. + Both Runtime and ScriptHost are collocated in the current app-domain. + + + + + Creates a new runtime with languages set up according to the current application configuration + (using System.Configuration). + + + + + + + + + Gets engine for the specified language. + + + + + Looks up the engine for the specified language. If the engine hasn't been created in this Runtime, it is instantiated here. + The method doesn't lock nor send notifications to the host. + + + + + path is empty, contains one or more of the invalid characters defined in GetInvalidPathChars or doesn't have an extension. + + + + path is null + file extension does not map to language engine + language does not have any search paths + file does exist in language's search path + + + + This method walks the assembly's namespaces and name bindings to ScriptRuntime.Globals + to represent the types available in the assembly. Each top-level namespace name gets + bound in Globals to a dynamic object representing the namespace. Within each top-level + namespace object, nested namespace names are bound to dynamic objects representing each + tier of nested namespaces. When this method encounters the same namespace-qualified name, + it merges names together objects representing the namespaces. + + + + + + This property returns the "global object" or name bindings of the ScriptRuntime as a ScriptScope. + + You can set the globals scope, which you might do if you created a ScriptScope with an + IAttributesCollection so that your host could late bind names. + + + + + Stores information needed to setup a ScriptRuntime + + + + + Reads setup from .NET configuration system (.config files). + If there is no configuration available returns an empty setup. + + + + + The list of language setup information for languages to load into + the runtime + + + + + Indicates that the script runtime is in debug mode. + This means: + + 1) Symbols are emitted for debuggable methods (methods associated with SourceUnit). + 2) Debuggable methods are emitted to non-collectable types (this is due to CLR limitations on dynamic method debugging). + 3) JIT optimization is disabled for all methods + 4) Languages may disable optimizations based on this value. + + + + + Ignore CLR visibility checks + + + + + Can be any derived class of ScriptHost. When set, it allows the + host to override certain methods to control behavior of the runtime + + + + + Option names are case-sensitive. + + + + + Arguments passed to the host type when it is constructed + + + + + A ScriptScope is a unit of execution for code. It consists of a global Scope which + all code executes in. A ScriptScope can have an arbitrary initializer and arbitrary + reloader. + + ScriptScope is not thread safe. Host should either lock when multiple threads could + access the same module or should make a copy for each thread. + + Hosting API counterpart for . + + + + + Gets a value stored in the scope under the given name. + + The specified name is not defined in the scope. + is a null reference. + + + + Gets a value stored in the scope under the given name. + Converts the result to the specified type using the conversion that the language associated with the scope defines. + If no language is associated with the scope, the default CLR conversion is attempted. + + The specified name is not defined in the scope. + is a null reference. + + + + Tries to get a value stored in the scope under the given name. + + is a null reference. + + + + Tries to get a value stored in the scope under the given name. + Converts the result to the specified type using the conversion that the language associated with the scope defines. + If no language is associated with the scope, the default CLR conversion is attempted. + + is a null reference. + + + + Sets the name to the specified value. + + is a null reference. + + + + Determines if this context or any outer scope contains the defined name. + + is a null reference. + + + + Removes the variable of the given name from this scope. + + true if the value existed in the scope before it has been removed. + is a null reference. + + + + Gets a list of variable names stored in the scope. + + + + + Gets an array of variable names and their values stored in the scope. + + + + + Gets an engine for the language associated with this scope. + Returns invariant engine if the scope is language agnostic. + + + + + Hosting counterpart for . + + + + + Compile the ScriptSource into CompileCode object that can be executed + repeatedly in its default scope or in other scopes without having to recompile the code. + + Code cannot be compiled. + + + + Errors are reported to the specified listener. + Returns null if the parser cannot compile the code due to errors. + + + + + Errors are reported to the specified listener. + Returns null if the parser cannot compile the code due to error(s). + + + + + Errors are reported to the specified listener. + Returns null if the parser cannot compile the code due to error(s). + + + + + Executes the code in the specified scope. + Returns an object that is the resulting value of running the code. + + When the ScriptSource is a file or statement, the engine decides what is + an appropriate value to return. Some languages return the value produced + by the last expression or statement, but languages that are not expression + based may return null. + + Code cannot be compiled. + + + + Executes the source code. The execution is not bound to any particular scope. + + + + + Executes the code in a specified scope and converts the result to the specified type. + The conversion is language specific. + + + + + Executes the code in an empty scope and converts the result to the specified type. + The conversion is language specific. + + + + + Runs a specified code as if it was a program launched from OS command shell. + and returns a process exit code indicating the success or error condition + of executing the code. + + Exact behavior depends on the language. Some languages have a dedicated "exit" exception that + carries the exit code, in which case the exception is cought and the exit code is returned. + The default behavior returns the result of program's execution converted to an integer + using a language specific conversion. + + Code cannot be compiled. + + + + Detects the encoding of the content. + + + An encoding that is used by the reader of the script source to transcode its content to Unicode text. + Null if the content is already textual and no transcoding is performed. + + + Note that the default encoding specified when the script source is created could be overridden by + an encoding that is found in the content preamble (Unicode BOM or a language specific encoding preamble). + In that case the preamble encoding is returned. Otherwise, the default encoding is returned. + + An I/O error occurs. + + + + Reads specified range of lines (or less) from the source unit. + + 1-based number of the first line to fetch. + The number of lines to fetch. + + Which character sequences are considered line separators is language specific. + If language doesn't specify otherwise "\r", "\n", "\r\n" are recognized line separators. + + An I/O error occurs. + + + + Reads a specified line. + + 1-based line number. + Line content. Line separator is not included. + An I/O error occurs. + + Which character sequences are considered line separators is language specific. + If language doesn't specify otherwise "\r", "\n", "\r\n" are recognized line separators. + + + + + Gets script source content. + + Entire content. + An I/O error occurs. + + The result includes language specific preambles (e.g. "#coding:UTF-8" encoding preamble recognized by Ruby), + but not the preamble defined by the content encoding (e.g. BOM). + The entire content of the source unit is encoded by single encoding (if it is read from binary stream). + + + + + Identification of the source unit. Assigned by the host. + The format and semantics is host dependent (could be a path on file system or URL). + null for anonymous script source. + Cannot be an empty string. + + + + + Move the tokenizer past the next token and return its category. + + The token information associated with the token just scanned. + + + + Move the tokenizer past the next token. + + False if the end of stream has been reached, true otherwise. + + + + Get all tokens over a block of the stream. + + + + The scanner should return full tokens. If startLocation + length lands in the middle of a token, the full token + should be returned. + + s + Tokens are read until at least given amount of characters is read or the stream ends. + A enumeration of tokens. + + + + Scan from startLocation to at least startLocation + length. + + Tokens are read until at least given amount of characters is read or the stream ends. + + This method is used to determine state at arbitrary startLocation. + + False if the end of stream has been reached, true otherwise. + + + + The current internal state of the scanner. + + + + + The current startLocation of the scanner. + + + + + Represents a language context. Typically there is at most 1 context + associated with each language, but some languages may use more than one context + to identify code that should be treated differently. Contexts are used during + member and operator lookup. + + + + + Registers a language within the system with the specified name. + + + + + Looks up the context ID for the specified context identifier + + + + + Singleton for each language. + + + + + Must not be called under a lock as it can potentially call a user code. + + The language context's implementation failed to instantiate. + + + + Whether the application is in debug mode. + This means: + + 1) Symbols are emitted for debuggable methods (methods associated with SourceUnit). + 2) Debuggable methods are emitted to non-collectable types (this is due to CLR limitations on dynamic method debugging). + 3) JIT optimization is disabled for all methods + 4) Languages may disable optimizations based on this value. + + + + + Ignore CLR visibility checks. + + + + + ObjectOperations provide a large catalogue of object operations such as member access, conversions, + indexing, and things like addition. There are several introspection and tool support services available + for more advanced hosts. + + You get ObjectOperation instances from ScriptEngine, and they are bound to their engines for the semantics + of the operations. There is a default instance of ObjectOperations you can share across all uses of the + engine. However, very advanced hosts can create new instances. + + + + the number of sites required before we'll try cleaning up the cache... + + + the minimum difference between the average that is required to remove + + + the maximum number we'll remove on a single cache cleanup + + + the number of sites we should clear after if we can't make progress cleaning up otherwise + + + a dictionary of SiteKey's which are used to cache frequently used operations, logically a set + + + the # of sites we had created at the last cleanup + + + the total number of sites we've ever created + + + + Calls the provided object with the given parameters and returns the result. + + The prefered way of calling objects is to convert the object to a strongly typed delegate + using the ConvertTo methods and then invoking that delegate. + + + + + Invokes a member on the provided object with the given parameters and returns the result. + + + + + Invokes a member on the provided object with the given parameters and returns the result. + + + + + Creates a new instance from the provided object using the given parameters, and returns the result. + + + + + Gets the member name from the object obj. Throws an exception if the member does not exist or is write-only. + + + + + Gets the member name from the object obj and converts it to the type T. Throws an exception if the + member does not exist, is write-only, or cannot be converted. + + + + + Gets the member name from the object obj. Returns true if the member is successfully retrieved and + stores the value in the value out param. + + + + + Returns true if the object has a member named name, false if the member does not exist. + + + + + Removes the member name from the object obj. + + + + + Sets the member name on object obj to value. + + + + + Sets the member name on object obj to value. This overload can be used to avoid + boxing and casting of strongly typed members. + + + + + Gets the member name from the object obj. Throws an exception if the member does not exist or is write-only. + + + + + Gets the member name from the object obj and converts it to the type T. The conversion will be explicit or implicit + depending on what the langauge prefers. Throws an exception if the member does not exist, is write-only, or cannot be converted. + + + + + Gets the member name from the object obj. Returns true if the member is successfully retrieved and + stores the value in the value out param. + + + + + Returns true if the object has a member named name, false if the member does not exist. + + + + + Removes the member name from the object obj. Returns true if the member was successfully removed + or false if the member does not exist. + + + + + Sets the member name on object obj to value. + + + + + Sets the member name on object obj to value. This overload can be used to avoid + boxing and casting of strongly typed members. + + + + + Converts the object obj to the type T. The conversion will be explicit or implicit + depending on what the langauge prefers. + + + + + Converts the object obj to the type type. The conversion will be explicit or implicit + depending on what the langauge prefers. + + + + + Converts the object obj to the type T. Returns true if the value can be converted, false if it cannot. + + The conversion will be explicit or implicit depending on what the langauge prefers. + + + + + Converts the object obj to the type type. Returns true if the value can be converted, false if it cannot. + + The conversion will be explicit or implicit depending on what the langauge prefers. + + + + + Convers the object obj to the type T including explicit conversions which may lose information. + + + + + Converts the object obj to the type type including explicit conversions which may lose information. + + + + + Converts the object obj to the type type including explicit conversions which may lose information. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type T. Returns true if the value can be converted, false if it cannot. + + + + + Convers the object obj to the type T including implicit conversions. + + + + + Converts the object obj to the type type including implicit conversions. + + + + + Converts the object obj to the type type including implicit conversions. + + Returns true if the value can be converted, false if it cannot. + + + + + Converts the object obj to the type T. Returns true if the value can be converted, false if it cannot. + + + + + Performs a generic unary operation on the strongly typed target and returns the value as the specified type + + + + + Peforms the generic binary operation on the specified strongly typed targets and returns + the strongly typed result. + + + + + Returns a list of strings which contain the known members of the object. + + + + + Returns a string representation of the object in a language specific object display format. + + + + + Gets or creates a dynamic site w/ the specified type parameters for the provided binder. + + + This will either get the site from the cache or create a new site and return it. The cache + may be cleaned if it's gotten too big since the last usage. + + + + + Gets or creates a dynamic site w/ the specified type parameters for the provided binder. + + + This will either get the site from the cache or create a new site and return it. The cache + may be cleaned if it's gotten too big since the last usage. + + + + + Gets or creates a dynamic site w/ the specified type parameters for the provided binder. + + + This will either get the site from the cache or create a new site and return it. The cache + may be cleaned if it's gotten too big since the last usage. + + + + + Gets or creates a dynamic site w/ the specified type parameters for the provided binder. + + + This will either get the site from the cache or create a new site and return it. The cache + may be cleaned if it's gotten too big since the last usage. + + + + + Gets or creates a dynamic site w/ the specified type parameters for the provided binder. + + + This will either get the site from the cache or create a new site and return it. The cache + may be cleaned if it's gotten too big since the last usage. + + + + + Helper to create to get or create the dynamic site - called by the GetSite methods. + + + + + Removes items from the cache that have the lowest usage... + + + + + Helper class for tracking all of our unique dynamic sites and their + usage patterns. We hash on the combination of the binder and site type. + + We also track the hit count and the key holds the site associated w/ the + key. Logically this is a set based upon the binder and site-type but we + store it in a dictionary. + + + + + Singleton LanguageContext which represents a language-neutral LanguageContext + + + + + Provides language specific facilities which are typically called by the runtime. + + + + + Provides access to setting variables in scopes. + + By default this goes through ObjectOperations which can be rather slow. + Languages can override this to provide fast customized access which avoids + ObjectOperations. Languages can provide fast access to commonly used scope + types for that language. Typically this includes ScopeStorage and any other + classes which the language themselves uses for backing of a Scope. + + + + + Provides access to try getting variables in scopes. + + By default this goes through ObjectOperations which can be rather slow. + Languages can override this to provide fast customized access which avoids + ObjectOperations. Languages can provide fast access to commonly used scope + types for that language. Typically this includes ScopeStorage and any other + classes which the language themselves uses for backing of a Scope. + + + + + Provides access to getting variables in scopes and converting the result. + + By default this goes through ObjectOperations which can be rather slow. + Languages can override this to provide fast customized access which avoids + ObjectOperations. Languages can provide fast access to commonly used scope + types for that language. Typically this includes ScopeStorage and any other + classes which the language themselves uses for backing of a Scope. + + + + + Provides access to getting variables in scopes. + + By default this goes through ObjectOperations which can be rather slow. + Languages can override this to provide fast customized access which avoids + ObjectOperations. Languages can provide fast access to commonly used scope + types for that language. Typically this includes ScopeStorage and any other + classes which the language themselves uses for backing of a Scope. + + + + + Provides a text reader for source code that is to be read from a given stream. + + The stream open for reading. The stream must also allow seeking. + An encoding that should be used if the stream doesn't have Unicode or language specific preamble. + the path of the source unit if available + The reader. + An I/O error occurs. + + + + Creates the language specific CompilerOptions object for compilation of code not bound to any particular scope. + The language should flow any relevant options from LanguageContext to the newly created options instance. + + + + + Creates the language specific CompilerOptions object for compilation of code bound to a given scope. + + + + + Parses the source code within a specified compiler context. + The source unit to parse is held on by the context. + + null on failure. + Could also set the code properties and line/file mappings on the source unit. + + + + Creates a conversion binder. + + If explicitCast is true then the binder should do explicit conversions. + If explicitCast is false then the binder should do implicit conversions. + + If explicitCast is null it is up to the language to select the conversions + which closest match their normal behavior. + + + + + Gets the member names associated with the object + By default, only returns IDO names + + + + + Returns a string representation of the object in a language specific object display format. + + Dynamic sites container that could be used for any dynamic dispatches necessary for formatting. + Object to format. + A string representation of object. + + + + Provides the ContextId which includes members that should only be shown for this LanguageContext. + + ContextId's are used for filtering by Scope's. + + + + + Gets the ScriptDomainManager that this LanguageContext is running within. + + + + + Whether the language can parse code and create source units. + + + + + Internal class which binds a LanguageContext, StreamContentProvider, and Encoding together to produce + a TextContentProvider which reads binary data with the correct language semantics. + + + + + Provides a factory to create TextReader's over one source of textual content. + + TextContentProvider's are used when reading from a source which is already decoded + or has a known specific decoding. + + For example a text editor might provide a TextContentProvider whose backing is + an in-memory text buffer that the user can actively edit. + + + + + Creates a new TextReader which is backed by the content the TextContentProvider was created for. + + This method may be called multiple times. For example once to compile the code and again to get + the source code to display error messages. + + + + + This attribute marks a parameter that is not allowed to be null. + It is used by the method binding infrastructure to generate better error + messages and method selection. + + + + + This attribute marks a parameter whose type is an array that is not allowed to have null items. + It is used by the method binding infrastructure to generate better error + messages and method selection. + + + + + This attribute is used to mark a parameter that can accept any keyword parameters that + are not bound to normal arguments. The extra keyword parameters will be + passed in a dictionary which is created for the call. + + Most languages which support params dictionaries will support the following types: + IDictionary<string, anything> + IDictionary<object, anything> + Dictionary<string, anything> + Dictionary<object, anything> + IDictionary + IAttributesCollection (deprecated) + + For languages which don't have language level support the user will be required to + create and populate the dictionary by hand. + + This attribute is the dictionary equivalent of the System.ParamArrayAttribute. + + + public static void KeywordArgFunction([ParamsDictionary]IDictionary<string, object> dict) { + foreach (var v in dict) { + Console.WriteLine("Key: {0} Value: {1}", v.Key, v.Value); + } + } + + Called from Python: + + KeywordArgFunction(a = 2, b = "abc") + + will print: + Key: a Value = 2 + Key: b Value = abc + + + + + Represents a host-provided variables for executable code. The variables are + typically backed by a host-provided dictionary. Languages can also associate per-language + information with the context by using scope extensions. This can be used for tracking + state which is used across multiple executions, for providing custom forms of + storage (for example object keyed access), or other language specific semantics. + + Scope objects are thread-safe as long as their underlying storage is thread safe. + + Script hosts can choose to use thread safe or thread unsafe modules but must be sure + to constrain the code they right to be single-threaded if using thread unsafe + storage. + + + + + Creates a new scope with a new empty thread-safe dictionary. + + + + + Creates a new scope which is backed by an arbitrary object for it's storage. + + + + + + Gets the ScopeExtension associated with the provided ContextId. + + + + + Sets the ScopeExtension to the provided value for the given ContextId. + + The extension can only be set once. The returned value is either the new ScopeExtension + if no value was previously set or the previous value. + + + + + Provides optimized and cacheable support for scope storage. + + This is the default object used for storing values in a scope. + + + + The implementation uses a case-insensitive dictionary which holds + onto ScopeVariableIgnoreCase objects. The SVIC's hold onto ScopeVariable + objects for each possible casing. + + + + + Gets the named value from the scope optionally ignoring case. + + If the named value is not present an InvalidOperationException is raised. + + + + + Attempts to get the named value from the scope optionally ignoring the case. + + Returns true if the value is present, false if it is not. + + + + + Sets the named value in the scope optionally ignoring the case. + + + + + Deletes the named value from the scope optionally ignoring the case. + + + + + Checks if the named value is present in the scope optionally ignoring the case. + + + + + Gets the IScopeVariable for the scope optionally ignoring case. + + The IScopeVariable can be held onto and get/set/deleted without performing + a dictionary lookup on subsequent accesses. + + + + + Gets the ScopeVariable for the scope in a case-sensitive manner. + + The ScopeVariable can be held onto and get/set/deleted without performing + a dictionary lookup on subsequent accesses. + + + + + Gets the ScopeVariableIgnoreCase for the scope in a case-insensitive manner. + + The ScopeVariable can be held onto and get/set/deleted without performing + a dictionary lookup on subsequent accesses. + + + + + Returns all of the member names which currently have values in the scope. + + The list contains all available casings. + + + + + Returns all of the member names and their associated values from the scope. + + The list contains all available casings. + + + + + Provides convenient case-sensitive value access. + + + + + Provides a common interface for accessing both case sensitive and + case insensitive variable storage. + + + + + Atempts to get the value. If a value is assigned it returns true otherwise + it returns false. + + + + + Sets the current value in the scope. + + + + + Removes the current value from the scope. + + + + + True if the scope has a value, false if it does not. + + + + + Boxes the value for storage in a scope. Languages or consumers of the scope + can save this value and use it to get/set the current value in the scope for + commonly accessed values. + + ScopeVariables are case sensitive and will only refer to a single value. + + + + + Atempts to get the value. If a value is assigned it returns true otherwise + it returns false. + + + + + Sets the current value in the scope. + + + + + Removes the current value from the scope. + + + + + True if the scope has a value, false if it does not. + + + + + Boxes the value for storage in a scope. Languages or consumers of the scope + can save this value and use it to get/set the current value in the scope for + commonly accessed values. + + ScopeVariablesIgnoreCase are case insensitive and may access different casings + depending on how other gets/sets occur in the scope. + + + + + Atempts to get the value. If a value is assigned it returns true otherwise + it returns false. + + + + + Sets the current value in the scope. + + + + + Removes the current value from the scope. + + + + + True if the scope has a value, false if it does not. + + + + + ScriptCode is an instance of compiled code that is bound to a specific LanguageContext + but not a specific ScriptScope. The code can be re-executed multiple times in different + scopes. Hosting API counterpart for this class is CompiledCode. + + + + + A collection of environment variables. + + + + + Event for when a host calls LoadAssembly. After hooking this + event languages will need to call GetLoadedAssemblyList to + get any assemblies which were loaded before the language was + loaded. + + + + + Only host should redirect I/O. + + + + + Provides a factory to create streams over one source of binary content. + + StreamContentProvider's are used when opening a file of an unknown encoding. The + StreamContentProvider will be wrapped in a TextContentProvider provided by the language + which can support a language specific way of interpreting the binary data into text. + + For example some languages allow a marker at the beginning of the file which specifies + the encoding of the rest of the file. + + + + + Creates a new Stream which is backed by the content the StreamContentProvider was created for. + + For example if the StreamContentProvider was backing a file then GetStream re-opens the file and returns + the new stream. + + This method may be called multiple times. For example once to compile the code and again to get + the source code to display error messages. + + + + + Move the tokenizer past the next token and return its category. + + The token information associated with the token just scanned. + + + + Move the tokenizer past the next token. + + False if the end of stream has been reached, true otherwise. + + + + Get all tokens over a block of the stream. + + + + The scanner should return full tokens. If startLocation + length lands in the middle of a token, the full token + should be returned. + + + Tokens are read until at least given amount of characters is read or the stream ends. + A enumeration of tokens. + + + + Scan from startLocation to at least startLocation + length. + + The mininum number of characters to process while getting tokens. + + This method is used to determine state at arbitrary startLocation. + + False if the end of stream has been reached, true otherwise. + + + + The current internal state of the scanner. + + + + + The current startLocation of the scanner. + + + + + See also Microsoft.VisualStudio.Package.TokenTriggers. + + + + + Source code is a syntactically correct. + + + + + Source code represents an empty statement/expression. + + + + + Source code is already invalid and no suffix can make it syntactically correct. + + + + + Last token is incomplete. Source code can still be completed correctly. + + + + + Last statement is incomplete. Source code can still be completed correctly. + + + + + Defines a kind of the source code. The parser sets its initial state accordingly. + + + + + The code is an expression. + + + + + The code is a sequence of statements. + + + + + The code is a single statement. + + + + + The code is a content of a file. + + + + + The code is an interactive command. + + + + + The language parser auto-detects the kind. A syntax error is reported if it is not able to do so. + + + + + Source code reader. + + + + + Seeks the first character of a specified line in the text stream. + + Line number. The current position is assumed to be line #1. + + Returns true if the line is found, false otherwise. + + + + + Encoding that is used by the reader to convert binary data read from an underlying binary stream. + Null if the reader is reading from a textual source (not performing any byte to character transcoding). + + + + + Provides a StreamContentProvider for a stream of content backed by a file on disk. + + + + + Represents a location in source code. + + + + + Creates a new source location. + + The index in the source stream the location represents (0-based). + The line in the source stream the location represents (1-based). + The column in the source stream the location represents (1-based). + + + + Compares two specified location values to see if they are equal. + + One location to compare. + The other location to compare. + True if the locations are the same, False otherwise. + + + + Compares two specified location values to see if they are not equal. + + One location to compare. + The other location to compare. + True if the locations are not the same, False otherwise. + + + + Compares two specified location values to see if one is before the other. + + One location to compare. + The other location to compare. + True if the first location is before the other location, False otherwise. + + + + Compares two specified location values to see if one is after the other. + + One location to compare. + The other location to compare. + True if the first location is after the other location, False otherwise. + + + + Compares two specified location values to see if one is before or the same as the other. + + One location to compare. + The other location to compare. + True if the first location is before or the same as the other location, False otherwise. + + + + Compares two specified location values to see if one is after or the same as the other. + + One location to compare. + The other location to compare. + True if the first location is after or the same as the other location, False otherwise. + + + + Compares two specified location values. + + One location to compare. + The other location to compare. + 0 if the locations are equal, -1 if the left one is less than the right one, 1 otherwise. + + + + A location that is valid but represents no location at all. + + + + + An invalid location. + + + + + A minimal valid location. + + + + + The index in the source stream the location represents (0-based). + + + + + The line in the source stream the location represents (1-based). + + + + + The column in the source stream the location represents (1-based). + + + + + Whether the location is a valid location. + + True if the location is valid, False otherwise. + + + + Stores the location of a span of text in a source file. + + + + + Constructs a new span with a specific start and end location. + + The beginning of the span. + The end of the span. + + + + A valid span that represents no location. + + + + + An invalid span. + + + + + Compares two specified Span values to see if they are equal. + + One span to compare. + The other span to compare. + True if the spans are the same, False otherwise. + + + + Compares two specified Span values to see if they are not equal. + + One span to compare. + The other span to compare. + True if the spans are not the same, False otherwise. + + + + The start location of the span. + + + + + The end location of the span. Location of the first character behind the span. + + + + + Length of the span (number of characters inside the span). + + + + + Whether the locations in the span are valid. + + + + + Reads specified range of lines (or less) from the source unit. + Line numbers starts with 1. + + + + + Errors are reported to the specified sink. + Returns null if the parser cannot compile the code due to error(s). + + + + + Executes against a specified scope. + + + + + Executes against a specified scope and reports errors to the given error sink. + + + + + Executes in a new scope created by the language. + + + + + Executes in a new scope created by the language. + + + + + Executes in a new scope created by the language. + + + + + Identification of the source unit. Assigned by the host. + The format and semantics is host dependent (could be a path on file system or URL). + Empty string for anonymous source units. + + + + + LanguageContext of the language of the unit. + + + + + Unmapped span. + + + + + A token marking an end of stream. + + + + + A space, tab, or newline. + + + + + A block comment. + + + + + A single line comment. + + + + + A documentation comment. + + + + + A numeric literal. + + + + + A character literal. + + + + + A string literal. + + + + + A regular expression literal. + + + + + A keyword. + + + + + A directive (e.g. #line). + + + + + A punctuation character that has a specific meaning in a language. + + + + + A token that operates as a separator between two language elements. + + + + + An identifier (variable, $variable, @variable, @@variable, $variable$, function!, function?, [variable], i'variable', ...) + + + + + Braces, parenthesis, brackets. + + + + + Errors. + + + + + Converts a generic ICollection of T into an array of T. + + If the collection is already an array of T the original collection is returned. + + + + + Not all .NET enumerators throw exceptions if accessed in an invalid state. This type + can be used to throw exceptions from enumerators implemented in IronPython. + + + + + Wraps the provided enumerable into a ReadOnlyCollection{T} + + Copies all of the data into a new array, so the data can't be + changed after creation. The exception is if the enumerable is + already a ReadOnlyCollection{T}, in which case we just return it. + + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + Offset or count are out of range. + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + Offset or count are out of range. + + + + Requires the array and all its items to be non-null. + + + + + Requires the enumerable collection and all its items to be non-null. + + + + + Requires the range [offset, offset + count] to be a subset of [0, array.Count]. + + Array is null. + Offset or count are out of range. + + + + Presents a flat enumerable view of multiple dictionaries + + + + + Strongly-typed and parameterized string factory. + + + + + A string like "Cannot access member {1} declared on type {0} because the type contains generic parameters." + + + + + A string like "Type '{0}' is missing or cannot be loaded." + + + + + A string like "static property "{0}" of "{1}" can only be read through a type, not an instance" + + + + + A string like "static property "{0}" of "{1}" can only be assigned to through a type, not an instance" + + + + + A string like "Type parameter is {0}. Expected a delegate." + + + + + A string like "Cannot cast from type '{0}' to type '{1}" + + + + + A string like "unknown member type: '{0}'. " + + + + + A string like "The operation requires a non-generic type for {0}, but this represents generic types only" + + + + + A string like "Invalid operation: '{0}'" + + + + + A string like "Cannot create default value for type {0}." + + + + + A string like "Unhandled convert: {0}" + + + + + A string like "{0}.{1} has no publiclly visible method." + + + + + A string like "Extension type {0} must be public." + + + + + A string like "Invalid type of argument {0}; expecting {1}." + + + + + A string like "Field {0} is read-only" + + + + + A string like "Property {0} is read-only" + + + + + A string like "Expected event from {0}.{1}, got event from {2}.{3}." + + + + + A string like "expected bound event, got {0}." + + + + + A string like "Expected type {0}, got {1}." + + + + + A string like "can only write to member {0}." + + + + + A string like "Invalid stream type: {0}." + + + + + A string like "can't add another casing for identifier {0}" + + + + + A string like "can't add new identifier {0}" + + + + + A string like "Type '{0}' doesn't provide a suitable public constructor or its implementation is faulty: {1}" + + + + + A string like "Cannot emit constant {0} ({1})" + + + + + A string like "No implicit cast from {0} to {1}" + + + + + A string like "No explicit cast from {0} to {1}" + + + + + A string like "name '{0}' not defined" + + + + + A string like "Cannot create instance of {0} because it contains generic parameters" + + + + + A string like "Non-verifiable assembly generated: {0}:\nAssembly preserved as {1}\nError text:\n{2}\n" + + + + + A string like "Method precondition violated" + + + + + A string like "Invalid argument value" + + + + + A string like "Non-empty string required" + + + + + A string like "Non-empty collection required" + + + + + A string like "must by an Exception instance" + + + + + A string like "Type of test must be bool" + + + + + A string like "Type of the expression must be bool" + + + + + A string like "Empty string is not a valid path." + + + + + A string like "Invalid delegate type (Invoke method not found)." + + + + + A string like "expected only static property" + + + + + A string like "Property doesn't exist on the provided type" + + + + + A string like "Field doesn't exist on provided type" + + + + + A string like "Type doesn't have constructor with a given signature" + + + + + A string like "Type doesn't have a method with a given name." + + + + + A string like "Type doesn't have a method with a given name and signature." + + + + + A string like "Count must be non-negative." + + + + + A string like "arrayType must be an array type" + + + + + A string like "Either code or target must be specified." + + + + + A string like "RuleBuilder can only be used with delegates whose first argument is CallSite." + + + + + A string like "no instance for call." + + + + + A string like "Missing Test." + + + + + A string like "Missing Target." + + + + + A string like "Finally already defined." + + + + + A string like "Can not have fault and finally." + + + + + A string like "Fault already defined." + + + + + A string like "Global/top-level local variable names must be unique." + + + + + A string like "Generating code from non-serializable CallSiteBinder." + + + + + A string like "Specified path is invalid." + + + + + A string like "Dictionaries are not hashable." + + + + + A string like "language already registered." + + + + + A string like "The method or operation is not implemented." + + + + + A string like "No exception." + + + + + A string like "Already initialized." + + + + + A string like "CreateScopeExtension must return a scope extension." + + + + + A string like "Invalid number of parameters for the service." + + + + + A string like "Cannot change non-caching value." + + + + + A string like "No code to compile." + + + + + A string like "Queue empty." + + + + + A string like "Enumeration has not started. Call MoveNext." + + + + + A string like "Enumeration already finished." + + + + + A string like "Invalid output directory." + + + + + A string like "Invalid assembly name or file extension." + + + + + A string like "No default value for a given type." + + + + + A string like "Specified language provider type is not registered." + + + + + A string like "can't read from property" + + + + + A string like "can't write to property" + + + + + Strongly-typed and parameterized exception factory. + + + + + ArgumentException with message like "Either code or target must be specified." + + + + + InvalidOperationException with message like "Type parameter is {0}. Expected a delegate." + + + + + InvalidOperationException with message like "Cannot cast from type '{0}' to type '{1}" + + + + + InvalidOperationException with message like "unknown member type: '{0}'. " + + + + + InvalidOperationException with message like "RuleBuilder can only be used with delegates whose first argument is CallSite." + + + + + InvalidOperationException with message like "no instance for call." + + + + + InvalidOperationException with message like "Missing Test." + + + + + InvalidOperationException with message like "Missing Target." + + + + + TypeLoadException with message like "The operation requires a non-generic type for {0}, but this represents generic types only" + + + + + ArgumentException with message like "Invalid operation: '{0}'" + + + + + InvalidOperationException with message like "Finally already defined." + + + + + InvalidOperationException with message like "Can not have fault and finally." + + + + + InvalidOperationException with message like "Fault already defined." + + + + + ArgumentException with message like "Cannot create default value for type {0}." + + + + + ArgumentException with message like "Unhandled convert: {0}" + + + + + InvalidOperationException with message like "{0}.{1} has no publiclly visible method." + + + + + ArgumentException with message like "Global/top-level local variable names must be unique." + + + + + ArgumentException with message like "Generating code from non-serializable CallSiteBinder." + + + + + ArgumentException with message like "Specified path is invalid." + + + + + ArgumentTypeException with message like "Dictionaries are not hashable." + + + + + InvalidOperationException with message like "language already registered." + + + + + NotImplementedException with message like "The method or operation is not implemented." + + + + + InvalidOperationException with message like "No exception." + + + + + ArgumentException with message like "Extension type {0} must be public." + + + + + InvalidOperationException with message like "Already initialized." + + + + + InvalidImplementationException with message like "CreateScopeExtension must return a scope extension." + + + + + ArgumentException with message like "Invalid number of parameters for the service." + + + + + ArgumentException with message like "Invalid type of argument {0}; expecting {1}." + + + + + ArgumentException with message like "Cannot change non-caching value." + + + + + MissingMemberException with message like "Field {0} is read-only" + + + + + MissingMemberException with message like "Property {0} is read-only" + + + + + ArgumentException with message like "Expected event from {0}.{1}, got event from {2}.{3}." + + + + + ArgumentTypeException with message like "expected bound event, got {0}." + + + + + ArgumentTypeException with message like "Expected type {0}, got {1}." + + + + + MemberAccessException with message like "can only write to member {0}." + + + + + InvalidOperationException with message like "No code to compile." + + + + + ArgumentException with message like "Invalid stream type: {0}." + + + + + InvalidOperationException with message like "Queue empty." + + + + + InvalidOperationException with message like "Enumeration has not started. Call MoveNext." + + + + + InvalidOperationException with message like "Enumeration already finished." + + + + + InvalidOperationException with message like "can't add another casing for identifier {0}" + + + + + InvalidOperationException with message like "can't add new identifier {0}" + + + + + ArgumentException with message like "Invalid output directory." + + + + + ArgumentException with message like "Invalid assembly name or file extension." + + + + + ArgumentException with message like "Cannot emit constant {0} ({1})" + + + + + ArgumentException with message like "No implicit cast from {0} to {1}" + + + + + ArgumentException with message like "No explicit cast from {0} to {1}" + + + + + MissingMemberException with message like "name '{0}' not defined" + + + + + ArgumentException with message like "No default value for a given type." + + + + + ArgumentException with message like "Specified language provider type is not registered." + + + + + InvalidOperationException with message like "can't read from property" + + + + + InvalidOperationException with message like "can't write to property" + + + + + ArgumentException with message like "Cannot create instance of {0} because it contains generic parameters" + + + + + System.Security.VerificationException with message like "Non-verifiable assembly generated: {0}:\nAssembly preserved as {1}\nError text:\n{2}\n" + + + + + Gets a Func of CallSite, object * paramCnt, object delegate type + that's suitable for use in a non-strongly typed call site. + + + + diff --git a/packages/IronPython.2.7.4/tools/ipy.exe b/packages/IronPython.2.7.4/tools/ipy.exe new file mode 100644 index 0000000000..9d13c3829a Binary files /dev/null and b/packages/IronPython.2.7.4/tools/ipy.exe differ diff --git a/packages/IronPython.2.7.4/tools/ipy.exe.config b/packages/IronPython.2.7.4/tools/ipy.exe.config new file mode 100644 index 0000000000..c080ce979e --- /dev/null +++ b/packages/IronPython.2.7.4/tools/ipy.exe.config @@ -0,0 +1,22 @@ + + + +
+ + + + + + + + + + + + + + + + + + diff --git a/packages/IronPython.2.7.4/tools/ipy64.exe b/packages/IronPython.2.7.4/tools/ipy64.exe new file mode 100644 index 0000000000..e1b8798f0e Binary files /dev/null and b/packages/IronPython.2.7.4/tools/ipy64.exe differ diff --git a/packages/IronPython.2.7.4/tools/ipy64.exe.config b/packages/IronPython.2.7.4/tools/ipy64.exe.config new file mode 100644 index 0000000000..c080ce979e --- /dev/null +++ b/packages/IronPython.2.7.4/tools/ipy64.exe.config @@ -0,0 +1,22 @@ + + + +
+ + + + + + + + + + + + + + + + + + diff --git a/packages/IronPython.2.7.4/tools/ipyw.exe b/packages/IronPython.2.7.4/tools/ipyw.exe new file mode 100644 index 0000000000..f6c42aa22a Binary files /dev/null and b/packages/IronPython.2.7.4/tools/ipyw.exe differ diff --git a/packages/IronPython.2.7.4/tools/ipyw.exe.config b/packages/IronPython.2.7.4/tools/ipyw.exe.config new file mode 100644 index 0000000000..c080ce979e --- /dev/null +++ b/packages/IronPython.2.7.4/tools/ipyw.exe.config @@ -0,0 +1,22 @@ + + + +
+ + + + + + + + + + + + + + + + + + diff --git a/packages/IronPython.2.7.4/tools/ipyw64.exe b/packages/IronPython.2.7.4/tools/ipyw64.exe new file mode 100644 index 0000000000..f8736f63ef Binary files /dev/null and b/packages/IronPython.2.7.4/tools/ipyw64.exe differ diff --git a/packages/IronPython.2.7.4/tools/ipyw64.exe.config b/packages/IronPython.2.7.4/tools/ipyw64.exe.config new file mode 100644 index 0000000000..c080ce979e --- /dev/null +++ b/packages/IronPython.2.7.4/tools/ipyw64.exe.config @@ -0,0 +1,22 @@ + + + +
+ + + + + + + + + + + + + + + + + + diff --git a/packages/IronPython.StdLib.2.7.4/IronPython.StdLib.2.7.4.nupkg b/packages/IronPython.StdLib.2.7.4/IronPython.StdLib.2.7.4.nupkg new file mode 100644 index 0000000000..75f3e72c0a Binary files /dev/null and b/packages/IronPython.StdLib.2.7.4/IronPython.StdLib.2.7.4.nupkg differ diff --git a/packages/IronPython.StdLib.2.7.4/IronPython.StdLib.2.7.4.nuspec b/packages/IronPython.StdLib.2.7.4/IronPython.StdLib.2.7.4.nuspec new file mode 100644 index 0000000000..ea31fc7664 --- /dev/null +++ b/packages/IronPython.StdLib.2.7.4/IronPython.StdLib.2.7.4.nuspec @@ -0,0 +1,22 @@ + + + + IronPython.StdLib + 2.7.4 + IronPython Standard Library + IronPython Contributors, Python Contributors + IronPython Contributors, Python Contributors + http://docs.python.org/license.html + http://ironpython.net/ + false + The Python Standard Library, for use with IronPython. + The Python Standard Library, for use with IronPython. + + + en-US + ironpython python dynamic dlr standard library + + + + + \ No newline at end of file diff --git a/packages/IronPython.StdLib.2.7.4/content/Lib/BaseHTTPServer.py b/packages/IronPython.StdLib.2.7.4/content/Lib/BaseHTTPServer.py new file mode 100644 index 0000000000..120bd789d8 --- /dev/null +++ b/packages/IronPython.StdLib.2.7.4/content/Lib/BaseHTTPServer.py @@ -0,0 +1,606 @@ +"""HTTP server base class. + +Note: the class in this module doesn't implement any HTTP request; see +SimpleHTTPServer for simple implementations of GET, HEAD and POST +(including CGI scripts). It does, however, optionally implement HTTP/1.1 +persistent connections, as of version 0.3. + +Contents: + +- BaseHTTPRequestHandler: HTTP request handler base class +- test: test function + +XXX To do: + +- log requests even later (to capture byte count) +- log user-agent header and other interesting goodies +- send error log to separate file +""" + + +# See also: +# +# HTTP Working Group T. Berners-Lee +# INTERNET-DRAFT R. T. Fielding +# H. Frystyk Nielsen +# Expires September 8, 1995 March 8, 1995 +# +# URL: http://www.ics.uci.edu/pub/ietf/http/draft-ietf-http-v10-spec-00.txt +# +# and +# +# Network Working Group R. Fielding +# Request for Comments: 2616 et al +# Obsoletes: 2068 June 1999 +# Category: Standards Track +# +# URL: http://www.faqs.org/rfcs/rfc2616.html + +# Log files +# --------- +# +# Here's a quote from the NCSA httpd docs about log file format. +# +# | The logfile format is as follows. Each line consists of: +# | +# | host rfc931 authuser [DD/Mon/YYYY:hh:mm:ss] "request" ddd bbbb +# | +# | host: Either the DNS name or the IP number of the remote client +# | rfc931: Any information returned by identd for this person, +# | - otherwise. +# | authuser: If user sent a userid for authentication, the user name, +# | - otherwise. +# | DD: Day +# | Mon: Month (calendar name) +# | YYYY: Year +# | hh: hour (24-hour format, the machine's timezone) +# | mm: minutes +# | ss: seconds +# | request: The first line of the HTTP request as sent by the client. +# | ddd: the status code returned by the server, - if not available. +# | bbbb: the total number of bytes sent, +# | *not including the HTTP/1.0 header*, - if not available +# | +# | You can determine the name of the file accessed through request. +# +# (Actually, the latter is only true if you know the server configuration +# at the time the request was made!) + +__version__ = "0.3" + +__all__ = ["HTTPServer", "BaseHTTPRequestHandler"] + +import sys +import time +import socket # For gethostbyaddr() +from warnings import filterwarnings, catch_warnings +with catch_warnings(): + if sys.py3kwarning: + filterwarnings("ignore", ".*mimetools has been removed", + DeprecationWarning) + import mimetools +import SocketServer + +# Default error message template +DEFAULT_ERROR_MESSAGE = """\ + +Error response + + +

Error response

+

Error code %(code)d. +

Message: %(message)s. +

Error code explanation: %(code)s = %(explain)s. + +""" + +DEFAULT_ERROR_CONTENT_TYPE = "text/html" + +def _quote_html(html): + return html.replace("&", "&").replace("<", "<").replace(">", ">") + +class HTTPServer(SocketServer.TCPServer): + + allow_reuse_address = 1 # Seems to make sense in testing environment + + def server_bind(self): + """Override server_bind to store the server name.""" + SocketServer.TCPServer.server_bind(self) + host, port = self.socket.getsockname()[:2] + self.server_name = socket.getfqdn(host) + self.server_port = port + + +class BaseHTTPRequestHandler(SocketServer.StreamRequestHandler): + + """HTTP request handler base class. + + The following explanation of HTTP serves to guide you through the + code as well as to expose any misunderstandings I may have about + HTTP (so you don't need to read the code to figure out I'm wrong + :-). + + HTTP (HyperText Transfer Protocol) is an extensible protocol on + top of a reliable stream transport (e.g. TCP/IP). The protocol + recognizes three parts to a request: + + 1. One line identifying the request type and path + 2. An optional set of RFC-822-style headers + 3. An optional data part + + The headers and data are separated by a blank line. + + The first line of the request has the form + + + + where is a (case-sensitive) keyword such as GET or POST, + is a string containing path information for the request, + and should be the string "HTTP/1.0" or "HTTP/1.1". + is encoded using the URL encoding scheme (using %xx to signify + the ASCII character with hex code xx). + + The specification specifies that lines are separated by CRLF but + for compatibility with the widest range of clients recommends + servers also handle LF. Similarly, whitespace in the request line + is treated sensibly (allowing multiple spaces between components + and allowing trailing whitespace). + + Similarly, for output, lines ought to be separated by CRLF pairs + but most clients grok LF characters just fine. + + If the first line of the request has the form + + + + (i.e. is left out) then this is assumed to be an HTTP + 0.9 request; this form has no optional headers and data part and + the reply consists of just the data. + + The reply form of the HTTP 1.x protocol again has three parts: + + 1. One line giving the response code + 2. An optional set of RFC-822-style headers + 3. The data + + Again, the headers and data are separated by a blank line. + + The response code line has the form + + + + where is the protocol version ("HTTP/1.0" or "HTTP/1.1"), + is a 3-digit response code indicating success or + failure of the request, and is an optional + human-readable string explaining what the response code means. + + This server parses the request and the headers, and then calls a + function specific to the request type (). Specifically, + a request SPAM will be handled by a method do_SPAM(). If no + such method exists the server sends an error response to the + client. If it exists, it is called with no arguments: + + do_SPAM() + + Note that the request name is case sensitive (i.e. SPAM and spam + are different requests). + + The various request details are stored in instance variables: + + - client_address is the client IP address in the form (host, + port); + + - command, path and version are the broken-down request line; + + - headers is an instance of mimetools.Message (or a derived + class) containing the header information; + + - rfile is a file object open for reading positioned at the + start of the optional input data part; + + - wfile is a file object open for writing. + + IT IS IMPORTANT TO ADHERE TO THE PROTOCOL FOR WRITING! + + The first thing to be written must be the response line. Then + follow 0 or more header lines, then a blank line, and then the + actual data (if any). The meaning of the header lines depends on + the command executed by the server; in most cases, when data is + returned, there should be at least one header line of the form + + Content-type: / + + where and should be registered MIME types, + e.g. "text/html" or "text/plain". + + """ + + # The Python system version, truncated to its first component. + sys_version = "Python/" + sys.version.split()[0] + + # The server software version. You may want to override this. + # The format is multiple whitespace-separated strings, + # where each string is of the form name[/version]. + server_version = "BaseHTTP/" + __version__ + + # The default request version. This only affects responses up until + # the point where the request line is parsed, so it mainly decides what + # the client gets back when sending a malformed request line. + # Most web servers default to HTTP 0.9, i.e. don't send a status line. + default_request_version = "HTTP/0.9" + + def parse_request(self): + """Parse a request (internal). + + The request should be stored in self.raw_requestline; the results + are in self.command, self.path, self.request_version and + self.headers. + + Return True for success, False for failure; on failure, an + error is sent back. + + """ + self.command = None # set in case of error on the first line + self.request_version = version = self.default_request_version + self.close_connection = 1 + requestline = self.raw_requestline + if requestline[-2:] == '\r\n': + requestline = requestline[:-2] + elif requestline[-1:] == '\n': + requestline = requestline[:-1] + self.requestline = requestline + words = requestline.split() + if len(words) == 3: + [command, path, version] = words + if version[:5] != 'HTTP/': + self.send_error(400, "Bad request version (%r)" % version) + return False + try: + base_version_number = version.split('/', 1)[1] + version_number = base_version_number.split(".") + # RFC 2145 section 3.1 says there can be only one "." and + # - major and minor numbers MUST be treated as + # separate integers; + # - HTTP/2.4 is a lower version than HTTP/2.13, which in + # turn is lower than HTTP/12.3; + # - Leading zeros MUST be ignored by recipients. + if len(version_number) != 2: + raise ValueError + version_number = int(version_number[0]), int(version_number[1]) + except (ValueError, IndexError): + self.send_error(400, "Bad request version (%r)" % version) + return False + if version_number >= (1, 1) and self.protocol_version >= "HTTP/1.1": + self.close_connection = 0 + if version_number >= (2, 0): + self.send_error(505, + "Invalid HTTP Version (%s)" % base_version_number) + return False + elif len(words) == 2: + [command, path] = words + self.close_connection = 1 + if command != 'GET': + self.send_error(400, + "Bad HTTP/0.9 request type (%r)" % command) + return False + elif not words: + return False + else: + self.send_error(400, "Bad request syntax (%r)" % requestline) + return False + self.command, self.path, self.request_version = command, path, version + + # Examine the headers and look for a Connection directive + self.headers = self.MessageClass(self.rfile, 0) + + conntype = self.headers.get('Connection', "") + if conntype.lower() == 'close': + self.close_connection = 1 + elif (conntype.lower() == 'keep-alive' and + self.protocol_version >= "HTTP/1.1"): + self.close_connection = 0 + return True + + def handle_one_request(self): + """Handle a single HTTP request. + + You normally don't need to override this method; see the class + __doc__ string for information on how to handle specific HTTP + commands such as GET and POST. + + """ + try: + self.raw_requestline = self.rfile.readline(65537) + if len(self.raw_requestline) > 65536: + self.requestline = '' + self.request_version = '' + self.command = '' + self.send_error(414) + return + if not self.raw_requestline: + self.close_connection = 1 + return + if not self.parse_request(): + # An error code has been sent, just exit + return + mname = 'do_' + self.command + if not hasattr(self, mname): + self.send_error(501, "Unsupported method (%r)" % self.command) + return + method = getattr(self, mname) + method() + self.wfile.flush() #actually send the response if not already done. + except socket.timeout, e: + #a read or a write timed out. Discard this connection + self.log_error("Request timed out: %r", e) + self.close_connection = 1 + return + + def handle(self): + """Handle multiple requests if necessary.""" + self.close_connection = 1 + + self.handle_one_request() + while not self.close_connection: + self.handle_one_request() + + def send_error(self, code, message=None): + """Send and log an error reply. + + Arguments are the error code, and a detailed message. + The detailed message defaults to the short entry matching the + response code. + + This sends an error response (so it must be called before any + output has been generated), logs the error, and finally sends + a piece of HTML explaining the error to the user. + + """ + + try: + short, long = self.responses[code] + except KeyError: + short, long = '???', '???' + if message is None: + message = short + explain = long + self.log_error("code %d, message %s", code, message) + # using _quote_html to prevent Cross Site Scripting attacks (see bug #1100201) + content = (self.error_message_format % + {'code': code, 'message': _quote_html(message), 'explain': explain}) + self.send_response(code, message) + self.send_header("Content-Type", self.error_content_type) + self.send_header('Connection', 'close') + self.end_headers() + if self.command != 'HEAD' and code >= 200 and code not in (204, 304): + self.wfile.write(content) + + error_message_format = DEFAULT_ERROR_MESSAGE + error_content_type = DEFAULT_ERROR_CONTENT_TYPE + + def send_response(self, code, message=None): + """Send the response header and log the response code. + + Also send two standard headers with the server software + version and the current date. + + """ + self.log_request(code) + if message is None: + if code in self.responses: + message = self.responses[code][0] + else: + message = '' + if self.request_version != 'HTTP/0.9': + self.wfile.write("%s %d %s\r\n" % + (self.protocol_version, code, message)) + # print (self.protocol_version, code, message) + self.send_header('Server', self.version_string()) + self.send_header('Date', self.date_time_string()) + + def send_header(self, keyword, value): + """Send a MIME header.""" + if self.request_version != 'HTTP/0.9': + self.wfile.write("%s: %s\r\n" % (keyword, value)) + + if keyword.lower() == 'connection': + if value.lower() == 'close': + self.close_connection = 1 + elif value.lower() == 'keep-alive': + self.close_connection = 0 + + def end_headers(self): + """Send the blank line ending the MIME headers.""" + if self.request_version != 'HTTP/0.9': + self.wfile.write("\r\n") + + def log_request(self, code='-', size='-'): + """Log an accepted request. + + This is called by send_response(). + + """ + + self.log_message('"%s" %s %s', + self.requestline, str(code), str(size)) + + def log_error(self, format, *args): + """Log an error. + + This is called when a request cannot be fulfilled. By + default it passes the message on to log_message(). + + Arguments are the same as for log_message(). + + XXX This should go to the separate error log. + + """ + + self.log_message(format, *args) + + def log_message(self, format, *args): + """Log an arbitrary message. + + This is used by all other logging functions. Override + it if you have specific logging wishes. + + The first argument, FORMAT, is a format string for the + message to be logged. If the format string contains + any % escapes requiring parameters, they should be + specified as subsequent arguments (it's just like + printf!). + + The client host and current date/time are prefixed to + every message. + + """ + + sys.stderr.write("%s - - [%s] %s\n" % + (self.address_string(), + self.log_date_time_string(), + format%args)) + + def version_string(self): + """Return the server software version string.""" + return self.server_version + ' ' + self.sys_version + + def date_time_string(self, timestamp=None): + """Return the current date and time formatted for a message header.""" + if timestamp is None: + timestamp = time.time() + year, month, day, hh, mm, ss, wd, y, z = time.gmtime(timestamp) + s = "%s, %02d %3s %4d %02d:%02d:%02d GMT" % ( + self.weekdayname[wd], + day, self.monthname[month], year, + hh, mm, ss) + return s + + def log_date_time_string(self): + """Return the current time formatted for logging.""" + now = time.time() + year, month, day, hh, mm, ss, x, y, z = time.localtime(now) + s = "%02d/%3s/%04d %02d:%02d:%02d" % ( + day, self.monthname[month], year, hh, mm, ss) + return s + + weekdayname = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] + + monthname = [None, + 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', + 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] + + def address_string(self): + """Return the client address formatted for logging. + + This version looks up the full hostname using gethostbyaddr(), + and tries to find a name that contains at least one dot. + + """ + + host, port = self.client_address[:2] + return socket.getfqdn(host) + + # Essentially static class variables + + # The version of the HTTP protocol we support. + # Set this to HTTP/1.1 to enable automatic keepalive + protocol_version = "HTTP/1.0" + + # The Message-like class used to parse headers + MessageClass = mimetools.Message + + # Table mapping response codes to messages; entries have the + # form {code: (shortmessage, longmessage)}. + # See RFC 2616. + responses = { + 100: ('Continue', 'Request received, please continue'), + 101: ('Switching Protocols', + 'Switching to new protocol; obey Upgrade header'), + + 200: ('OK', 'Request fulfilled, document follows'), + 201: ('Created', 'Document created, URL follows'), + 202: ('Accepted', + 'Request accepted, processing continues off-line'), + 203: ('Non-Authoritative Information', 'Request fulfilled from cache'), + 204: ('No Content', 'Request fulfilled, nothing follows'), + 205: ('Reset Content', 'Clear input form for further input.'), + 206: ('Partial Content', 'Partial content follows.'), + + 300: ('Multiple Choices', + 'Object has several resources -- see URI list'), + 301: ('Moved Permanently', 'Object moved permanently -- see URI list'), + 302: ('Found', 'Object moved temporarily -- see URI list'), + 303: ('See Other', 'Object moved -- see Method and URL list'), + 304: ('Not Modified', + 'Document has not changed since given time'), + 305: ('Use Proxy', + 'You must use proxy specified in Location to access this ' + 'resource.'), + 307: ('Temporary Redirect', + 'Object moved temporarily -- see URI list'), + + 400: ('Bad Request', + 'Bad request syntax or unsupported method'), + 401: ('Unauthorized', + 'No permission -- see authorization schemes'), + 402: ('Payment Required', + 'No payment -- see charging schemes'), + 403: ('Forbidden', + 'Request forbidden -- authorization will not help'), + 404: ('Not Found', 'Nothing matches the given URI'), + 405: ('Method Not Allowed', + 'Specified method is invalid for this resource.'), + 406: ('Not Acceptable', 'URI not available in preferred format.'), + 407: ('Proxy Authentication Required', 'You must authenticate with ' + 'this proxy before proceeding.'), + 408: ('Request Timeout', 'Request timed out; try again later.'), + 409: ('Conflict', 'Request conflict.'), + 410: ('Gone', + 'URI no longer exists and has been permanently removed.'), + 411: ('Length Required', 'Client must specify Content-Length.'), + 412: ('Precondition Failed', 'Precondition in headers is false.'), + 413: ('Request Entity Too Large', 'Entity is too large.'), + 414: ('Request-URI Too Long', 'URI is too long.'), + 415: ('Unsupported Media Type', 'Entity body in unsupported format.'), + 416: ('Requested Range Not Satisfiable', + 'Cannot satisfy request range.'), + 417: ('Expectation Failed', + 'Expect condition could not be satisfied.'), + + 500: ('Internal Server Error', 'Server got itself in trouble'), + 501: ('Not Implemented', + 'Server does not support this operation'), + 502: ('Bad Gateway', 'Invalid responses from another server/proxy.'), + 503: ('Service Unavailable', + 'The server cannot process the request due to a high load'), + 504: ('Gateway Timeout', + 'The gateway server did not receive a timely response'), + 505: ('HTTP Version Not Supported', 'Cannot fulfill request.'), + } + + +def test(HandlerClass = BaseHTTPRequestHandler, + ServerClass = HTTPServer, protocol="HTTP/1.0"): + """Test the HTTP request handler class. + + This runs an HTTP server on port 8000 (or the first command line + argument). + + """ + + if sys.argv[1:]: + port = int(sys.argv[1]) + else: + port = 8000 + server_address = ('', port) + + HandlerClass.protocol_version = protocol + httpd = ServerClass(server_address, HandlerClass) + + sa = httpd.socket.getsockname() + print "Serving HTTP on", sa[0], "port", sa[1], "..." + httpd.serve_forever() + + +if __name__ == '__main__': + test() diff --git a/packages/IronPython.StdLib.2.7.4/content/Lib/Bastion.py b/packages/IronPython.StdLib.2.7.4/content/Lib/Bastion.py new file mode 100644 index 0000000000..9ab2f127bb --- /dev/null +++ b/packages/IronPython.StdLib.2.7.4/content/Lib/Bastion.py @@ -0,0 +1,180 @@ +"""Bastionification utility. + +A bastion (for another object -- the 'original') is an object that has +the same methods as the original but does not give access to its +instance variables. Bastions have a number of uses, but the most +obvious one is to provide code executing in restricted mode with a +safe interface to an object implemented in unrestricted mode. + +The bastionification routine has an optional second argument which is +a filter function. Only those methods for which the filter method +(called with the method name as argument) returns true are accessible. +The default filter method returns true unless the method name begins +with an underscore. + +There are a number of possible implementations of bastions. We use a +'lazy' approach where the bastion's __getattr__() discipline does all +the work for a particular method the first time it is used. This is +usually fastest, especially if the user doesn't call all available +methods. The retrieved methods are stored as instance variables of +the bastion, so the overhead is only occurred on the first use of each +method. + +Detail: the bastion class has a __repr__() discipline which includes +the repr() of the original object. This is precomputed when the +bastion is created. + +""" +from warnings import warnpy3k +warnpy3k("the Bastion module has been removed in Python 3.0", stacklevel=2) +del warnpy3k + +__all__ = ["BastionClass", "Bastion"] + +from types import MethodType + + +class BastionClass: + + """Helper class used by the Bastion() function. + + You could subclass this and pass the subclass as the bastionclass + argument to the Bastion() function, as long as the constructor has + the same signature (a get() function and a name for the object). + + """ + + def __init__(self, get, name): + """Constructor. + + Arguments: + + get - a function that gets the attribute value (by name) + name - a human-readable name for the original object + (suggestion: use repr(object)) + + """ + self._get_ = get + self._name_ = name + + def __repr__(self): + """Return a representation string. + + This includes the name passed in to the constructor, so that + if you print the bastion during debugging, at least you have + some idea of what it is. + + """ + return "" % self._name_ + + def __getattr__(self, name): + """Get an as-yet undefined attribute value. + + This calls the get() function that was passed to the + constructor. The result is stored as an instance variable so + that the next time the same attribute is requested, + __getattr__() won't be invoked. + + If the get() function raises an exception, this is simply + passed on -- exceptions are not cached. + + """ + attribute = self._get_(name) + self.__dict__[name] = attribute + return attribute + + +def Bastion(object, filter = lambda name: name[:1] != '_', + name=None, bastionclass=BastionClass): + """Create a bastion for an object, using an optional filter. + + See the Bastion module's documentation for background. + + Arguments: + + object - the original object + filter - a predicate that decides whether a function name is OK; + by default all names are OK that don't start with '_' + name - the name of the object; default repr(object) + bastionclass - class used to create the bastion; default BastionClass + + """ + + raise RuntimeError, "This code is not secure in Python 2.2 and later" + + # Note: we define *two* ad-hoc functions here, get1 and get2. + # Both are intended to be called in the same way: get(name). + # It is clear that the real work (getting the attribute + # from the object and calling the filter) is done in get1. + # Why can't we pass get1 to the bastion? Because the user + # would be able to override the filter argument! With get2, + # overriding the default argument is no security loophole: + # all it does is call it. + # Also notice that we can't place the object and filter as + # instance variables on the bastion object itself, since + # the user has full access to all instance variables! + + def get1(name, object=object, filter=filter): + """Internal function for Bastion(). See source comments.""" + if filter(name): + attribute = getattr(object, name) + if type(attribute) == MethodType: + return attribute + raise AttributeError, name + + def get2(name, get1=get1): + """Internal function for Bastion(). See source comments.""" + return get1(name) + + if name is None: + name = repr(object) + return bastionclass(get2, name) + + +def _test(): + """Test the Bastion() function.""" + class Original: + def __init__(self): + self.sum = 0 + def add(self, n): + self._add(n) + def _add(self, n): + self.sum = self.sum + n + def total(self): + return self.sum + o = Original() + b = Bastion(o) + testcode = """if 1: + b.add(81) + b.add(18) + print "b.total() =", b.total() + try: + print "b.sum =", b.sum, + except: + print "inaccessible" + else: + print "accessible" + try: + print "b._add =", b._add, + except: + print "inaccessible" + else: + print "accessible" + try: + print "b._get_.func_defaults =", map(type, b._get_.func_defaults), + except: + print "inaccessible" + else: + print "accessible" + \n""" + exec testcode + print '='*20, "Using rexec:", '='*20 + import rexec + r = rexec.RExec() + m = r.add_module('__main__') + m.b = b + r.r_exec(testcode) + + +if __name__ == '__main__': + _test() diff --git a/packages/IronPython.StdLib.2.7.4/content/Lib/CGIHTTPServer.py b/packages/IronPython.StdLib.2.7.4/content/Lib/CGIHTTPServer.py new file mode 100644 index 0000000000..9c7f9dfb61 --- /dev/null +++ b/packages/IronPython.StdLib.2.7.4/content/Lib/CGIHTTPServer.py @@ -0,0 +1,374 @@ +"""CGI-savvy HTTP Server. + +This module builds on SimpleHTTPServer by implementing GET and POST +requests to cgi-bin scripts. + +If the os.fork() function is not present (e.g. on Windows), +os.popen2() is used as a fallback, with slightly altered semantics; if +that function is not present either (e.g. on Macintosh), only Python +scripts are supported, and they are executed by the current process. + +In all cases, the implementation is intentionally naive -- all +requests are executed sychronously. + +SECURITY WARNING: DON'T USE THIS CODE UNLESS YOU ARE INSIDE A FIREWALL +-- it may execute arbitrary Python code or external programs. + +Note that status code 200 is sent prior to execution of a CGI script, so +scripts cannot send other status codes such as 302 (redirect). +""" + + +__version__ = "0.4" + +__all__ = ["CGIHTTPRequestHandler"] + +import os +import sys +import urllib +import BaseHTTPServer +import SimpleHTTPServer +import select +import copy + + +class CGIHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): + + """Complete HTTP server with GET, HEAD and POST commands. + + GET and HEAD also support running CGI scripts. + + The POST command is *only* implemented for CGI scripts. + + """ + + # Determine platform specifics + have_fork = hasattr(os, 'fork') + have_popen2 = hasattr(os, 'popen2') + have_popen3 = hasattr(os, 'popen3') + + # Make rfile unbuffered -- we need to read one line and then pass + # the rest to a subprocess, so we can't use buffered input. + rbufsize = 0 + + def do_POST(self): + """Serve a POST request. + + This is only implemented for CGI scripts. + + """ + + if self.is_cgi(): + self.run_cgi() + else: + self.send_error(501, "Can only POST to CGI scripts") + + def send_head(self): + """Version of send_head that support CGI scripts""" + if self.is_cgi(): + return self.run_cgi() + else: + return SimpleHTTPServer.SimpleHTTPRequestHandler.send_head(self) + + def is_cgi(self): + """Test whether self.path corresponds to a CGI script. + + Returns True and updates the cgi_info attribute to the tuple + (dir, rest) if self.path requires running a CGI script. + Returns False otherwise. + + If any exception is raised, the caller should assume that + self.path was rejected as invalid and act accordingly. + + The default implementation tests whether the normalized url + path begins with one of the strings in self.cgi_directories + (and the next character is a '/' or the end of the string). + """ + splitpath = _url_collapse_path_split(self.path) + if splitpath[0] in self.cgi_directories: + self.cgi_info = splitpath + return True + return False + + cgi_directories = ['/cgi-bin', '/htbin'] + + def is_executable(self, path): + """Test whether argument path is an executable file.""" + return executable(path) + + def is_python(self, path): + """Test whether argument path is a Python script.""" + head, tail = os.path.splitext(path) + return tail.lower() in (".py", ".pyw") + + def run_cgi(self): + """Execute a CGI script.""" + path = self.path + dir, rest = self.cgi_info + + i = path.find('/', len(dir) + 1) + while i >= 0: + nextdir = path[:i] + nextrest = path[i+1:] + + scriptdir = self.translate_path(nextdir) + if os.path.isdir(scriptdir): + dir, rest = nextdir, nextrest + i = path.find('/', len(dir) + 1) + else: + break + + # find an explicit query string, if present. + i = rest.rfind('?') + if i >= 0: + rest, query = rest[:i], rest[i+1:] + else: + query = '' + + # dissect the part after the directory name into a script name & + # a possible additional path, to be stored in PATH_INFO. + i = rest.find('/') + if i >= 0: + script, rest = rest[:i], rest[i:] + else: + script, rest = rest, '' + + scriptname = dir + '/' + script + scriptfile = self.translate_path(scriptname) + if not os.path.exists(scriptfile): + self.send_error(404, "No such CGI script (%r)" % scriptname) + return + if not os.path.isfile(scriptfile): + self.send_error(403, "CGI script is not a plain file (%r)" % + scriptname) + return + ispy = self.is_python(scriptname) + if not ispy: + if not (self.have_fork or self.have_popen2 or self.have_popen3): + self.send_error(403, "CGI script is not a Python script (%r)" % + scriptname) + return + if not self.is_executable(scriptfile): + self.send_error(403, "CGI script is not executable (%r)" % + scriptname) + return + + # Reference: http://hoohoo.ncsa.uiuc.edu/cgi/env.html + # XXX Much of the following could be prepared ahead of time! + env = copy.deepcopy(os.environ) + env['SERVER_SOFTWARE'] = self.version_string() + env['SERVER_NAME'] = self.server.server_name + env['GATEWAY_INTERFACE'] = 'CGI/1.1' + env['SERVER_PROTOCOL'] = self.protocol_version + env['SERVER_PORT'] = str(self.server.server_port) + env['REQUEST_METHOD'] = self.command + uqrest = urllib.unquote(rest) + env['PATH_INFO'] = uqrest + env['PATH_TRANSLATED'] = self.translate_path(uqrest) + env['SCRIPT_NAME'] = scriptname + if query: + env['QUERY_STRING'] = query + host = self.address_string() + if host != self.client_address[0]: + env['REMOTE_HOST'] = host + env['REMOTE_ADDR'] = self.client_address[0] + authorization = self.headers.getheader("authorization") + if authorization: + authorization = authorization.split() + if len(authorization) == 2: + import base64, binascii + env['AUTH_TYPE'] = authorization[0] + if authorization[0].lower() == "basic": + try: + authorization = base64.decodestring(authorization[1]) + except binascii.Error: + pass + else: + authorization = authorization.split(':') + if len(authorization) == 2: + env['REMOTE_USER'] = authorization[0] + # XXX REMOTE_IDENT + if self.headers.typeheader is None: + env['CONTENT_TYPE'] = self.headers.type + else: + env['CONTENT_TYPE'] = self.headers.typeheader + length = self.headers.getheader('content-length') + if length: + env['CONTENT_LENGTH'] = length + referer = self.headers.getheader('referer') + if referer: + env['HTTP_REFERER'] = referer + accept = [] + for line in self.headers.getallmatchingheaders('accept'): + if line[:1] in "\t\n\r ": + accept.append(line.strip()) + else: + accept = accept + line[7:].split(',') + env['HTTP_ACCEPT'] = ','.join(accept) + ua = self.headers.getheader('user-agent') + if ua: + env['HTTP_USER_AGENT'] = ua + co = filter(None, self.headers.getheaders('cookie')) + if co: + env['HTTP_COOKIE'] = ', '.join(co) + # XXX Other HTTP_* headers + # Since we're setting the env in the parent, provide empty + # values to override previously set values + for k in ('QUERY_STRING', 'REMOTE_HOST', 'CONTENT_LENGTH', + 'HTTP_USER_AGENT', 'HTTP_COOKIE', 'HTTP_REFERER'): + env.setdefault(k, "") + + self.send_response(200, "Script output follows") + + decoded_query = query.replace('+', ' ') + + if self.have_fork: + # Unix -- fork as we should + args = [script] + if '=' not in decoded_query: + args.append(decoded_query) + nobody = nobody_uid() + self.wfile.flush() # Always flush before forking + pid = os.fork() + if pid != 0: + # Parent + pid, sts = os.waitpid(pid, 0) + # throw away additional data [see bug #427345] + while select.select([self.rfile], [], [], 0)[0]: + if not self.rfile.read(1): + break + if sts: + self.log_error("CGI script exit status %#x", sts) + return + # Child + try: + try: + os.setuid(nobody) + except os.error: + pass + os.dup2(self.rfile.fileno(), 0) + os.dup2(self.wfile.fileno(), 1) + os.execve(scriptfile, args, env) + except: + self.server.handle_error(self.request, self.client_address) + os._exit(127) + + else: + # Non Unix - use subprocess + import subprocess + cmdline = [scriptfile] + if self.is_python(scriptfile): + interp = sys.executable + if interp.lower().endswith("w.exe"): + # On Windows, use python.exe, not pythonw.exe + interp = interp[:-5] + interp[-4:] + cmdline = [interp, '-u'] + cmdline + if '=' not in query: + cmdline.append(query) + + self.log_message("command: %s", subprocess.list2cmdline(cmdline)) + try: + nbytes = int(length) + except (TypeError, ValueError): + nbytes = 0 + p = subprocess.Popen(cmdline, + stdin = subprocess.PIPE, + stdout = subprocess.PIPE, + stderr = subprocess.PIPE, + env = env + ) + if self.command.lower() == "post" and nbytes > 0: + data = self.rfile.read(nbytes) + else: + data = None + # throw away additional data [see bug #427345] + while select.select([self.rfile._sock], [], [], 0)[0]: + if not self.rfile._sock.recv(1): + break + stdout, stderr = p.communicate(data) + self.wfile.write(stdout) + if stderr: + self.log_error('%s', stderr) + p.stderr.close() + p.stdout.close() + status = p.returncode + if status: + self.log_error("CGI script exit status %#x", status) + else: + self.log_message("CGI script exited OK") + + +# TODO(gregory.p.smith): Move this into an appropriate library. +def _url_collapse_path_split(path): + """ + Given a URL path, remove extra '/'s and '.' path elements and collapse + any '..' references. + + Implements something akin to RFC-2396 5.2 step 6 to parse relative paths. + + Returns: A tuple of (head, tail) where tail is everything after the final / + and head is everything before it. Head will always start with a '/' and, + if it contains anything else, never have a trailing '/'. + + Raises: IndexError if too many '..' occur within the path. + """ + # Similar to os.path.split(os.path.normpath(path)) but specific to URL + # path semantics rather than local operating system semantics. + path_parts = [] + for part in path.split('/'): + if part == '.': + path_parts.append('') + else: + path_parts.append(part) + # Filter out blank non trailing parts before consuming the '..'. + path_parts = [part for part in path_parts[:-1] if part] + path_parts[-1:] + if path_parts: + tail_part = path_parts.pop() + else: + tail_part = '' + head_parts = [] + for part in path_parts: + if part == '..': + head_parts.pop() + else: + head_parts.append(part) + if tail_part and tail_part == '..': + head_parts.pop() + tail_part = '' + return ('/' + '/'.join(head_parts), tail_part) + + +nobody = None + +def nobody_uid(): + """Internal routine to get nobody's uid""" + global nobody + if nobody: + return nobody + try: + import pwd + except ImportError: + return -1 + try: + nobody = pwd.getpwnam('nobody')[2] + except KeyError: + nobody = 1 + max(map(lambda x: x[2], pwd.getpwall())) + return nobody + + +def executable(path): + """Test for executable file.""" + try: + st = os.stat(path) + except os.error: + return False + return st.st_mode & 0111 != 0 + + +def test(HandlerClass = CGIHTTPRequestHandler, + ServerClass = BaseHTTPServer.HTTPServer): + SimpleHTTPServer.test(HandlerClass, ServerClass) + + +if __name__ == '__main__': + test() diff --git a/packages/IronPython.StdLib.2.7.4/content/Lib/ConfigParser.py b/packages/IronPython.StdLib.2.7.4/content/Lib/ConfigParser.py new file mode 100644 index 0000000000..033edda881 --- /dev/null +++ b/packages/IronPython.StdLib.2.7.4/content/Lib/ConfigParser.py @@ -0,0 +1,745 @@ +"""Configuration file parser. + +A setup file consists of sections, lead by a "[section]" header, +and followed by "name: value" entries, with continuations and such in +the style of RFC 822. + +The option values can contain format strings which refer to other values in +the same section, or values in a special [DEFAULT] section. + +For example: + + something: %(dir)s/whatever + +would resolve the "%(dir)s" to the value of dir. All reference +expansions are done late, on demand. + +Intrinsic defaults can be specified by passing them into the +ConfigParser constructor as a dictionary. + +class: + +ConfigParser -- responsible for parsing a list of + configuration files, and managing the parsed database. + + methods: + + __init__(defaults=None) + create the parser and specify a dictionary of intrinsic defaults. The + keys must be strings, the values must be appropriate for %()s string + interpolation. Note that `__name__' is always an intrinsic default; + its value is the section's name. + + sections() + return all the configuration section names, sans DEFAULT + + has_section(section) + return whether the given section exists + + has_option(section, option) + return whether the given option exists in the given section + + options(section) + return list of configuration options for the named section + + read(filenames) + read and parse the list of named configuration files, given by + name. A single filename is also allowed. Non-existing files + are ignored. Return list of successfully read files. + + readfp(fp, filename=None) + read and parse one configuration file, given as a file object. + The filename defaults to fp.name; it is only used in error + messages (if fp has no `name' attribute, the string `' is used). + + get(section, option, raw=False, vars=None) + return a string value for the named option. All % interpolations are + expanded in the return values, based on the defaults passed into the + constructor and the DEFAULT section. Additional substitutions may be + provided using the `vars' argument, which must be a dictionary whose + contents override any pre-existing defaults. + + getint(section, options) + like get(), but convert value to an integer + + getfloat(section, options) + like get(), but convert value to a float + + getboolean(section, options) + like get(), but convert value to a boolean (currently case + insensitively defined as 0, false, no, off for False, and 1, true, + yes, on for True). Returns False or True. + + items(section, raw=False, vars=None) + return a list of tuples with (name, value) for each option + in the section. + + remove_section(section) + remove the given file section and all its options + + remove_option(section, option) + remove the given option from the given section + + set(section, option, value) + set the given option + + write(fp) + write the configuration state in .ini format +""" + +try: + from collections import OrderedDict as _default_dict +except ImportError: + # fallback for setup.py which hasn't yet built _collections + _default_dict = dict + +import re + +__all__ = ["NoSectionError", "DuplicateSectionError", "NoOptionError", + "InterpolationError", "InterpolationDepthError", + "InterpolationSyntaxError", "ParsingError", + "MissingSectionHeaderError", + "ConfigParser", "SafeConfigParser", "RawConfigParser", + "DEFAULTSECT", "MAX_INTERPOLATION_DEPTH"] + +DEFAULTSECT = "DEFAULT" + +MAX_INTERPOLATION_DEPTH = 10 + + + +# exception classes +class Error(Exception): + """Base class for ConfigParser exceptions.""" + + def _get_message(self): + """Getter for 'message'; needed only to override deprecation in + BaseException.""" + return self.__message + + def _set_message(self, value): + """Setter for 'message'; needed only to override deprecation in + BaseException.""" + self.__message = value + + # BaseException.message has been deprecated since Python 2.6. To prevent + # DeprecationWarning from popping up over this pre-existing attribute, use + # a new property that takes lookup precedence. + message = property(_get_message, _set_message) + + def __init__(self, msg=''): + self.message = msg + Exception.__init__(self, msg) + + def __repr__(self): + return self.message + + __str__ = __repr__ + +class NoSectionError(Error): + """Raised when no section matches a requested option.""" + + def __init__(self, section): + Error.__init__(self, 'No section: %r' % (section,)) + self.section = section + +class DuplicateSectionError(Error): + """Raised when a section is multiply-created.""" + + def __init__(self, section): + Error.__init__(self, "Section %r already exists" % section) + self.section = section + +class NoOptionError(Error): + """A requested option was not found.""" + + def __init__(self, option, section): + Error.__init__(self, "No option %r in section: %r" % + (option, section)) + self.option = option + self.section = section + +class InterpolationError(Error): + """Base class for interpolation-related exceptions.""" + + def __init__(self, option, section, msg): + Error.__init__(self, msg) + self.option = option + self.section = section + +class InterpolationMissingOptionError(InterpolationError): + """A string substitution required a setting which was not available.""" + + def __init__(self, option, section, rawval, reference): + msg = ("Bad value substitution:\n" + "\tsection: [%s]\n" + "\toption : %s\n" + "\tkey : %s\n" + "\trawval : %s\n" + % (section, option, reference, rawval)) + InterpolationError.__init__(self, option, section, msg) + self.reference = reference + +class InterpolationSyntaxError(InterpolationError): + """Raised when the source text into which substitutions are made + does not conform to the required syntax.""" + +class InterpolationDepthError(InterpolationError): + """Raised when substitutions are nested too deeply.""" + + def __init__(self, option, section, rawval): + msg = ("Value interpolation too deeply recursive:\n" + "\tsection: [%s]\n" + "\toption : %s\n" + "\trawval : %s\n" + % (section, option, rawval)) + InterpolationError.__init__(self, option, section, msg) + +class ParsingError(Error): + """Raised when a configuration file does not follow legal syntax.""" + + def __init__(self, filename): + Error.__init__(self, 'File contains parsing errors: %s' % filename) + self.filename = filename + self.errors = [] + + def append(self, lineno, line): + self.errors.append((lineno, line)) + self.message += '\n\t[line %2d]: %s' % (lineno, line) + +class MissingSectionHeaderError(ParsingError): + """Raised when a key-value pair is found before any section header.""" + + def __init__(self, filename, lineno, line): + Error.__init__( + self, + 'File contains no section headers.\nfile: %s, line: %d\n%r' % + (filename, lineno, line)) + self.filename = filename + self.lineno = lineno + self.line = line + + +class RawConfigParser: + def __init__(self, defaults=None, dict_type=_default_dict, + allow_no_value=False): + self._dict = dict_type + self._sections = self._dict() + self._defaults = self._dict() + if allow_no_value: + self._optcre = self.OPTCRE_NV + else: + self._optcre = self.OPTCRE + if defaults: + for key, value in defaults.items(): + self._defaults[self.optionxform(key)] = value + + def defaults(self): + return self._defaults + + def sections(self): + """Return a list of section names, excluding [DEFAULT]""" + # self._sections will never have [DEFAULT] in it + return self._sections.keys() + + def add_section(self, section): + """Create a new section in the configuration. + + Raise DuplicateSectionError if a section by the specified name + already exists. Raise ValueError if name is DEFAULT or any of it's + case-insensitive variants. + """ + if section.lower() == "default": + raise ValueError, 'Invalid section name: %s' % section + + if section in self._sections: + raise DuplicateSectionError(section) + self._sections[section] = self._dict() + + def has_section(self, section): + """Indicate whether the named section is present in the configuration. + + The DEFAULT section is not acknowledged. + """ + return section in self._sections + + def options(self, section): + """Return a list of option names for the given section name.""" + try: + opts = self._sections[section].copy() + except KeyError: + raise NoSectionError(section) + opts.update(self._defaults) + if '__name__' in opts: + del opts['__name__'] + return opts.keys() + + def read(self, filenames): + """Read and parse a filename or a list of filenames. + + Files that cannot be opened are silently ignored; this is + designed so that you can specify a list of potential + configuration file locations (e.g. current directory, user's + home directory, systemwide directory), and all existing + configuration files in the list will be read. A single + filename may also be given. + + Return list of successfully read files. + """ + if isinstance(filenames, basestring): + filenames = [filenames] + read_ok = [] + for filename in filenames: + try: + fp = open(filename) + except IOError: + continue + self._read(fp, filename) + fp.close() + read_ok.append(filename) + return read_ok + + def readfp(self, fp, filename=None): + """Like read() but the argument must be a file-like object. + + The `fp' argument must have a `readline' method. Optional + second argument is the `filename', which if not given, is + taken from fp.name. If fp has no `name' attribute, `' is + used. + + """ + if filename is None: + try: + filename = fp.name + except AttributeError: + filename = '' + self._read(fp, filename) + + def get(self, section, option): + opt = self.optionxform(option) + if section not in self._sections: + if section != DEFAULTSECT: + raise NoSectionError(section) + if opt in self._defaults: + return self._defaults[opt] + else: + raise NoOptionError(option, section) + elif opt in self._sections[section]: + return self._sections[section][opt] + elif opt in self._defaults: + return self._defaults[opt] + else: + raise NoOptionError(option, section) + + def items(self, section): + try: + d2 = self._sections[section] + except KeyError: + if section != DEFAULTSECT: + raise NoSectionError(section) + d2 = self._dict() + d = self._defaults.copy() + d.update(d2) + if "__name__" in d: + del d["__name__"] + return d.items() + + def _get(self, section, conv, option): + return conv(self.get(section, option)) + + def getint(self, section, option): + return self._get(section, int, option) + + def getfloat(self, section, option): + return self._get(section, float, option) + + _boolean_states = {'1': True, 'yes': True, 'true': True, 'on': True, + '0': False, 'no': False, 'false': False, 'off': False} + + def getboolean(self, section, option): + v = self.get(section, option) + if v.lower() not in self._boolean_states: + raise ValueError, 'Not a boolean: %s' % v + return self._boolean_states[v.lower()] + + def optionxform(self, optionstr): + return optionstr.lower() + + def has_option(self, section, option): + """Check for the existence of a given option in a given section.""" + if not section or section == DEFAULTSECT: + option = self.optionxform(option) + return option in self._defaults + elif section not in self._sections: + return False + else: + option = self.optionxform(option) + return (option in self._sections[section] + or option in self._defaults) + + def set(self, section, option, value=None): + """Set an option.""" + if not section or section == DEFAULTSECT: + sectdict = self._defaults + else: + try: + sectdict = self._sections[section] + except KeyError: + raise NoSectionError(section) + sectdict[self.optionxform(option)] = value + + def write(self, fp): + """Write an .ini-format representation of the configuration state.""" + if self._defaults: + fp.write("[%s]\n" % DEFAULTSECT) + for (key, value) in self._defaults.items(): + fp.write("%s = %s\n" % (key, str(value).replace('\n', '\n\t'))) + fp.write("\n") + for section in self._sections: + fp.write("[%s]\n" % section) + for (key, value) in self._sections[section].items(): + if key == "__name__": + continue + if (value is not None) or (self._optcre == self.OPTCRE): + key = " = ".join((key, str(value).replace('\n', '\n\t'))) + fp.write("%s\n" % (key)) + fp.write("\n") + + def remove_option(self, section, option): + """Remove an option.""" + if not section or section == DEFAULTSECT: + sectdict = self._defaults + else: + try: + sectdict = self._sections[section] + except KeyError: + raise NoSectionError(section) + option = self.optionxform(option) + existed = option in sectdict + if existed: + del sectdict[option] + return existed + + def remove_section(self, section): + """Remove a file section.""" + existed = section in self._sections + if existed: + del self._sections[section] + return existed + + # + # Regular expressions for parsing section headers and options. + # + SECTCRE = re.compile( + r'\[' # [ + r'(?P

[^]]+)' # very permissive! + r'\]' # ] + ) + OPTCRE = re.compile( + r'(?P