October 27, 2003 11:23 am

A long hacking night

As you guys probably already know, this week is PDC week ...

It's currently 11:11 am local time and I hacked all night trying to get at least one of the examples to work. Well, I already realized last week that I could only fix one bug at a time and this strategy really worked out fine for me. However, each time I fixed one problem, another problem showed up - a problem which you could not see before because the problem you just fixed was hiding it ;-)

But hey, that's life of a software developer - and I can live very well with it. I mean, I acually just fixed a problem - there's one problem which is now gone and which'll never show up again, so I actually did something productive ...

However, sometimes you still have the aim and the passion of trying to fix everything at once - just to see one of these higly complex examples actually work. Well, that's fine - as long as you don't get too frustrated if you fail.

Tonight, I finally realized that it's still a very long way until we can actually run these examples - it may even be more difficult than compiling them. The problem is mini and the runtime: we need to add support for generic type and method parameters (MONO_TYPE_VAR and MONO_TYPE_MVAR) before we can run the more complicated examples.

Have a look at the following example:

class Foo<T> { T t; public Foo (T t) { this.t = t; } public void Hello () { // doesn't work in mini Test (t); } public void Test (T t) { } } class X { static void Main () { Foo<int> foo = new Foo<int> (); // Works foo.Hello (); // Works foo.Test (4); }

The problem is the Test (t) call in Foo.Hello() - at the time this method is JITed, we cannot know which type t is - for instance, it could be a reference or a value type.

Posted by martin at October 27, 2003 11:23 am.