[IronPython] IronPython 2.6 CodePlex Source Update

merllab at microsoft.com merllab at microsoft.com
Thu Apr 1 17:53:34 CEST 2010


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/65175.

ADDED SOURCES
	$/IronPython/IronPython_Main/Src/Tests/pyc/stdmodules_ok.ps1

DELETED SOURCES
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Dynamic/Runtime/DynamicStackFrame.cs

MODIFIED SOURCES
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Dynamic/Interpreter/Instructions/ControlFlowInstructions.cs
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Dynamic/Interpreter/Instructions/InstructionList.cs
	$/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/AstMethods.cs
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Dynamic/Generation/Snippets.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonDynamicStackFrame.cs
	$/IronPython/IronPython_Main/Src/Hosts/SilverLight/Microsoft.Scripting.Silverlight/ErrorFormatter.cs
	$/IronPython/IronPython_Main/Src/Hosts/SilverLight/Chiron/Properties/AssemblyInfo.cs
	$/IronPython/IronPython_Main/Src/IronPython/Compiler/PythonScriptCode.cs
	$/IronPython/IronPython_Main/Src/IronPython/Compiler/RuntimeScriptCode.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonDictionary.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/Exceptions/PythonExceptions.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/PythonTypeUserDescriptorSlot.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/PythonType.cs
	$/IronPython/IronPython_Main/Src/AssemblyVersion.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/PythonOps.cs
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Dynamic/Properties/AssemblyInfo.cs
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Dynamic/Microsoft.Dynamic.csproj
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Dynamic/Runtime/ExceptionHelpers.cs
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Dynamic/Interpreter/Interpreter.cs
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/UserTypeOps.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/WeakRef.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/Generator.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/List.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonContext.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/Importer.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/ObjectAttributesAdapter.cs
	$/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/WithStatement.cs
	$/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/TryStatement.cs
	$/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/ScopeStatement.cs
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Dynamic/Utils/ArrayUtils.cs
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Dynamic/Runtime/ScriptingRuntimeHelpers.cs
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Debugging/AssemblyInfo.cs
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Properties/ExtensionAssemblyInfo.cs
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Hosting/ExceptionOperations.cs
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Microsoft.Scripting.csproj
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Core/Properties/AssemblyInfo.cs
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Hosting/TokenCategorizer.cs
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Runtime/DynamicStackFrame.cs
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Properties/AssemblyInfo.cs
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Runtime/LanguageContext.cs
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Runtime/TokenizerService.cs
	$/IronPython/IronPython_Main/Src/Tests/pyc/stdmodules_ok.ps1
	$/IronPython/IronPython_Main/Src/Tests/pyc/test_pyc.ps1

CHECKIN COMMENTS
--------------------------------------------------------------------------------
Changeset Id: 1708300
Date: 3/31/2010 8:52:23 PM

Cleans up exception handling in IronPython to fix a source of memory leak bugs.  Improves the interpreter’s support for rethrowing exceptions. Adds support for getting DynamicStackFrames via the hosting APIs ExceptionOperations class rather than going to some static helper.

The big change here is that IronPython now adds the stack frames that an exception has propagated through via try/catch blocks instead of storing them in a ThreadStatic variable and attaching them when the exception is caught.  We used to do the thread static because we used to frequently use try/fault blocks – but when we switched to using DynamicMethod’s for all of our optimized code gen we never almost no opportunities to use try/fault blocks – not that we have code paths that would use them even if we did.  Because we always have try/catch’s we may as well take care of this to clean up the memory leaks which have been reported by users.  This also means we no longer need to clear stack frames throughout the code base.

This also adds a new hosting API to get the dynamic stack frames – we currently have a static API in ScriptingRuntimeHelpers that people have been using.  Instead I’ve moved this to ExceptionOperations and have a virtual on LanguageContext which languages can override.

This pulls a bunch of code from ScriptingRuntimeHelpers into PythonExceptions as we’re the only consumer (this is a post-2.6 change so I’m opening the flood gates on breaking changes).

Also adds support for proper rethrow in the interpreter.  Whenever we take an exception we now go into a HandleException method.  This method can recurse for each exception which is caught (we’re limited to the number of throws actually available in the exception handler) and returns when the exception is done being handled.  If we encounter a rethrow we now have the exception on the stack in our catch block so we can properly re-throw it.




(Shelveset: EhCleanupFinal3;REDMOND\dinov | SNAP CheckinId: 10621)
--------------------------------------------------------------------------------
Changeset Id: 1708006
Date: 3/31/2010 5:19:57 PM

Added a fairly thorough regression for http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=26593.  We now precompile the entire CPython standard library for every
checkin (as a test).


(Shelveset: PRECOMPILE_TEST;REDMOND\dfugate | SNAP CheckinId: 10617)
--------------------------------------------------------------------------------
Changeset Id: 1708300
Date: 3/31/2010 8:52:23 PM

Cleans up exception handling in IronPython to fix a source of memory leak bugs.  Improves the interpreter’s support for rethrowing exceptions. Adds support for getting DynamicStackFrames via the hosting APIs ExceptionOperations class rather than going to some static helper.

The big change here is that IronPython now adds the stack frames that an exception has propagated through via try/catch blocks instead of storing them in a ThreadStatic variable and attaching them when the exception is caught.  We used to do the thread static because we used to frequently use try/fault blocks – but when we switched to using DynamicMethod’s for all of our optimized code gen we never almost no opportunities to use try/fault blocks – not that we have code paths that would use them even if we did.  Because we always have try/catch’s we may as well take care of this to clean up the memory leaks which have been reported by users.  This also means we no longer need to clear stack frames throughout the code base.

This also adds a new hosting API to get the dynamic stack frames – we currently have a static API in ScriptingRuntimeHelpers that people have been using.  Instead I’ve moved this to ExceptionOperations and have a virtual on LanguageContext which languages can override.

This pulls a bunch of code from ScriptingRuntimeHelpers into PythonExceptions as we’re the only consumer (this is a post-2.6 change so I’m opening the flood gates on breaking changes).

Also adds support for proper rethrow in the interpreter.  Whenever we take an exception we now go into a HandleException method.  This method can recurse for each exception which is caught (we’re limited to the number of throws actually available in the exception handler) and returns when the exception is done being handled.  If we encounter a rethrow we now have the exception on the stack in our catch block so we can properly re-throw it.




(Shelveset: EhCleanupFinal3;REDMOND\dinov | SNAP CheckinId: 10621)



More information about the Ironpython-users mailing list