summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Made a typer hack less hacky.Paul Phillips2012-02-041-4/+6
|
* Hardening in Constructors.Paul Phillips2012-02-041-2/+2
|
* A little msil I missed un-reverting.Paul Phillips2012-02-041-5/+4
|
* Hardened/documented AnyVal constructor switcheroo.Paul Phillips2012-02-042-0/+3
|
* Tweaking parent printing a little further.Paul Phillips2012-02-041-5/+14
| | | | Not too many Object/AnyRef parents, not too few.
* Fixing AnyVal verify error and reflection.Paul Phillips2012-02-041-2/+7
| | | | | | | | Have to give AnyVal a constructor and simultaneously pacify both the typer (which knows Any has no constructor) and the jvm (which mandates a constructor must call its superconstructor.) It's the usual angle of adding a not-quite-right tree during parsing and then finishing it later (in this case, in AddInterfaces.)
* Merge branch 'master' into topic/inlinePaul Phillips2012-02-042-1/+12
|\
| * An IntelliJ module for the root directory.Jason Zaugg2012-02-042-1/+12
| | | | | | | | This allows any file to be be edited, rather than just the ones under library, compiler, actors, ...
* | Fixed all but one of the scalap tests.Paul Phillips2012-02-041-7/+5
| |
* | Restored msil.Paul Phillips2012-02-0410-364/+359
| |
* | Utilizing convenience methods martin hasn't discovered yet.Paul Phillips2012-02-041-7/+2
| |
* | Making AnyVal into a class instead of a trait.Paul Phillips2012-02-046-38/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- traits can extend Any, AnyRef, or AnyVal -- classes can extend AnyRef or AnyVal but not Any. This breaks reflection for the moment as it smuggles AnyVal so far downstream that it's reflecting its way into bytecode (or something) but the following test case goes five for six as anticipated. trait Foo1 extends Any trait Foo2 extends AnyVal trait Foo3 extends AnyRef class Bar1 extends Any // fail @inline class Bar2 extends AnyVal class Bar3 extends AnyRef Eliminated various hijinx from definitions.
* | Having Proxy extend Any as well.Paul Phillips2012-02-041-3/+2
| |
* | Guard List_apply from premature forcitude.Paul Phillips2012-02-041-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | Solved the annotation cycle puzzle. Was being burned again by the hack which preferentially treats List() as Nil to avoid List's extractor. This commit includes a new starr which fully bootstraps. Also at this point traits can extend Any and will not be given an AnyRef parent (until erasure.) This is the case for AnyVal and NotNull.
* | Made Any parents work more.Paul Phillips2012-02-0410-67/+91
| | | | | | | | Working on type printing logic.
* | ant and diff friendlier msil-disabling.Paul Phillips2012-02-046-3564/+3570
| |
* | Disabled all things MSIL.Paul Phillips2012-02-0311-3842/+3842
| | | | | | | | It's a huge drag when making fundamental changes.
* | Eliminated ScalaObject.Paul Phillips2012-02-036-8/+23
| | | | | | | | "This too shall pass."
* | Mostly eliminated ScalaObject.Paul Phillips2012-02-0322-61/+19
| |
* | Merge branch 'master' into topic/inlinePaul Phillips2012-02-0332-892/+1184
|\|
| * Updated Flags toString/documentation.Paul Phillips2012-02-021-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | 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
| |
| * Merge commit 'c58b240' into developPaul Phillips2012-02-023-644/+643
| |\
| | * [vpm] factored out optimizing codegenAdriaan Moors2012-02-022-472/+500
| | |
| | * [vpm] __match determines match semantics; virtualizationAdriaan Moors2012-02-022-245/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0212-94/+197
| |\ \ \ \ | | | |_|/ | | |/| | | | | | | '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-024-4/+17
| | | |
| | | * Miscellaneous fixes to reificationEugene Burmako2012-02-028-86/+170
| | |/ | | | | | | | | | | | | | | | | | | | | | 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
| * | 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-016-72/+162
| |\ \ \ | | | | | | | | | | | | | | | 'scalamacros/pullrequest/5256' into develop
| | | * | Hardens classToType logicEugene Burmako2012-02-013-62/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-013-10/+37
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-011-4/+6
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | |
| | \
| | \
| | \
| *---. \ Merge remote-tracking branches 'gkossakowski/virtpatmat-switch', ↵Paul Phillips2012-02-015-14/+74
| |\ \ \ \ | | | | | | | | | | | | | | | | | | 'scalamacros/pullrequest/5427' and 'scalamacros/pullrequest/5423' into develop
| | | | * | Introduce getAnnotations that triggers symbol completionEugene Burmako2012-01-312-1/+11
| | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * | | 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-011-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | Fix for slice boundary condition.Paul Phillips2012-02-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 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
| |/ / /
| * / / Improved warning for insensible comparisons.Paul Phillips2012-01-311-4/+7
| |/ / | | | | | | | | | | | | 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-0311-80/+128
| | |