Avatar for the FuelLabs user
FuelLabs
sway
BlogDocsChangelog

Performance History

Latest Results

Fix post-rebase breakage against master fn-order changes. Rename Jump field type_ -> ty from #7720, and refresh ABI/snap/contract-id fixtures for the combined constant-propagate + fn-order output. Co-authored-by: Cursor <cursoragent@cursor.com>
xunilrj/improve-constant-propagate
18 hours ago
update tests
xunilrj/opt-get-config
1 day ago
Use `DeclEngine::insert_modified` instead of `with_parent` (#7744) ## Description This PR removes `with_parent` method from the `DeclEngine`. It is an another prerequisite for removals of duplicates from `DeclEngine` and for elimination of expensive hashing. Semantically valid registering of parents is now enforced implicitly inside of the `insert_modified` method. The previous API based on `with_parent` suffered from two conceptual issues: - The API was allowed for `TraitFn`, `Function`, `Constant`, and `Type`, but needed only for linking dummy functions to their trait/ABI interface declarations and for linking monomorphized functions to their original declarations. In other words, the parent links were never consumed for `Constant`s and associated `Type`s. Still, they were _sometimes_ added to declarations, only bloating the `DeclEngine`. - As mentioned in the above point, _sometimes_ added leads to the second API issue, the fact that `with_parent` was a separate call that could easily either be forgotten or called on a declaration for which it was irrelevant. The only two cases where we actually need parent links are: - every dummy function must be linked to its `TraitFn`, - every modified copy of a `TyFunctionDecl/TyTraitFn` must be linked to its original. The other two associated items, constants and associated types are redirected by entirely different mechanisms: - A `ConstantExpression` embeds the whole `TyConstantDecl` inline (not a DeclId reference). Redirection to the impl's constant happens in `UpdateConstantExpression` via `find_const_decl_from_impl`, which does a name-based lookup in the implementing impl block's items and overwrites the embedded decl in place. - Associated types references live as `TypeInfo::TraitType` in the `TypeEngine` and are substituted through `TypeSubstMap::find_match`. The new API enforces the preservation of only the two parent links listed above by design. Consequently, the `AssociatedItemDeclId` is renamed to `FunctionalDeclId`, to match the similar `InterfaceDeclId` grouping of `Abi` and `Trait` declarations. ## Checklist - [x] I have linked to any relevant issues. - [x] I have commented my code, particularly in hard-to-understand areas. - [ ] I have updated the documentation where relevant (API docs, the reference, and the Sway book). - [ ] If my change requires substantial documentation changes, I have [requested support from the DevRel team](https://github.com/FuelLabs/devrel-requests/issues/new/choose) - [ ] I have added tests that prove my fix is effective or that my feature works. - [ ] I have added (or requested a maintainer to add) the necessary `Breaking*` or `New Feature` labels where relevant. - [x] I have done my best to ensure that my PR adheres to [the Fuel Labs Code Review Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md). - [x] I have requested a review from the relevant team or maintainers.
master
1 day ago
Add `DeclId<T>::substitute_types_and_insert_new_if_not_concrete`
ironcev/decl-engine-remove-with-parent
1 day ago
Fix fmt issues
ironcev/decl-engine-remove-with-parent
8 days ago
update tests
xunilrj/opt-get-config
12 days ago
removing
xunilrj/opt-get-config
12 days ago

Latest Branches

CodSpeed Performance Gauge
0%
Improve constant propagate#7722
8 days ago
59d68fc
xunilrj/improve-constant-propagate
CodSpeed Performance Gauge
0%
12 days ago
ebca105
xunilrj/opt-get-config
CodSpeed Performance Gauge
0%
Use `DeclEngine::insert_modified` instead of `with_parent`#7744
1 day ago
1abcff0
ironcev/decl-engine-remove-with-parent
© 2026 CodSpeed Technology
Home Terms Privacy Docs