Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

documentation followup for "invert linetable representation (#52415)" #53781

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

aviatesk
Copy link
Sponsor Member

@aviatesk aviatesk commented Mar 19, 2024

  • fix up added documents: eb05b4f
  • set up a specific type to capture the 3-set data of codelocs: 6afde4b (moved to a separate PR)

@aviatesk aviatesk requested a review from vtjnash March 19, 2024 16:11
test/show.jl Outdated
test_DILineInfoPrinter(42) # ensure we have code instance cache for `test_DILineInfoPrinter(::Int)`
let io = IOContext(IOBuffer(), :color=>true)
mi = only(methods(test_DILineInfoPrinter, (Int,))).specializations
src = Core.Compiler._uncompressed_ir(mi.cache, mi.cache.inferred::String)
Copy link
Sponsor Member Author

Choose a reason for hiding this comment

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

This bit seems pretty hacky, but we currently can't use code_typed here. Since @code_typed func(args...) doesn't trigger caching for func(args...) because typeinf_code doesn't call lock_mi_inference beforehand. Should typeinf_code be tweaked to set lock_mi_inference?

@aviatesk aviatesk force-pushed the avi/follow-52415 branch 2 times, most recently from 1dd4c9c to 58e46fd Compare March 25, 2024 06:46
@Pangoraw
Copy link
Contributor

Pangoraw commented Mar 28, 2024

Not sure if this is the right place to indicate but IIUC the two following items should be replaced with debuginfo

* `linetable`
An array of source location objects
* `codelocs`
An array of integer indices into the `linetable`, giving the location associated
with each statement.

I propose something along the line of:

  * `debuginfo`

    An object to retrieve source information for each statements, see [How to interpret line numbers in a `CodeInfo` object](@ref How-to-interpret-line-numbers-in-a-CodeInfo-object).

I can open a separate pr if needed.

@aviatesk aviatesk changed the title follow up "invert linetable representation (#52415)" documentation followup for "invert linetable representation (#52415)" Apr 1, 2024
@aviatesk
Copy link
Sponsor Member Author

aviatesk commented Apr 1, 2024

@Pangoraw Thanks for your suggestion!

@aviatesk aviatesk merged commit 718b988 into master Apr 2, 2024
7 checks passed
@aviatesk aviatesk deleted the avi/follow-52415 branch April 2, 2024 02:31
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.

2 participants