fixed some type warnings
This commit is contained in:
parent
3c5dd6de57
commit
982a7c1592
14
lib/exec.c
14
lib/exec.c
@ -150,7 +150,7 @@ static void terminate_all_processes (hcl_t* hcl);
|
|||||||
hcl_seterrbfmt (hcl, HCL_EOOMEM, "process exception stack overflow"); \
|
hcl_seterrbfmt (hcl, HCL_EOOMEM, "process exception stack overflow"); \
|
||||||
(hcl)->abort_req = -1; \
|
(hcl)->abort_req = -1; \
|
||||||
} \
|
} \
|
||||||
exsp++; ap->slot[exsp] = (ctx_); \
|
exsp++; ap->slot[exsp] = (hcl_oop_t)(ctx_); \
|
||||||
exsp++; ap->slot[exsp] = HCL_SMOOI_TO_OOP(ip_); \
|
exsp++; ap->slot[exsp] = HCL_SMOOI_TO_OOP(ip_); \
|
||||||
exsp++; ap->slot[exsp] = HCL_SMOOI_TO_OOP(clsp_); \
|
exsp++; ap->slot[exsp] = HCL_SMOOI_TO_OOP(clsp_); \
|
||||||
exsp++; ap->slot[exsp] = HCL_SMOOI_TO_OOP(sp_); \
|
exsp++; ap->slot[exsp] = HCL_SMOOI_TO_OOP(sp_); \
|
||||||
@ -172,7 +172,7 @@ static void terminate_all_processes (hcl_t* hcl);
|
|||||||
sp_ = HCL_OOP_TO_SMOOI(ap->slot[exsp]); exsp--; \
|
sp_ = HCL_OOP_TO_SMOOI(ap->slot[exsp]); exsp--; \
|
||||||
clsp_ = HCL_OOP_TO_SMOOI(ap->slot[exsp]); exsp--; \
|
clsp_ = HCL_OOP_TO_SMOOI(ap->slot[exsp]); exsp--; \
|
||||||
ip_ = HCL_OOP_TO_SMOOI(ap->slot[exsp]); exsp--; \
|
ip_ = HCL_OOP_TO_SMOOI(ap->slot[exsp]); exsp--; \
|
||||||
ctx_ = ap->slot[exsp]; exsp--; \
|
ctx_ = (hcl_oop_context_t)ap->slot[exsp]; exsp--; \
|
||||||
ap->exsp = HCL_SMOOI_TO_OOP(exsp); \
|
ap->exsp = HCL_SMOOI_TO_OOP(exsp); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
@ -2296,7 +2296,7 @@ static HCL_INLINE int send_message (hcl_t* hcl, hcl_oop_t rcv, hcl_oop_t msg, in
|
|||||||
if (HCL_UNLIKELY(x <= -1)) return -1;
|
if (HCL_UNLIKELY(x <= -1)) return -1;
|
||||||
|
|
||||||
/* update the method owner field of the new context created */
|
/* update the method owner field of the new context created */
|
||||||
newctx->owner = owner;
|
newctx->owner = (hcl_oop_t)owner;
|
||||||
|
|
||||||
SWITCH_ACTIVE_CONTEXT (hcl, newctx);
|
SWITCH_ACTIVE_CONTEXT (hcl, newctx);
|
||||||
return 0;
|
return 0;
|
||||||
@ -2613,7 +2613,7 @@ static int start_initial_process_and_context (hcl_t* hcl, hcl_ooi_t initial_ip,
|
|||||||
ctx->home = hcl->initial_function->home; /* this should be nil */
|
ctx->home = hcl->initial_function->home; /* this should be nil */
|
||||||
ctx->sender = (hcl_oop_context_t)hcl->_nil; /* the initial context has nil in the sender field */
|
ctx->sender = (hcl_oop_context_t)hcl->_nil; /* the initial context has nil in the sender field */
|
||||||
ctx->base = hcl->initial_function;
|
ctx->base = hcl->initial_function;
|
||||||
ctx->receiver = (hcl_oop_context_t)hcl->_nil; /* TODO: change this? keep this in sync with the dummy receiver used in the call instruction generated for xlist */
|
ctx->receiver = hcl->_nil; /* TODO: change this? keep this in sync with the dummy receiver used in the call instruction generated for xlist */
|
||||||
HCL_ASSERT (hcl, (hcl_oop_t)ctx->home == hcl->_nil);
|
HCL_ASSERT (hcl, (hcl_oop_t)ctx->home == hcl->_nil);
|
||||||
|
|
||||||
/* [NOTE]
|
/* [NOTE]
|
||||||
@ -3184,7 +3184,7 @@ static HCL_INLINE int do_return_from_home (hcl_t* hcl, hcl_oop_t return_value, h
|
|||||||
SWITCH_ACTIVE_CONTEXT (hcl, (hcl_oop_context_t)hcl->active_context->sender);
|
SWITCH_ACTIVE_CONTEXT (hcl, (hcl_oop_context_t)hcl->active_context->sender);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HCL_UNLIKELY(sender == hcl->_nil))
|
if (HCL_UNLIKELY((hcl_oop_t)sender == hcl->_nil))
|
||||||
{
|
{
|
||||||
/* non-local return out of the initial context
|
/* non-local return out of the initial context
|
||||||
* (defun y(x) (return-from-home (* x x)))
|
* (defun y(x) (return-from-home (* x x)))
|
||||||
@ -3200,8 +3200,8 @@ static HCL_INLINE int do_return_from_home (hcl_t* hcl, hcl_oop_t return_value, h
|
|||||||
* when y is called from the second initial context, the home context to return
|
* when y is called from the second initial context, the home context to return
|
||||||
* from the the first initial context. comparing hcl->active_context->home against
|
* from the the first initial context. comparing hcl->active_context->home against
|
||||||
* hcl->initial_context doesn't return true in this case. */
|
* hcl->initial_context doesn't return true in this case. */
|
||||||
HCL_ASSERT (hcl, home->home == hcl->_nil);
|
HCL_ASSERT (hcl, (hcl_oop_t)home->home == hcl->_nil);
|
||||||
HCL_ASSERT (hcl, hcl->active_context->sender == hcl->_nil);
|
HCL_ASSERT (hcl, (hcl_oop_t)hcl->active_context->sender == hcl->_nil);
|
||||||
|
|
||||||
home->ip = HCL_SMOOI_TO_OOP(-1); /* mark the home context dead */
|
home->ip = HCL_SMOOI_TO_OOP(-1); /* mark the home context dead */
|
||||||
goto term_proc;
|
goto term_proc;
|
||||||
|
10
lib/prim.c
10
lib/prim.c
@ -777,18 +777,18 @@ static hcl_pfrc_t pf_integer_bshift (hcl_t* hcl, hcl_mod_t* mod, hcl_ooi_t nargs
|
|||||||
/* ------------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------------- */
|
||||||
static hcl_pfrc_t pf_va_context (hcl_t* hcl, hcl_mod_t* mod, hcl_ooi_t nargs)
|
static hcl_pfrc_t pf_va_context (hcl_t* hcl, hcl_mod_t* mod, hcl_ooi_t nargs)
|
||||||
{
|
{
|
||||||
HCL_STACK_SETRET (hcl, nargs, hcl->active_context);
|
HCL_STACK_SETRET (hcl, nargs, (hcl_oop_t)hcl->active_context);
|
||||||
return HCL_PF_SUCCESS;
|
return HCL_PF_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static hcl_pfrc_t pf_va_count (hcl_t* hcl, hcl_mod_t* mod, hcl_ooi_t nargs)
|
static hcl_pfrc_t pf_va_count (hcl_t* hcl, hcl_mod_t* mod, hcl_ooi_t nargs)
|
||||||
{
|
{
|
||||||
hcl_context_t* ctx;
|
hcl_oop_context_t ctx;
|
||||||
hcl_ooi_t attr_mask, va, fixed_nargs, nrvars, nlvars, nvaargs;
|
hcl_ooi_t attr_mask, va, fixed_nargs, nrvars, nlvars, nvaargs;
|
||||||
|
|
||||||
if (nargs >= 1)
|
if (nargs >= 1)
|
||||||
{
|
{
|
||||||
ctx = HCL_STACK_GETARG(hcl, nargs, 0);
|
ctx = (hcl_oop_context_t)HCL_STACK_GETARG(hcl, nargs, 0);
|
||||||
if (!HCL_IS_CONTEXT(hcl, ctx))
|
if (!HCL_IS_CONTEXT(hcl, ctx))
|
||||||
{
|
{
|
||||||
hcl_seterrbfmt (hcl, HCL_EINVAL, "not a proper va context - %O", ctx);
|
hcl_seterrbfmt (hcl, HCL_EINVAL, "not a proper va context - %O", ctx);
|
||||||
@ -819,13 +819,13 @@ static hcl_pfrc_t pf_va_count (hcl_t* hcl, hcl_mod_t* mod, hcl_ooi_t nargs)
|
|||||||
static hcl_pfrc_t pf_va_get (hcl_t* hcl, hcl_mod_t* mod, hcl_ooi_t nargs)
|
static hcl_pfrc_t pf_va_get (hcl_t* hcl, hcl_mod_t* mod, hcl_ooi_t nargs)
|
||||||
{
|
{
|
||||||
hcl_oop_t ret;
|
hcl_oop_t ret;
|
||||||
hcl_context_t* ctx;
|
hcl_oop_context_t ctx;
|
||||||
hcl_ooi_t attr_mask, va, fixed_nargs, nrvars, nlvars, nvaargs;
|
hcl_ooi_t attr_mask, va, fixed_nargs, nrvars, nlvars, nvaargs;
|
||||||
hcl_oow_t index;
|
hcl_oow_t index;
|
||||||
|
|
||||||
if (nargs >= 2)
|
if (nargs >= 2)
|
||||||
{
|
{
|
||||||
ctx = HCL_STACK_GETARG(hcl, nargs, 1);
|
ctx = (hcl_oop_context_t)HCL_STACK_GETARG(hcl, nargs, 1);
|
||||||
if (!HCL_IS_CONTEXT(hcl, ctx))
|
if (!HCL_IS_CONTEXT(hcl, ctx))
|
||||||
{
|
{
|
||||||
hcl_seterrbfmt (hcl, HCL_EINVAL, "not a proper va context - %O", ctx);
|
hcl_seterrbfmt (hcl, HCL_EINVAL, "not a proper va context - %O", ctx);
|
||||||
|
Loading…
Reference in New Issue
Block a user