Skip to content

Conversation

@Keno
Copy link
Member

@Keno Keno commented Nov 11, 2025

Continues the recent work to turn special lowered-IR forms into builtins when those forms do not have any syntactic impact. Written by Claude. Will hold until #59870 merges and then make the analogous changes there.

Continues the recent work to turn special lowered-IR forms into builtins
when those forms do not have any syntactic impact. Written by Claude.
Will hold until #59870 merges and then make the analogous changes
there.
Copy link
Member

@vtjnash vtjnash left a comment

Choose a reason for hiding this comment

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

SGTM

e.head = deserialize(s)::Symbol
e.args = Any[ deserialize(s) for i = 1:len ]

# Rewrite old :method expressions to define_method calls
Copy link
Member

Choose a reason for hiding this comment

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

Seems unlikely we should encounter or support this, since pre-lowered top level code is a pretty buggy concept even in a single session

Copy link
Member Author

Choose a reason for hiding this comment

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

We have a specific test for this case, so I added the compat. We can remove the test if course

Copy link
Member

Choose a reason for hiding this comment

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

Weird, but I guess harmless probably

mt = (jl_methtable_t*)fname;
jl_value_t *atypes = args[2];
jl_value_t *meth = args[3];
jl_method_t *ret = jl_method_def((jl_svec_t*)atypes, mt, (jl_code_info_t*)meth, module);
Copy link
Member

Choose a reason for hiding this comment

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

Does this need a check that the module is "open" or does it already have that internally?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll double check, but you may be correct that we were relying on the eval check before.

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.

3 participants