Skip to content

Conversation

@Drvi
Copy link
Collaborator

@Drvi Drvi commented Oct 7, 2025

Mostly copy-pasted the identical fix from JuliaData/Parsers.jl#195
Fixes: #120
Bumps version to 0.6.4

Copy link
Collaborator

@nickrobinson251 nickrobinson251 left a comment

Choose a reason for hiding this comment

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

I can't tell if _divpow10! is covered by tests or not (and Coverage doesn't seem to be working on this repo)... but this looks correct to me

(and if it is covered, Nightly passes!)

Thanks!

end

function _divpow10!(x::BigInt, code, pow, ::RoundingMode{:Throw})
@inbounds y = Parsers.access_threaded(() -> (@static VERSION > v"1.5" ? BigInt(; nbits=256) : BigInt()), _BIGINT_10s) # we must not yield here!
Copy link
Collaborator

Choose a reason for hiding this comment

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

we've dropped the @inbounds here -- tbh i can't see where there would be bounds-checking that this disables, but perhaps there is somewhere in a nested call? (or maybe access_threaded meant to have a @boundscheck but didn't?)

probably it's fine to drop (but i wish this repo had benchmarks)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It seems to me that access_threaded already elides bounds checking, so this should be fine

@Drvi
Copy link
Collaborator Author

Drvi commented Oct 7, 2025

I can't tell if _divpow10! is covered by tests or not

I've very scientifically added an @info "aaa" statement to the BigInt _divpow10! methods, and they did produce a lot of logs during the test run

@Drvi Drvi merged commit 9d18432 into master Oct 7, 2025
12 checks passed
@Drvi Drvi deleted the td-1.12-compat branch October 7, 2025 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UndefVarError with Julia v1.12

2 participants