This is an automated email letting you know that sources
have recently been pushed out. You can download these newer
sources directly from http://ironpython.codeplex.com/SourceControl/changeset/view/55001.
ADDED SOURCES
$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/TypeInferer.cs
MODIFIED SOURCES
$/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonOverloadResolver.cs
$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/DefaultOverloadResolver.cs
$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/ArgBuilder.cs
$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/CallFailureReason.cs
$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/CallFailure.cs
$/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/MetaPythonFunction.cs
$/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/BuiltinFunction.cs
$/IronPython/IronPython_Main/Src/IronPythonTest/BindTest.cs
$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/TypeInferer.cs
$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/RestrictedArguments.cs
$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/ParamsArgBuilder.cs
$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/SimpleArgBuilder.cs
$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/OverloadResolver.cs
$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/ParameterMapping.cs
$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/MethodCandidate.cs
$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/Calls/KeywordArgBuilder.cs
$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Microsoft.Scripting.csproj
$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Runtime/BinderOps.cs
$/IronPython/IronPython_Main/Src/Tests/test_methodbinder1.py
$/IronPython/IronPython_Main/Src/Tests/test_cliclass.py
$/IronPython/IronPython_Main/Src/Tests/test_methodbinder2.py
$/IronPython/IronPython_Main/Src/Tests/test_statics.py
CHECKIN COMMENTS
--------------------------------------------------------------------------------
Changeset Id: 950981
Date: 6/17/2009 2:10:25 PM
(dinov) Implements support for generic method type inference. Mostly a DLR outer layer change with some tweaks to IronPython and IronRuby.
Python changes:
We no longer need to eagerly detect when we’re calling a method w/ only generics. We also add support for inferring types for Lambda arguments based upon a Python Function’s arity. Finally there’s one fix where we make sure to create the correct kind DMO instead of just the base DynamicMetaObject type. A few tests are also updated as there are some minor changes in results when overloaded by both a generic method and a non-generic method. Finally lots of new tests are added.
Ruby changes:
Ruby’s MethodGroupInfo was doing MakeGenericMethod and then returning the generic method. But the types it’s passing in are all generic parameters – so the end result is Ruby produces a method for which .IsGenericMethodDefinition is false but it contains all of the original generic method parameters. Now we return the original target so IsGenericMethodDefinition remains true. Also updated MissingBlockArgBuilder so we can know that it doesn’t really prodive any parameters. Finally the small set of tests verifying exceptions are throw are updated to expect successful inference.
DLR changes:
This is the bulk of the changes. Added a new TypeInferer class which performs the actual type inference. Added a new CallFailureReason for noting when we failed to perform type inference. Updated the ArgBuilder’s so we can clone them w/ a new ParameterInfo. This is used for replacing the existing ArgBuilder’s built for the generic method w/ new ArgBuilders which have been specialized to the specific generic type. Fixed a couple of spots where we were creating base DynamicMetaObject’s instead of getting them from their values. Added support for MethodCandidate’s to track additional restrictions with themselves – this is necessary because the type inference can result in new type checks when inferring based ...
(Shelveset: GenericMethodTypeInferenceFinal2;REDMOND\dinov | SNAP CheckinId: 8720)