[IronPython] IronPython 2.6 CodePlex Source Update

merllab at microsoft.com merllab at microsoft.com
Tue Jul 7 17:53:02 CEST 2009


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

ADDED SOURCES
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonTracebackListener.cs

MODIFIED SOURCES
	$/IronPython/IronPython_Main/Src/IronPython/Compiler/GeneratorRewriter.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonFunction.Generated.cs
	$/IronPython/IronPython_Main/Src/IronPython/Hosting/Python.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/MetaOldInstance.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/BindingHelpers.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/MetaPythonFunction.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonProtocol.Operations.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/PythonProtocol.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/MetaMethod.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/Binding/ConditionalBuilder.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/FunctionCode.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonFunction.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/FunctionAttributes.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/Method.cs
	$/IronPython/IronPython_Main/Src/IronPython/Compiler/PythonCallTargets.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/Exceptions/PythonExceptions.cs
	$/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/YieldExpression.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/Exceptions/TraceBack.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/Operations/PythonOps.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonContext.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/Builtin.cs
	$/IronPython/IronPython_Main/Src/IronPython.Modules/socket.cs
	$/IronPython/IronPython_Main/Src/IronPython.Modules/gc.cs
	$/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/WhileStatement.cs
	$/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/TryStatement.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/PythonTracebackListener.cs
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Debugging/DebugContext.cs
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Debugging/DebugContext.GeneratorLoopProc.cs
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Debugging/DebuggableLambdaBuilder.cs
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Debugging/DebugInfoRewriter.cs
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Debugging/RuntimeOps.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/sys.cs
	$/IronPython/IronPython_Main/Src/IronPython/Runtime/Types/OldInstance.cs
	$/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/ReturnStatement.cs
	$/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/NameExpression.cs
	$/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/IfStatement.cs
	$/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/FunctionDefinition.cs
	$/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/ForStatement.cs
	$/IronPython/IronPython_Main/Src/IronPython/Compiler/Ast/AstGenerator.cs
	$/IronPython/IronPython_Main/Src/IronPython/Compiler/Parser.cs
	$/IronPython/IronPython_Main/Src/IronPython/IronPython.csproj
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Debugging/TraceEventKind.cs
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting.Debugging/TracePipeline/TracePipeline.cs
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Interpreter/LightCompiler.cs
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Ast/GeneratorRewriter.cs
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Interpreter/Instruction.cs
	$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Generation/ToDiskRewriter.cs
	$/IronPython/IronPython_Main/Src/Scripts/run_interactive.py
	$/IronPython/IronPython_Main/Src/Scripts/generate_calls.py
	$/IronPython/IronPython_Main/Src/Tests/test_superconsole.py
	$/IronPython/IronPython_Main/Src/Tests/test_memory.py
	$/IronPython/IronPython_Main/Src/Tests/test_function.py
	$/IronPython/IronPython_Main/Src/Tests/test_class.py
	$/IronPython/IronPython_Main/Src/Tests/test_sys.py
	$/IronPython/IronPython_Main/Tutorial/Tutorial.htm

CHECKIN COMMENTS
--------------------------------------------------------------------------------
Changeset Id: 977090
Date: 7/6/2009 4:54:14 PM

(dinov) Adds sys.settrace/sys.gettrace/sys.call_tracing support.  Also adds support via the extension methods for the hosting APIs.  Enables test_trace.py with a few exceptions where we differ (due to GC, and testing some pretty extreme implementation details of CPython).

This is a pretty big change.  It alters our function implementation so that we can replace function implementations at runtime.  It updates recursion enforcement to also use this new mechanism fixing the fact that recursion enforcement currently bleeds across runtimes.  It also nearly finalizes fixing the relationship between function and function code objects so that we match CPython as we now load the delegate from the function code instead of the function.  It also means we no longer need our “FunctionInfo” class which was basically serving the same purpose.  Another benefit is we no longer create a new function code object each time a function is created.  Finally we also get func_code.co_freevars and exec on a closure code is now disallowed like CPython.

Here’s how this works.  We now maintain a global weak list of all function code objects in the system.  Whenever we compile a function we create a new function code object and register it in this global list.  When sys.settrace/sys.setrecursionlimit are called we walk the global list and fix all of the function code delegates.  If we’re switching recursion on this is just simply wrapping the existing delegate in a recursion enforcement delegate.  This means we no longer need to check the EnforceRecursion static field when recursion isn’t enforced.  If we’re flipping on sys.settrace then we switch to the debuggable lambda – we don’t actually initially do this as it’s a slow process instead we just switch back to the lazy delegate until the functions are called the 1st time.  Then they’ll get compiled in the debuggable form.

There’s also a bunch of tweaks to our parsing and code gen so that we match CPython when tracing is enabled.  This includes having the ending ...



(Shelveset: SysSetTraceFinal2;REDMOND\dinov | SNAP CheckinId: 8847)



More information about the Ironpython-users mailing list