[Mono-list] [Off-topic] "if else" or "switch" ?

Michal Moskal malekith@pld-linux.org
Sun, 17 Oct 2004 12:54:59 +0200


On Sat, Oct 16, 2004 at 07:11:49PM -0500, Marcus wrote:
> On Saturday 16 October 2004 7:20 am, Mike Welham wrote:
> 
> Yes, and in fact, according to the CLI spec, it is difficult for the JIT to 
> determine whether the a tail call can be used when the ldloca and ldarga 
> instructions are involved. 

According to the spec -- it's not. You simply cannot have tailcall if
any ldloca/ldarga are involved. Since then you would have to pass
managed pointer to the called function, which is not permitted in the
verifiable CIL. So the ,,rationale'' for the tail prefix listed there
seems bogus.

> I must admit that I do not quite understand how 
> ldloca and ldarga interact would interact with tail calls.

ld{loc,arg}a loads address of a value in the current stack frame.
Which you're going to destroy with the tail call.

-- 
: Michal Moskal :: http://www.kernel.pl/~malekith :: GCS !tv h e>+++ b++
: ::: Logic is a nice contrast to the Real World. :: UL++++$ C++ E--- a?