summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into topic/inlinePaul Phillips2012-02-03156-944/+1902
|\
| * Restored build.number.Paul Phillips2012-02-031-0/+5
| | | | | | | | | | | | | | As it is apparently used by maven. We're now at a local minimum of sensibility for the construction of build strings, but the good thing about local minima is that one can reasonably anticipate an upward climb. Or at least flatlining.
| * Updated Flags toString/documentation.Paul Phillips2012-02-029-36/+36
| | | | | | | | | | | | | | | | | | | | | | | | 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
| * Cleanups in classfile parser symbol creation.Paul Phillips2012-02-021-18/+18
| |
| * Misc optimizations with zip.Paul Phillips2012-02-023-6/+3
| |
| * Create a reference tag if none exists.Paul Phillips2012-02-021-2/+11
| |
| * Merge commit 'c58b240' into developPaul Phillips2012-02-026-644/+697
| |\
| | * [vpm] factored out optimizing codegenAdriaan Moors2012-02-022-472/+500
| | |
| | * [vpm] __match determines match semantics; virtualizationAdriaan Moors2012-02-025-245/+252
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| | * [vpm] factored out reusing treemakers (used by CSE)Adriaan Moors2012-02-021-110/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | |
| | \
| | \
| | \
| *---. \ Merge branch 'master', remote-tracking branches ↵Paul Phillips2012-02-0275-100/+473
| |\ \ \ \ | | | | | | | | | | | | | | | | | | 'scalamacros/pullrequest/reify' and 'hubertp/issue/fix-sbt-build' into develop
| | | | * | Fix sbt build with trunk.Hubert Plociniczak2012-02-022-4/+10
| | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | | * | Fixes reifyThisEugene Burmako2012-02-0234-6/+19
| | | | |
| | | * | Miscellaneous fixes to reificationEugene Burmako2012-02-0251-88/+439
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * / Extremely hacky tweak to deal with printf portability failure.Paul Phillips2012-02-021-1/+4
| | |/ | | | | | | | | | No leading zeros for %016s on some platforms, yes on others.
| * | Merge remote-tracking branch 'dcsobral/DocSpeed' into developPaul Phillips2012-02-011-47/+53
| |\ \ | | |/ | |/|
| | * Performance improvements for CommentFactory.Daniel C. Sobral2012-01-261-47/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | |
| | \
| *-. \ Merge remote-tracking branches 'scalamacros/pullrequest/5258' and ↵Paul Phillips2012-02-0128-72/+331
| |\ \ \ | | | | | | | | | | | | | | | 'scalamacros/pullrequest/5256' into develop
| | | * | Hardens classToType logicEugene Burmako2012-02-0119-62/+247
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * | | Hardens reification against rare kinds of ConstantsEugene Burmako2012-02-019-10/+84
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | Update RoundingMode.Paul Phillips2012-02-012-2/+4
| | | | | | | | | | | | | | | | Not to use the deprecated Enumeration constructor.
| * | | Fix for parser OOM.Paul Phillips2012-02-013-4/+12
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | Fixing build string.Paul Phillips2012-02-013-15/+4
| | | | | | | | | | | | | | | | | | | | | | | | Version number turning up more than once. Looking at the situation I could only see the former mechanism as trouble. I deleted build.number and in ant am generating the build string only from tools/get-scala-revision. We may need to revisit when the time comes to build a release.
| | |
| | \
| | \
| | \
| *---. \ Merge remote-tracking branches 'gkossakowski/virtpatmat-switch', ↵Paul Phillips2012-02-0119-15/+177
| |\ \ \ \ | | | | | | | | | | | | | | | | | | 'scalamacros/pullrequest/5427' and 'scalamacros/pullrequest/5423' into develop
| | | | * | Introduce getAnnotations that triggers symbol completionEugene Burmako2012-01-314-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | | * | | Tests for https://issues.scala-lang.org/browse/SI-5427Eugene Burmako2012-02-018-0/+49
| | | |/ /
| | * | | Added a test-case for switches with Yvirtpatmat.Grzegorz Kossakowski2012-02-013-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added a bunch of tests that cover changes related to switches that were applied to Yvirtpatmat implementation. Note: I didn't add those tests progressively because my changes fix trees after typer phase but do not affect resulting bytecode. How come? It's because -Yvirtpatmat will emit pattern for switches and then the old pattern matcher implementation would transform them in the old fashion in explicitouter. We cannot disable the old pattern matcher in explicitouter yet because it doesn't handle patterns used for catching exceptions. Thus, consider this as a sign of the fact that Yvirtpatmat is still work in progress.
| | * | | Convert values to Int in switchable patterns.Grzegorz Kossakowski2012-02-011-21/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * | | Generate default case for switches.Grzegorz Kossakowski2012-02-011-1/+12
| | | | |
| | * | | Get rid of unused import.Grzegorz Kossakowski2012-02-011-1/+1
| | | | |
| | * | | Unfold pattern alternatives in genicode.Grzegorz Kossakowski2012-02-011-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * | | Fixed handling of empty keys in emitSWITCH.Grzegorz Kossakowski2012-02-012-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | Updated get-scala-revision to use git describe.Paul Phillips2012-02-012-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hopefully this will satisfy all version-interesting parties. Version string now looks like this: v2.10.0-M1-0098-gbda61bb7e5-2012-02-01 Review by @dragos and anyone who uses windows (where it definitely won't produce that string, but hopefully it produces some usable string.)
| * | | | Fix for slice boundary condition.Paul Phillips2012-02-013-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Negative "to" index should be normalized to 0 before using it in a difference operation.
| * | | | Added getPackage to the repl classloader.Paul Phillips2012-02-012-0/+30
| | | | |
| * | | | Tweak to repl debugging output.Paul Phillips2012-02-011-1/+1
| |/ / /
| * | | Test case closes SI-5352.Paul Phillips2012-01-313-0/+29
| | | |
| * | | Improved warning for insensible comparisons.Paul Phillips2012-01-315-5/+35
| |/ / | | | | | | | | | | | | Utilize knowledge of case class synthetic equals to rule out some comparisons statically. Closes SI-5426.
* | | intermediate work towards a new starr for value classes.Martin Odersky2012-02-0312-86/+134
| | |
* | | First steps towards erasure of inline classes.Martin Odersky2012-01-312-0/+20
| | |
* | | New trait for erasure of inline classes.Martin Odersky2012-01-311-0/+9
| | |
* | | Merge remote branch 'paulp/inline' into topic/inlineMartin Odersky2012-01-3148-733/+1373
|\ \ \
| * | | More work on inline classes.Paul Phillips2012-01-3012-15/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fail compile if AnyVal is inherited by a trait, a non-@inline class, or a class with an AnyRef parent somewhere. Added tests. Added logging, like [log extmethods] Inline class class Bippy spawns extension method. Old: def getClass: Class[_ <: Bippy] New: final def extension$getClass($this: Bippy): Class[_ <: Bippy] Fixed what I hope was a bug in ExtensionMethods where the original method params were dropped. Since adding a NonNull parent was also inflicting an AnyRef on AnyVal subclasses, suppressed that for those. Had the bright idea that AnyVal could extend NotNull. It doesn't seem to accomplish much, but then, I don't think NotNull accomplishes much. Still, maybe it's time to restrict the ways one can use AnyVal so one can't do this: scala> var x: AnyVal = _ x: AnyVal = null
| * | | Merge branch 'master' into inlinePaul Phillips2012-01-301-2/+13
| |\| |
| | * | Have ant notice starr out of date.Paul Phillips2012-01-301-2/+13
| | | | | | | | | | | | | | | | | | | | If your compiler .desired.sha1 is newer than the jar, it will go download it.
| * | | Pushed new starr and updated desired shas.Paul Phillips2012-01-303-3/+3
| | | |
| * | | Merge branch 'master' into inlinePaul Phillips2012-01-302-19/+35
| |\| |
| | * | Print compound types legibly.Paul Phillips2012-01-302-19/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | Synthesize getClass method for AnyVal children.Paul Phillips2012-01-301-0/+11
| | | | | | | | | | | | | | | | The synthetic method is only a null for now.
| * | | Removed obsolete checkfile.Paul Phillips2012-01-302-13/+0
| | | |