Files @ 85419b0950c7
Branch filter:

Location: CSY/reowolf/testdata/parser/positive/18.pdl - annotation

MH
Rewrote typing to use indices.

Currently it is slower than before, because we do a HashMap lookup
followed up by actually using the index. But it serves as the basis
for a faster type inferencer.

The main goal, however, is to fix the manner in which polymorph
types are determined. The typing queue of functions still needs to
correctly write this data to the type table.
#version 100

import std.reo;

composite main() {}

primitive main1(in a, out c) {
	int x = 0;
	int y = 0;
	msg z = null;
	msg w = null;
	x = 1;
	y = 1;
	while (true) {
		synchronous {
			if (x > 0 && fires(a)) {
				z = get(a);
				x--;
			}
			if (w != null && fires(c)) {
				put(c, w);
				w = null;
				y++;
			}
		}
		synchronous {
			assert !fires(a) && !fires(c);
			if (z != null && y > 0) {
				w = z;
				z = null;
				y--;
				x++;
			}
		}
	}
}

composite main2(in a, out c) {
	channel xo -> xi;
	new fifo(a, xo, null);
	new fifo(xi, c, null);
}