[Swift-devel] hang checker updates

Mihael Hategan hategan at mcs.anl.gov
Sat Jul 14 19:11:42 CDT 2012


On Sat, 2012-07-14 at 12:07 -0700, Mihael Hategan wrote:
> On Sat, 2012-07-14 at 13:55 -0500, Michael Wilde wrote:
> > Wow - great analysis!  Is the logic you applied here embedded in the new trace code? (Ie if users and Swift support folks could get this right off the bat, that would be excellent).
> 
> It doesn't deal with partial closes and array analysis. I'm working on
> that.

Hmm, that was harder and I'm not quite sure how it will behave for large
scripts (there are plenty of > O(N) things there). But I committed it if
you want to try. It now detects things like:
foreach i in [0:4] {
        c[i] = cat(d);
}

foreach i in [5:9] {
        c[i] = gen();
}

d = mcat(c);

Dependency loop found:
	d (declared on line 21) is needed by: 
		cat, many-cat.swift, line 26
		foreach, many-cat.swift, line 24

	the above must complete before the block below can complete:
		foreach, many-cat.swift, line 24
	which produces c (declared on line 20)

	c (declared on line 20) is needed by: 
		mcat, many-cat.swift, line 34
	which produces d (declared on line 21)






More information about the Swift-devel mailing list