The previous commit
394fec90c1d7a66f2e13c658c5cc28e0d38c5678
"Use tag versions to implement fallback tags." added copy coalescing
and introduced serious changes to allocation algorithm. It simulated
the order of allocation used by previous algorithm to preserve test
results.
Now we drop this simulation and keep to the natural order: it is easy
to see that changes in test results are caused by different order of
tag version allocation.
if (repr[x] != END) continue;
// try all existing classes
- for (rx = nver; --rx >= 0;) {
+ for (rx = 0; rx < nver; ++rx) {
if (rx != repr[rx]) continue;
// check interference with class members
}
// make new equivalence class
- if (rx < 0) {
+ if (rx == nver) {
repr[x] = x;
}
}
tagver_t maxver = 0;
- for (rx = nver; --rx >= 0;) {
+ for (rx = 0; rx < nver; ++rx) {
if (repr[rx] != rx) continue;
++maxver;
default: goto yy3;
}
yy2:
- q = yyt2;
- p = yyt1;
+ q = yyt1;
+ p = yyt2;
{ p q }
yy3:
++YYCURSOR;
yych = *++YYCURSOR;
switch (yych) {
case 'c':
- yyt1 = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy6;
case 'd':
- yyt1 = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy7;
default: goto yy4;
}
switch (yych) {
case 'a': goto yy9;
default:
- yyt2 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy2;
}
yy7:
switch (yych) {
case 'a': goto yy11;
default:
- yyt2 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy8;
}
yy8:
- s = yyt2;
- r = yyt1;
+ s = yyt1;
+ r = yyt2;
{ r s }
yy9:
++YYCURSOR;
yych = *YYCURSOR;
switch (yych) {
case 'c':
- yyt1 = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy6;
default: goto yy10;
}
yy10:
YYCURSOR = YYMARKER;
if (yyaccept == 0) {
- yyt2 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy2;
} else {
- yyt2 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy8;
}
yy11:
yych = *YYCURSOR;
switch (yych) {
case 'd':
- yyt1 = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy7;
default: goto yy10;
}
{}
yy4:
++YYCURSOR;
- yyt1 = yyt2 = YYCURSOR;
switch ((yych = *YYCURSOR)) {
- case 'b': goto yy6;
- case 'c': goto yy8;
- case 'd': goto yy11;
- default: goto yy5;
+ case 'b':
+ yyt2 = YYCURSOR;
+ goto yy6;
+ case 'c':
+ yyt1 = yyt2 = YYCURSOR;
+ goto yy8;
+ case 'd':
+ yyt1 = yyt2 = YYCURSOR;
+ goto yy11;
+ default:
+ yyt1 = yyt2 = YYCURSOR;
+ goto yy5;
}
yy5:
- YYCURSOR = yyt2;
- p = yyt1;
+ YYCURSOR = yyt1;
+ p = yyt2;
{ 1 p }
yy6:
++YYCURSOR;
yyt1 = YYCURSOR;
goto yy8;
case 'd':
- yyt2 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy11;
default:
- yyt2 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy5;
}
yy8:
yyt1 = yyt2 = YYCURSOR;
goto yy21;
default:
- yyt2 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy18;
}
yy18:
- p = yyt2;
+ p = yyt1;
{ 1 p }
yy19:
++YYCURSOR;
switch (yych) {
case 'b': goto yy19;
case 'c':
- yyt2 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy21;
default: goto yy18;
}
default: goto yy23;
}
yy23:
- YYCURSOR = yyt2;
- p = yyt1;
+ YYCURSOR = yyt1;
+ p = yyt2;
{ 2 p }
}
yych = *(YYMARKER = ++YYCURSOR);
switch (yych) {
case 'b':
- yyt2 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy30;
case 'c':
yyt1 = yyt2 = YYCURSOR;
goto yy32;
default:
- yyt2 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy29;
}
yy29:
- p = yyt2;
+ p = yyt1;
{ 1 p }
yy30:
yyaccept = 1;
switch (yych) {
case 'b': goto yy30;
case 'c':
- yyt1 = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy32;
default: goto yy29;
}
YYCURSOR = YYMARKER;
switch (yyaccept) {
case 0:
- yyt2 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy29;
case 1: goto yy29;
default: goto yy35;
default: goto yy35;
}
yy35:
- YYCURSOR = yyt1;
- p = yyt2;
+ YYCURSOR = yyt2;
+ p = yyt1;
{ 2 p }
}
yych = *++YYCURSOR;
switch (yych) {
case 'b':
- yyt2 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy41;
default: goto yy39;
}
switch (yych) {
case 'b': goto yy41;
case 'c':
- yyt1 = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy44;
default: goto yy43;
}
yy43:
- p = yyt2;
+ p = yyt1;
{ 1 p }
yy44:
++YYCURSOR;
default: goto yy47;
}
yy47:
- YYCURSOR = yyt1;
- p = yyt2;
+ YYCURSOR = yyt2;
+ p = yyt1;
{ 2 p }
}
yych = *YYCURSOR;
switch (yych) {
case 'a':
- yyt1 = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy5;
default: goto yy3;
}
yy2:
- YYCURSOR = yyt1;
+ YYCURSOR = yyt2;
{}
yy3:
++YYCURSOR;
yych = *++YYCURSOR;
switch (yych) {
case 'b':
- yyt2 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy6;
default: goto yy4;
}
yych = *YYCURSOR;
switch (yych) {
case 'a':
- yyt1 = yyt2;
+ yyt2 = yyt1;
goto yy9;
default: goto yy8;
}
yy8:
- p = yyt2;
+ p = yyt1;
{ p }
yy9:
++YYCURSOR;
yych = *YYCURSOR;
switch (yych) {
case 'b':
- yyt2 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy11;
default: goto yy10;
}
yy10:
YYCURSOR = YYMARKER;
- yyt2 = yyt1;
+ yyt1 = yyt2;
goto yy8;
yy11:
++YYCURSOR;
yych = *(YYMARKER = ++YYCURSOR);
switch (yych) {
case '1':
- yyt1 = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy5;
case '2':
- yyt1 = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy8;
default: goto yy3;
}
yych = *++YYCURSOR;
switch (yych) {
case '3':
- yyt2 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy9;
case '4':
- yyt2 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy11;
default: goto yy7;
}
yy11:
++YYCURSOR;
p4 = YYCURSOR - 1;
- p3 = yyt2;
- p2 = yyt2 - 1;
- p1 = yyt1;
- p0 = yyt1 - 1;
+ p3 = yyt1;
+ p2 = yyt1 - 1;
+ p1 = yyt2;
+ p0 = yyt2 - 1;
{
printf("'%.*s', '%.*s', '%.*s', '%.*s', '%.*s'\n",
p1 - p0, p0,
yych = *(YYMARKER = ++YYCURSOR);
switch (yych) {
case '1':
- yyt1 = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy5;
case '2':
- yyt1 = YYCURSOR;
+ yyt2 = YYCURSOR;
goto yy8;
default: goto yy3;
}
yych = *++YYCURSOR;
switch (yych) {
case '3':
- yyt2 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy9;
case '4':
- yyt2 = YYCURSOR;
+ yyt1 = YYCURSOR;
goto yy11;
default: goto yy7;
}
yy11:
++YYCURSOR;
YYCURSOR -= 1;
- p3 = yyt2;
- p2 = yyt2 - 1;
- p1 = yyt1;
- p0 = yyt1 - 1;
+ p3 = yyt1;
+ p2 = yyt1 - 1;
+ p1 = yyt2;
+ p0 = yyt2 - 1;
{
printf("'%.*s', '%.*s', '%.*s', '%.*s', '%s'\n",
p1 - p0, p0,
yych = *YYCURSOR;
switch (yych) {
case '0':
- yyt1 = YYCURSOR;
+ yyt3 = YYCURSOR;
goto yy4;
case '1':
- yyt1 = YYCURSOR;
+ yyt3 = YYCURSOR;
goto yy5;
default: goto yy2;
}
}
yy12:
++YYCURSOR;
- yyt3 = YYCURSOR;
+ yyt1 = YYCURSOR;
yych = *YYCURSOR;
goto yy15;
yy13:
- p4 = yyt3;
- p3 = yyt3 - 1;
+ p4 = yyt1;
+ p3 = yyt1 - 1;
p2 = yyt2;
p1 = yyt2 - 1;
- p0 = yyt1;
+ p0 = yyt3;
{
printf("'%.*s', '%.*s', '%.*s', '%.*s', '%.*s'\n",
p1 - p0, p0,
yych = *YYCURSOR;
switch (yych) {
case '0':
- yyt1 = YYCURSOR;
+ yyt3 = YYCURSOR;
goto yy4;
case '1':
- yyt1 = YYCURSOR;
+ yyt3 = YYCURSOR;
goto yy5;
default: goto yy2;
}
}
yy12:
++YYCURSOR;
- yyt3 = YYCURSOR;
+ yyt1 = YYCURSOR;
yych = *YYCURSOR;
goto yy15;
yy13:
- YYCURSOR = yyt3;
- p3 = yyt3 - 1;
+ YYCURSOR = yyt1;
+ p3 = yyt1 - 1;
p2 = yyt2;
p1 = yyt2 - 1;
- p0 = yyt1;
+ p0 = yyt3;
{
printf("'%.*s', '%.*s', '%.*s', '%.*s', '%s'\n",
p1 - p0, p0,