summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | Avoid tree sharing with substituteThisJason Zaugg2016-05-313-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The underlying transformer has a by-name parameter for the to provide the `to` tree, but this was strict in the layers of API above. Tree sharing is frowned upon in general as it leads to cross talk when, e.g., the erasure typechecker mutates the `tpe` field of the shared tree in different context.
* | | | | Merge pull request #5209 from adriaanm/trait-no-native-methLukas Rytz2016-06-034-13/+32
|\ \ \ \ \ | |_|/ / / |/| | | | Prohibit @native method in trait
| * | | | Prohibit @native method in traitAdriaan Moors2016-06-024-13/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the JVM, a @native interface method results in a VerifyError. Other platforms could decide to be more permissive, but it seems like allowing them in classes is enough.
* | | | | Merge pull request #5147 from som-snytt/issue/8667-too-many-argsAdriaan Moors2016-06-0215-50/+219
|\ \ \ \ \ | | | | | | | | | | | | SI-8667 Improve too-many-args message
| * | | | | SI-8667 Caret at bad argSom Snytt2016-05-1315-55/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pick the first excessive positional arg for the caret. Note that erroring on named args doesn't do the obvious thing in this regard. If `k` was removed from the signature, then `f(k=1, i=2, j=3)` doesn't tell us much about the wrong arg, because naming takes the `k=1` as an assignment, `i` as duplicate naming. No arg is deemed extra, though further inspection of the conflicting args might get there. Since assignment syntax in parens is more|less deprecated (?), no more effort is done here.
| * | | | | SI-8667 Improve too-many-args messageSom Snytt2016-05-1315-27/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use removeNames to help diagnose the application. Supplement the error message with how many extra args and any other residual assignments that the user might have thought was a properly named arg. The error message is gradual: succinct for short arg lists, more verbose for longer applications. Very long arg lists are probably generated, so that message is the least colloquial.
* | | | | | Merge pull request #5197 from som-snytt/issue/9104-rawAdriaan Moors2016-06-0210-24/+117
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | SI-9104 Autodetect raw pastage
| * | | | | SI-9104 Autodetect raw pastageSom Snytt2016-06-0210-24/+117
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If `-raw` is not supplied explicitly to REPL `:paste`, see if the code text starts with `package` keyword or else see if it parses to a named package (to cope with leading commentary). In that case, take it as raw. But parse only on suspect comment slash. It's only worth parsing for a package if there's a chance that package keyword is buried behind comments. Small refactors to the `paste` object.
* | | | | Merge pull request #5205 from adriaanm/misc-optAdriaan Moors2016-06-026-51/+56
|\ \ \ \ \ | | | | | | | | | | | | Small optimizations around use of Scopes.
| * | | | | Compute constrParamAccessors once. It's expensiveAdriaan Moors2016-06-011-22/+26
| | | | | |
| * | | | | opt: fuse some operations on `Scope`sAdriaan Moors2016-06-016-29/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `Scope`'s `filter` is implemented using `toList`, so may as well start with `toList`ourselves. Also fused some `filter`/`foreach` combos.
* | | | | | Merge pull request #5207 from lrytz/nan-compareAdriaan Moors2016-06-024-17/+52
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix comparisons involving NaN
| * | | | | | Fix comparisons involving NaNLukas Rytz2016-06-024-17/+52
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | Floating point comparisons involving NaN should always return false, except for !=. Fixes a regression introduced by #4963.
* | | | | | Merge pull request #5203 from lrytz/merge-2.11-to-2.12-june-1Lukas Rytz2016-06-0239-140/+1104
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Merge 2.11 to 2.12 [ci: last-only]
| * | | | | scala version in benchmark projectLukas Rytz2016-06-021-1/+1
| | | | | |
| * | | | | Merge commit '90215ce' into merge-2.11-to-2.12-june-1Lukas Rytz2016-06-0115-171/+541
| |\ \ \ \ \ | | | |_|/ / | | |/| | |
| | * | | | Merge pull request #4998 from som-snytt/issue/7898-iLukas Rytz2016-06-0110-78/+285
| | |\ \ \ \ | | | | | | | | | | | | | | SI-7898 Read user input during REPL warmup
| | | * | | | SI-7898 Label for parsing -i sourcesLukas Rytz2016-05-244-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Text-based REPL pre-parses, so use the current label for errors.
| | | * | | | SI-7898 Report paste errors improvedlySom Snytt2016-05-233-19/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a "label" for errors, so that script names are shown. Position is still wrong for scripts in REPL. Initial scripts are run with `ILoop.echo` and results printing turned off, but reporter still enabled.
| | | * | | | SI-7898 Quiet REPL at startupSom Snytt2016-05-221-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable noisy modes only when interpreting user input.
| | | * | | | SI-7898 Read user input during REPL warmupSom Snytt2016-05-205-60/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The compiler is created on main thread and user input is read on an aux thread (opposite to currently). Fixes completion when `-i` is supplied. Now `-i` means pasted and new option `-I` means line-by-line. The temporary reader uses postInit to swap in the underlying reader. Completion is disabled for the temporary reader, rather than blocking while it waits for a compiler. But manically hitting tab is one way of knowing exactly when completion is live.
| | * | | | | Merge pull request #5183 from performantdata/bug/SI-9789Lukas Rytz2016-05-305-94/+257
| | |\ \ \ \ \ | | | |_|_|_|/ | | |/| | | | SI-9789 use quadratic probing in OpenHashMap
| | | * | | | SI-9789 use quadratic probing in OpenHashMapPerformant Data LLC2016-05-265-94/+257
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original probe sequence, taken from Python's hash table code, is exponential, jumping around in the hash table with poor memory locality. This replaces the probe algorithm with the more conventional quadratic probing. This also adds tests to the benchmarking code using AnyRef keys, which have pseudorandom hash codes (unlike Ints, whose hash code is simply the Int itself). The intensity of the benchmarking is reduced to make the tests complete within 9 hours, by removing unnecessary sampling.
| * | | | | Merge commit '139f6bf' into merge-2.11-to-2.12-june-1Lukas Rytz2016-06-013-4/+28
| |\| | | |
| | * | | | Merge pull request #4959 from rjolly/scripting15Stefan Zeiger2016-05-255-12/+32
| | |\ \ \ \ | | | | | | | | | | | | | | Use jarlister in build
| | | * | | | Jarlist scala-library in build.sbtRaphael Jolly2016-05-212-3/+15
| | | | | | |
| | | * | | | Use jarlister in buildRaphael Jolly2016-05-213-9/+17
| | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The goal of this change is to exercize the "manifest classpath" mechanism, meant to bring the compiler its needed classes as resources, listed in jar manifests, as opposed to files, thus enabling to use the compiler in sandboxed environments (and also the scripting engine for that matter).
| * | | | | Merge commit 'cba585d' into merge-2.11-to-2.12-june-1Lukas Rytz2016-06-0118-44/+568
| |\| | | |
| | * | | | Merge pull request #5061 from performantdata/benchmark-frameworkJason Zaugg2016-05-257-0/+457
| | |\ \ \ \ | | | | | | | | | | | | | | JMH-based benchmark framework
| | | * | | | Enable full compiler optimizations in JMH benchmarking.Performant Data LLC2016-05-051-1/+1
| | | | | | |
| | | * | | | Address JMH benchmark reviewer's issues.Performant Data LLC2016-05-033-59/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Besides tweaks to the documentation, this tests smaller (25-element) maps, and rewrites OpenHashMapRunner in more idiomatic Scala.
| | | * | | | Improve the OpenHashMapBenchmark run times.Performant Data LLC2016-05-031-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the warm-up invocations, suppress setup and teardown that is only needed for the measurement iterations. Reduce the number of forks.
| | | * | | | Add a JMH runner class to the library benchmark framework.Performant Data LLC2016-05-033-9/+167
| | | | | | |
| | | * | | | Benchmark the OpenHashMap memory usage.Performant Data LLC2016-05-034-11/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also add sbteclipse to the benchmark project.
| | | * | | | Add get() tests to OpenHashMap, reduce timing artifacts.Performant Data LLC2016-05-031-35/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to get a better exploration of the variance of tests in a limited time, I've reduced the number of measurement iterations and increased the number of forks. By sight, the measurement iterations seemed pretty consistent within a trial, whereas they would vary widely on occasional forks. I extended testing down to 50-entry maps, to explore the rise in service times that I was seeing at small scale. This is probably a timing artifact, from too-short invocations, since I'm using @Level.Invocation in the put() tests. To fix that, I enlarged the unit of testing, by creating multiple, sometimes thousands, of maps for the invocation to fill. This has also changed the test from filling a previously-filled map, to filling a new, but sufficiently sized map. The put()/remove() test now performs much worse (on a more realistic scenario). This also adds a couple tests for calling get() against a map that's been filled only with put()s, or with a mix of put() and remove().
| | | * | | | Add a reference to Doug Lea's benchmarks.Performant Data LLC2016-05-031-1/+2
| | | | | | |
| | | * | | | Add JMH to the benchmark framework.Performant Data LLC2016-05-035-0/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an example benchmark for OpenHashMap.
| | * | | | | Merge pull request #5169 from som-snytt/issue/4625Lukas Rytz2016-05-2311-44/+111
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | SI-4625 Recognize App in script
| | | * | | | | SI-4625 Warn on first non-toplevel onlySom Snytt2016-05-172-42/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed the warning when main module is accompanied by snippets. Minor clean-up so even I can follow what is returned.
| | | * | | | | SI-4625 Warn when discarding script objectSom Snytt2016-05-174-4/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's pretty confusing when your script object becomes a local and then nothing happens. Such as when you're writing a test and it takes forever to figure out what's going on.
| | | * | | | | SI-4625 Permit arbitrary top-level in scriptSom Snytt2016-05-164-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In an unwrapped script, where a `main` entry point is discovered in a top-level object, retain all top-level classes. Everything winds up in the default package.
| | | * | | | | SI-4625 App is a thingSom Snytt2016-05-162-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Scripting knows it by name.
| | | * | | | | SI-4625 Recognize App in scriptSom Snytt2016-05-164-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cheap name test: if the script object extends "App", take it for a main-bearing parent. Note that if `-Xscript` is not `Main`, the default, then the source is taken as a snippet and there is no attempt to locate an existing `main` method.
| * | | | | | | Merge commit 'f640fa0' into merge-2.11-to-2.12-june-1Lukas Rytz2016-06-010-0/+0
| |\| | | | | |
| | * | | | | | Merge pull request #5167 from martijnhoekstra/SI-9766Lukas Rytz2016-05-232-1/+20
| | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI 9766 - allow ++ on empty ConcatIterator
| | | * | | | | | SI-9766 - allow ++ on empty ConcatIteratorMartijn Hoekstra2016-05-212-1/+20
| | | |/ / / / /
| * | | | | | | Merge commit '4196569' into merge-2.11-to-2.12-june-1Lukas Rytz2016-06-012-1/+49
| |\| | | | | |
| | * | | | | | SI-9688 Make merge in immutable HashMap1 work with null kv.Łukasz Gieroń2016-05-232-1/+49
| | | |_|/ / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The kv field of scala.collection.immutable.HashMap.HashMap1 can be null. This commit corrects the behavior of updated0 (which is on call path for merged) to work in such cases, instead of throwing NPE. Commit contains regression test.
| * | | | | | Merge commit '0d0671a' into merge-2.11-to-2.12-june-1Lukas Rytz2016-06-010-0/+0
| |\| | | | |
| | * | | | | Merge pull request #5178 from lrytz/readme211Adriaan Moors2016-05-203-185/+296
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | [backport] identical readme in 2.11.x as in 2.12.x