Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions changelog.d/7312-drop-orphaned-setjmp-state.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#7302/#7305 replaced setjmp/longjmp exception lowering with `invoke`/`landingpad`
and deleted `volatile_setjmp.rs`. Two references to that machinery outlived it:

- `PERRY_SETJMP_VOLATILE` was still hashed into the object-cache key. The pass it
gated no longer exists, so the field could never vary — dead state in a cache
key, plus a test asserting its presence. Both removed. (Object-cache keys shift
once as a result; the next build repopulates.)
- `native_emit.rs`'s module doc still claimed `has_try` functions render text
"whose setjmp volatile pass needs whole-function analysis". That pass is gone
and no such exception remains. Reworded to record the history rather than
assert a present-tense behaviour that is no longer true.

The `_setjmp` link in `perry-ext-fastify` is deliberate and untouched — #7305
keeps the private Rust-side boundary trap, since Rust cannot catch a foreign
exception.
6 changes: 4 additions & 2 deletions crates/perry-codegen/src/native_emit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@
//! per-line stream including entry-alloca hoists, boundary splices and
//! return-site rewrites, shared with `to_ir` so those transforms have
//! exactly one implementation. No per-function text is materialized on this
//! path; the exception is `has_try` functions, whose setjmp volatile pass
//! needs whole-function analysis and therefore still renders text. What
//! path. (Until #7302 `has_try` functions were an exception, because the
//! setjmp volatile pass needed whole-function analysis and forced a text
//! render; invoke/landingpad deleted that pass, so no such exception
//! remains.) What
//! stops existing everywhere is the module-scale concatenation and the
//! full-grammar LLVM parse. The follow-up (typed `LlInst` variants) removes
//! the remaining per-LINE formatting; the `instructions=` counter logged per
Expand Down
4 changes: 0 additions & 4 deletions crates/perry/src/commands/compile/object_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -906,10 +906,6 @@ fn compute_object_cache_key_with_env(
"env_codegen_unit_size",
env_var("PERRY_CODEGEN_UNIT_SIZE").as_deref().unwrap_or(""),
);
h.field(
"env_setjmp_volatile",
env_var("PERRY_SETJMP_VOLATILE").as_deref().unwrap_or(""),
);
h.field(
"env_gc_moving_loop_polls",
env_var("PERRY_GC_MOVING_LOOP_POLLS")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,6 @@ fn key_changes_with_codegen_env_vars() {
"PERRY_ENTRY_SYMBOL",
"PERRY_CODEGEN_UNITS",
"PERRY_CODEGEN_UNIT_SIZE",
"PERRY_SETJMP_VOLATILE",
"PERRY_GC_MOVING_LOOP_POLLS",
// Inline-hot-small (#6850 follow-up).
"PERRY_INLINE_HOT_SMALL",
Expand Down
Loading