[Mono-devel-list] Bug in mini

Paolo Molaro lupus at ximian.com
Sun May 4 06:35:54 EDT 2003


On 05/03/03 Piers Haken wrote:
> Paolo, I think you may be mistaken about the meanin of 'single forward
> pass'. I believe that 'forward' does NOT refer to an increasing sequence
> of addresses. I believe that it refers to the order in which the
> 'virtual' processor might execute those instructions: an acyclic,
> depth-first traversal as opposed to a linear one, if you will.

Well, what you describe is a way to make the sample code work, but it doesn't
match with what the spec says, IMHO. It talks about a 'single forward
pass through the CIL instruction stream', not through the control flow
graph. Each basic block needs to be processed in a forward way because
it doesn't make sense otherwise:-) so the forward reference in the spec
may only refer to addresses of the instructions when multiple basic
blocks are involved, always IMHO. Forward has a meaning when there is
also a direction clearly specified, something that doesn't belong to
graphs with cycles in them;-)

We could keep a stack of IL addresses to be visited later, instead of
doing a linear pass on the IL code, much like it's done when
coloring a concave figure. But I would like some sort of official
response from the spec people, because, I hope we can agree that
if the spec is meant to allow that sort of code, it is at least poorly
worded.

lupus

-- 
-----------------------------------------------------------------
lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better



More information about the Mono-devel-list mailing list