From ffbdf6f203fd23ff8a7e697193b82fc03a496581 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Tue, 16 Apr 2024 14:23:37 +0200 Subject: [PATCH] exceptions: runtime stack error signals exceptions (not conditions) Replace calls to CEstack_overflow with exceptions - this is a necessary step before moving stacks into nucleus. --- src/c/stacks.d | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/c/stacks.d b/src/c/stacks.d index 0c22031e4..d3a2c94eb 100644 --- a/src/c/stacks.d +++ b/src/c/stacks.d @@ -20,6 +20,7 @@ # include # include #endif +#include #include #include #include @@ -162,9 +163,9 @@ ecl_cs_overflow(void) else ecl_internal_error(stack_overflow_msg); if (env->c_stack.max_size == (cl_index)0 || env->c_stack.size < env->c_stack.max_size) - CEstack_overflow(@'ext::c-stack', ecl_make_fixnum(size), ECL_T); + ecl_cerror(ECL_EX_CS_OVR, ecl_make_fixnum(size), ECL_T); else - CEstack_overflow(@'ext::c-stack', ecl_make_fixnum(size), ECL_NIL); + ecl_ferror(ECL_EX_CS_OVR, ecl_make_fixnum(size), ECL_NIL); } /* -- ByteVM stack ----------------------------------------------------------- */ @@ -340,7 +341,7 @@ ecl_bds_overflow(void) ecl_internal_error(stack_overflow_msg); } env->bds_stack.limit += margin; - CEstack_overflow(@'ext::binding-stack', ecl_make_fixnum(size), ECL_T); + ecl_cerror(ECL_EX_BDS_OVR, ecl_make_fixnum(limit_size), ECL_T); return env->bds_stack.top; } @@ -619,7 +620,7 @@ frs_overflow(void) ecl_internal_error(stack_overflow_msg); } env->frs_stack.limit += margin; - CEstack_overflow(@'ext::frame-stack', ecl_make_fixnum(limit_size), ECL_T); + ecl_cerror(ECL_EX_FRS_OVR, ecl_make_fixnum(limit_size), ECL_T); } ecl_frame_ptr