summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | Fixes markdown syntaxLuc Bourlier2013-11-141-1/+1
|/ / / / / /
* | | | | | Merge pull request #3127 from ↵Adriaan Moors2013-11-131-3/+2
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | RajivKurian/OpenHashMap-nextPowerOfTwo-implementation Use an intrinsic for the next power of two calculation.
| * | | | | Use an intrinsic for the next power of two calculation and also return the ↵Rajiv2013-11-111-3/+2
| | |_|_|/ | |/| | | | | | | | | | | | | input as is if it is already a power of two
* | | | | Merge pull request #3129 from adriaanm/pr-rebase-3001Adriaan Moors2013-11-13277-692/+1133
|\ \ \ \ \ | |_|/ / / |/| | | | [rebase] blackbox and whitebox macros
| * | | | blackbox restriction #4: can't customize pattern matchingEugene Burmako2013-11-128-4/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an application of a blackbox macro is used as an extractor in a pattern match, it triggers an unconditional compiler error, preventing customizations of pattern matching implemented with macros.
| * | | | blackbox restriction #3: can't affect implicit searchEugene Burmako2013-11-1214-64/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an application of a blackbox macro is used as an implicit candidate, no expansion is performed until the macro is selected as the result of the implicit search. This makes it impossible to dynamically calculate availability of implicit macros.
| * | | | blackbox restriction #2: can't guide type inferenceEugene Burmako2013-11-1212-5/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an application of a blackbox macro still has undetermined type parameters after Scala’s type inference algorithm has finished working, these type parameters are inferred forcedly, in exactly the same manner as type inference happens for normal methods. This makes it impossible for blackbox macros to influence type inference, prohibiting fundep materialization.
| * | | | blackbox restriction #1: can't refine the official return typeEugene Burmako2013-11-1219-31/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an application of a blackbox macro expands into a tree `x`, the expansion is wrapped into a type ascription `(x: T)`, where `T` is the declared return type of the blackbox macro with type arguments and path dependencies applied in consistency with the particular macro application being expanded. This invalidates blackbox macros as an implementation vehicle of type providers.
| * | | | blackbox and whitebox macrosEugene Burmako2013-11-12246-619/+788
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first commit in the series. This commit only: 1) Splits Context into BlackboxContext and WhiteboxContext 2) Splits Macro into BlackboxMacro and WhiteboxMacro 3) Introduces the isBundle property in the macro impl binding Here we just teach the compiler that macros can now be blackbox and whitebox, without actually imposing any restrictions on blackbox macros. These restrictions will come in subsequent commits. For description and documentation of the blackbox/whitebox separation see the official macro guide at the scaladoc website: http://docs.scala-lang.org/overviews/macros/blackbox-whitebox.html Some infrastructure work to make evolving macros easier: compile partest-extras with quick so they can use latest library/reflect/...
* | | | | Merge pull request #3090 from densh/pull/undo-forAdriaan Moors2013-11-1333-557/+1046
|\ \ \ \ \ | | | | | | | | | | | | Add support for For loops to quasiquotes
| * | | | | add comments that explain FreshName extractor from Quasiquotes cakeDen Shabalin2013-11-121-0/+4
| | | | | |
| * | | | | add comments that explain new for loop enumerator encodingDen Shabalin2013-11-121-0/+28
| | | | | |
| * | | | | test legacy .filter support in for loop resugaringDen Shabalin2013-11-121-0/+11
| | | | | |
| * | | | | re-implement hasAttachment directly in raw attachmentsDen Shabalin2013-11-122-1/+5
| | | | | |
| * | | | | add support for for loops and for enumerators to quasiquotesDen Shabalin2013-11-128-8/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. q"for (..$enums) $body", q"for (..$enums) yield $body" 2. fq"..." quote to construct/deconstruct enumerators
| * | | | | implement inverse transformation to mkForDen Shabalin2013-11-125-9/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This effectively reconstructs a sequence of enumerators and body from the tree produced by mkFor. This lets to define bi-directional SyntacticFor and SyntacticForYield constructors/extractors to work with for loops. Correctness of the transformation is tested by a scalacheck test that generates a sequence of random enumerators, sugars them into maps/flatMaps/foreach/withFilter calls and reconstructs them back.
| * | | | | add syntactic combinators that represent enumeratorsDen Shabalin2013-11-122-0/+95
| | | | | |
| * | | | | move for loop desugaring into tree genDen Shabalin2013-11-124-387/+379
| | | | | |
| * | | | | change intermidiate representation of for loop enumeratorsDen Shabalin2013-11-127-55/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Encode values into real trees rather than non-tree case classes. This is needed for re-usability of desugaring code between quasiquotes and parser.
| * | | | | make fresh names compare similar in quasiquotesDen Shabalin2013-11-122-4/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise it's annoying that trees that look the same are not equal due to some fresh name hidden underneath. Due to this one test needs to be changed to use plain equalsStructure.
| * | | | | add support for importable attachmentsDen Shabalin2013-11-123-5/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously attachments weren't imported by importTree. Now a new marker trait has been added that lets attachments to import themselves to the new universe together with all their innards. Additionally a simpler subtrait is defined to mark attachments that can be imported as-is.
| * | | | | simplify imports in quasiquotes scalacheck testsDen Shabalin2013-11-1212-91/+25
| | | | | |
| * | | | | add some post-typecheck tests for quasiquotesDen Shabalin2013-11-124-7/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Typecheck trees with toolbox and check that they are still matched by corresponding quasiquote. Fix tuples and function types matchers to account for different shape of trees after typing.
| * | | | | add hasAttachment utility method to the internal apiDen Shabalin2013-11-122-1/+2
| | | | | |
| * | | | | make internal implementation of universe.build less restrictiveDen Shabalin2013-11-121-26/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Use protected instead of private to avoid needless lock-in 2. Use BuildImpl field type to expose non-protected members to the compiler (user-facing side in the reflection api stays the same)
| * | | | | deduplicate tuple tree creation codeDen Shabalin2013-11-128-44/+39
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | Previously tuple tree generation code has been implemented in three place: tree builder, tree gen, build utils. Now it's just defined once in tree gen.
* | | | | Merge pull request #3112 from adriaanm/modularize-scaladocJames Iry2013-11-1311-50/+298
|\ \ \ \ \ | |_|_|_|/ |/| | | | Modularize scaladoc... almost
| * | | | Refactoring to prepare modularization of the compiler.Adriaan Moors2013-11-1211-50/+298
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Actual modularization is delayed until 2.12. The one big (one-line) change is to make the interactive compiler independent of scaladoc. We have one "integration test": `MemoryLeaksTest`. This commit adds a bunch of comments marked `TODO: modularize the compiler`, that should be uncommented when we're ready to continue the modularization effort. I decided to merge them commented out to avoid having to rebase xml patches. There's still some chance of bitrot, but I'm willing to take my chances. I previously refactored the build to make it easier to add jars in a coherent way, which hinges on the `init-project-prop` mechanism, so the relevant properties are already injected there.
* | | | Merge pull request #3123 from som-snytt/issue/7747-scrapcodes-fixAdriaan Moors2013-11-126-23/+417
|\ \ \ \ | | | | | | | | | | SI-7747 Support class based wrappers in REPL
| * | | | SI-7747 Support class based wrappers clean upSom Snytt2013-11-107-102/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplified the code paths to just use one of two `Wrapper` types for textual templating. Simplified the class-based template to use the same `$iw` name for the both the class and the wrapper value. In addition, the $read value is an object extending $read, instead of containing an extra instance field, which keeps paths to values the same for both templates. Both styles trigger loading the value object by referencing the value that immediately wraps the user code, although for the class style, inner vals are eager and it would suffice to load the enclosing `$read` object. The proposed template included extra vals for values imported from history, but this is not necessary since such an import is always a stable path. (Or, counter-example to test is welcome.) The test for t5148 is updated as a side effect. Probably internal APIs don't make good test subjects. Modify -Y option message.
| * | | | SI-7747 Support class based wrappers as alternative through switch ↵Prashant Sharma2013-11-107-14/+436
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -Yrepl-class-based Refactoring to reduce the number of if-else Fix test.
* | | | | Merge pull request #3113 from adriaanm/pr-rebase-3046Adriaan Moors2013-11-1214-101/+63
|\ \ \ \ \ | | | | | | | | | | | | Make parameters to implicit value classes private
| * | | | | Make parameters to implicit value classes privateJason Zaugg2013-11-1213-98/+38
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So that they aren't offered as an autocomplete suggestion: implicit class Shouty(string: String) extends AnyVal { def SHOUT_! = string.toUpperCase + "!" } "". // autocompletion offers `.string` here The original incarnation of value classes didn't allow this sort of encapsulation, so we either invented goofy names like `__thingToAdd` or just picked `x` or `self`. But SI-7859 has delivered us the freedom to keep the accessor private. Should we keep any of these accessors around in a deprecated form? The implicit classes in Predef were added in 2.11.0-M2 (c26a8db067e4f), so they are okay. I think we can make reason that these APIs were both accidental and unlikely to be interpreted as public, so we can break them immediately. scala> Left(1).x res0: scala.util.Either[Int,Int] = Left(1) scala> import concurrent.duration._ import concurrent.duration._ scala> 1.n res1: Int = 1
| * | | | Filter dependencies from partest and scalacheck.Adriaan Moors2013-11-111-3/+25
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | I previously messed this up in a24e7fa, which caused partest classpath again to include multiple version of scala-library and friends. We should really automate enforcing uniqueness of packages.
* | | | Merge pull request #3121 from rjfwhite/SI-7568James Iry2013-11-122-1/+33
|\ \ \ \ | | | | | | | | | | SI-7568 Adding Serializable to ResizableArrayAccess inner class
| * | | | SI-7568 Adding PriorityQueueTestrjfwhite2013-11-111-0/+32
| | | | |
| * | | | SI-7568 Adding Serializable to ResizableArrayAccess inner class of PriorityQueuerjfwhite2013-11-111-1/+1
| | |/ / | |/| |
* | | | Merge pull request #3111 from phaller/issue/7958James Iry2013-11-129-101/+105
|\ \ \ \ | |_|/ / |/| | | SI-7958 Deprecate methods `future` and `promise` in the `scala.concurren...
| * | | SI-7958 Deprecate methods `future` and `promise` in the `scala.concurrent` ↵Philipp Haller2013-11-129-101/+105
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | package object - The corresponding `apply` methods in the `Future` and `Promise` objects should be used instead. - Adjusted tests to use non-deprecated versions - Fixed doc comments not to use deprecated methods - Added comment about planned removal in 2.13.0
* | | Merge pull request #3114 from adriaanm/to-m6Adriaan Moors2013-11-113-37/+24
|\ \ \ | |/ / |/| | M6 modules, partest depends on scala as provided.
| * | M6 modules, partest depends on scala as provided.Adriaan Moors2013-11-113-37/+24
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new partest now marks its scala dependencies as provided. This is much more robust than before, and it breaks ugly cycles. Updated the build for partest-extras to provide the required scala-compiler dependency. Also, upgrade pax-url-aether to 1.6.0. Since our jenkins uses mirrors with passwords, we needed a fix for https://ops4j1.jira.com/browse/PAXURL-217 in order to run osgi.test on jenkins, now that we use maven more. We didn't hit this bug before because we were using a standard location for the maven local repository, but that causes problems with concurrent jenkins jobs accessing it. So, I added the following to `~/.m2/settings`, and then ran into the issue described above. Also removed some non-essential uses of the extra-repo (slows stuff down), and added a comment of how to make the osgi tests look in a certain local m2 repo (for /some/ operations...) ``` <!-- Maven repos are not safe for concurrent access, thus give each job its own. The WORKSPACE env var is set by jenkins to the path of the current job's workspace. This settings file will cause ant/maven to break if WORKSPACE is not set (to a writeable directory). I don't know how to encode a fall back, but I assume it's not needed as this is ~jenkins/.m2/settings.xml --> <localRepository>${WORKSPACE}/m2repo</localRepository> ```
* | Merge pull request #3115 from paulp/pr/antJason Zaugg2013-11-101-0/+1
|\ \ | | | | | | Add buildcharacter.properties to .gitignore.
| * | Add buildcharacter.properties to .gitignore.Paul Phillips2013-11-101-0/+1
|/ /
* | Merge pull request #3100 from som-snytt/paulp/reductionJason Zaugg2013-11-087-143/+188
|\ \ | | | | | | Paulper stack reduction
| * | Parser stack reduction peekingAheadSom Snytt2013-11-083-19/+38
| | | | | | | | | | | | | | | | | | | | | | | | Restores a form of the previous peekAhead bookkeeping. Instead of tracking the current token and offset outside of xxxAhead, peekingAhead uses `in.prev` and will push back if the operation results in an empty tree.
| * | Parser stack reduction discussionSom Snytt2013-11-086-26/+27
| | | | | | | | | | | | Check files
| * | Rewrites the parser stack reduction logic.Paul Phillips2013-11-084-137/+124
| | | | | | | | | | | | | | | | | | | | | Centralizes the scattered logic surrounding erroneous pattern syntax. Consolidates the redundant lookahead implementations. Eliminates var manipulation in favor of recursion.
| * | A value class for Precedence.Paul Phillips2013-11-081-0/+38
| | | | | | | | | | | | | | | One fewer Int to be whizzing around the parser hoping to be confused with other Ints.
* | | Merge pull request #3108 from adriaanm/faster-buildAdriaan Moors2013-11-082-175/+275
|\ \ \ | | | | | | | | Faster PR validation
| * | | IDE needs actors/swing/continuations publish for validation.Adriaan Moors2013-11-071-0/+8
| | | | | | | | | | | | | | | | | | | | As soon as they are also modularized, we can go back to only building/publishing the core (lib/reflect/compiler).