| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
In a stunningly unusual demonstration of farsightedness,
I was able to generate these changes only by running:
scala scala.tools.nsc.util.FlagsUtilCompiler
With this much time in between runs:
-// Generated by mkFlagsTable() at Mon Oct 11 10:01:09 PDT 2010
+// Generated by mkFlagsTable() at Thu Feb 02 20:31:52 PST 2012
|
| |
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
determine match strategy by typing `__match`
factored out the interface to generate code in this monad, cleaned up codegen a bit
no longer solving a context bound to determine the match strategy and the monad's type constructor
it's too expensive
don't consider implicits looking for __match
implicit search causes HUGE slowdowns -- now the overhead is about 4% compared to just assuming there's no __match in scope
to support virtualization&staging, we use the type of `__match.one` as the prototype for how to wrap "pure" types and types "in the monad"
pure types T are wrapped as P[T], and T goes into the monad as M[T], if one is defined as:
def one[T](x: P[T]): M[T]
for staging, P will typically be the Rep type constructor, and type M[T] = Rep[Option[T]]
furthermore, naive codegen no longer supplies type information -- type inference will have to work it out
optimized codegen still does, of course, and that's enough since we only bootstrap that way
TODO: improve the test (currently the condition is not represented)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
before, we were mutating treemakers in-place when they were reused
no more mutation, and CSE is now self-contained
interestingly, we were considering all FunTreeMakers as potentially reused,
but only CondTreeMakers ever did anything with that flag
should be clearer now that only those are ever reused
simplified substonly treemaker a bit
overall cleanup to prepare for switching to new-style detection of MatchStrategy
delaying wrapping in function to simplify optimizing codegen logic
|
| | | |
| \ | |
| \ | |
| \ | |
|\ \ \ \
| | |_|/
| |/| |
| | | | |
'scalamacros/pullrequest/reify' and 'hubertp/issue/fix-sbt-build' into develop
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This was tricky to find as HLists and multiple chains of implicits are definitely not fun to debug.
Reporting ambiguous errors is influenced by the general error reporting,
don't look for implicit arguments if any of the preceding ones failed
(kills performance, causes diverging implicits with HLists). Previously
throwing type errors handled that correctly but now we don't do that.
Fixed small but essential typo when typing implicit.
Review by @dragos
|
| | | |
|
| |/
| |
| |
| |
| |
| |
| |
| | |
More specifically:
* Importers now preserve wasEmpty and original
* ToolBoxes no longer auto-evaluate nullary functions returned by runExpr
* All local symbols from previous typechecks are now correctly erased by ResetAttrs
* Originals are now reified
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A few small improvements to the parsing steps of CommentFactory (both
main parsing and wiki format parsing), resulting in a 30% reduction
of time spent in def parse, which gives me 5% reduction in docs.lib.
Turn docBody into a StringBuilder, to improve concatenation speed. Make
WikiParser and CharReader work with String instead of Array[String], to
reduce copying of data. Get rid of the implicit conversion from String
to Array[String].
Also, adjust a couple of regex to avoid expensive backtracking. The
new regex has a different semantics, which is arguably more correct
than the former one. There's absolutely no change in the generated
docs for Scala anyway.
|
| | | |
| \ | |
|\ \ \
| | | |
| | | |
| | | | |
'scalamacros/pullrequest/5256' into develop
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Reflection now correctly processes classes, objects and inner classes
that are declared in classes and objects.
However classToType still crashes on compound types and local classes.
For more information on those, follow the links:
* Compound types: https://issues.scala-lang.org/browse/SI-5430
* Local classes: https://issues.scala-lang.org/browse/SI-5431
Fixes https://issues.scala-lang.org/browse/SI-5256.
Review by @paulp, @odersky.
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Importers now correctly process constants that carry types and symbols.
However, it is still impossible to reify classOf for a class/trait that
is defined inside a quasiquote.
Theoretically, this can be implemented, but will require attaching
original trees to classOf constants, which needs much more effort.
|
| | |
| | |
| | |
| | | |
Not to use the deprecated Enumeration constructor.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The scanner performs some sketchy heuristics when it sees an ascii 1A
since it may be EOF or it may be part of a literal. Due to this, it
failed to detect an unterminated string literal if the opening quote was
unicode-escaped, leading to memory exhaustion as it read SUs until the
universe ended.
We're parsing a fixed input with known length! There's no reason to be
guessing about whether a char is EOF. If we're at the end of the file,
it's the end of file. Otherwise, it is not the end of the file.
|
| | | |
| \ | |
| \ | |
| \ | |
|\ \ \ \
| | | | |
| | | | |
| | | | | |
'scalamacros/pullrequest/5427' and 'scalamacros/pullrequest/5423' into develop
|
| | |/ /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Default getter for annotations doesn't perform initialization, hence
we've faced the following bug: https://issues.scala-lang.org/browse/SI-5423.
One of the approaches to fixing it would be to auto-complete on getter,
but according to Martin we'd better not do that because of cycles.
That's why I'm just introducing a new, eager, variation of `annotations'
and redirecting public API to it.
Review by @odersky.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Further improvements to how -Yvirtpatmat
handles switch-like patterns that can be
translated to switch tables.
First of all, we added a check whether
a type of an expression we pattern match
on is in the set of allowed types for
switch patterns.
If yes, we translate a pattern to switch
one by converting both an expression we
pattern match on and literals in a pattern
to an Int.
I borrowed an idea of converting to Ints
from both old pattern matcher implementation
and from how javac handles it.
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Implemented unfolding of pattern alternatives
that can be translated into switch table in
genicode. This way pattern matcher can keep
simple patterns as-is and let backend handle
translation of them instead of generating
bunch of LabelDefs and jumps.
Review by @dragos or @magarciaEPFL as both
seem to know genicode very well.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The problem of emitSWITCH not handling empty
keys popped up when I tried to implement
unfolding of pattern alternatives in genicode
instead of in typers/explicitouter.
This change makes perfect sense in isolation
as bytecode allows LOOKUPSWITCHes that have
only default case. I actually verified that
this kind of bytecode is generated by javac
when one has switch statement with only
default case defined.
Review by @paulp or @dragos.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Negative "to" index should be normalized to 0 before using it
in a difference operation.
|
| | | | |
|
|/ / / |
|
|/ /
| |
| |
| |
| | |
Utilize knowledge of case class synthetic equals to rule out
some comparisons statically. Closes SI-5426.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This one's about a million years overdue. Try this on for size,
from the command line:
printf ":power\nList(1).?.baseClasses.sigs >\n" | scala
Also, a little more power mode refinement.
|
|\ \ |
|
| | \ | |
| | \ | |
| |\ \ \
| | | | |
| | | | |
| | | | | |
'hubertp/ticket/4336' into develop
|
| | | | |
| | | | |
| | | | |
| | | | | |
Some of the type params might already be instantiated if explicit type application is done. Review by @adriaanm
|
| | |\| | |
|
| | | | | |
|
| |\ \ \ \
| | |_|/ /
| |/| | | |
AvlTree performance improvements
|
| | | | |
| | | | |
| | | | |
| | | | | |
Use a specialized iterator.
|
| | | | |
| | | | |
| | | | |
| | | | | |
recursion is not necessary here.
|
| | | | | |
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
And disambiguations. And renamed all kinds of methods to something
less inscrutable. Moved all the instance-to-compiler-structure implicit
behind a wrapper to avoid accidental conversions. The wrapper has
a single method, ?, which you can experience like so:
// Sorry tab completion doesn't yet figure out implicit conversions
scala> val x = Map(1 -> 2).?
x: $r.power.InternalInfo[scala.collection.immutable.Map[Int,Int]] = Map(1 -> 2) (Map)
scala> x.
asInstanceOf baseTypeSeq baseTypeSeqMap baseTypeWhichDefines companion
decls declsOriginal declsOverride erasure fullManifest
glb info isInstanceOf lub memberMethods
memberTypes members membersDeclared membersInherited membersUnabridged
moduleClass name owner owners pkg
pkgClass pkgClassSymbols pkgClasses pkgMembers pkgName
pkgSymbols shortClass signature symbol toString
tpe
// This uses an implicit to install sigs (and another for '>' which is
// the generic printing function) but transparency, one step at a time.
scala> Map(1 -> 2).?.membersDeclared.sigs >
def $init$(): Unit
override def empty: scala.collection.immutable.Map[A,B]
override def toMap[T,U](implicit ev: <:<[(A, B),(T, U)]): scala.collection.immutable.Map[T,U]
override def seq: scala.collection.immutable.Map[A,B]
def withDefault[B1 >: B](d: A => B1): scala.collection.immutable.Map[A,B1]
def withDefaultValue[B1 >: B](d: B1): scala.collection.immutable.Map[A,B1]
override def updated[B1 >: B](key: A,value: B1): scala.collection.immutable.Map[A,B1]
def +[B1 >: B](kv: (A, B1)): scala.collection.immutable.Map[A,B1]
|
| | | | | |
| \ \ \ | |
|\ \ \ \ \
| | | |_|/
| | |/| |
| | | | | |
'scalamacros/ticket/5418' into develop
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This very situational option proved to be very useful when debugging
https://issues.scala-lang.org/browse/SI-5415
With the help of -Yshow-symkinds, it became possible to distinguish
a free var from a module symbol, which gave precise indication of the
root of the bug.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
I love the smell of polymorphic method synthesis in the
early afternoon.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Finally had a concrete motivation to change partest's inexplicable
ISO-8859-1 encoding to UTF-8. My test case would cause it to barf
"illegal character". Is this going to break on windows or something?
If so, it's time to fix the broken place which can't handle UTF-8.
|
| | | |
| | | |
| | | |
| | | | |
At least tell us what they are.
|
| | | |
| | | |
| | | |
| | | | |
This reverts commit 6a5901461c1aaac7dd8786cb374b079520895527.
|
| | | | | |
| \ \ \ | |
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | | |
'axel22/feature/immutable-thread-safe' into develop
|
| | |/ / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This is part of an effort to make the immutable collections
(more) thread safe. The `::` still has non-final member fields
for head and tail, but there is not much that can be done right
now about that, since these fields are used by list buffers.
Tried writing a test with unsafe initialization, but could not
invent a scenario which actually fails, at least on the JDK6.
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This very situational option proved to be very useful when debugging
https://issues.scala-lang.org/browse/SI-5415
With the help of -Yshow-symkinds, it became possible to distinguish
a free var from a module symbol, which gave precise indication of the
root of the bug.
This changeset also upgrades stringification of symbols and types, so
I'd like to get a review by @paulp and @odersky.
|