• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

JuliaLang / julia / #37876
77%

Build:
DEFAULT BRANCH: master
Ran 20 Aug 2024 10:44AM UTC
Jobs 1
Files 361
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 Aug 2024 02:58AM UTC coverage: 87.845% (+0.02%) from 87.823%
#37876

push

local

web-flow
inference: model partially initialized structs with `PartialStruct` (#55297)

There is still room for improvement in the accuracy of `getfield` and
`isdefined` for structs with uninitialized fields. This commit aims to
enhance the accuracy of struct field defined-ness by propagating such
struct as `PartialStruct` in cases where fields that might be
uninitialized are confirmed to be defined. Specifically, the
improvements are made in the following situations:
1. when a `:new` expression receives arguments greater than the minimum
number of initialized fields.
2. when new information about the initialized fields of `x` can be
obtained in the `then` branch of `if isdefined(x, :f)`.

Combined with the existing optimizations, these improvements enable DCE
in scenarios such as:
```julia
julia> @noinline broadcast_noescape1(a) = (broadcast(identity, a); nothing);

julia> @allocated broadcast_noescape1(Ref("x"))
16 # master
0  # this PR
```

One important point to note is that, as revealed in
JuliaLang/julia#48999, fields and globals can revert to `undef` during
precompilation. This commit does not affect globals. Furthermore, even
for fields, the refinements made by 1. and 2. are propagated along with
data-flow, and field defined-ness information is only used when fields
are confirmed to be initialized. Therefore, the same issues as
JuliaLang/julia#48999 will not occur by this commit.

101 of 111 new or added lines in 5 files covered. (90.99%)

38 existing lines in 6 files now uncovered.

78174 of 88991 relevant lines covered (87.84%)

16547832.09 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #37876.1 20 Aug 2024 10:44AM UTC 0
87.84
Source Files on build #37876
Detailed source file information is not available for this build.
  • Back to Repo
  • 9650510b on github
  • Prev Build on master
  • Next Build on master
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc