aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/transform/Erasure.scala
Commit message (Collapse)AuthorAgeFilesLines
* Rename NameExtractor -> NameKindMartin Odersky2017-04-111-1/+1
|
* Add ShadowedName and AvoidClashNameMartin Odersky2017-04-111-1/+2
|
* Harmonize paramTypes and paramBoundsMartin Odersky2017-04-061-6/+6
| | | | | | MethodTypes have paramTypes whereas PolyTypes have paramBounds. We now harmonize by alling both paramInfos, and parameterizing types that will become common to both.
* Construct MethodTypes from parameter closureMartin Odersky2017-03-141-6/+7
| | | | | To allow for dependencies between method type parameters, construct MethodTypes from a closure that maps the currently constructed MethodType to its parameter types.
* Harden outer proxy computation of inlined codeMartin Odersky2017-02-191-1/+1
| | | | | | | | | | | It turns out that we simply cannot do reliable outer path computation that fills in the right hand sides of this-proxies from the types of these proxies. As-seen-from logic can mangle the types of proxies enough to scramble the necessary information. What we now do instead is simply count: We record the number of outer accesses to an outer this in inlineable code, and do the same number of outer accesses when computing the proxy.
* Add checks for synthetic functions and erased functions.Nicolas Stucki2017-02-131-4/+2
| | | | | | | | * Add `isSyntheticFunction` checks for synthetic functions such as FuntionN for N > 22 and ImplicitFunctionN for N >= 0. * Add `erasedFunctionClass` to get the erased verion of synthetic functions. * Change the semantics of `isFunctionClass` to return true if it is any kind of FunctionN or ImplicitFunctionN.
* Fix #1916: fix erasure of implicit xxl closuresNicolas Stucki2017-02-031-2/+2
| | | | This commit extends the fix done in #1920 to implicit closures.
* Fix #1916 - fix erasure of xxl closuresMartin Odersky2017-01-311-1/+3
| | | | | xxl closures need to get the SAM type FunctionXXL as their explicit type field after ersure.
* Fix erasure of implicit functionsMartin Odersky2016-12-171-13/+15
| | | | and check at runtime that it works
* Drop explicit types for local implicit valsMartin Odersky2016-12-121-2/+2
| | | | | Drop explicit types for local implicit vals of type Context and Position. Exercises the functionality and shortens the code.
* Merge pull request #1766 from dotty-staging/fix-#1756odersky2016-12-101-2/+2
|\ | | | | Fix #1756: Use lexically enclosing class as start of outer path.
| * Fix-1756: Use lexically enclosing class as start of outer path.Martin Odersky2016-12-021-2/+2
| | | | | | | | | | | | We confused the enclosing class (which skips the current class in super call contexts) and the lexically enclosing class in three locations that all had to do with the start of an outer path.
* | Adress reviewers commentsMartin Odersky2016-12-011-10/+13
| |
* | Drop function 22 limit.Martin Odersky2016-11-301-15/+62
|/ | | | | | | | | | | | | | | | | | | Functions with more than 22 parameters are now automatically converted to functions taking a single object array parameter. This has been achieved by tweaking erasure. Other things I have tried that did ot work out well: - Use a single function type in typer. The problem with this one which could not be circumvented was that existing higher-kinded code with e.g. Funcor assumes that Functon1 is a binary type constructor. - Have a late phase that converts to FunctonXXL instead of doing it in erasure. The problem with that one was that potentially every type could be affected, which was ill-suited to the architecture of a miniphase.
* Move compiler and compiler tests to compiler dirFelix Mulder2016-11-221-0/+664