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

Refactor Interface::Shape calculation #635

Merged
merged 10 commits into from
Aug 19, 2022
Merged

Conversation

soutaro
Copy link
Owner

@soutaro soutaro commented Aug 19, 2022

The goal of this pull request is to make type to shape translation more robust and consistent. It contains the following sub-goals.

  • Rename Interface::Interface to Interface::Shape class to avoid class name confusion
  • Simplify Factory class implementations that just translate the RBS data to Steep data
  • Add Interface::Builder class that translates a type to a shape if possible
  • Many performance tricks to make MethodType#subst memory conscious

soutaro added 10 commits August 10, 2022 08:59
GC time is dominating the execution time of Steep type checking, so reducing memory allocations by itarating types before doing the substitution makes sense.
* Builder translates types to Shapes, not Factory
* Shpaes::Methods implements lazy substitution to decrease unneccesary memory allocations duging substitution
@soutaro soutaro merged commit a5efbac into master Aug 19, 2022
@soutaro soutaro deleted the self-instance-class-type branch August 19, 2022 15:29
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.

1 participant