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

Split errors into AllocationSite, AllocatingRuntimeCall, and DynamicDispatch #36

Merged
merged 7 commits into from
Nov 17, 2023

Conversation

topolarity
Copy link
Member

@topolarity topolarity commented Nov 16, 2023

This makes it much easier to understand the three main opponents one will have when trying to eliminate allocations.

This also does a major re-factoring of the allocfunc.jl internals while we're at it.

Example:
image

@gbaraldi
Copy link
Member

Should we call them errors or something else? And maybe we should add an option to the macro so it executes anyway? But prints this as a warning?

@topolarity
Copy link
Member Author

Should we call them errors or something else?

Open to suggestions 🙂

And maybe we should add an option to the macro so it executes anyway? But prints this as a warning?

I'd be open to a warn_only option or similar, yeah

@gbaraldi
Copy link
Member

I guess errors are fine. They look like errors, so I guess that sets the expectation

topolarity and others added 7 commits November 17, 2023 12:16
…amicDispatch`

This makes it much easier to understand the three main enemies one will
have when trying to eliminate allocations.

This also does a major re-factoring of the `allocfunc.jl` internals
while we're at it.
Try and look through the global to see it's initializer
This needs to be expanded still, but it's much better than nothing.

This also bundles up various tweaks to the first commit in this PR.
Still needs a bit of refinement/DRY, but this is enough to get things
working.
Apparently terminal support for this is quite poor, so perhaps we should
avoid it all together?
@topolarity topolarity mentioned this pull request Nov 17, 2023
@topolarity topolarity linked an issue Nov 17, 2023 that may be closed by this pull request
@topolarity
Copy link
Member Author

Time to go public 😎

@topolarity topolarity merged commit b9850a0 into main Nov 17, 2023
4 checks passed
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.

Built-in functions (e.g. jl_type_error) should provide better error messages Check dynamic dispatch
2 participants