summaryrefslogtreecommitdiff
path: root/src/runtime/fstruct.r
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/fstruct.r')
-rw-r--r--src/runtime/fstruct.r71
1 files changed, 0 insertions, 71 deletions
diff --git a/src/runtime/fstruct.r b/src/runtime/fstruct.r
index 469c3c5..3e5972a 100644
--- a/src/runtime/fstruct.r
+++ b/src/runtime/fstruct.r
@@ -34,8 +34,6 @@ function{1} delete(s,x)
(BlkLoc(s)->set.size)--;
}
- EVValD(&s, E_Sdelete);
- EVValD(&x, E_Sval);
return s;
}
table:
@@ -54,8 +52,6 @@ function{1} delete(s,x)
(BlkLoc(s)->table.size)--;
}
- EVValD(&s, E_Tdelete);
- EVValD(&x, E_Tsub);
return s;
}
default:
@@ -89,11 +85,7 @@ struct descrip *res;
if (bp->nused <= 0) {
bp = (struct b_lelem *) bp->listnext;
hp->listhead = (union block *) bp;
-#ifdef ListFix
- bp->listprev = (union block *) hp;
-#else /* ListFix */
bp->listprev = NULL;
-#endif /* ListFix */
}
/*
@@ -131,7 +123,6 @@ function{0,1} get_or_pop(x)
}
body {
- EVValD(&x, E_Lget);
if (!c_get((struct b_list *)BlkLoc(x), &result)) fail;
return result;
}
@@ -156,10 +147,8 @@ function{*} key(t)
tended union block *ep;
struct hgstate state;
- EVValD(&t, E_Tkey);
for (ep = hgfirst(BlkLoc(t), &state); ep != 0;
ep = hgnext(BlkLoc(t), &state, ep)) {
- EVValD(&ep->telem.tref, E_Tsub);
suspend ep->telem.tref;
}
fail;
@@ -215,8 +204,6 @@ function{1} insert(s, x, y)
else
deallocate((union block *)se);
- EVValD(&s, E_Sinsert);
- EVValD(&x, E_Sval);
return s;
}
}
@@ -264,8 +251,6 @@ function{1} insert(s, x, y)
te->tval = y;
}
- EVValD(&s, E_Tinsert);
- EVValD(&x, E_Tsub);
return s;
}
}
@@ -313,9 +298,6 @@ function{1} list(n, x)
Protect(hp = alclist(size), runerr(0));
Protect(bp = alclstb(nslots, (word)0, size), runerr(0));
hp->listhead = hp->listtail = (union block *) bp;
-#ifdef ListFix
- bp->listprev = bp->listnext = (union block *) hp;
-#endif /* ListFix */
/*
* Initialize each slot.
@@ -323,8 +305,6 @@ function{1} list(n, x)
for (i = 0; i < size; i++)
bp->lslots[i] = x;
- Desc_EVValD(hp, E_Lcreate, D_List);
-
/*
* Return the new list.
*/
@@ -347,9 +327,6 @@ function{0,1} member(s, x)
int res;
register uword hn;
- EVValD(&s, E_Smember);
- EVValD(&x, E_Sval);
-
hn = hash(&x);
memb(BlkLoc(s), &x, hn, &res);
if (res==1)
@@ -366,9 +343,6 @@ function{0,1} member(s, x)
int res;
register uword hn;
- EVValD(&s, E_Tmember);
- EVValD(&x, E_Tsub);
-
hn = hash(&x);
memb(BlkLoc(s), &x, hn, &res);
if (res == 1)
@@ -400,8 +374,6 @@ function{0,1} pull(x)
register struct b_list *hp;
register struct b_lelem *bp;
- EVValD(&x, E_Lpull);
-
/*
* Point at list header block and fail if the list is empty.
*/
@@ -417,11 +389,7 @@ function{0,1} pull(x)
if (bp->nused <= 0) {
bp = (struct b_lelem *) bp->listprev;
hp->listtail = (union block *) bp;
-#ifdef ListFix
- bp->listnext = (union block *) hp;
-#else /* ListFix */
bp->listnext = NULL;
-#endif /* ListFix */
}
/*
@@ -456,10 +424,6 @@ dptr val;
*/
bp = (struct b_lelem *) BlkLoc(*l)->list.listhead;
-#ifdef EventMon /* initialize i so it's 0 if first list-element */
- i = 0; /* block isn't full */
-#endif /* EventMon */
-
/*
* If the first list-element block is full, allocate a new
* list-element block, make it the first list-element block,
@@ -489,9 +453,6 @@ dptr val;
}
BlkLoc(*l)->list.listhead->lelem.listprev = (union block *) bp;
-#ifdef ListFix
- bp->listprev = BlkLoc(*l);
-#endif /* ListFix */
bp->listnext = BlkLoc(*l)->list.listhead;
BlkLoc(*l)->list.listhead = (union block *) bp;
}
@@ -553,10 +514,6 @@ function{1} push(x, vals[n])
hp = (struct b_list *) BlkLoc(x);
bp = (struct b_lelem *) hp->listhead;
-#ifdef EventMon /* initialize i so it's 0 if first list-element */
- i = 0; /* block isn't full */
-#endif /* EventMon */
-
/*
* If the first list-element block is full, allocate a new
* list-element block, make it the first list-element block,
@@ -586,9 +543,6 @@ function{1} push(x, vals[n])
}
hp->listhead->lelem.listprev = (union block *) bp;
-#ifdef ListFix
- bp->listprev = (union block *) hp;
-#endif /* ListFix */
bp->listnext = hp->listhead;
hp->listhead = (union block *) bp;
}
@@ -610,8 +564,6 @@ function{1} push(x, vals[n])
hp->size++;
}
- EVValD(&x, E_Lpush);
-
/*
* Return the list.
*/
@@ -637,10 +589,6 @@ struct descrip *val;
*/
bp = (struct b_lelem *) BlkLoc(*l)->list.listtail;
-#ifdef EventMon /* initialize i so it's 0 if last list-element */
- i = 0; /* block isn't full */
-#endif /* EventMon */
-
/*
* If the last list-element block is full, allocate a new
* list-element block, make it the last list-element block,
@@ -672,9 +620,6 @@ struct descrip *val;
((struct b_list *)BlkLoc(*l))->listtail->lelem.listnext =
(union block *) bp;
bp->listprev = ((struct b_list *)BlkLoc(*l))->listtail;
-#ifdef ListFix
- bp->listnext = BlkLoc(*l);
-#endif /* ListFix */
((struct b_list *)BlkLoc(*l))->listtail = (union block *) bp;
}
@@ -733,10 +678,6 @@ function{1} put(x, vals[n])
hp = (struct b_list *)BlkLoc(x);
bp = (struct b_lelem *) hp->listtail;
-#ifdef EventMon /* initialize i so it's 0 if last list-element */
- i = 0; /* block isn't full */
-#endif /* EventMon */
-
/*
* If the last list-element block is full, allocate a new
* list-element block, make it the last list-element block,
@@ -766,9 +707,6 @@ function{1} put(x, vals[n])
hp->listtail->lelem.listnext = (union block *) bp;
bp->listprev = hp->listtail;
-#ifdef ListFix
- bp->listnext = (union block *)hp;
-#endif /* ListFix */
hp->listtail = (union block *) bp;
}
@@ -789,8 +727,6 @@ function{1} put(x, vals[n])
}
- EVValD(&x, E_Lput);
-
/*
* Return the list.
*/
@@ -815,7 +751,6 @@ function{1} set(l)
ps = hmake(T_Set, (word)0, (word)0);
if (ps == NULL)
runerr(0);
- Desc_EVValD(ps, E_Screate, D_Set);
return set(ps);
}
}
@@ -854,11 +789,7 @@ function{1} set(l)
Protect(ne = alcselem(&nulldesc, (uword)0), runerr(0));
for (pb = pb->list.listhead;
-#ifdef ListFix
- BlkType(pb) == T_Lelem;
-#else /* ListFix */
pb != NULL;
-#endif /* ListFix */
pb = pb->lelem.listnext) {
for (i = 0; i < pb->lelem.nused; i++) {
j = pb->lelem.first + i;
@@ -876,7 +807,6 @@ function{1} set(l)
}
}
deallocate((union block *)ne);
- Desc_EVValD(ps, E_Screate, D_Set);
return set(ps);
}
}
@@ -900,7 +830,6 @@ function{1} table(x)
if (bp == NULL)
runerr(0);
bp->table.defvalue = x;
- Desc_EVValD(bp, E_Tcreate, D_Table);
return table(bp);
}
end