[Mono-devel-list] Trampolines...

Willibald Krenn Willibald.Krenn at gmx.at
Wed Feb 23 08:56:17 EST 2005


Hi Ben!

>>>SomeStruct s = new SomeStruct ();
>>>s.ToString ();
>>>object o = s;
>>>o.ToString ();
>>
>>[..idea..]
>>addq 0x10, %r_this	;unbox start
>>pushq %rbp		;normal start
>>movq  %rsp, %rbp
>>....
> 
> Totally not needed. If you call s.ToString (), the compiler does *not*
> emit a box instruction, provided that typeof (s) provided an override for
> .ToString.

It's not about s.ToString, but o.ToString. s.ToString would enter at 
pushq, whereas o.ToString would enter at addq... Or do I have missed 
something?

Willi




More information about the Mono-devel-list mailing list