summaryrefslogtreecommitdiff
path: root/Gemfile
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2016-02-10 15:03:49 -0800
committerAdriaan Moors <adriaan.moors@typesafe.com>2016-02-12 16:12:04 -0800
commit6c8a12fbfe02db2890fefd60546dd43230e34bc3 (patch)
tree76bafd56e8c63e663d065f0884e79c7964db82ca /Gemfile
parentbaee820b32f6e71907658ad6386e0d79e726e761 (diff)
downloadscala-6c8a12fbfe02db2890fefd60546dd43230e34bc3.tar.gz
scala-6c8a12fbfe02db2890fefd60546dd43230e34bc3.tar.bz2
scala-6c8a12fbfe02db2890fefd60546dd43230e34bc3.zip
Less distribution of logic across TypeRef subclasses
Redeem myself for e1c732db44 -- hopefully. I inlined `thisInfo` (== `sym.info`), and made sure to use `relativeInfo` wherever prefix and args influence the result of the query that we're delegating to the underlying type. For type aliases, use `normalize` for `baseClasses` and `decls`, since `relativeInfo` breaks the gnarly SI-8177. I think normalize is okay for aliases, as the prefix should not matter when computing base classes, and infos for the members in `decls` are given the `asSeenFrom` treatment individually downstream. (It's a tight rope between rewriting too many symbols and maintaining correctness. Documented the trade-off in the code.) Renamed the unimaginative `transform` to `relativize`, which, although everything is relative, hopefully says a bit more about its usage than `transform`. Removed a lot of over-factoring in the TypeRef hierarchy. Ultimately, we need to reduce the number of TypeRef subclasses further, I think. It's really hard to follow what's going on. Removed the `thisInfo` cache, since `sym.info` and `relativeInfo` are both cached. Made the cache invalidation hooks a bit more OO-y. Compare `Symbol`s with `eq` -- they don't define an `equals` method. Also, don't recurse in isSubtype when a `baseType` results in `NoType`. This happens a lot and is cheap to check, so I posit (without proof), that it's better for performance (and clarity) to check before recursing.
Diffstat (limited to 'Gemfile')
0 files changed, 0 insertions, 0 deletions