summaryrefslogtreecommitdiff
path: root/libguile/eval.i.c
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2007-12-08 16:00:56 +0000
committerLudovic Courtès <ludo@gnu.org>2007-12-08 16:00:56 +0000
commit9cc37597af1efcb2e60cc07e82e4d6d8fa874e6e (patch)
treed493c16159ad39ac2b8c21b4b8bc813ab3b9d2bb /libguile/eval.i.c
parent693758d5a84cac257ae39d69dbade694d2f4f515 (diff)
downloadguile-9cc37597af1efcb2e60cc07e82e4d6d8fa874e6e.tar.gz
Changes from arch/CVS synchronization
Diffstat (limited to 'libguile/eval.i.c')
-rw-r--r--libguile/eval.i.c39
1 files changed, 20 insertions, 19 deletions
diff --git a/libguile/eval.i.c b/libguile/eval.i.c
index c1e1fb62e..83878ff41 100644
--- a/libguile/eval.i.c
+++ b/libguile/eval.i.c
@@ -681,7 +681,7 @@ dispatch:
#ifdef DEVAL
debug.info->a.args = arg1;
#endif
- if (scm_badargsp (formals, arg1))
+ if (SCM_UNLIKELY (scm_badargsp (formals, arg1)))
scm_wrong_num_args (proc);
ENTER_APPLY;
/* Copy argument list */
@@ -1143,7 +1143,7 @@ dispatch:
case scm_tcs_closures:
{
const SCM formals = SCM_CLOSURE_FORMALS (proc);
- if (scm_is_pair (formals))
+ if (SCM_UNLIKELY (scm_is_pair (formals)))
goto wrongnumargs;
x = SCM_CLOSURE_BODY (proc);
env = SCM_EXTEND_ENV (formals, SCM_EOL, SCM_ENV (proc));
@@ -1187,7 +1187,7 @@ dispatch:
/* must handle macros by here */
x = SCM_CDR (x);
- if (scm_is_pair (x))
+ if (SCM_LIKELY (scm_is_pair (x)))
arg1 = EVALCAR (x, env);
else
scm_wrong_num_args (proc);
@@ -1316,7 +1316,7 @@ dispatch:
goto badfun;
}
}
- if (scm_is_pair (x))
+ if (SCM_LIKELY (scm_is_pair (x)))
arg2 = EVALCAR (x, env);
else
scm_wrong_num_args (proc);
@@ -1440,7 +1440,7 @@ dispatch:
}
}
}
- if (!scm_is_pair (x))
+ if (SCM_UNLIKELY (!scm_is_pair (x)))
scm_wrong_num_args (proc);
#ifdef DEVAL
debug.info->a.args = scm_cons2 (arg1, arg2,
@@ -1518,7 +1518,7 @@ dispatch:
}
#else /* DEVAL */
case scm_tc7_subr_3:
- if (!scm_is_null (SCM_CDR (x)))
+ if (SCM_UNLIKELY (!scm_is_null (SCM_CDR (x))))
scm_wrong_num_args (proc);
else
RETURN (SCM_SUBRF (proc) (arg1, arg2, EVALCAR (x, env)));
@@ -1709,37 +1709,38 @@ tail:
switch (SCM_TYP7 (proc))
{
case scm_tc7_subr_2o:
- if (SCM_UNBNDP (arg1))
+ if (SCM_UNLIKELY (SCM_UNBNDP (arg1)))
scm_wrong_num_args (proc);
if (scm_is_null (args))
args = SCM_UNDEFINED;
else
{
- if (! scm_is_null (SCM_CDR (args)))
+ if (SCM_UNLIKELY (! scm_is_null (SCM_CDR (args))))
scm_wrong_num_args (proc);
args = SCM_CAR (args);
}
RETURN (SCM_SUBRF (proc) (arg1, args));
case scm_tc7_subr_2:
- if (scm_is_null (args) || !scm_is_null (SCM_CDR (args)))
+ if (SCM_UNLIKELY (scm_is_null (args) ||
+ !scm_is_null (SCM_CDR (args))))
scm_wrong_num_args (proc);
args = SCM_CAR (args);
RETURN (SCM_SUBRF (proc) (arg1, args));
case scm_tc7_subr_0:
- if (!SCM_UNBNDP (arg1))
+ if (SCM_UNLIKELY (!SCM_UNBNDP (arg1)))
scm_wrong_num_args (proc);
else
RETURN (SCM_SUBRF (proc) ());
case scm_tc7_subr_1:
- if (SCM_UNBNDP (arg1))
+ if (SCM_UNLIKELY (SCM_UNBNDP (arg1)))
scm_wrong_num_args (proc);
case scm_tc7_subr_1o:
- if (!scm_is_null (args))
+ if (SCM_UNLIKELY (!scm_is_null (args)))
scm_wrong_num_args (proc);
else
RETURN (SCM_SUBRF (proc) (arg1));
case scm_tc7_dsubr:
- if (SCM_UNBNDP (arg1) || !scm_is_null (args))
+ if (SCM_UNLIKELY (SCM_UNBNDP (arg1) || !scm_is_null (args)))
scm_wrong_num_args (proc);
if (SCM_I_INUMP (arg1))
{
@@ -1760,13 +1761,13 @@ tail:
SCM_WTA_DISPATCH_1 (*SCM_SUBR_GENERIC (proc), arg1,
SCM_ARG1, scm_i_symbol_chars (SCM_SNAME (proc)));
case scm_tc7_cxr:
- if (SCM_UNBNDP (arg1) || !scm_is_null (args))
+ if (SCM_UNLIKELY (SCM_UNBNDP (arg1) || !scm_is_null (args)))
scm_wrong_num_args (proc);
RETURN (scm_i_chase_pairs (arg1, (scm_t_bits) SCM_SUBRF (proc)));
case scm_tc7_subr_3:
- if (scm_is_null (args)
- || scm_is_null (SCM_CDR (args))
- || !scm_is_null (SCM_CDDR (args)))
+ if (SCM_UNLIKELY (scm_is_null (args)
+ || scm_is_null (SCM_CDR (args))
+ || !scm_is_null (SCM_CDDR (args))))
scm_wrong_num_args (proc);
else
RETURN (SCM_SUBRF (proc) (arg1, SCM_CAR (args), SCM_CADR (args)));
@@ -1777,7 +1778,7 @@ tail:
RETURN (SCM_SUBRF (proc) (SCM_UNBNDP (arg1) ? SCM_EOL : scm_cons (arg1, args)));
#endif
case scm_tc7_lsubr_2:
- if (!scm_is_pair (args))
+ if (SCM_UNLIKELY (!scm_is_pair (args)))
scm_wrong_num_args (proc);
else
RETURN (SCM_SUBRF (proc) (arg1, SCM_CAR (args), SCM_CDR (args)));
@@ -1809,7 +1810,7 @@ tail:
#else
arg1 = (SCM_UNBNDP (arg1) ? SCM_EOL : scm_cons (arg1, args));
#endif
- if (scm_badargsp (SCM_CLOSURE_FORMALS (proc), arg1))
+ if (SCM_UNLIKELY (scm_badargsp (SCM_CLOSURE_FORMALS (proc), arg1)))
scm_wrong_num_args (proc);
/* Copy argument list */