Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
2398a01
fix(async): release a completed plain-async activation's box cells fo…
Aug 16, 2026
305f508
test(transform,runtime): cover the ReleaseBoxes shape; route release …
Aug 16, 2026
7d9e848
test(codegen): pin the ReleaseBoxes lowering — kind selection, captur…
Aug 16, 2026
410ca31
docs: changelog fragment for #8208
Aug 16, 2026
2cbd698
fix(async,gc): close the ReleaseBoxes id-remap holes and re-argue the…
Aug 16, 2026
02f4d78
fix(hir,transform): scope the new id-remap arms strictly to ReleaseBoxes
Aug 16, 2026
dc50fbf
docs: re-measure #8208 on 07c8040bf and record the hardening
Aug 16, 2026
b09faf2
docs: record the flush-boundary limitation and the exit-path coverage
Aug 16, 2026
27429c1
test(gap): pin every async exit path across the #8208 box release
Aug 16, 2026
240f79a
docs: re-measure #8208 with both arms rebuilt at b8d32ab19
Aug 16, 2026
e7f1d2c
perf(runtime): thread the box reuse pool through the cells, deleting …
Aug 16, 2026
1e610a5
docs: record the RSS sweep, the remaining floor, and why a cap cannot…
Aug 16, 2026
5bd9502
docs: record why no earlier publish point is safe (per-kind split ref…
Aug 16, 2026
eecdeb3
docs: final numbers on matched 923342925 arms; gc-ratchet shared_ci OK
Aug 16, 2026
fa86e88
fix(async): publish box cells at activation reachability zero
Aug 16, 2026
c8a4f11
test(async): close PR review and CI coverage gaps
Aug 17, 2026
3c8e772
ci: classify the stale loop safepoint assertion
Aug 17, 2026
e7b0dec
ci: record inherited codegen integration failures
Aug 17, 2026
485925b
fix(async): complete final review coverage
Aug 17, 2026
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
21 changes: 5 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1110,22 +1110,11 @@ jobs:
# PR-only: tags / nightly / workflow_dispatch already run every suite in the
# full `cargo-test` path.
runs-on: ubuntu-latest
# MUST cover the worst case the per-suite bound allows, or the job wall
# clock kills legitimately-running suites and we get an uninformative
# "cancelled" instead of the per-suite `::error::` — reintroducing, one
# level up, exactly what `timeout 1500` below exists to prevent.
# DEFAULT_CAP (ci_e2e_scope.py) = 12 diff-named suites
# NAMED_SUITE_TIMEOUT_S = 1500s = 25 min -> 12 x 25 = 300
# #7708 mapped perry-codegen = 22 suites, uncapped, but in-process:
# MAPPED_SUITE_TIMEOUT_S = 300s = 5 min -> 22 x 5 = 110
# + 2 known-failure checks at 5 min = 10
# + 30 min for toolchain/cache/staticlib build
# total = 450
# Keep these in sync with ci_e2e_scope.py. This is a backstop, not a budget:
# every mapped suite measured 2.2-10.4 s wall clock, each suite is
# independently bounded, and the common case selects zero suites and exits
# in ~20-30s.
timeout-minutes: 450
# GitHub-hosted runners enforce a six-hour job limit. The per-suite bounds
# below isolate a hung compile and provide a useful named failure; they are
# not an additive job budget. The mapped in-process suites measure 2.2-10.4
# seconds each, and the common case selects no suite and exits in ~20-30s.
timeout-minutes: 360
env:
RUSTC_WRAPPER: sccache
SCCACHE_GHA_ENABLED: "false"
Expand Down
28 changes: 28 additions & 0 deletions changelog.d/8208-async-box-release-reuse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
**fix(async): completed plain-async activations release and reuse their box cells, removing the ~500 B/request malloc-side accumulation** (#7933 follow-up)

Plain-async activations box body locals and state-machine control cells in 8-byte `std::alloc` cells. #7933 stopped completed activations from retaining the JS values in releasable cells, but the cells and registry entries themselves remained malloc-resident for the process lifetime. That produced linear Rust-side growth which was invisible to every GC counter.

The release is now real:

- New HIR `Stmt::ReleaseBoxes(ids)` carries the terminal reclamation set through id-remapping transforms and lowers to the typed `js_box_release`, `js_i32_box_release`, and `js_bool_box_release` helpers.
- Release clears and de-registers a cell, evicts its positive-cache entry, and parks its address in the owning activation's tagged release range.
- A stable malloc-side activation token owns one lifecycle reference plus one reference for every queued or running `Task::AsyncStep`. Only the zero-reference transition publishes that activation's cells to the per-kind intrusive free lists.
- Pending-await thunks capture the stable token pointer plus its generation, rejecting stale captures after token reuse without a process-growing lookup table. The execution-reference stack explicitly releases the current pump's ownership across `longjmp`.
- Untracked runtime releases retain the old whole-pump quarantine as a conservative fallback.

Cell memory is deliberately never returned to the allocator. An address minted as a box remains readable box-cell memory for the life of the thread, preserving #4898's pointer rejection and #7906's positive-cache invariant.

The per-activation boundary is required for correctness. A stray resume writes `__gen_sent` before the `__gen_done` check short-circuits, so terminal state alone cannot make a body-local cell reusable: that write could otherwise land in a cell already registered to another activation. Publication at activation reachability zero makes the stale write unreachable by construction. Closure-visible locals remain excluded from terminal release.

Matched static-runtime measurements, peak RSS best-of-5 with byte-identical stdout:

| BATCHES | base RSS | activation reachability | final vs base |
|--:|--:|--:|--:|
| 30 | 21.625 MiB | **21.547 MiB** | **−0.078 MiB** |
| 60 | 28.109 MiB | **27.922 MiB** | **−0.188 MiB** |

The small-workload RSS floor is closed. Resident cells are constant at **1,635** at both sizes: BATCHES=30 reports 48,238 allocations / 48,238 releases / 46,603 reuses, and BATCHES=60 reports 96,448 / 96,448 / 94,813. At BATCHES=1200, reachability accounting costs +2.38% instructions relative to the earlier pump-quarantine implementation while leaving the complete change **−8.98% instructions versus base**; peak RSS is 79.17 MiB.

The former continuous-cascade limitation is also closed: the exit-path fixture reuses 19,997 of 20,027 released cells without waiting for the global task queue to empty. That fixture covers normal return, throw/rejection, early return, `try`/`finally`, async-generator termination, and loop-created closures retained across a real queue drain and a later activation allocation.

Regression coverage includes ten focused runtime release/reachability tests, terminal-arm transform coverage, typed codegen lowering tests, static GC/TLS/dominance gates, and byte-identical parity for the exit-path fixture.
2 changes: 1 addition & 1 deletion crates/perry-codegen-js/src/emit/stmts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ impl JsEmitter {
// (alloca slot+box for hoisted FnDecl ids). The JS backend has no
// equivalent — JS hoisting handles this for free in the V8 / JSC
// runtime. Emit nothing.
Stmt::PreallocateBoxes(_) | Stmt::PreallocateTdzBoxes(_) => {}
Stmt::PreallocateBoxes(_) | Stmt::PreallocateTdzBoxes(_) | Stmt::ReleaseBoxes(_) => {}
}
}
}
2 changes: 1 addition & 1 deletion crates/perry-codegen-wasm/src/emit/js_fallback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ impl WasmModuleEmitter {
// Issue #569: PreallocateBoxes is a perry-codegen-only directive
// — JS hoisting handles forward refs natively, so the wasm/JS
// backend has no equivalent to emit.
Stmt::PreallocateBoxes(_) | Stmt::PreallocateTdzBoxes(_) => {}
Stmt::PreallocateBoxes(_) | Stmt::PreallocateTdzBoxes(_) | Stmt::ReleaseBoxes(_) => {}
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/perry-codegen-wasm/src/emit/stmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ impl<'a> FuncEmitCtx<'a> {
// Issue #569: Wasm backend has no equivalent of LLVM's
// alloca'd box slot — JS hoisting in the host runtime handles
// forward refs natively. Emit nothing.
Stmt::PreallocateBoxes(_) | Stmt::PreallocateTdzBoxes(_) => {}
Stmt::PreallocateBoxes(_) | Stmt::PreallocateTdzBoxes(_) | Stmt::ReleaseBoxes(_) => {}
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/perry-codegen-wasm/src/emit/string_collection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ impl WasmModuleEmitter {
}
}
Stmt::Break | Stmt::Continue | Stmt::LabeledBreak(_) | Stmt::LabeledContinue(_) => {}
Stmt::PreallocateBoxes(_) | Stmt::PreallocateTdzBoxes(_) => {}
Stmt::PreallocateBoxes(_) | Stmt::PreallocateTdzBoxes(_) | Stmt::ReleaseBoxes(_) => {}
}
}

Expand Down
14 changes: 14 additions & 0 deletions crates/perry-codegen/src/boxed_vars.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,20 @@ fn collect_prealloc_box_ids_in_stmts(stmts: &[perry_hir::Stmt], out: &mut HashSe
out.insert(*id);
}
}
// #8208: deliberately NOT collected. This set seeds `boxed_vars`,
// i.e. it DECIDES which locals get a box; a release is a statement
// ABOUT already-boxed locals, so letting it vote here would let a
// reclamation hint change a local's representation. The generator
// only ever releases ids it also preallocated
// (`generator/box_release.rs`, asserted both directions by
// `every_released_id_is_also_preallocated` and
// `the_whole_activation_frame_is_released`), so nothing is lost.
//
// The fail-safe direction is the right one: if a released id were
// somehow absent from `boxed_vars`, `emit_release_boxes` skips it
// and the cell simply stays live — the pre-#8208 behaviour — rather
// than releasing a cell codegen never boxed.
Stmt::ReleaseBoxes(_) => {}
Stmt::If {
then_branch,
else_branch,
Expand Down
3 changes: 2 additions & 1 deletion crates/perry-codegen/src/codegen/spec_return_proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,8 @@ fn verify_block(
| Stmt::LabeledBreak(_)
| Stmt::LabeledContinue(_)
| Stmt::PreallocateBoxes(_)
| Stmt::PreallocateTdzBoxes(_) => {}
| Stmt::PreallocateTdzBoxes(_)
| Stmt::ReleaseBoxes(_) => {}
// Return-proof facts are optional. Complex exceptional/fallthrough
// joins remain generic until their proof can be modeled exactly.
Stmt::Try { .. } | Stmt::Switch { .. } => return false,
Expand Down
3 changes: 2 additions & 1 deletion crates/perry-codegen/src/collectors/cjs_scaffolding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,8 @@ fn for_each_stmt(stmts: &[Stmt], f: &mut dyn FnMut(&Stmt)) {
| Stmt::LabeledBreak(_)
| Stmt::LabeledContinue(_)
| Stmt::PreallocateBoxes(_)
| Stmt::PreallocateTdzBoxes(_) => {}
| Stmt::PreallocateTdzBoxes(_)
| Stmt::ReleaseBoxes(_) => {}
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions crates/perry-codegen/src/collectors/escape_arrays.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ fn collect_length_only_indices_in_stmts(
| Stmt::LabeledBreak(_)
| Stmt::LabeledContinue(_)
| Stmt::PreallocateBoxes(_)
| Stmt::PreallocateTdzBoxes(_) => {}
| Stmt::PreallocateTdzBoxes(_)
| Stmt::ReleaseBoxes(_) => {}
}
}
}
Expand Down Expand Up @@ -309,7 +310,8 @@ fn collect_used_array_indices_in_stmts(
| Stmt::LabeledBreak(_)
| Stmt::LabeledContinue(_)
| Stmt::PreallocateBoxes(_)
| Stmt::PreallocateTdzBoxes(_) => {}
| Stmt::PreallocateTdzBoxes(_)
| Stmt::ReleaseBoxes(_) => {}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/perry-codegen/src/collectors/escape_news.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ fn collect_used_new_fields_in_stmts(
);
}
Stmt::Break | Stmt::Continue | Stmt::LabeledBreak(_) | Stmt::LabeledContinue(_) => {}
Stmt::PreallocateBoxes(_) | Stmt::PreallocateTdzBoxes(_) => {}
Stmt::PreallocateBoxes(_) | Stmt::PreallocateTdzBoxes(_) | Stmt::ReleaseBoxes(_) => {}
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion crates/perry-codegen/src/collectors/escape_objects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ fn collect_used_object_fields_in_stmts(
| Stmt::LabeledBreak(_)
| Stmt::LabeledContinue(_)
| Stmt::PreallocateBoxes(_)
| Stmt::PreallocateTdzBoxes(_) => {}
| Stmt::PreallocateTdzBoxes(_)
| Stmt::ReleaseBoxes(_) => {}
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions crates/perry-codegen/src/collectors/hir_facts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,8 @@ fn collect_owned_buffer_lets(
| Stmt::LabeledContinue(_)
| Stmt::Throw(_)
| Stmt::PreallocateBoxes(_)
| Stmt::PreallocateTdzBoxes(_) => {}
| Stmt::PreallocateTdzBoxes(_)
| Stmt::ReleaseBoxes(_) => {}
}
}
}
Expand Down Expand Up @@ -1114,7 +1115,8 @@ impl ArrayFactCollector {
| Stmt::LabeledBreak(_)
| Stmt::LabeledContinue(_)
| Stmt::PreallocateBoxes(_)
| Stmt::PreallocateTdzBoxes(_) => {}
| Stmt::PreallocateTdzBoxes(_)
| Stmt::ReleaseBoxes(_) => {}
}
}

Expand Down
6 changes: 4 additions & 2 deletions crates/perry-codegen/src/collectors/hot_callees.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,8 @@ fn walk_stmt(s: &Stmt, in_loop: bool, scan: &mut HotCalleeScan) {
| Stmt::LabeledBreak(_)
| Stmt::LabeledContinue(_)
| Stmt::PreallocateBoxes(_)
| Stmt::PreallocateTdzBoxes(_) => {}
| Stmt::PreallocateTdzBoxes(_)
| Stmt::ReleaseBoxes(_) => {}
}
}

Expand Down Expand Up @@ -579,7 +580,8 @@ fn count_alloc_sites_in_stmts(
| Stmt::LabeledBreak(_)
| Stmt::LabeledContinue(_)
| Stmt::PreallocateBoxes(_)
| Stmt::PreallocateTdzBoxes(_) => {}
| Stmt::PreallocateTdzBoxes(_)
| Stmt::ReleaseBoxes(_) => {}
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions crates/perry-codegen/src/collectors/int_valued_ta_locals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,8 @@ fn additive_flow_stmt(
| Stmt::LabeledContinue(_)
| Stmt::Return(None)
| Stmt::PreallocateBoxes(_)
| Stmt::PreallocateTdzBoxes(_) => {}
| Stmt::PreallocateTdzBoxes(_)
| Stmt::ReleaseBoxes(_) => {}
}
}

Expand Down Expand Up @@ -808,7 +809,8 @@ fn collect_facts<'a>(
| Stmt::LabeledBreak(_)
| Stmt::LabeledContinue(_)
| Stmt::PreallocateBoxes(_)
| Stmt::PreallocateTdzBoxes(_) => {}
| Stmt::PreallocateTdzBoxes(_)
| Stmt::ReleaseBoxes(_) => {}
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion crates/perry-codegen/src/collectors/not_bigint_locals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,8 @@ pub(super) fn collect_writes<'a>(
| Stmt::LabeledBreak(_)
| Stmt::LabeledContinue(_)
| Stmt::PreallocateBoxes(_)
| Stmt::PreallocateTdzBoxes(_) => {}
| Stmt::PreallocateTdzBoxes(_)
| Stmt::ReleaseBoxes(_) => {}
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion crates/perry-codegen/src/collectors/param_ranges.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ fn visit_stmt(stmt: &Stmt, module_constants: &HashMap<u32, f64>, scan: &mut Scan
| Stmt::LabeledBreak(_)
| Stmt::LabeledContinue(_)
| Stmt::PreallocateBoxes(_)
| Stmt::PreallocateTdzBoxes(_) => {}
| Stmt::PreallocateTdzBoxes(_)
| Stmt::ReleaseBoxes(_) => {}
Stmt::If {
condition,
then_branch,
Expand Down
6 changes: 4 additions & 2 deletions crates/perry-codegen/src/collectors/pointer_locals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,8 @@ pub fn collect_pointer_typed_locals(
| Stmt::LabeledBreak(_)
| Stmt::LabeledContinue(_)
| Stmt::PreallocateBoxes(_)
| Stmt::PreallocateTdzBoxes(_) => {}
| Stmt::PreallocateTdzBoxes(_)
| Stmt::ReleaseBoxes(_) => {}
Stmt::If {
condition,
then_branch,
Expand Down Expand Up @@ -748,7 +749,8 @@ pub fn collect_pointer_typed_locals(
| Stmt::LabeledBreak(_)
| Stmt::LabeledContinue(_)
| Stmt::PreallocateBoxes(_)
| Stmt::PreallocateTdzBoxes(_) => {}
| Stmt::PreallocateTdzBoxes(_)
| Stmt::ReleaseBoxes(_) => {}
Stmt::If {
condition,
then_branch,
Expand Down
3 changes: 2 additions & 1 deletion crates/perry-codegen/src/collectors/ptr_numarray.rs
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,8 @@ impl<'a> UseWalk<'a> {
| Stmt::LabeledBreak(_)
| Stmt::LabeledContinue(_)
| Stmt::PreallocateBoxes(_)
| Stmt::PreallocateTdzBoxes(_) => {}
| Stmt::PreallocateTdzBoxes(_)
| Stmt::ReleaseBoxes(_) => {}
}
}

Expand Down
6 changes: 4 additions & 2 deletions crates/perry-codegen/src/collectors/ptr_shape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,8 @@ impl<'a> UseWalk<'a> {
| Stmt::LabeledBreak(_)
| Stmt::LabeledContinue(_)
| Stmt::PreallocateBoxes(_)
| Stmt::PreallocateTdzBoxes(_) => {}
| Stmt::PreallocateTdzBoxes(_)
| Stmt::ReleaseBoxes(_) => {}
}
}

Expand Down Expand Up @@ -1638,7 +1639,8 @@ impl<'a, 'b> ThisFlowAnalysis<'a, 'b> {
| Stmt::LabeledBreak(_)
| Stmt::LabeledContinue(_)
| Stmt::PreallocateBoxes(_)
| Stmt::PreallocateTdzBoxes(_) => true,
| Stmt::PreallocateTdzBoxes(_)
| Stmt::ReleaseBoxes(_) => true,
}
}

Expand Down
3 changes: 2 additions & 1 deletion crates/perry-codegen/src/collectors/ptr_shape_elements.rs
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,8 @@ impl<'a> ArrayWalk<'a> {
| Stmt::LabeledBreak(_)
| Stmt::LabeledContinue(_)
| Stmt::PreallocateBoxes(_)
| Stmt::PreallocateTdzBoxes(_) => {}
| Stmt::PreallocateTdzBoxes(_)
| Stmt::ReleaseBoxes(_) => {}
}
}

Expand Down
3 changes: 2 additions & 1 deletion crates/perry-codegen/src/collectors/repsel_benefit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,8 @@ impl<'a> Model<'a> {
| Stmt::LabeledBreak(_)
| Stmt::LabeledContinue(_)
| Stmt::PreallocateBoxes(_)
| Stmt::PreallocateTdzBoxes(_) => {}
| Stmt::PreallocateTdzBoxes(_)
| Stmt::ReleaseBoxes(_) => {}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,8 @@ fn for_each_expr_in_stmt(stmt: &Stmt, f: &mut dyn FnMut(&Expr)) {
| Stmt::LabeledBreak(_)
| Stmt::LabeledContinue(_)
| Stmt::PreallocateBoxes(_)
| Stmt::PreallocateTdzBoxes(_) => {}
| Stmt::PreallocateTdzBoxes(_)
| Stmt::ReleaseBoxes(_) => {}
}
}

Expand Down
3 changes: 2 additions & 1 deletion crates/perry-codegen/src/collectors/scalar_methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,8 @@ fn stmt_writes_this_property(stmt: &Stmt, property: &str) -> bool {
| Stmt::LabeledBreak(_)
| Stmt::LabeledContinue(_)
| Stmt::PreallocateBoxes(_)
| Stmt::PreallocateTdzBoxes(_) => false,
| Stmt::PreallocateTdzBoxes(_)
| Stmt::ReleaseBoxes(_) => false,
}
}

Expand Down
3 changes: 2 additions & 1 deletion crates/perry-codegen/src/collectors/shadow_slots.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ pub fn collect_declared_shadow_locals_in_stmt(
| Stmt::LabeledContinue(_)
| Stmt::Throw(_)
| Stmt::PreallocateBoxes(_)
| Stmt::PreallocateTdzBoxes(_) => {}
| Stmt::PreallocateTdzBoxes(_)
| Stmt::ReleaseBoxes(_) => {}
}
}
2 changes: 1 addition & 1 deletion crates/perry-codegen/src/collectors/spec_abi_sites.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ fn walk_stmt(s: &Stmt, depth: u32, scan: &mut ModuleScan) {
}
Stmt::Expr(e) | Stmt::Throw(e) => record_expr_use(e, depth, scan),
Stmt::Return(Some(e)) => record_expr_use(e, depth, scan),
Stmt::PreallocateBoxes(ids) | Stmt::PreallocateTdzBoxes(ids) => {
Stmt::PreallocateBoxes(ids) | Stmt::PreallocateTdzBoxes(ids) | Stmt::ReleaseBoxes(ids) => {
scan.boxed_prealloc.extend(ids.iter().copied());
}
Stmt::Return(None)
Expand Down
4 changes: 3 additions & 1 deletion crates/perry-codegen/src/collectors/this_as_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,9 @@ pub fn stmts_use_this_as_value(stmts: &[perry_hir::Stmt], fields: &HashSet<Strin
Stmt::Break | Stmt::Continue | Stmt::LabeledBreak(_) | Stmt::LabeledContinue(_) => {
false
}
Stmt::PreallocateBoxes(_) | Stmt::PreallocateTdzBoxes(_) => false,
Stmt::PreallocateBoxes(_) | Stmt::PreallocateTdzBoxes(_) | Stmt::ReleaseBoxes(_) => {
false
}
};
if bad {
return true;
Expand Down
3 changes: 2 additions & 1 deletion crates/perry-codegen/src/collectors/uppercase_strings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,8 @@ fn check_uses_in_stmt(
| Stmt::LabeledBreak(_)
| Stmt::LabeledContinue(_)
| Stmt::PreallocateBoxes(_)
| Stmt::PreallocateTdzBoxes(_) => {}
| Stmt::PreallocateTdzBoxes(_)
| Stmt::ReleaseBoxes(_) => {}
}
}

Expand Down
Loading
Loading