mirror of
https://github.com/urbit/shrub.git
synced 2024-12-02 08:55:07 +03:00
replaces road stack sanity assertions with explicit bail:meme
This commit is contained in:
parent
ab562348e9
commit
e03c9286aa
@ -38,10 +38,14 @@ _cue_push(c3_ys mov,
|
||||
// (off==0 means we're on a north road)
|
||||
//
|
||||
if ( 0 == off ) {
|
||||
c3_assert(u3R->cap_p > u3R->hat_p);
|
||||
if( !(u3R->cap_p > u3R->hat_p) ) {
|
||||
u3m_bail(c3__meme);
|
||||
}
|
||||
}
|
||||
else {
|
||||
c3_assert(u3R->cap_p < u3R->hat_p);
|
||||
if( !(u3R->cap_p < u3R->hat_p) ) {
|
||||
u3m_bail(c3__meme);
|
||||
}
|
||||
}
|
||||
|
||||
cueframe* fam_u = u3to(cueframe, u3R->cap_p + off);
|
||||
|
@ -586,8 +586,13 @@ u3a_push(c3_w len_w)
|
||||
top -= len_w;
|
||||
cur = top;
|
||||
u3p(void) cap_p = u3R->cap_p = u3of(void, top);
|
||||
c3_assert(cap_p < u3R->mat_p);
|
||||
c3_assert(cap_p > u3R->hat_p);
|
||||
|
||||
if( !( cap_p < u3R->mat_p &&
|
||||
cap_p > u3R->hat_p ) )
|
||||
{
|
||||
u3m_bail(c3__meme);
|
||||
}
|
||||
|
||||
return cur;
|
||||
}
|
||||
else {
|
||||
@ -595,8 +600,13 @@ u3a_push(c3_w len_w)
|
||||
top += len_w;
|
||||
u3R->cap_p = u3of(void, top);
|
||||
u3p(void) cap_p = u3R->cap_p = u3of(void, top);
|
||||
c3_assert(cap_p > u3R->mat_p);
|
||||
c3_assert(cap_p < u3R->hat_p);
|
||||
|
||||
if( !( cap_p > u3R->mat_p &&
|
||||
cap_p < u3R->hat_p ) )
|
||||
{
|
||||
u3m_bail(c3__meme);
|
||||
}
|
||||
|
||||
return cur;
|
||||
}
|
||||
}
|
||||
|
@ -1597,10 +1597,14 @@ _mug_push(c3_ys mov,
|
||||
// (off==0 means we're on a north road)
|
||||
//
|
||||
if ( 0 == off ) {
|
||||
c3_assert(u3R->cap_p > u3R->hat_p);
|
||||
if( !(u3R->cap_p > u3R->hat_p) ) {
|
||||
u3m_bail(c3__meme);
|
||||
}
|
||||
}
|
||||
else {
|
||||
c3_assert(u3R->cap_p < u3R->hat_p);
|
||||
if( !(u3R->cap_p < u3R->hat_p) ) {
|
||||
u3m_bail(c3__meme);
|
||||
}
|
||||
}
|
||||
|
||||
mugframe* fam_u = u3to(mugframe, u3R->cap_p + off);
|
||||
|
Loading…
Reference in New Issue
Block a user