simplified message send a bit
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
hyung-hwan 2024-09-10 23:11:25 +09:00
parent d0019e52cb
commit b5c24eb440
4 changed files with 10 additions and 19 deletions

2
configure vendored
View File

@ -18053,7 +18053,7 @@ if test "x$ac_cv_lib_quadmath_quadmath_snprintf" = xyes
then : then :
QUADMATH_LIBS="-lquadmath" QUADMATH_LIBS="-lquadmath"
LIBM="$LIBM -lquadmath" LIBM="-lquadmath $LIBM"
hcl_lib_quadmath_required="yes" hcl_lib_quadmath_required="yes"
printf "%s\n" "#define HAVE_QUADMATH_SNPRINTF 1" >>confdefs.h printf "%s\n" "#define HAVE_QUADMATH_SNPRINTF 1" >>confdefs.h

View File

@ -441,7 +441,7 @@ then
AC_CHECK_LIB([quadmath], [quadmath_snprintf], [ AC_CHECK_LIB([quadmath], [quadmath_snprintf], [
QUADMATH_LIBS="-lquadmath" QUADMATH_LIBS="-lquadmath"
LIBM="$LIBM -lquadmath" LIBM="-lquadmath $LIBM"
hcl_lib_quadmath_required="yes" hcl_lib_quadmath_required="yes"
AC_DEFINE(HAVE_QUADMATH_SNPRINTF, 1) AC_DEFINE(HAVE_QUADMATH_SNPRINTF, 1)
]) ])

View File

@ -4246,11 +4246,12 @@ hcl_logbfmt (hcl, HCL_LOG_STDERR, ">>>%O c->sc=%O sc=%O b2=%d b3=%d nivars=%d nc
if (!HCL_OBJ_IS_CHAR_POINTER(op)) /*if (!HCL_IS_SYMBOL(hcl, op))*/ if (!HCL_OBJ_IS_CHAR_POINTER(op)) /*if (!HCL_IS_SYMBOL(hcl, op))*/
{ {
hcl_seterrbfmt (hcl, HCL_ECALL, "unable to send %O to %O - invalid message", op, rcv); /* TODO: change to HCL_ESEND?? */ hcl_seterrbfmt (hcl, HCL_ECALL, "unable to send %O to %O - invalid message", op, rcv); /* TODO: change to HCL_ESEND?? */
goto cannot_send; cannot_send:
if (do_throw_with_internal_errmsg(hcl, fetched_instruction_pointer) >= 0) break;
goto oops_with_errmsg_supplement;
} }
else if (HCL_IS_CLASS(hcl, rcv) || HCL_IS_INSTANCE(hcl, rcv) || HCL_IS_CLASS(hcl, rcv->_class)) /* TOIDO: revisit this condition */ else
{ {
send_message:
if (send_message(hcl, rcv, op, ((bcode >> 2) & 1) /* to_super */, b1 /* nargs */, b2 /* nrvars */) <= -1) if (send_message(hcl, rcv, op, ((bcode >> 2) & 1) /* to_super */, b1 /* nargs */, b2 /* nrvars */) <= -1)
{ {
const hcl_ooch_t* msg = hcl_backuperrmsg(hcl); const hcl_ooch_t* msg = hcl_backuperrmsg(hcl);
@ -4258,19 +4259,6 @@ hcl_logbfmt (hcl, HCL_LOG_STDERR, ">>>%O c->sc=%O sc=%O b2=%d b3=%d nivars=%d nc
goto cannot_send; goto cannot_send;
} }
} }
/* TODO: support non-symbol op? */
else
{
#if 0
hcl_seterrbfmt (hcl, HCL_ECALL, "unable to send %O to %O - invalid receiver", op, rcv); /* TODO: change to HCL_ESEND?? */
#else
goto send_message;
#endif
cannot_send:
if (do_throw_with_internal_errmsg(hcl, fetched_instruction_pointer) >= 0) break;
goto oops_with_errmsg_supplement;
}
break; break;
} }

View File

@ -642,7 +642,10 @@ static HCL_INLINE hcl_cnode_t* leave_list (hcl_t* hcl, hcl_loc_t* list_loc, int*
* defun f(a :: b c) { b := (a + 10); c := (a + 20) } * defun f(a :: b c) { b := (a + 10); c := (a + 20) }
* [x, y] := (f 9) ## this kind of expression - translate to set-r x y (f 9) * [x, y] := (f 9) ## this kind of expression - translate to set-r x y (f 9)
*/ */
hcl_cnode_t* tmp, * rval; hcl_cnode_t* tmp;
#if defined(TRANSFORM_ALIST)
hcl_cnode_t* rval;
#endif
#if defined(TRANSFORM_ALIST) #if defined(TRANSFORM_ALIST)
fake_tok.ptr = vocas[VOCA_SYM_SET_R].str; fake_tok.ptr = vocas[VOCA_SYM_SET_R].str;