[IronPython] IL Rewriting @ Runtime

Jim Hugunin jim at ironpython.com
Thu Dec 9 22:36:28 CET 2004


There's another technology in .net that supports IL rewriting at runtime -
edit-and-continue.  This one requires the debugging API and like the hacks
using the profiling API isn't really useful for production use.  Both VB and
C# will be using this in their debugger modes in VS.Net 2005 to give some of
the benefits of making changes on the fly that we're all used to in Python.
Here's an msdn article on the feature:
 
http://msdn.microsoft.com/vcsharp/default.aspx?pull=/library/en-us/dnvs05/ht
ml/edit_continue.asp

I haven't had a chance yet to play with the underlying APIs, partially
because they're only useful for development-time use.  I believe that the
only way to use EnC today is through the unmanaged debug API, but that's
always something that could be wrapped in the future if this is useful.

-Jim

> -----Original Message-----
> From: users-ironpython.com-bounces at lists.ironpython.com [mailto:users-
> ironpython.com-bounces at lists.ironpython.com] On Behalf Of Douglas
> Stockwell
> Sent: Wednesday, December 08, 2004 5:14 PM
> To: users-ironpython.com at lists.ironpython.com
> Subject: RE: [IronPython] IL Rewriting @ Runtime
> 
> John Lam also uses the Profiler API to mutate IL in his Runtime Aspect
> Weaver. See here: http://www.iunknown.com/000267.html
> 
> Unfortunately while these techniques are interesting experiments, in their
> current incarnation (unmanaged, and external to the CLR) they are not
> particularly useful to language implementers.
> 
> >From the article:
> 
> "...but note that its not suited for deployment in a production
> environment.
> The reason is that it's based on the Profiling API, which after being
> registered circumvents the CLR security infrastructure..."
> 
> Remembering that taking advantage of the benefits of managed execution is
> one of the biggest reasons for porting a language to a VM like the CLR.
> 
> Not to mention the potential performance implications.
> 
> - Doug
> 
> -----Original Message-----
> From: users-ironpython.com-bounces at lists.ironpython.com
> [mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of
> Keith J. Farmer
> Sent: Thursday, 9 December 2004 7:48 AM
> To: users-ironpython.com at lists.ironpython.com
> Subject: [IronPython] IL Rewriting @ Runtime
> 
> I forgot about this article...
> 
> http://msdn.microsoft.com/msdnmag/issues/03/09/NETProfilingAPI/
> 
> It describes a technique to rewrite IL at runtime.
> _______________________________________________
> users-ironpython.com mailing list
> users-ironpython.com at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> 
> _______________________________________________
> users-ironpython.com mailing list
> users-ironpython.com at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com





More information about the Ironpython-users mailing list