[Mono-devel-list] Extension to mcs

Miguel de Icaza miguel at ximian.com
Thu Apr 22 16:35:21 EDT 2004


> I'd like to add support for "Design by Contract" [1] to the Mono C#
> compiler using custom attributes - kind of what eXtensible C# [2] does.
> This requires the dynamic modification of the code tree after the parse
> step of mcs. At the moment there is AFAIK no possibility to extend mcs
> like that without forking it. But it seems that such extensions are
> possible with very little modification of mcs. Specifically that'd be:
> - a hook event after the parse step, probably in MainDriver
> - a public get property for the statements member in the Block class
> Perhaps more changes will become necessary but such little modifications
> shouldn't hurt. So, my question is now, can I assume that a patch
> integrating these changes would be accepted or are there some
> fundamental issues I've overlooked?

I could integrate small patches like that.

But in general a fork is not a bad thing;  It is done all the time
everywhere to test, prototype and play with things.  

Once you have a mature patch, maybe we could see what bits we can put in
the mainline compiler, and which ones are not suitable (maybe mcs could
load plugins if necessary).


More information about the Mono-devel-list mailing list