History log of /wasmtime-44.0.1/crates/cranelift/src/debug/transform/utils.rs (Results 1 – 17 of 17)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: dev, v36.0.9, v44.0.1, v43.0.2, v36.0.8, v24.0.8, v44.0.0, v43.0.1, v42.0.2, v36.0.7, v24.0.7, v43.0.0, v42.0.1, v41.0.4, v42.0.0, v40.0.4, v36.0.6, v24.0.6, v41.0.3, v41.0.2, v41.0.1, v36.0.5
# c4a38d67 26-Jan-2026 Philip Craig <[email protected]>

Use `gimli::write::Dwarf::convert_with_filter` for DWARF transform (#12428)

Replace parts of the transform code with `gimli`'s generic DWARF
transformation support. Most of the remaining code is spe

Use `gimli::write::Dwarf::convert_with_filter` for DWARF transform (#12428)

Replace parts of the transform code with `gimli`'s generic DWARF
transformation support. Most of the remaining code is specific to the
needs of Wasmtime.

The overall behaviour is the same as the previous implementation. We
build a graph of the DIE dependencies, and prune DIEs that don't have
valid code ranges. Then we traverse the DIE tree again and transform the
DIEs. However, there are some differences.

Previously, unresolved references to DIEs were stored in `PendingUnitRefs`
and `PendingDebugInfoRefs`, then at the end of the transformation we
went back and fixed up these references. The new behaviour reserves IDs
for all of the DIEs in the dependency tree before transformation, which
avoids the need to fix up references later. It also allows gimli to
correctly handle references in DWARF expressions, although that doesn't
currently matter for Wasmtime because it doesn't handle references in
expressions yet. The visible effect of this in Wasmtime is that the
order of transformed attributes will now always match the original DWARF.

The DIE tree pruning is slightly different. We no longer add back-edges
pointing to namespace DIEs or the root DIE, which previously caused some
DIEs to be reachable when they should not have been. In particular,
this affects DW_TAG_variable DIEs for global variables. Wasmtime can't
currently translate the location for globals, so they were added without
a valid DW_AT_location. These DIEs are now omitted from the transformed
DWARF. In the future when global variables can be translated correctly,
they can be included by calling `ReserveUnitSection::require_entry`.

Performance measurements for `wasmtime compile -D debug-info=y` show
minimal change.

show more ...


Revision tags: v40.0.3
# 7ee620a5 24-Jan-2026 Philip Craig <[email protected]>

Update gimli and addr2line dependencies (#12424)

* Update gimli and addr2line dependencies

gimli has a significant number of breaking changes to adapt to.

* Add vets

---------

Co-authored-by: Al

Update gimli and addr2line dependencies (#12424)

* Update gimli and addr2line dependencies

gimli has a significant number of breaking changes to adapt to.

* Add vets

---------

Co-authored-by: Alex Crichton <[email protected]>

show more ...


Revision tags: v41.0.0, v36.0.4, v39.0.2, v40.0.2, v40.0.1
# c7cab275 22-Dec-2025 Nick Fitzgerald <[email protected]>

wasmtime-cranelift: Use `wasmtime_environ::error` instead of `anyhow` (#12204)


Revision tags: v40.0.0, v39.0.1, v39.0.0, v38.0.4, v37.0.3, v36.0.3, v24.0.5, v38.0.3, v38.0.2, v38.0.1
# bd7b59da 19-Oct-2025 Philip Craig <[email protected]>

Delete DWARF `Reader` trait, also use `gimli::UnitRef` (#11883)

* Delete DWARF Reader trait

Use the existing Reader type alias instead. Most places were already
using this.

* Use `gimli::UnitRef`

Delete DWARF `Reader` trait, also use `gimli::UnitRef` (#11883)

* Delete DWARF Reader trait

Use the existing Reader type alias instead. Most places were already
using this.

* Use `gimli::UnitRef`

This reduces parameter counts and makes it harder to use the
wrong DWARF sections for split DWARF.

A drawback is that `UnitRef<'a, R>` is invariant over `R`,
so additional lifetime annotations are needed in some places.

This probably also fixes a bug with the parsing of
`AttributeValue::LocationListsRef`, but I didn't try to test this.

show more ...


Revision tags: v37.0.2, v37.0.1, v37.0.0, v36.0.2, v36.0.1, v36.0.0, v35.0.0, v24.0.4, v33.0.2, v34.0.2, v34.0.1, v33.0.1, v24.0.3, v32.0.1, v34.0.0, v33.0.0
# 90ac295e 19-May-2025 Alex Crichton <[email protected]>

Update Wasmtime to the 2024 Rust Edition (#10806)

* Update Wasmtime to the 2024 Rust Edition

Now that our MSRV supports the 2024 edition it's possible to make this
switch. This commit moves Wasmtim

Update Wasmtime to the 2024 Rust Edition (#10806)

* Update Wasmtime to the 2024 Rust Edition

Now that our MSRV supports the 2024 edition it's possible to make this
switch. This commit moves Wasmtime to the 2024 Edition to keep
up-to-date with Rust idioms and access many of the edition features
exclusive to the 2024 edition.

prtest:full

* Reformat with the 2024 edition

show more ...


Revision tags: v32.0.0, v31.0.0
# d2c9d2a2 17-Mar-2025 SingleAccretion <[email protected]>

[DWARF] Fix the loclist to exprloc optimization (#10400)

* Add a test

* Fix the loclist -> exprloc optimization

The expression must be valid over the entire parent scope.


Revision tags: v30.0.2, v30.0.1, v30.0.0, v29.0.1, v29.0.0, v28.0.1
# 0b2c9d72 27-Dec-2024 SingleAccretion <[email protected]>

[DWARF] Transform instance methods into static methods with a `__this` parameter (#9898)

* Add an instance method test

* Transform instance methods into static methods with a '__this' parameter


Revision tags: v28.0.0
# af476a51 02-Dec-2024 SingleAccretion <[email protected]>

Synthetic type centralization (#9700)


Revision tags: v27.0.0, v26.0.1, v25.0.3, v24.0.2, v26.0.0, v21.0.2, v22.0.1, v23.0.3, v25.0.2, v24.0.1, v25.0.1, v25.0.0, v24.0.0, v23.0.2, v23.0.1, v23.0.0, v22.0.0
# dd8c48b3 05-Jun-2024 Alex Crichton <[email protected]>

Add basic support for DWARF processing with components (#8693)

This commit updates the native-DWARF processing (the `-D debug-info` CLI
flag) to support components. Previously component support was

Add basic support for DWARF processing with components (#8693)

This commit updates the native-DWARF processing (the `-D debug-info` CLI
flag) to support components. Previously component support was not
implemented and if there was more than one core wasm module within a
component then dwarf would be ignored entirely.

This commit contains a number of refactorings to plumb a more full
compilation context throughout the dwarf processing pipeline. Previously
the data structures used only were able to support a single module. A
new `Compilation` structure is used to represent the results of an
entire compilation and is plumbed through the various locations. Most of
the refactorings in this commit were then to extend loops to loop over
more things and handle the case where there is more than one core wasm
module.

I'll admit I'm not expert on DWARF but basic examples appear to work
locally and most of the additions here seemed relatively straightforward
in terms of "add another loop to iterate over more things" but I'm not
100% sure how well this will work. In theory this now supports
concatenating DWARF sections across multiple core wasm modules, but
that's not super well tested.

show more ...


# fcf1054b 05-Jun-2024 Alex Crichton <[email protected]>

Add some support for imported memories to generated DWARF (#8740)

This is more-or-less a prerequisite for #8652 and extends the generated
dwarf with expressions to not only dereference owned memorie

Add some support for imported memories to generated DWARF (#8740)

This is more-or-less a prerequisite for #8652 and extends the generated
dwarf with expressions to not only dereference owned memories but
additionally imported memories which involve some extra address
calculations to be emitted in the dwarf.

show more ...


Revision tags: v21.0.1, v21.0.0
# 0e9121da 16-May-2024 FrankReh <[email protected]>

Fix some typos (#8641)

* occurred

* winch typos

* tests typos

* cli typos

* fuzz typos

* examples typos

* docs typos

* crates/wasmtime typos

* crates/environ typos

* crates/cranelift typos

Fix some typos (#8641)

* occurred

* winch typos

* tests typos

* cli typos

* fuzz typos

* examples typos

* docs typos

* crates/wasmtime typos

* crates/environ typos

* crates/cranelift typos

* crates/test-programs typos

* crates/c-api typos

* crates/cache typos

* crates other typos

* cranelift/codegen/src/isa typos

* cranelift/codegen/src other typos

* cranelift/codegen other typos

* cranelift other typos

* ci js typo

* .github workflows typo

* RELEASES typo

* Fix clang-format documentation line

---------

Co-authored-by: Andrew Brown <[email protected]>

show more ...


Revision tags: v20.0.2, v20.0.1, v20.0.0
# 67adf149 19-Apr-2024 Alex Crichton <[email protected]>

Update nightly used in CI and fix warnings (#8416)

Fixes some warnings that nightly Rust has started emitting.


Revision tags: v17.0.3, v19.0.2, v18.0.4, v19.0.1, v19.0.0, v18.0.3, v18.0.2, v17.0.2, v18.0.1, v18.0.0, v17.0.1, v17.0.0, v16.0.0, v15.0.1, v15.0.0, v14.0.4, v14.0.3, v14.0.2, v13.0.1, v14.0.1, v14.0.0, minimum-viable-wasi-proxy-serve, v13.0.0, v12.0.2, v11.0.2, v10.0.2, v12.0.1, v12.0.0, v11.0.1, v11.0.0
# ca90650c 07-Jul-2023 Adam Petro <[email protected]>

Support multiple versions of `wasmtime` in the same crate (#6673)

* Attempt versioned exports to facilitate having multiple versions in the same crate

* Modify approach to use `export_name` and `li

Support multiple versions of `wasmtime` in the same crate (#6673)

* Attempt versioned exports to facilitate having multiple versions in the same crate

* Modify approach to use `export_name` and `link_name`

* Only apply version to names in assembly and foreign item fns

* Attempt to handle the s390x case

* Fix alignment of backslashes in assembly file

* Pretend I understand the preprocessor

* Version symbols in `crates/runtime/src/helpers.c`

* Stop versioning `__jit_debug_register_code` because gdb relies on it and it is uses `weak` linkage

* Version symbol in `crates/fiber/src/windows.c`

* Consolidate `LitStr` creation in macro

* Add new crate to publish script and supply-chain config

* Fix order in supply chain config

* Set `audit-as-crates-io` to false

* Missing `versioned_link` for Windows

* Version strings used in debug

* Formatting

* Get rid of `versioned_str` and bring back `versioned_suffix`

---------

Co-authored-by: Alex Crichton <[email protected]>

show more ...


Revision tags: v10.0.1, v10.0.0, v9.0.4, v9.0.3, v9.0.2, v9.0.1, v9.0.0
# 1cbca5a5 02-May-2023 Saúl Cabrera <[email protected]>

winch: Handle relocations and traps (#6298)

* winch: Handle relocations and traps

This change introduces handling of traps and relocations in Winch, which
was left out in https://github.com/bytecod

winch: Handle relocations and traps (#6298)

* winch: Handle relocations and traps

This change introduces handling of traps and relocations in Winch, which
was left out in https://github.com/bytecodealliance/wasmtime/pull/6119.

In order to so, this change moves the `CompiledFunction` struct to the
`wasmtime-cranelift-shared` crate, allowing Cranelift and Winch to
operate on a single, shared representation, following some of the ideas
discussed in https://github.com/bytecodealliance/wasmtime/pull/5944.

Even though Winch doesn't rely on all the fields of `CompiledFunction`,
it eventually will. With the addition of relocations and traps it
started to be more evident that even if we wanted to have different
representations of a compiled function, they would end up being very
similar.

This change also consolidates where the `traps` and `relocations` of the
`CompiledFunction` get created, by introducing a constructor that
operates on a `MachBufferFinalized<Final>`, esentially encapsulating
this process in a single place for both Winch and Cranelift.

* Rework the shared `CompiledFunction`

This commit reworks the shared `CompiledFunction` struct. The compiled
function now contains the essential pieces to derive all the information
to create the final object file and to derive the debug information for
the function.

This commit also decouples the dwarf emission process by introducing
a `metadata` field in the `CompiledFunction` struct, which is used as
the central structure for dwarf emission.

show more ...


Revision tags: v6.0.2, v7.0.1, v8.0.1, v8.0.0, v7.0.0, v6.0.1, v5.0.1, v4.0.1, v6.0.0, v5.0.0, v4.0.0, v3.0.1, v3.0.0, v1.0.2, v2.0.2, v2.0.1, v2.0.0, v1.0.1, v1.0.0, v0.40.1, v0.40.0, v0.39.1, v0.38.3, v0.38.2, v0.39.0
# 9c43749d 07-Jul-2022 Sam Parker <[email protected]>

[RFC] Dynamic Vector Support (#4200)

Introduce a new concept in the IR that allows a producer to create
dynamic vector types. An IR function can now contain global value(s)
that represent a dynami

[RFC] Dynamic Vector Support (#4200)

Introduce a new concept in the IR that allows a producer to create
dynamic vector types. An IR function can now contain global value(s)
that represent a dynamic scaling factor, for a given fixed-width
vector type. A dynamic type is then created by 'multiplying' the
corresponding global value with a fixed-width type. These new types
can be used just like the existing types and the type system has a
set of hard-coded dynamic types, such as I32X4XN, which the user
defined types map onto. The dynamic types are also used explicitly
to create dynamic stack slots, which have no set size like their
existing counterparts. New IR instructions are added to access these
new stack entities.

Currently, during codegen, the dynamic scaling factor has to be
lowered to a constant so the dynamic slots do eventually have a
compile-time known size, as do spill slots.

The current lowering for aarch64 just targets Neon, using a dynamic
scale of 1.

Copyright (c) 2022, Arm Limited.

show more ...


Revision tags: v0.38.1, v0.38.0, v0.37.0, v0.36.0, v0.35.3, v0.34.2, v0.35.2, v0.35.1, v0.35.0, v0.33.1, v0.34.1, v0.34.0, v0.33.0, v0.32.1, v0.32.0, v0.31.0, v0.30.0
# eb21ae14 23-Aug-2021 Alex Crichton <[email protected]>

Move definition of ModuleMemoryOffset (#3228)

This was historically defined in `wasmtime-environ` but it's only used
in `wasmtime-cranelift`, so this commit moves the definition to the
`debug` mod

Move definition of ModuleMemoryOffset (#3228)

This was historically defined in `wasmtime-environ` but it's only used
in `wasmtime-cranelift`, so this commit moves the definition to the
`debug` module where it's primarily used.

show more ...


# 87c33c29 18-Aug-2021 Alex Crichton <[email protected]>

Remove `wasmtime-environ`'s dependency on `cranelift-codegen` (#3199)

* Move `CompiledFunction` into wasmtime-cranelift

This commit moves the `wasmtime_environ::CompiledFunction` type into the
`

Remove `wasmtime-environ`'s dependency on `cranelift-codegen` (#3199)

* Move `CompiledFunction` into wasmtime-cranelift

This commit moves the `wasmtime_environ::CompiledFunction` type into the
`wasmtime-cranelift` crate. This type has lots of Cranelift-specific
pieces of compilation and doesn't need to be generated by all Wasmtime
compilers. This replaces the usage in the `Compiler` trait with a
`Box<Any>` type that each compiler can select. Each compiler must still
produce a `FunctionInfo`, however, which is shared information we'll
deserialize for each module.

The `wasmtime-debug` crate is also folded into the `wasmtime-cranelift`
crate as a result of this commit. One possibility was to move the
`CompiledFunction` commit into its own crate and have `wasmtime-debug`
depend on that, but since `wasmtime-debug` is Cranelift-specific at this
time it didn't seem like it was too too necessary to keep it separate.
If `wasmtime-debug` supports other backends in the future we can
recreate a new crate, perhaps with it refactored to not depend on
Cranelift.

* Move wasmtime_environ::reference_type

This now belongs in wasmtime-cranelift and nowhere else

* Remove `Type` reexport in wasmtime-environ

One less dependency on `cranelift-codegen`!

* Remove `types` reexport from `wasmtime-environ`

Less cranelift!

* Remove `SourceLoc` from wasmtime-environ

Change the `srcloc`, `start_srcloc`, and `end_srcloc` fields to a custom
`FilePos` type instead of `ir::SourceLoc`. These are only used in a few
places so there's not much to lose from an extra abstraction for these
leaf use cases outside of cranelift.

* Remove wasmtime-environ's dep on cranelift's `StackMap`

This commit "clones" the `StackMap` data structure in to
`wasmtime-environ` to have an independent representation that that
chosen by Cranelift. This allows Wasmtime to decouple this runtime
dependency of stack map information and let the two evolve
independently, if necessary.

An alternative would be to refactor cranelift's implementation into a
separate crate and have wasmtime depend on that but it seemed a bit like
overkill to do so and easier to clone just a few lines for this.

* Define code offsets in wasmtime-environ with `u32`

Don't use Cranelift's `binemit::CodeOffset` alias to define this field
type since the `wasmtime-environ` crate will be losing the
`cranelift-codegen` dependency soon.

* Commit to using `cranelift-entity` in Wasmtime

This commit removes the reexport of `cranelift-entity` from the
`wasmtime-environ` crate and instead directly depends on the
`cranelift-entity` crate in all referencing crates. The original reason
for the reexport was to make cranelift version bumps easier since it's
less versions to change, but nowadays we have a script to do that.
Otherwise this encourages crates to use whatever they want from
`cranelift-entity` since we'll always depend on the whole crate.

It's expected that the `cranelift-entity` crate will continue to be a
lean crate in dependencies and suitable for use at both runtime and
compile time. Consequently there's no need to avoid its usage in
Wasmtime at runtime, since "remove Cranelift at compile time" is
primarily about the `cranelift-codegen` crate.

* Remove most uses of `cranelift-codegen` in `wasmtime-environ`

There's only one final use remaining, which is the reexport of
`TrapCode`, which will get handled later.

* Limit the glob-reexport of `cranelift_wasm`

This commit removes the glob reexport of `cranelift-wasm` from the
`wasmtime-environ` crate. This is intended to explicitly define what
we're reexporting and is a transitionary step to curtail the amount of
dependencies taken on `cranelift-wasm` throughout the codebase. For
example some functions used by debuginfo mapping are better imported
directly from the crate since they're Cranelift-specific. Note that
this is intended to be a temporary state affairs, soon this reexport
will be gone entirely.

Additionally this commit reduces imports from `cranelift_wasm` and also
primarily imports from `crate::wasm` within `wasmtime-environ` to get a
better sense of what's imported from where and what will need to be
shared.

* Extract types from cranelift-wasm to cranelift-wasm-types

This commit creates a new crate called `cranelift-wasm-types` and
extracts type definitions from the `cranelift-wasm` crate into this new
crate. The purpose of this crate is to be a shared definition of wasm
types that can be shared both by compilers (like Cranelift) as well as
wasm runtimes (e.g. Wasmtime). This new `cranelift-wasm-types` crate
doesn't depend on `cranelift-codegen` and is the final step in severing
the unconditional dependency from Wasmtime to `cranelift-codegen`.

The final refactoring in this commit is to then reexport this crate from
`wasmtime-environ`, delete the `cranelift-codegen` dependency, and then
update all `use` paths to point to these new types.

The main change of substance here is that the `TrapCode` enum is
mirrored from Cranelift into this `cranelift-wasm-types` crate. While
this unfortunately results in three definitions (one more which is
non-exhaustive in Wasmtime itself) it's hopefully not too onerous and
ideally something we can patch up in the future.

* Get lightbeam compiling

* Remove unnecessary dependency

* Fix compile with uffd

* Update publish script

* Fix more uffd tests

* Rename cranelift-wasm-types to wasmtime-types

This reflects the purpose a bit more where it's types specifically
intended for Wasmtime and its support.

* Fix publish script

show more ...