| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
This reverts commit 1d0372f84f9a7325a47beb55169cc454895ef74b.
I forgot about polymorphic dispatch. Have to seek another way.
|
|\ \ \
| | | |
| | | |
| | | | |
'refs/pull/447/head' into develop
|
| | | | |
|
| | |/ |
|
| |/
| |
| |
| |
| |
| | |
it would be nice to have a test for this,
but you'd need to involve the repl,
as I couldn't trigger it using multiple scalac runs
|
|/ |
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In patterns, the parser halts when it sees stars.
This means it does not handle infix notation for a case class
named "*". This patch uses lookahead to decide whether to parse
'_' '*' as a sequence pattern or as the start of infix.
(For both normal and error cases, the tokens are always consumed
immediately.) Error messages are improved for _* (as a help to learners)
and slightly improved recovery helps the parse continue.
The entry point for XML patterns is now distinct; otherwise,
the change is local to pattern3-simplepattern; the entry point
for simplepattern() is unchanged because it is commented
"hook for IDE."
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
the implicit beta-reduction performed by typedFunction on a Function(.., Match(EmptyTree, ...))
must of course only be done when the selector actually is empty...
(yes, typedMatchAnonFun needs to be cleaned up, I know)
|
| | |
| | |
| | |
| | |
| | |
| | | |
Try this unreasonably long command line:
scalac -Xprint-pos -Yshow-trees -Xprint:all -Yrangepos *.scala
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Try it: ./tools/dump-class ./build/quick/classes
The output is intended to be easy to filter on the command line.
This is a starting point for lots of interesting bytecode analysis
for which we have waited too long.
Example. All generic signatures we produce.
// almost 20K classfiles
% find build/quick/classes -name '*.class' |wc -l
18519
// fully parsed in 6 seconds
tools/dump-class build/quick/classes |grep "^ signature" | wc -l
50802
real 0m6.230s
It's designed to be easy to make faster if you don't care about
particular classfile bits; you can override those methods to jump
forward in the input stream rather than building a structure.
For just a little sampling, here are our most frequently
repeated name/signature combinations.
194 signature <init> ()V // this one is weird, wonder why there's a generic signature
115 signature $div$colon$bslash <A1:Ljava/lang/Object;>(TA1;Lscala/Function2<TA1;TA1;TA1;>;)TA1;
105 signature applyOrElse <A1:Ljava/lang/Object;B1:Ljava/lang/Object;>(TA1;Lscala/Function1<TA1;TB1;>;)TB1;
103 signature view ()Ljava/lang/Object;
101 signature toSet <B:Ljava/lang/Object;>()Lscala/collection/immutable/Set<TB;>;
And the top five name/descriptor combinations.
11170 descriptor <clinit> ()V
10155 descriptor serialVersionUID J
7130 descriptor apply (Ljava/lang/Object;)Ljava/lang/Object;
3028 descriptor apply ()Ljava/lang/Object;
2426 descriptor <init> ()V
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Hopefully there are useful examples to be had in here.
Please note that you should never be testing "x.size != 0",
use isEmpty or nonEmpty. Even if these happen to be small
collections, it's not a habit you want to form: size is O(n)
on a number of collections. (Most pointedly, Lists.)
|
| | |
|
| |
| |
| |
| |
| | |
A strange blip in the benchmarks makes me wish to see
this on the sidelines.
|
| | | |
| \ | |
| \ | |
| \ | |
|\ \ \ \
| | | | |
| | | | |
| | | | | |
'refs/pull/441/head' into develop
|
| | | | | |
|
| | |/ / |
|
| |/ / |
|
| | | | |
| \ \ | |
|\ \ \ \ |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This test ensures hyperlinking works inside and around pattern matching. The new virtual pattern matcher
synthesizes trees that are not properly nested, and whose positions make it impossible to retrieve the correct
tree/symbol for a given position. Therefore, the current test is using the old pattern matcher. However,
once the virtual pattern matcher is fixed, remove the corresponding line from patmat.flags to re-enable virtpatmat.
|
| | | | |
| | | | |
| | | | |
| | | | | |
Nothing too major, please see the comment.
|
| |_|/ /
|/| | |
| | | |
| | | |
| | | |
| | | | |
Not just conveniences though. One of the clearest statements made
by profiling is that collections methods of the form of the enclosed
flatCollect are materially faster than the alternatives.
|
|\ \ \ \
| |_|/ /
|/| | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Very first time I tried "reify" in the repl and it crashed.
I changed an assert to issue a proper error, as best I could
figure out how. We probably need to do a lot more of this.
|
|/ / / |
|
|\ \ \
| |/ /
|/| | |
updated check file
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Moved compose/andThen off Function1, curried/tupled off Function2.
Pushed Tuple2 zipped into auxiliary class. Created implicits to
plaster over the changes. This drops several hundred classfiles and
takes (unoptimized) scala-library.jar from 7.8 Mb to 7.4 Mb.
|
| | | |
|
| | | |
|
|\ \ \
| |/ /
|/| | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
typer synthesized the wrong isDefinedAt method in typedMatchAnon
because a BackQuotedIdent was copied as an Ident, so that the equality check
was performed in applyOrElse (since it operates on the original tree),
but not in isDefinedAt (since it operates on the copy, which collapsed Ident and BackQuotedIdent)
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
val pattern: Type = expr desugared to
val x = expr match { case pattern: Type => (var_1, ..., var_N)}
but `pattern: Type` is only a valid pattern if `pattern` is an Ident
thus, we desugar to
val x = (expr: Type) match { case pattern => (var_1, ..., var_N)}
... in this case (see def makePatDef)
also, MaybeBoundType now fails on illegal patterns (to defend against similar regressions)
|
| |
| |
| |
| |
| |
| |
| | |
Trying to compile sbt with 2.10.0 reminded me that ScalaObject
wasn't only a marker interface, it was a public trait in the library
and has to be removed properly. "The ol' boy had a bit of life
in him yet, 'e did."
|
| |
| |
| |
| | |
For those of us robots who still have a little human blood.
|
|\ \ |
|
| | | |
|
| | | |
|
| | | |
|
| | | | |
| \ \ | |
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | | |
@paulp I think this is the place we should dump the contents of AbsSymbolInternal to
|
| | | | | |
|