summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | Merge pull request #4694 from janekdb/2.11.x-READMEAdriaan Moors2015-08-311-35/+40
| |\ \ \ \ \ \ \ | | |_|_|/ / / / | |/| | | | | | Format and content enhance README.md
| | * | | | | | Format and content enhance README.mdJanek Bogucki2015-08-191-35/+40
| | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace bullet points with tables for - Review labels - Command overviews Rescue sbt section from midst of Ant section. Syntax correct use of ANT_OPTS. Synchronise IntelliJ menu path to 14.1. Update OSS repo name. The Central Repository was formerly known as Maven Central. Standardise on @-mention instead of @mention. Mark unfinished section with TODO. Include a few other minor improvements.
| * | | | | | Merge pull request #4707 from fthomas/topic/pins-linkLukas Rytz2015-08-281-2/+3
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | Add link to online version of Programming in Scala
| | * | | | | | Add link to online version of Programming in ScalaFrank S. Thomas2015-08-241-2/+3
| | | |_|_|/ / | | |/| | | |
| * | | | | | Merge pull request #4710 from retronym/ticket/9450Seth Tisue2015-08-273-3/+11
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-9450 Fix triple quoted strings in REPL :power mode
| | * | | | | | SI-9450 Fix triple quoted strings in REPL :power modeJason Zaugg2015-08-273-3/+11
| | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some extra synthetic code generated under this mode failed to escape input before adding it to a literal string. It used to get away with this most of the time by triple quoting the literal. This commit reuses Scala string escaping logic buried in `Constant` to do this properly. Actually, the proper approach would be to build the synthetic code with trees and quasiquotes, and avoid the mess of stringly-genererated code. I threw in some defensive hygiene for the reference to `Nil` while I was in the neighbourhood.
| * | | | | | Merge pull request #4703 from Ichoran/issue/8346Lukas Rytz2015-08-276-5/+124
| |\ \ \ \ \ \ | | |/ / / / / | |/| | | | | SI-8346 Re-established soundness of toSet (element type widening)
| | * | | | | SI-8346 Re-established soundness of toSet (element type widening)Rex Kerr2015-08-266-5/+124
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | toSet needs to rebuild some child classes, but not others, as toSet is allowed to widen element types (which the invariant Set normally cannot do), and some sets rely upon their invariance. Thus, sets that rely upon their invariance now rebuild themselves into a generic set upon toSet, while those that do not just sit there. Note: there was a similar patch previously that fixed the same problem, but this is a reimplementation to circumvent license issues. Note: the newBuilder method was benchmarked as (surprisingly!) the most efficient way to create small sets, so it is used where sets may need to be rebuild.
| * | | | | Merge pull request #4705 from mpociecha/fix-typos3Seth Tisue2015-08-2340-52/+52
| |\ \ \ \ \ | | |_|_|/ / | |/| | | | Fix typos in spec, docs and comments
| | * | | | Fix typo in the name of a private methodMichał Pociecha2015-08-231-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Since it's a private method, it's safe to just rename it.
| | * | | | Fix typos in spec, docs and commentsMichał Pociecha2015-08-2339-47/+47
| |/ / / /
| * | | | Merge pull request #4702 from janekdb/2.11.x-CONTRIBUTING-adviceAdriaan Moors2015-08-211-2/+2
| |\ \ \ \ | | | | | | | | | | | | Sync commit advice to README.md and fix Scabot URL
| | * | | | Sync commit advice to README.md and fix Scabot URLJanek Bogucki2015-08-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CONTRIBUTING.md offered different advice on commit subject line length to README.md. Align CONTRIBUTING to README. Fix Scabot repo URL
| * | | | | Merge pull request #4696 from janekdb/2.11.x-contributingSeth Tisue2015-08-201-0/+1
| |\| | | | | | |_|/ / | |/| | | Extend documentation contacts
| | * | | Extend documentation contactsJanek Bogucki2015-08-191-0/+1
| | |/ /
* | | | Merge pull request #4711 from lrytz/opt/heuristicsLukas Rytz2015-09-2239-903/+2406
|\ \ \ \ | | | | | | | | | | Inliner heuristic for higher-order methods
| * \ \ \ Merge remote-tracking branch 'upstream/2.12.x' into opt/heuristicsLukas Rytz2015-09-18146-984/+1440
| |\ \ \ \
| * | | | | Test inliner warnings for callsites not annotated @inlineLukas Rytz2015-09-181-2/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test that no warning is issued with the default flags when an inlining fails and the callee is not annotated @inline.
| * | | | | First version of inliningh heuristics that prefer higher-order methosLukas Rytz2015-09-184-5/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When invoking a higher-order method and the value passed for the SAM type is either a function literal or a parameter of the callsite method, inline the higher-order method into the callee. This is a first version, the heuristics will be refined further.
| * | | | | Emit exception handlers for inlined methods in the correct orderLukas Rytz2015-09-182-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handler tables are lists of tuples (try-start, try-end, handler-start, exception-type). When an instruction throws, the first handler in the list that covers the instruction and matches the type is executed. For nested handlers, it is the job of the compiler to add them to the handler table in the correct order. When inlining a method, the handlers of the callee are prepended to the list of handlers in the callsite method. This ensures that the callee's handlers are tested first if an exception is thrown in the inlined code.
| * | | | | Avoid running data flow analyses on very large methodsLukas Rytz2015-09-175-62/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Data flow analyses take a long time to converge (many seconds) when analyzing large methods. This commit prevents running analyses that would take too long. This means for example that callsites in very large methods are not added to the call graph and will therefore not be inlined.
| * | | | | Don't run unreachable code elimination when building the call graphLukas Rytz2015-09-173-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not necessary to run it for building the call graph. DCE will be run anyway later down the pipeline.
| * | | | | Run computeMaxLocalsMaxStack less oftenLukas Rytz2015-09-1716-109/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a cache to remember which methods have maxLocals and maxStack already computed. Before we were computing these values on every run of eliminateUnreachableCode. Also update the implementation of eliminateUnreachableCode to keep correct max values.
| * | | | | Minor fixes in the optimizerLukas Rytz2015-09-174-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the variable indices in the local variable table (debug info) for inlined locals. After re-writing a closure invocation to the body method, mark the callsite method as potentially having dead code. The body method may return Nothing$, creating new unreachable code in the callsite method.
| * | | | | Cleanups and performance fixes in Nullness analysisLukas Rytz2015-09-173-98/+89
| | | | | |
| * | | | | Improve the performance of analyses tracking aliasesLukas Rytz2015-09-174-115/+796
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Plenty of optimizations to make aliasing analysis faster. I cannot say how much faster: an analysis that used to not terminate now takes one second. The lessons are not new: - avoid boxing (of course) - avoid allocating in tight loops - use arrays, avoid hash sets / maps - specialize for common cases (see SmallBitSet in this commit) - avoid megamorphic calls - understand the details of the problem and find those twists that make it run faster More explanations in the code.
| * | | | | Remove stack values from aliasing set when being droppedLukas Rytz2015-09-171-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When entering an exception handler, all values are dropped from the stack (and the exception value is pushed). The ASM analyzer handles this by invoking `firstHandlerInstructionFrame.clearStack()`. To ensure consistent aliasing sets, we need to remove the dropped values from aliasing sets.
| * | | | | Avoid re-computing argInfos after inlining and closure optimizationLukas Rytz2015-09-174-49/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The call graph holds an argInfos field for every callsite, which contains additional information about the argument passed to the callee. For example, an argInfo specifies if the argument is a function literal or a parameter of the callsite method. Computing the argInfo requires running an ASM analyzer, which is not cheap. This change assembles the argInfos for callsites that are created or changed by the inliner / closure optimizer from the available information instead of just running the analyzer again.
| * | | | | In the call graph, rename higherOrderParams to samParamTypesLukas Rytz2015-09-175-33/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because that's what the field holds: the parameter types that are SAM types.
| * | | | | Reduce component nesting in backendLukas Rytz2015-09-178-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make InlinerHeuristics a backend component like the others, instead of nested within the Inliner component.
| * | | | | Revert workaround for SI-8334Lukas Rytz2015-09-175-25/+29
| | | | | | | | | | | | | | | | | | | | | | | | The new optimizer doesn't have this problem.
| * | | | | Tone down inliner warnings for callsites not annotated @inlineLukas Rytz2015-09-172-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, with `-Yopt-warnings:at-inline-failed` or with the default options, the inliner would emit inline warnings for failed attempts of callsites that are not annotated @inline. A test for this change follows in a later commit, after enabling the new inliner heuristic for higher-order methods.
| * | | | | Store information about function literals in call graphLukas Rytz2015-09-175-41/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remember in the call graph if a function literal is passed as an argument to a higher-order function.
| * | | | | Include information about higher-order methods in the call graphLukas Rytz2015-08-285-120/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For higher order methods, the call graph contains a map from parameter positions to SAM types.
| * | | | | Ensure the call graph contains all inlined callsitesLukas Rytz2015-08-282-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After inlining, inlined callsites are added to the call graph. For efficiency, the callsites of the callee are copied and adapted (the alternative would be to re-add the entire method to the call graph, which involves running data flow analyses). If the callee is in a class parsed from bytecode (vs a class being compiled), it might not yet be in the call graph. This commit ensures that the method is added to the call graph before looking for its callsites.
| * | | | | Inline post-inlining requestsLukas Rytz2015-08-282-182/+258
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Inline requests have a list of post-inline requests: callsites within the inlined method that should be inlined into the initial callee. This commit changes the inliner to actually perform post-inline requests.
| * | | | | Fix maxStack after inliningLukas Rytz2015-08-282-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The computed value was too large previously: inlining stores receiver and argument values of the inlined method into locals. A too large value doesn't cause any bugs, but data flow analyses would allocate too large frames. The test (InlinerTest.maxLocalsMaxStackAfterInline) didn't catch the bug because it tested the methods of the wrong ClassNode. The CodeGenTools.compileClasses method returns a ClassNode that is created from the classfile byte array emitted by the compiler. This ClassNode is a new object and unrelated to the ClassNode used in the compiler backend. The test now takes the correct ClassNode from the hash map in the backend's byteCodeRepository.
| * | | | | Make sure to inline only callsites in classes being compiledLukas Rytz2015-08-271-29/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid producing inline requests for callsites in classes on the classpath.
| * | | | | Introduce a type for inline requestsLukas Rytz2015-08-272-58/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An inline request contains a callsite and a list of post-inlining requests. A post-inlining request asks to inline an invocation that is copied from the callee into the callsite method while inlining the initial callsite. Post-inlining requests are still ignored for now.
| * | | | | move current inliner heuristic to the InlinerHeuristics classLukas Rytz2015-08-272-47/+50
| | | | | |
| * | | | | Store SAM information in ClassBTypesLukas Rytz2015-08-279-23/+255
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a class (trait) is a SAM type, store the name and descriptor of the SAM in the ClassBType's InlineInfo.
| * | | | | Separate hash maps in the code repo for classes being compiled or notLukas Rytz2015-08-186-24/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Store classes being compiled in a separate hash map. This allows efficiently traversing all classes being compiled. It also simplifies limiting the size of the cache of class nodes parsed from classfiles. Also change the cache of class nodes parsed from classfiles to LRU instead of FIFO.
| * | | | | Move call graph and code repo building to the same placeLukas Rytz2015-08-183-13/+14
| | | | | |
| * | | | | Group call graph by methodLukas Rytz2015-08-175-121/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the hash maps in the call graph to index callsites and closure instantiations by the containing method. This is beneficial for implementing inliner heuristics and the closure optimizer.
| * | | | | minor clenaupsLukas Rytz2015-08-145-13/+19
| | | | | |
* | | | | | Merge pull request #4749 from retronym/ticket/9473Lukas Rytz2015-09-2220-75/+138
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-9473 Cleaner references to statically owned symbols
| * | | | | | SI-9473 Cleaner references to statically owned symbolsJason Zaugg2015-09-2220-75/+138
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ever wonder why `identity("")` typechecks to `scala.this.Predef.identity("")`? It turns out that `mkAttributedRef` was importing `q"$scalaPackageClass.this.Predef._"` for all these years, rather than `q"$scalaModule.Predef._"`. This commit makes `mkAttributedRef` special case static owners by referring the the corresponding module, instead.
* | | | | | Merge pull request #4734 from soc/SI-9081Lukas Rytz2015-09-211-5/+10
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-9081 Deprecate public implementation details in TrieMap
| * | | | | | SI-9081 Deprecate public implementation details in TrieMapSimon Ochsenreither2015-09-091-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I added the intended future visibility levels which I used to test these changes in comments for clarity.
* | | | | | | Merge pull request #4745 from sschaef/update-eclipse-build-filesLukas Rytz2015-09-2110-52/+31
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Update eclipse build files