FuelLabs
sway
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
Improve `inline` heuristic to avoid the final inlined function to be too big (#7710) ## Description This PR avoids the `inline` optimization to creating huge functions, and so avoiding issues like register spill, downgrading near to far calls etc... To help to diagnose this problem I have also created the "inspect" tool. It was vibe-coded, and it is a wonderful playground for anything IR related. To allow "inspect" to print the original source near IR I created another type of metatada definition which inline auto-generated code. That allows us to see what is the generated IR for the `__entry` function. I have also improved some of the scripts to generate benchmarks: now they work even when test names do not match (a problem when one create tests), and support for md tables, as the old code would fail silently. ## Checklist - [ ] I have linked to any relevant issues. - [ ] 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. - [ ] 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). - [ ] I have requested a review from the relevant team or maintainers. --------- Co-authored-by: Igor Rončević <ironcev@hotmail.com>
master
20 hours ago
Merge branch 'master' into xunilrj/inline-spill-prediction
xunilrj/inline-spill-prediction
20 hours ago
Use `DeclEngine::insert_modified` instead of `replace`
ironcev/use-insert-modified-instead-of-replace
21 hours ago
adjustments to PR feedback
xunilrj/inline-spill-prediction
21 hours ago
Add `has_changes_scoped!` and fix emitting of scoped errors (#7716) ## Description Emitting errors within a `handler.scope` call was not always done as intended by the `scope` semantics. Sometimes errors were, as expected by semantics, swallowed within the `scope` closure, but not always. This PR: - documents in detail the intended `scope` semantics and explains the patterns to be used when dealing with failing calls within a `scope`. - introduces `has_changes_scoped` macro. The macro offers the same convenience as `has_changes` but but it expects and accepts statements that return `Result<HasChanges, ...> and swallows the errors, which makes it compatible with the `scope` semantics. ## Checklist - [ ] 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
2 days ago
Add `has_changes_scoped` and fix emitting of scoped errors
ironcev/has-changes-scoped
2 days ago
Implement `type_check_finalize` for `DeclEngine` optimization (#7714) ## Description This PR is a prerequisite for upcoming compiler performance optimization: removals of expensive hashing and removals of duplicates from the `DeclEngine`. The PR: - returns `HasChanges` from `type_check_finalize`, enabling callers to decide what to do in case of changes happened or not. - replaces `decl_engine.replace` calls with conditional calls to `decl_engine.insert_modified`. This was the central point of the refactoring. Before removing duplicates from the `DeclEngine` we need to remove the `replace` method. Note that the intended usage of the `replace` method wasn't to replace some shared declaration. The usages were assuming that the replaced declaration is used only from a single usage point, although `DeclEngine` never provided that guarantee. Having `insert_modified` instead of `replace` removes the possibility of unwanted side effects. - fixes `type_check_finalized` implementation for `TyDecl`. The implementation was `type_check_finalize`ing a cloned `TyDecl` that got discarded without actually affecting the original. - fixes `type_check_finalized` implementations that were swallowing errors coming from internal `type_check_finalized` calls. All errors are now properly propagated. - implements two `todo!`s in `TyExpressionVariant::type_check_finalize` by properly returning `HasChanges::No`. ## Checklist - [ ] 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
3 days ago
Merge branch 'master' into ironcev/type-check-finalize-has-changes
ironcev/type-check-finalize-has-changes
3 days ago
Latest Branches
CodSpeed Performance Gauge
0%
Improve `inline` heuristic to avoid the final inlined function to be too big
#7710
20 hours ago
df2d48f
xunilrj/inline-spill-prediction
CodSpeed Performance Gauge
0%
Use `DeclEngine::insert_modified` instead of `replace`
#7717
1 day ago
01d1aff
ironcev/use-insert-modified-instead-of-replace
CodSpeed Performance Gauge
+28%
Add `has_changes_scoped!` and fix emitting of scoped errors
#7716
2 days ago
89403d1
ironcev/has-changes-scoped
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs