-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[mypyc] Enable incremental self-compilation #21369
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -182,7 +182,12 @@ def load_type_map(mapper: Mapper, modules: list[MypyFile], deser_ctx: DeserMaps) | |
| continue | ||
| mapper.type_to_ir[node.node] = ir | ||
| mapper.symbol_fullnames.add(node.node.fullname) | ||
| mapper.func_to_decl[node.node] = ir.ctor | ||
| # Trait/builtin-base classes have an ir.ctor FuncDecl | ||
| # but no emitted CPyDef_<ctor>, so a cross-group direct | ||
| # call would hit an undefined symbol. Mirror the skip | ||
| # in prepare_init_method. | ||
| if not ir.is_trait and not ir.builtin_base: | ||
| mapper.func_to_decl[node.node] = ir.ctor | ||
|
Comment on lines
+185
to
+190
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i can't find would it be possible to make
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, right now theres a couple usages of "always present but maybe fake". One restriction I have with making it
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's fine to leave it for another PR. |
||
|
|
||
| for module in modules: | ||
| for func in get_module_func_defs(module): | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this safe to skip when skipping the object file copy?
i don't think the extensions we generate need stubs but the patch technically could affect
setup_toolsoutside ofmypycify. so maybe also remove the patch at the end ofmypycify?