Skip to content

Conversation

@vtjnash
Copy link
Member

@vtjnash vtjnash commented Apr 23, 2025

DRY code somewhat by consolidating builtin declarations to use a table or macro definition to auto-generate the required reflection metadata. Mostly NFC, but does include a couple bugfixes caused by the consistency this enforces. Adding a new Builtin is now simply a matter of declaring it in builtin_proto.h and defining it in builtins.c and any relevant declarations are handled automatically.

@vtjnash vtjnash added the backport 1.12 Change should be backported to release-1.12 label Apr 23, 2025
@oscardssmith
Copy link
Member

This looks great!

@vtjnash vtjnash force-pushed the jn/dedup-builtin-decls branch from 2de3c02 to 97cb5a6 Compare April 23, 2025 20:40
@vtjnash vtjnash requested a review from JeffBezanson April 23, 2025 20:41
@vtjnash vtjnash force-pushed the jn/dedup-builtin-decls branch from 97cb5a6 to ad44533 Compare April 23, 2025 20:45
DRY code somewhat by consolidating builtin declarations to use a table
or macro definition to auto-generate the required reflection metadata.
@vtjnash vtjnash force-pushed the jn/dedup-builtin-decls branch from ad44533 to e0cfd8c Compare April 23, 2025 20:45
@JeffBezanson
Copy link
Member

Nice! Note to everyone: don't take this as an invitation to add more builtins just because it's easy 😂

@vtjnash vtjnash merged commit 907b201 into master Apr 24, 2025
5 of 7 checks passed
@vtjnash vtjnash deleted the jn/dedup-builtin-decls branch April 24, 2025 14:25
@KristofferC KristofferC mentioned this pull request Apr 29, 2025
53 tasks
LebedevRI pushed a commit to LebedevRI/julia that referenced this pull request May 2, 2025
DRY code somewhat by consolidating builtin declarations to use a table
or macro definition to auto-generate the required reflection metadata.
Mostly NFC, but does include a couple bugfixes caused by the consistency
this enforces. Adding a new `Builtin` is now simply a matter of
declaring it in `builtin_proto.h` and defining it in `builtins.c` and
any relevant declarations are handled automatically.
@KristofferC KristofferC mentioned this pull request May 9, 2025
58 tasks
vtjnash added a commit that referenced this pull request Jun 5, 2025
DRY code somewhat by consolidating builtin declarations to use a table
or macro definition to auto-generate the required reflection metadata.
Mostly NFC, but does include a couple bugfixes caused by the consistency
this enforces. Adding a new `Builtin` is now simply a matter of
declaring it in `builtin_proto.h` and defining it in `builtins.c` and
any relevant declarations are handled automatically.

(cherry picked from commit 907b201)
@KristofferC KristofferC mentioned this pull request Jun 6, 2025
60 tasks
@KristofferC KristofferC removed the backport 1.12 Change should be backported to release-1.12 label Jul 9, 2025
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.

5 participants