Merge branch 'loops/sx-vm-extensions' into scratch/host-jit
# Conflicts: # hosts/ocaml/bin/sx_server.ml # lib/erlang/runtime.sx
This commit is contained in:
@@ -757,4 +757,24 @@
|
||||
"format-arguments" args))))
|
||||
(cl-restart-case
|
||||
(fn () (cl-signal-obj obj cl-handler-stack))
|
||||
(list "continue" (list) (fn () nil))))))
|
||||
(list "continue" (list) (fn () nil))))))
|
||||
;; ── JIT interpret-only boundary ───────────────────────────────────────────
|
||||
;; The Common-Lisp evaluator implements block/return-from, catch/throw, and
|
||||
;; the condition system via non-local control (host continuations); under JIT
|
||||
;; a compiled frame can't transfer control through a CEK continuation. Exclude
|
||||
;; the cl-/clos- namespaces from JIT. See Sx_types.jit_excluded_prefixes.
|
||||
(jit-exclude! "cl-*" "clos-*")
|
||||
|
||||
;; cl-restart-case / cl-handler-case / cl-handler-bind wrap their body in
|
||||
;; call/cc (restarts + non-local handler exit). Any function that CALLS one of
|
||||
;; these (e.g. SX fixtures driving the condition system: parse-recover,
|
||||
;; interactive-debugger) must also be interpret-only: JIT'ing such a caller
|
||||
;; forces the call/cc form into a nested cek-run where the captured
|
||||
;; continuation runs-to-completion-and-returns instead of escaping, so a
|
||||
;; restart fails to abort and the body falls through (accumulation/no-abort).
|
||||
(jit-exclude-callers-of! "cl-restart-case" "cl-handler-case" "cl-handler-bind")
|
||||
;; Also the INVOKE side: cl-invoke-restart / cl-invoke-debugger / cl-signal
|
||||
;; trigger the continuation escape; a JIT'd caller can't let the escape
|
||||
;; propagate out of its frame (e.g. make-policy-debugger building a debugger
|
||||
;; hook that invokes a restart). Mark their callers interpret-only too.
|
||||
(jit-exclude-callers-of! "cl-invoke-restart" "cl-invoke-debugger" "cl-signal" "cl-error-with-debugger")
|
||||
|
||||
Reference in New Issue
Block a user