mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-09 07:00:23 +02:00
Emit new instructions in function preludes
* module/system/vm/assembler.scm (standard-prelude, opt-prelude): (kw-prelude): Emit new instructions in function preludes. Now all branches are via the new instructions. Remove exports for old branches.
This commit is contained in:
parent
7aff0fff22
commit
c92b80be2d
2 changed files with 26 additions and 27 deletions
|
@ -4189,30 +4189,23 @@ VM_NAME (scm_i_thread *thread, struct scm_vm *vp,
|
|||
{
|
||||
scm_t_uint8 compare_result;
|
||||
scm_t_uint32 nreq, expected;
|
||||
scm_t_ptrdiff nargs;
|
||||
scm_t_ptrdiff nargs, npos;
|
||||
|
||||
UNPACK_24 (op, nreq);
|
||||
UNPACK_24 (ip[1], expected);
|
||||
nargs = FRAME_LOCALS_COUNT ();
|
||||
|
||||
/* We can only have too many positionals if there are more
|
||||
arguments than NPOS. */
|
||||
if (nargs < (scm_t_ptrdiff) nreq)
|
||||
compare_result = SCM_F_COMPARE_LESS_THAN;
|
||||
else
|
||||
{
|
||||
scm_t_ptrdiff npos = nreq;
|
||||
for (npos = nreq; npos < nargs && npos <= expected; npos++)
|
||||
if (scm_is_keyword (FP_REF (npos)))
|
||||
break;
|
||||
/* Precondition: at least NREQ arguments. */
|
||||
for (npos = nreq; npos < nargs && npos <= expected; npos++)
|
||||
if (scm_is_keyword (FP_REF (npos)))
|
||||
break;
|
||||
|
||||
if (npos < (scm_t_ptrdiff) expected)
|
||||
compare_result = SCM_F_COMPARE_LESS_THAN;
|
||||
else if (npos == (scm_t_ptrdiff) expected)
|
||||
compare_result = SCM_F_COMPARE_EQUAL;
|
||||
else
|
||||
compare_result = SCM_F_COMPARE_NONE;
|
||||
}
|
||||
if (npos < (scm_t_ptrdiff) expected)
|
||||
compare_result = SCM_F_COMPARE_LESS_THAN;
|
||||
else if (npos == (scm_t_ptrdiff) expected)
|
||||
compare_result = SCM_F_COMPARE_EQUAL;
|
||||
else
|
||||
compare_result = SCM_F_COMPARE_NONE;
|
||||
|
||||
vp->compare_result = compare_result;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue