Functions compiled with (OPTIMIZE (SAFETY >= 2)) have an explicit stack overflow check.

This commit is contained in:
Juan Jose Garcia Ripoll 2008-10-12 12:50:35 +02:00
parent 5cfb4c0919
commit b7efe80e7d
3 changed files with 9 additions and 0 deletions

View file

@ -77,6 +77,9 @@ ECL 8.9.0:
- ECL builds using thread local storage when configured with --with-__thread and
the feature works on that platform.
- Functions compiled with (OPTIMIZE (SAFETY >= 2)) have an explicit stack
overflow check.
* Embedding:
- ECL now implements a more transparent interface for setting and querying

View file

@ -613,6 +613,10 @@
(space (third x))
(speed (fourth x)))))
(defun policy-check-stack-overflow (&optional (env *cmp-env*))
"Do we add a stack check to every function?"
(>= (cmp-env-optimization 'safety env) 2))
(defun policy-inline-slot-access-p (&optional (env *cmp-env*))
"Do we inline access to structures and sealed classes?"
(or (< (cmp-env-optimization 'safety env) 2)

View file

@ -587,6 +587,8 @@
(wt-nl *volatile* "cl_object value0;")
(when (>= (fun-debug fun) 2)
(wt-nl "struct ihs_frame ihs;"))
(when (policy-check-stack-overflow)
(wt-nl "ecl_cs_check(value0);"))
(when (eq (fun-closure fun) 'CLOSURE)
(let ((clv-used (remove-if
#'(lambda (x)