avoid some unneeded sfs-clears in bytecode
svn: r15367
This commit is contained in:
parent
dab73989ae
commit
6d3481a927
|
@ -4142,14 +4142,15 @@ static Scheme_Object *sfs_let_one(Scheme_Object *o, SFS_Info *info)
|
|||
info->max_nontail = save_mnt;
|
||||
|
||||
if (info->max_used[pos] <= ip) {
|
||||
/* No one is using it, so either don't push the real value, or clear it.
|
||||
/* No one is using it, so either don't push the real value, or
|
||||
clear it if there's a later non-tail call.
|
||||
The optimizer normally would have converted away the binding, but
|
||||
it might not because (1) it was introduced late by inlining,
|
||||
or (2) the rhs expression doesn't always produce a single
|
||||
value. */
|
||||
if (scheme_omittable_expr(rhs, 1, -1, 1, NULL)) {
|
||||
rhs = scheme_false;
|
||||
} else {
|
||||
} else if (ip < info->max_calls[pos]) {
|
||||
Scheme_Object *clr;
|
||||
Scheme_Sequence *s;
|
||||
s = malloc_sequence(2);
|
||||
|
|
|
@ -160,7 +160,7 @@ scheme_init_list (Scheme_Env *env)
|
|||
scheme_add_global_constant ("mpair?", p, env);
|
||||
|
||||
REGISTER_SO(scheme_cons_proc);
|
||||
p = scheme_make_noncm_prim(cons_prim, "cons", 2, 2);
|
||||
p = scheme_make_immed_prim(cons_prim, "cons", 2, 2);
|
||||
scheme_cons_proc = p;
|
||||
SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_BINARY_INLINED;
|
||||
scheme_add_global_constant ("cons", p, env);
|
||||
|
@ -174,7 +174,7 @@ scheme_init_list (Scheme_Env *env)
|
|||
scheme_add_global_constant ("cdr", p, env);
|
||||
|
||||
REGISTER_SO(scheme_mcons_proc);
|
||||
p = scheme_make_noncm_prim(mcons_prim, "mcons", 2, 2);
|
||||
p = scheme_make_immed_prim(mcons_prim, "mcons", 2, 2);
|
||||
scheme_mcons_proc = p;
|
||||
SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_BINARY_INLINED;
|
||||
scheme_add_global_constant ("mcons", p, env);
|
||||
|
|
Loading…
Reference in New Issue
Block a user