Skip to content

Tailrec tc #155

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

Merged
merged 8 commits into from
Jul 23, 2014
Merged

Tailrec tc #155

merged 8 commits into from
Jul 23, 2014

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Jul 22, 2014

Fixes final remaining problem in #154. Review by @DarkDimius

DarkDimius and others added 7 commits July 22, 2014 14:06
If some node in tree is transformed changing the type,
the outer node could potentially also change type.

This patch implements a RetypingTreeMap that propagates those
changes until types converge. Propagation is done for tree nodes
that are able to compute their type based on their children:
Pair, Block, If, Match, CaseDef, Try, SeqLiteral, Annotated, Select.
Test for order of type parameters in recursive call
TailRec now relies on FullParameterization and uses two passes
for transformation. First one decides weather the method will
be transformed and if yes, starts rewriting calls in taill position.

Second one lifts the method body to a fully parameterized one,
correcting types.
Used in FullParameterization to substitute type parameters.
Fixes test failure for t2399.scala
@odersky
Copy link
Contributor Author

odersky commented Jul 22, 2014

In the future, let's all use dotty-staging for pull requests, instead of our home directories. Makes it much easier to collaborate.

@DarkDimius
Copy link
Contributor

Ok, I'll use staging for pull requests.

DarkDimius added a commit that referenced this pull request Jul 23, 2014
@DarkDimius DarkDimius merged commit 2f29892 into scala:master Jul 23, 2014
@allanrenucci allanrenucci deleted the tailrecTC branch December 14, 2017 19:25
WojciechMazur pushed a commit to WojciechMazur/dotty that referenced this pull request Mar 19, 2025
Backport "Fix scala#22226: Use `classOf[BoxedUnit]` for Unit array in `ArrayConstructors`." to 3.3 LTS
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.

2 participants