mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parent
9f8abd28ba
commit
d9167491db
Notes:
git
2022-08-10 14:20:08 +09:00
1 changed files with 19 additions and 0 deletions
19
insns.def
19
insns.def
|
@ -597,6 +597,25 @@ swap
|
||||||
/* none */
|
/* none */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* reverse stack top N order. */
|
||||||
|
DEFINE_INSN
|
||||||
|
reverse
|
||||||
|
(rb_num_t n)
|
||||||
|
(...)
|
||||||
|
(...)
|
||||||
|
// attr rb_snum_t sp_inc = 0;
|
||||||
|
{
|
||||||
|
rb_num_t i;
|
||||||
|
VALUE *sp = STACK_ADDR_FROM_TOP(n);
|
||||||
|
|
||||||
|
for (i=0; i<n/2; i++) {
|
||||||
|
VALUE v0 = sp[i];
|
||||||
|
VALUE v1 = TOPN(i);
|
||||||
|
sp[i] = v1;
|
||||||
|
TOPN(i) = v0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* for stack caching. */
|
/* for stack caching. */
|
||||||
DEFINE_INSN_IF(STACK_CACHING)
|
DEFINE_INSN_IF(STACK_CACHING)
|
||||||
reput
|
reput
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue