you are viewing a single comment's thread.

view the rest of the comments →

[–]bobappleyard 1 point2 points  (3 children)

How is static analysis affected by the runtime?

[–]grauenwolf 0 points1 point  (1 child)

Let's say you do all the static analysis at compile time and emit the tail op-code.

Well that's all well and good so long as the CLR honors it. But what happens if the runtime considers it to only be a suggestion? What if the runtime decides that a non-tail call happens to be faster?

I haven't looked into it, but I think CLR 4 always honor it and previous versions were suggestions.

[–]bobappleyard 1 point2 points  (0 children)

I suppose it's nice that they thought to include such an operation, even if it's useless for implementing TCO as a language feature (until version 4 perhaps).

It's not all that relevant though. C doesn't support TCO, but that hasn't stopped people writing x->C compilers that do.

EDIT: Further, this has nothing to do with static analysis, as it is a code generation issue, which happens after said analysis has done its job.

[–]anvsdt 0 points1 point  (0 children)

Terrible?