mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-03-11 07:20:29 -07:00
Add a couple more uses of ecl_unlikely and remove a duplicate definition of cs_check in ecl-cmp
This commit is contained in:
parent
154df113be
commit
73db1aacd9
2 changed files with 5 additions and 8 deletions
|
|
@ -19,11 +19,6 @@
|
|||
#include <math.h> /* for inline mathematics */
|
||||
#include <ecl/ecl-inl.h>
|
||||
|
||||
#undef cs_check
|
||||
#define cs_check \
|
||||
if ((int *)(&narg) < cs_limit) \
|
||||
cs_overflow()
|
||||
|
||||
#define TRAMPOLINK(narg, vv, lk, cblock) \
|
||||
cl_va_list args; cl_va_start(args, narg, narg, 0); \
|
||||
return(_ecl_link_call(vv, (cl_objectfn *)lk, cblock, narg, args))
|
||||
|
|
|
|||
|
|
@ -24,9 +24,11 @@ extern "C" {
|
|||
***********/
|
||||
|
||||
#ifdef ECL_DOWN_STACK
|
||||
#define ecl_cs_check(env,var) if ((char*)(&var) <= (env)->cs_limit) ecl_cs_overflow()
|
||||
#define ecl_cs_check(env,var) \
|
||||
if (ecl_unlikely((char*)(&var) <= (env)->cs_limit)) ecl_cs_overflow()
|
||||
#else
|
||||
#define ecl_cs_check(env,var) if ((char*)(&var) >= (env)->cs_limit) ecl_cs_overflow()
|
||||
#define ecl_cs_check(env,var) \
|
||||
if (ecl_unlikely((char*)(&var) >= (env)->cs_limit)) ecl_cs_overflow()
|
||||
#endif
|
||||
|
||||
/**************
|
||||
|
|
@ -39,7 +41,7 @@ typedef struct bds_bd {
|
|||
} *bds_ptr;
|
||||
|
||||
#define ecl_bds_check(env) \
|
||||
((env->bds_top >= env->bds_limit)? ecl_bds_overflow() : (void)0)
|
||||
(ecl_unlikely(env->bds_top >= env->bds_limit)? ecl_bds_overflow() : (void)0)
|
||||
|
||||
#define ECL_MISSING_SPECIAL_BINDING (~((cl_index)0))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue