Skip to content

Transform/erasure #101

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 9 commits into from
Mar 29, 2014
Merged

Transform/erasure #101

merged 9 commits into from
Mar 29, 2014

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Mar 27, 2014

First working version of erasure.

Well it works for one file (tests/pos/erasure.scala).

To test erasure, you need to use

-YstopBefore terminal

Otherwise it will stop before it comes to the phase.

@odersky
Copy link
Contributor Author

odersky commented Mar 27, 2014

@DarkDimius @gzm0 please review.

Also, it would be good to get this in before the with->set renaming, or else we need to take special care with 64868aa
because that one fixes a critical typo in withPhase that might get lost otherwise.

@DarkDimius
Copy link
Contributor

I have 64868aa fixed in #100, which gives phases periods.
So I'd say that we can get #97 merged to unlock other people and rebase this one during sheparding .

@odersky
Copy link
Contributor Author

odersky commented Mar 27, 2014

OK, I see #100 fixes the problem already, so it can go in first.

@odersky
Copy link
Contributor Author

odersky commented Mar 28, 2014

@DarkDimius No this is the Typer phase. Only its erasure derivation cannot see imports anymore.

@odersky
Copy link
Contributor Author

odersky commented Mar 28, 2014

Can we merge this now? I have a large number of commits waiting that depend on it.

odersky added 9 commits March 29, 2014 09:10
Now works for all combinations of

    java/scala
    sue ErasedValueClass/go directly to underlying type
    constructors/others
    wildcards ok/not

Signatures had to be refined as well, because the signature depends
on whether a type comes form Java or Scala (handling of intersections
is different).

Also, replaced splitArray method in TypeApplication by extractors for
single- and multi-dimensional array types in definitions.
New method ensureApplied which will add a () parameter list if
a tree's widened type takes parameters.

Used in numericConversion, so that we are independent whether we
run before () insertion or after. With that change TypeTestCasts can stay enabled for
the whole build.

Conflicts:
	src/dotty/tools/dotc/ast/tpd.scala
Added general way to produce summaries when shwowing trees or types.
Summaries have limited, configrable recusion depth.
fix showSummary
Still missing: bridge method generation, signatures.

Other changes

 - Turned around Checking and NoChecking. Checking is the default, NoChecking
   disables it.

 - Refactored Typer#typed to expose typedNamed, so that it can be overridden in
   erasure.

 - Made logging more forgiving wrt off-buy-one phase errors.

Conflicts:
	src/dotty/tools/dotc/typer/Typer.scala
Squash was accidenbtally turned off before. Is now on again.
Run now interprets correctly

     -YstopBefore
     -YstopAfter
     -Yskip
     -Tprint

phase settings. For now, we stop by default before
erasure, until erasure is fully debugged.
Various fixes to the tree transformer.

In the denotation transformer we now keep self types around because otherwise
sourceModule would stop to work.

Conflicts:
   src/dotty/tools/dotc/core/transform/Erasure.scala
@DarkDimius
Copy link
Contributor

LGTM

DarkDimius added a commit that referenced this pull request Mar 29, 2014
@DarkDimius DarkDimius merged commit 5d9feef into scala:master Mar 29, 2014
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