Skip to content

Conversation

@cfallin
Copy link
Member

@cfallin cfallin commented Dec 12, 2025

As discussed in this week's Cranelift meeting, we've discovered a need to generalize the patchable_call mechanism and corresponding patchable ABI slightly. In particular, we will need patchable try_call callsites as well in order to allow breakpoint handlers to throw exceptions (desirable functionality eventually) and have this work in the presence of inlining. Also, it's just a nice generalization to say that patchability is an orthogonal dimension to the call ABI and the other restrictions we initially imposed, and works as long as the basic requirement (no return values) is met.

This also renames the patchable ABI to preserve_all, to make it clear that its purpose is actually orthogonal, and it can be used independently of patchable callsites. It also deletes the cold ABI, which never actually did anything and is misleading in the presence of an actual cold-ish (subzero temperature, actually) ABI like preserve_all.

@cfallin cfallin requested review from a team as code owners December 12, 2025 10:20
@cfallin cfallin requested review from fitzgen and removed request for a team December 12, 2025 10:20
@cfallin cfallin changed the title Cranelift: make all non-tail calls patchable, and rename patchable ABI to preserve_all. Cranelift: make all non-tail, non-indirect calls patchable, and rename patchable ABI to preserve_all. Dec 12, 2025
@cfallin cfallin force-pushed the patchability-is-not-an-instruction-its-a-way-of-life branch 2 times, most recently from ead0b4b to bc459cc Compare December 12, 2025 10:44
@github-actions github-actions bot added cranelift Issues related to the Cranelift code generator cranelift:area:aarch64 Issues related to AArch64 backend. cranelift:meta Everything related to the meta-language. isle Related to the ISLE domain-specific language labels Dec 12, 2025
@github-actions
Copy link

Subscribe to Label Action

cc @cfallin, @fitzgen

Details This issue or pull request has been labeled: "cranelift", "cranelift:area:aarch64", "cranelift:meta", "isle"

Thus the following users have been cc'd because of the following labels:

  • cfallin: isle
  • fitzgen: isle

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

@cfallin cfallin force-pushed the patchability-is-not-an-instruction-its-a-way-of-life branch 2 times, most recently from b3caf46 to e520c95 Compare December 12, 2025 23:00
…e patchable ABI to `preserve_all`.

As discussed in this week's Cranelift meeting, we've discovered a need
to generalize the `patchable_call` mechanism and corresponding
`patchable` ABI slightly. In particular, we will need patchable
`try_call` callsites as well in order to allow breakpoint handlers to
throw exceptions (desirable functionality eventually) and have this work
in the presence of inlining. Also, it's just a nice generalization to
say that patchability is an orthogonal dimension to the call ABI and the
other restrictions we initially imposed, and works as long as the basic
requirement (no return values) is met.

This also renames the `patchable` ABI to `preserve_all`, to make it
clear that its purpose is actually orthogonal, and it can be used
independently of patchable callsites. It also deletes the `cold` ABI,
which never actually did anything and is misleading in the presence of
an actual cold-ish (subzero temperature, actually) ABI like
`preserve_all`.
@cfallin cfallin force-pushed the patchability-is-not-an-instruction-its-a-way-of-life branch from e520c95 to 28ea991 Compare December 12, 2025 23:01
Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for cleaning this up!

@cfallin cfallin enabled auto-merge December 15, 2025 23:06
@cfallin cfallin added this pull request to the merge queue Dec 15, 2025
Merged via the queue into bytecodealliance:main with commit 87ed3b6 Dec 15, 2025
76 checks passed
@cfallin cfallin deleted the patchability-is-not-an-instruction-its-a-way-of-life branch December 15, 2025 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cranelift:area:aarch64 Issues related to AArch64 backend. cranelift:meta Everything related to the meta-language. cranelift Issues related to the Cranelift code generator isle Related to the ISLE domain-specific language

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants