mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-13 11:45:45 +03:00
u3: moves _n_swap() next to other stack ops
This commit is contained in:
parent
890d6b4944
commit
53665a6172
@ -1485,6 +1485,19 @@ _n_rewo(c3_y* buf, c3_w* ip_w)
|
||||
return one | (two << 8) | (tre << 16) | (qua << 24);
|
||||
}
|
||||
|
||||
/* _n_swap(): swap two items on the top of the stack, return pointer to top
|
||||
*/
|
||||
static inline u3_noun*
|
||||
_n_swap(c3_ys mov, c3_ys off)
|
||||
{
|
||||
u3_noun* top = _n_peek(off);
|
||||
u3_noun* up = _n_peet(mov, off);
|
||||
u3_noun tmp = *up;
|
||||
*up = *top;
|
||||
*top = tmp;
|
||||
return top;
|
||||
}
|
||||
|
||||
#ifdef VERBOSE_BYTECODE
|
||||
/* _n_print_byc(): print bytecode. used for debugging.
|
||||
*/
|
||||
@ -1604,19 +1617,6 @@ u3n_find(u3_noun key, u3_noun fol)
|
||||
return pog_p;
|
||||
}
|
||||
|
||||
/* _n_swap(): swap two items on the top of the stack, return pointer to top
|
||||
*/
|
||||
static inline u3_noun*
|
||||
_n_swap(c3_ys mov, c3_ys off)
|
||||
{
|
||||
u3_noun* top = _n_peek(off);
|
||||
u3_noun* up = _n_peet(mov, off);
|
||||
u3_noun tmp = *up;
|
||||
*up = *top;
|
||||
*top = tmp;
|
||||
return top;
|
||||
}
|
||||
|
||||
/* _n_kick(): stop tracing noc and kick a u3j_site.
|
||||
*/
|
||||
static u3_weak
|
||||
|
Loading…
Reference in New Issue
Block a user