summaryrefslogtreecommitdiff
path: root/src/compiler
Commit message (Collapse)AuthorAgeFilesLines
* SI-5957 enable direct parsing of nested java class classfileLukas Rytz2012-07-121-1/+8
| | | | by weakening an assertion. explained in the source comment.
* Merge pull request #877 from magarciaEPFL/fixesAdriaan Moors2012-07-111-1/+1
|\ | | | | SI-6015 assertion (in Type-flow analysis) that wasn't, valid counterexample found
| * SI-6015 assertion (in Type-flow analysis) that wasn't, valid counterexample ↵Miguel Garcia2012-07-111-1/+1
| | | | | | | | found
* | Merge pull request #874 from adriaanm/ticket-6022Adriaan Moors2012-07-111-8/+36
|\ \ | | | | | | SI-6022 model type-test-implication better
| * | SI-6022 model type-test-implication betterAdriaan Moors2012-07-111-8/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | we use subtyping as a model for implication between instanceof tests i.e., when S <:< T we assume x.isInstanceOf[S] implies x.isInstanceOf[T] unfortunately this is not true in general. SI-6022 expects instanceOfTpImplies(ProductClass.tpe, AnyRefClass.tpe), but ProductClass.tpe <:< AnyRefClass.tpe does not hold because Product extends Any however, if x.isInstanceOf[Product] holds, so does x.isInstanceOf[AnyRef], and that's all we care about when modeling type tests
* | | Merge pull request #878 from adriaanm/topic-polyvalclassAdriaan Moors2012-07-115-30/+65
|\ \ \ | | | | | | | | polymorphic value classes
| * | | polymorphic value classesMartin Odersky2012-07-114-29/+64
| | | | | | | | | | | | | | | | dropping boxing code, which turned out to be a dead end.
| * | | don't crash on syntactically incorrect value classesMartin Odersky2012-07-111-1/+1
| | | |
* | | | Merge pull request #887 from paulp/topic/pickledflagsAdriaan Moors2012-07-111-2/+2
|\ \ \ \ | | | | | | | | | | major fixes to how flags are pickled
| * \ \ \ Merge branch '2.10.x' into topic/pickledflagsPaul Phillips2012-07-1115-75/+243
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/reflect/scala/reflect/internal/Flags.scala
| * | | | | Pickled flag reorgMartin Odersky2012-07-111-2/+2
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleaned up and optimized code that maps between raw and pickled flags. Avoids mystery constants. Makes a whole bunch of new flags be pickled which were not pickled before (more precisely: Everything in InitialFlags with value greater than 1 << 31 which is not in FlagsNotPickled now gets pickled whereas before it wasn't. Among these: VARARGS, IMPLCLASS, SPECIALZED, DEFAULTINIT, SYNCHRONIZED. I am curious how many tickets will get fixed by this change. The first one I noted is t5504, which previously enforced the buggy behavior through a neg check! There are also some build manager check file changes that have to do with the fact that flags now print in a different order for performance reasons.
* | | | | Merge pull request #881 from lrytz/t4763Josh Suereth2012-07-111-1/+1
|\ \ \ \ \ | |_|/ / / |/| | | | SI-4763 deprecated `@cloneable` annotation
| * | | | SI-4763 Deprecated the `cloneable` annotationLukas Rytz2012-07-111-1/+1
| | |/ / | |/| |
* | | | Merge commit 'refs/pull/851/head' into 2.10.xAdriaan Moors2012-07-115-7/+9
|\ \ \ \ | |/ / / |/| | |
| * | | Added a HIDDEN flag.Paul Phillips2012-07-085-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Still not a fan of the massive overlap between GenJVM and GenASM. I do not think such duplication should be allowed into master at all, neither in experimental backends nor anywhere else. Putting us in the position that we have to actually switch to stop incurring the duplication is engineering-by-prayer.] The SYNTHETIC flag was long ago discovered to be inadequately specific to allow for emitting ACC_SYNTHETIC in bytecode. In this commit is born a HIDDEN flag, which signals the flagged symbol as implementation detail which should not be considered during typechecking, and which will receive ACC_SYNTHETIC during code generation. Unsure what should be hidden, I conservatively marked a few things which seem safely hidable. - $outer fields and accessors - classes whose classfile has the jvm Synthetic attribute (not to be confused with the SYNTHETIC flag) I leave additional choices to those who have a better idea how this will materialize (i.e. IDE guys.) It is easy to selectively introduce this flag; but the SYNTHETIC flag is set or checked for in so many places, it is very difficult to alter the logic around it (either by setting it less, or checking for HIDDEN only) with much confidence. So right now HIDDEN is only used to help ACC_SYNTHETIC make it into bytecode - it is only set in conjunction with SYNTHETIC, and it doesn't help anyone hide from the typechecker. Review by @dragos, @odersky.
| | | |
| \ \ \
| \ \ \
| \ \ \
| \ \ \
| \ \ \
| \ \ \
| \ \ \
*-------. \ \ \ Merge commit 'refs/pull/825/head'; commit 'refs/pull/827/head'; commit ↵Adriaan Moors2012-07-1111-68/+234
|\ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / |/| | | | | | | | | | | | | | | 'refs/pull/828/head'; commit 'refs/pull/850/head'; commit 'refs/pull/858/head' into 2.10.x
| | | | | * | | bandaid in GenASM for SI-6049Miguel Garcia2012-07-101-4/+10
| | | | | | | |
| | | | * | | | SI-6042 Improve type selection from volatile type errorJason Zaugg2012-07-082-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Display the type of the typed qualifier (qual1), to avoid the message "Illegal type selection from volatile type null". - Show the upper bound, which is used to calculate the volatility.
| | * | | | | | Allow attachments for symbols, just like for trees.Lukas Rytz2012-07-054-49/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes the two global hash maps in Namers, and the one in NamesDefaults. Also fixes SI-5975.
| | * | | | | | Enhanced presentation compiler test infrastructureMirco Dotta2012-07-053-11/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Removed unneeded .flags. * Renamed a few methods in `InteractiveTest`. * Force the presentation compiler to shut down after each test. * -sourcepath in the .flags file is now relative to the test's base directory. * Use `InteractiveReporter` in Presentation Compiler tests. By using the `InteractiveReporter`, compilation errors are collected in the compilation unit. This was necessary for testing SI-5975.
| * | | | | | | removes special case for BigIntegerDominik Gruntz2012-07-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After rebasing, the commit 34d36108bf is in the history, therefore a patch in my code can be removed as an implicit conversion from BigInteger to BigInt was added in commit 34d36108bf. The tests cases test this case and still pass.
| * | | | | | | macro-based string interpolation formatterAdriaan Moors2012-07-062-2/+152
| | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit provides a macro based string interpolation formatter. The macro is implemented in MacroImplementations.scala. In order to still be able to build a new STARR, the implementation in StringContext.f is not yet changed. This will be replaced in a later commit.
* | | | | | | Revert "GenASM: pipeline disk-write with building of classfiles"Iulian Dragos2012-07-103-91/+35
| |_|_|_|/ / |/| | | | | | | | | | | | | | | | | This reverts commit 5d12fa4b791e73d5c99a0e145d28cbaba12823d2.
* | | | | | Merge pull request #841 from magarciaEPFL/fixesAdriaan Moors2012-07-094-13/+28
|\ \ \ \ \ \ | | | | | | | | | | | | | | final touches to GenASM to become default JVM backend in M5
| * | | | | | scalac ant task now supports all GenASM targetsMiguel Garcia2012-07-081-1/+1
| | | | | | |
| * | | | | | raise compile time error about impending VerifyError due to unsorted ↵Miguel Garcia2012-07-071-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | lookupswitch (SI-6011)
| * | | | | | SI-6025 fix for GenASM, GenJVM-based fix pendingMiguel Garcia2012-07-061-10/+14
| | | | | | |
| * | | | | | GenASM becomes default backend, 1.5 classfiles remain as defaultMiguel Garcia2012-07-063-3/+5
| |/ / / / /
* | | | | | Merge pull request #843 from scalamacros/ticket/6036Adriaan Moors2012-07-082-5/+8
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | SI-6036 yet again makes sense of magic symbols
| * | | | | SI-6036 yet again makes sense of magic symbolsEugene Burmako2012-07-062-5/+8
| |/ / / /
* | | | | Merge pull request #844 from paulp/topic/stop-admonishing-meAdriaan Moors2012-07-085-8/+12
|\ \ \ \ \ | | | | | | | | | | | | Knocking off a few catch _ => warnings.
| * | | | | Knocking off a few catch _ => warnings.Paul Phillips2012-07-065-8/+12
| | |_|_|/ | |/| | |
* | | | | Merge pull request #816 from VladUreche/feature/diagrams-dev-pullreq-newJosh Suereth2012-07-0733-525/+3154
|\ \ \ \ \ | | | | | | | | | | | | Scaladoc diagrams (again)
| * | | | | Diagram tweaks #2Vlad Ureche2012-07-026-59/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - fixed the AnyRef linking (SI-5780) - added tooltips to implicit conversions in diagrams - fixed the intermittent dot error where node images would be left out (dot is not reliable at all -- with all the mechanisms in place to fail gracefully, we still get dot errors crawling their way into diagrams - and that usually means no diagram generated, which is the most appropriate way to fail, I think...)
| * | | | | Diagram tweaks #1Vlad Ureche2012-07-027-80/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - relaxed the restrictions on nodes - nodes can be classes, traits and objects, both stand-alone and companion objects -- all are added to the diagram, but usually companion objects are filtered out as they don't have any superclasses - changed the rules for default diagram creation: - classes and traits (and AnyRef) get inheritance diagrams - packages and objects get content diagrams (can be overridden by @contentDiagram [hideDiagram] and @inheritanceDiagram [hideDiagram]) - tweaked the model to register subclasses of Any - hardcoded the scala package diagram to show all relations - enabled @contentDiagram showInheritedNodes by default and changed the setting to hideInheritedNodes (and added a test for this) - better node selection (can select nodes that don't have a corresponding trait) - fixed the docsite link in member selection, which was broken since the first commit :))
| * | | | | Scaladoc class diagrams part 2Damien2012-07-0214-24/+1297
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit contains the svg diagram generation using the graphviz package, the template changes, the css styling and javascript code that enables displaying and interacting with the diagrams. The full history is located at: https://github.com/damienobrist/scala/tree/feature/diagrams-dev The diagrams are included as svg markup inside the html code. This enables interacting with the image beyond what would be possible with a static image (highlighting, scaling, tooltips, links to nodes, etc). The svg generation has four main phases: model => dot, dot => svg (using the graphviz package), svg postprocessing, inclusion in the html page. This commit also fixes SI-5212 - links to individual pages automatically load the left navigation panel of the website. Commit summary: - diagram generation - model => dot (DotDiagramGenerator.scala, DiagramGenerator.scala) - dot => svg (DotRunner.scala) - svg post-processing (DotDiagramGenerator.scala) - svg inclusion in the html (Template.scala) - diagram interaction - css, js and image files Review by @heathermiller, @kzys. Also fixed the memory leak that was causing the testsuite to timeout.
| * | | | | Scaladoc class diagrams part 1Vlad Ureche2012-07-0219-202/+1234
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit contains model changes required for adding class diagrams to scaladoc. It also contains an improved implicit shadowing computation, which hides the shadowed implicitly inherited members from the main view and gives instructions on how to access them. This is joint work with Damien Obrist (@damienobrist) on supporting diagram generation in scaladoc, as part of Damien's semester project in the LAMP laborarory at EPFL. The full history is located at: https://github.com/damienobrist/scala/tree/feature/diagrams-dev Commit summary: - diagrams model - diagram settings (Settings.scala, ScalaDoc.scala) - diagram model object (Entity.scala, Diagram.scala) - model: tracking direct superclasses and subclasses, implicit conversions from and to (ModelFactory.scala) - diagram object computation (DiagramFactory.scala, DocFactory.scala) - capacity to filter diagrams (CommentFactory.scala, DiagramDirectiveParser.scala) - diagram statistics object (DiagramStats.scala) - delayed link evaluation (Body.scala, Comment.scala) - tests - improved implicits shadowing information - model shadowing computation (ModelFactoryImplicitSupport.scala, Entity.scala) - html generation for shadowing information (Template.scala) - tests Also fixes an issue reported by @dragos, where single-line comment expansion would lead to the comment disappearing. Review by @kzys, @pedrofurla. Adapted to the new model and fixed a couple of problems: - duplicate implicit conversions in StringAdd/StringFormat - incorrect implicit conversion signature (from X to X) Conflicts: src/compiler/scala/tools/nsc/doc/Settings.scala src/compiler/scala/tools/nsc/doc/html/page/Template.scala src/compiler/scala/tools/nsc/doc/model/Entity.scala src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala src/compiler/scala/tools/nsc/doc/model/ModelFactoryImplicitSupport.scala
| * | | | | Reorganized scaladoc modelVlad Ureche2012-07-029-277/+460
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the old model was "interruptible", it was prone to something similar to race conditions -- where the model was creating a template, that template creating was interrupted to creat another template, and so on until a cycle was hit -- then, the loop would be broken by returning the originally not-yet-finished template. Now everything happens in a depth-first order, starting from root, traversing packages and classes all the way to members. The previously interrupting operations are now grouped in two categories: - those that were meant to add entities, like inheriting a class from a template to the other (e.g. trait T { class C }; trait U extends T) => those were moved right after the core model creation - those that were meant to do lookups - like finding the companion object -- those were moved after the model creation and inheritance and are not allowed to create new documentable templates. Now, for the documentable templates we have: DocTemplateImpl - the main documentable template, it represents a Scala template (class, trait, object or package). It may only be created when modelFinished=false by methods in the modelCreation object NoDocTemplateMemberImpl - a non-documented (source not present) template that was inherited. May be used as a member, but does not get its own page NoDocTemplateImpl - a non-documented (source not present) template that may not be used as a member and does not get its own page For model users: you can use anything in the ModelFactory trait at will, but not from the modelCreation object -- that is reserved for the core model creation and using those functions may lead to duplicate templates, invalid links and other ugly problems.
| * | | | | Scaladoc diff-firendly outputVlad Ureche2012-07-025-18/+42
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Scaladoc can create raw content files that we can easily diff and spot any modifications. There is a cool project by Stefan Zeiger to export the scaladoc model in JSON, but with the language and scaladoc being so quick to evolve, it'll be a pain to properly maintain. In the long-run, the plan is to sample a couple of raw files on each build and email me the diff. If I spot anything that may be wrong I can fix it, revert the commit or at least file a bug. For now, .html.raw files are generated on-demand, using ant -Dscaladoc.raw.output="yes" <targets> Also added a script that will do the job of diff-ing. Review by @jsuereth. Conflicts: src/compiler/scala/tools/nsc/doc/Settings.scala
* | | | | Merge pull request #838 from adriaanm/ticket-2442Adriaan Moors2012-07-071-2/+2
|\ \ \ \ \ | |_|/ / / |/| | | | SI-2442 sealedness for java enums non-experimental
| * | | | SI-2442 sealedness for java enums non-experimentalAdriaan Moors2012-07-061-2/+2
| | |/ / | |/| |
* | | | Merge pull request #834 from paulp/issue/3836-2Adriaan Moors2012-07-061-3/+26
|\ \ \ \ | |/ / / |/| | | Fix SI-3836 not-really-ambiguous import detection.
| * | | Fix SI-3836 not-really-ambiguous import detection.Paul Phillips2012-07-051-3/+26
| | | | | | | | | | | | | | | | | | | | Normalize types before declaring that two imports are ambiguous, because they might be the same thing. Review by @moors.
* | | | Merge pull request #824 from adriaanm/ticket-4691_6008Adriaan Moors2012-07-062-218/+212
|\ \ \ \ | | | | | | | | | | [SI-4691, SI-6008] improve patmat analyses: irrefutable user-defined extractors, no-op type tests
| * | | | refactor to implement @retronym's reviewAdriaan Moors2012-07-061-18/+20
| | | | |
| * | | | SI-6008 use static knowledge of success of type testsAdriaan Moors2012-07-051-24/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | augment the equality axioms to take into account that a type test against the static type of a variable succeeds unless the variable is null for exhaustivity we disregard null, so the type test always succeeds during unreachability we model this knowledge as the obvious implication
| * | | | SI-4691 exhaustivity: `unapply: Some` = irrefutableAdriaan Moors2012-07-051-175/+128
| | | | | | | | | | | | | | | | | | | | overhauls treeMakersToConds in the process -- was getting a bit unwieldy
| * | | | introduce -Ypatmat-debug (no new functionality)Adriaan Moors2012-07-052-35/+47
| |/ / / | | | | | | | | | | | | | | | | the setting is actually a no-op until I can figure out how to convince the inliner to inline patmatDebug (/cc @magarciaEPFL)
* | | | Merge pull request #826 from lrytz/t5907Adriaan Moors2012-07-062-50/+66
|\ \ \ \ | |/ / / |/| | | SI-5907, SI-5009 case-class copy defaults only for first param list
| * | | SI-5907, SI-5009 case-class copy defaults only for first param listLukas Rytz2012-07-052-50/+66
| |/ / | | | | | | | | | | | | `copy` no longer returns anonymous functions if there are multiple parameter lists, reverts most of 40e7cab7a2. Cleaned up the special type completer for copy methods.