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

ArrowType.rigidify-sig! should detect cases where stack type base can be turned into STACK_TYPE_UNIT. #239

Open
typeswitch-dev opened this issue Apr 13, 2024 · 0 comments
Labels
compiler Compiler internals.

Comments

@typeswitch-dev
Copy link
Contributor

Because STACK_TYPE_UNIT is treated specially when applying type signatures (during type checking), it would be better if rigidify-sig! detected cases where the stack base of an arrow type can be turned into STACK_TYPE_UNIT on both sides of the arrow type without loss of generality.

ArrowType.rigidify-sig! is only used currently in the specializer, where this isn't needed. But it's also useful for implementing type signature inference. Low priority.

@typeswitch-dev typeswitch-dev added the compiler Compiler internals. label Apr 13, 2024
typeswitch-dev added a commit that referenced this issue Dec 19, 2024
typeswitch-dev added a commit that referenced this issue Dec 19, 2024
* Improves the specializer so it can deduplicate specializations

* Decouple specialization from inlining.

* Inlined arrows are "codipped" properly during code generation, meaning
they ignore extra things on the stack.

* Detect panic-like functions by type signature, and track unreachable
branches, to improve code generation.

Fixes issue #239
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler Compiler internals.
Projects
None yet
Development

No branches or pull requests

1 participant