julia
2adc817f - staticdata: Restore custom MethodTable dispatch status (#62170)

Commit
97 days ago
staticdata: Restore custom MethodTable dispatch status (#62170) When a package image is loaded, methods in a worklist-owned custom `@MethodTable` used to be restored in place as internal typemap entries, skipping `jl_method_table_activate` and coming back with a cleared `dispatch_status` (no `METHOD_SIG_LATEST_WHICH`/`METHOD_SIG_LATEST_ONLY`). This made `queue_external_cis` drop foreign `CodeInstance`s cached on such methods during downstream precompilation, and made on-load edge revalidation treat calls to them as invalidated, so GPUCompiler-style compilation caches never survived a package image when the overlay method and the cached code live in the same package. Fix this by treating all custom method tables as external: method tables owned by the worklist are now serialized without their contents (their defs and dispatch caches are dropped), and all of their still-valid methods are collected as extext methods, so `jl_add_methods` / `jl_activate_methods` re-add and re-activate them on load through the same batched, `allow_new_worlds`-gated path used for methods extending tables owned by other modules. Activation restores the dispatch fast-path bits. x-ref: #58291, which added the on-load edge revalidation gated on these dispatch bits, but only restored them for methods activated through the external path. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Author
Parents
Loading