summaryrefslogtreecommitdiff
path: root/src/manual/scala/man1
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo in scalac, scalap man pagesMohit Agarwal2016-11-132-2/+2
| | | | s/exist status/exit status/
* Typo and spelling correctionsJanek Bogucki2016-11-111-1/+1
|
* expunge a stray reference to sbaz in the Scala man pageSeth Tisue2016-09-261-5/+2
| | | | and fix a typo while we're at it
* Fields does bitmaps & synch for lazy vals & modulesAdriaan Moors2016-08-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Essentially, we fuse mixin and lazyvals into the fields phase. With fields mixing in trait members into subclasses, we have all info needed to compute bitmaps, and thus we can synthesize the synchronisation logic as well. By doing this before erasure we get better signatures, and before specialized means specialized lazy vals work now. Mixins is now almost reduced to its essence: implementing super accessors and forwarders. It still synthesizes accessors for param accessors and early init trait vals. Concretely, trait lazy vals are mixed into subclasses with the needed synchronization logic in place, as do lazy vals in classes and methods. Similarly, modules are initialized using double checked locking. Since the code to initialize a module is short, we do not emit compute methods for modules (anymore). For simplicity, local lazy vals do not get a compute method either. The strange corner case of constant-typed final lazy vals is resolved in favor of laziness, by no longer assigning a constant type to a lazy val (see widenIfNecessary in namers). If you explicitly ask for something lazy, you get laziness; with the constant-typedness implicit, it yields to the conflicting `lazy` modifier because it is explicit. Co-Authored-By: Lukas Rytz <lukas@lightbend.com> Fixes scala/scala-dev#133 Inspired by dotc, desugar a local `lazy val x = rhs` into ``` val x$lzy = new scala.runtime.LazyInt() def x(): Int = { x$lzy.synchronized { if (!x$lzy.initialized) { x$lzy.initialized = true x$lzy.value = rhs } x$lzy.value } } ``` Note that the 2.11 decoding (into a local variable and a bitmap) also creates boxes for local lazy vals, in fact two for each lazy val: ``` def f = { lazy val x = 0 x } ``` desugars to ``` public int f() { IntRef x$lzy = IntRef.zero(); VolatileByteRef bitmap$0 = VolatileByteRef.create((byte)0); return this.x$1(x$lzy, bitmap$0); } private final int x$lzycompute$1(IntRef x$lzy$1, VolatileByteRef bitmap$0$1) { C c = this; synchronized (c) { if ((byte)(bitmap$0$1.elem & 1) == 0) { x$lzy$1.elem = 0; bitmap$0$1.elem = (byte)(bitmap$0$1.elem | 1); } return x$lzy$1.elem; } } private final int x$1(IntRef x$lzy$1, VolatileByteRef bitmap$0$1) { return (byte)(bitmap$0$1.elem & 1) == 0 ? this.x$lzycompute$1(x$lzy$1, bitmap$0$1) : x$lzy$1.elem; } ``` An additional problem with the above encoding is that the `lzycompute` method synchronizes on `this`. In connection with the new lambda encoding that no longer generates anonymous classes, captured lazy vals no longer synchronize on the lambda object. The new encoding solves this problem (scala/scala-dev#133) by synchronizing on the lazy holder. Currently, we don't exploit the fact that the initialized field is `@volatile`, because it's not clear the performance is needed for local lazy vals (as they are not contended, and as soon as the VM warms up, biased locking should deal with that) Note, be very very careful when moving to double-checked locking, as this needs a different variation than the one we use for class-member lazy vals. A read of a volatile field of a class does not necessarily impart any knowledge about a "subsequent" read of another non-volatile field of the same object. A pair of volatile reads and write can be used to implement a lock, but it's not clear if the complexity is worth an unproven performance gain. (Once the performance gain is proven, let's change the encoding.) - don't explicitly init bitmap in bytecode - must apply method to () explicitly after uncurry
* Merge 2.11.x into 2.12.xAdriaan Moors2016-03-141-25/+26
|\ | | | | | | Resolved conflicts as in b0e05b67c7
| * Document -Xxml:coalescing in scalac man pageJanek Bogucki2016-03-031-25/+26
| | | | | | | | The formatting style is based on -g and -target.
* | Merge remote-tracking branch 'origin/2.11.x' into ↵Jason Zaugg2016-02-253-15/+12
|\| | | | | | | | | | | | | | | | | | | | | merge/2.11.x-to-2.12.x-20160225 Conflicts: scripts/jobs/integrate/bootstrap src/build/maven/scala-actors-pom.xml test/files/pos/t3420.flags Conflicts were trivial to resolve.
| * Remove GIJ memory configuration advice from fsc, scala and scalac man pages.Janek Bogucki2016-02-203-15/+3
| | | | | | | | | | | | | | GIJ is uncommonly used so general guidance on setting memory configuration in the fsc, scala and scalac man pages would only be of use to a highly select group of individuals. For 99.99999999999999% of users this info would be an historical curio at best and random noise at worst.
| * Document when the `scala` command starts/uses a compilation daemonStefan Zeiger2016-02-011-0/+9
| |
* | Merge commit 'a170c99' into 2.12.xLukas Rytz2015-09-221-1/+1
|\|
| * Improve drifted URLsJanek Bogucki2015-09-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Any.scala: Link to the guide instead of the SIP. - AnyVal.scala: Remove SIP link and align guide link to Any.scala. - Commands.scala: Use a less out of date team link. - Logic.scala: Link was broken. Substitute found. - Process.scala: Links were 403 & 404. Fixed as this is a code sample. - TypeMaps.scala: Move old EPFL Trac to JIRA. - RedBlackTree.scala: Replaced broken link with substitutes based on site maintainer input [1]. [1] When asked where Data-Set-RBTree.html had gone Don@UNSW advised "I think it's on the Haskell wiki now. It was Chris Okazaki's version". The closest I could find to what this document probably was is this paper by Hinze edited by Okasaki, http://www.cs.ox.ac.uk/ralf.hinze/publications/WAAAPL99b.ps.gz The paper cites the Okasaki document so I included a link to that as well. The Haskell Wiki does have a link to a RB document but that's broken too, https://wiki.haskell.org/Research_papers/Data_structures > Constructing red-black trees
| * Document -target:jvm-1.8 in the man pageJason Zaugg2015-05-201-2/+3
| | | | | | | | We neglected to do this earlier.
* | Require and target Java 8Jason Zaugg2015-05-261-4/+2
|/ | | | | | | | | | | | | | | - Require Java 8 in ant build - use -source 1.8 and -target 1.8 for javac - Default scalac's -target to `jvm-1.8`, ignore and deprecate attempts to use `jvm-1.{6.7}` - Remove fragile javap-app test. The feature itself is slated for removal. - Remove obsolete Java6 checkfile - Adapt DCE tests - Remove deprecated/redundant -target:jvm-1.6 from flags where the intent was to trigger generation of stack map frames. - Remove tests with -target:jvm-1.5 that tested without stack map frames - Ignore OpenJDK JVM warnings (via test/[files|scaladoc]/filters).
* Fix many typos in docs and commentsmpociecha2014-12-142-2/+2
| | | | | | | | | | | | | This commit corrects many typos found in scaladocs, comments and documentation. It should reduce a bit number of PRs which fix one typo. There are no changes in the 'real' code except one corrected name of a JUnit test method and some error messages in exceptions. In the case of typos in other method or field names etc., I just skipped them. Obviously this commit doesn't fix all existing typos. I just generated in IntelliJ the list of potential typos and looked through it quickly.
* Merge pull request #3443 from gourlaysama/man-pagesAdriaan Moors2014-02-151-0/+3
|\ | | | | add -Xsource:version to scalac man page
| * add -Xsource:version to scalac man pageAntoine Gourlay2014-01-311-0/+3
| | | | | | | | The flag was added in d43618a (PR #3340) by @huitseeker.
* | SI-7711 Do not emit extra argv in script bodySom Snytt2014-02-141-3/+3
|/ | | | | | | | | | | | | | | Take away `argv` and make `args` the standard parameter name. This is a quick fix to avoid "unused local" lint error. All the examples use `args`; in particular, "Step 4. Write some Scala scripts" in "Programming in Scala" uses `args`. I see the footnote there is also where Odersky concatenation is specified, `"Hello, "+ args(0) +"!"` with no space next to the literals. Also removes `argv` from `StdNames`. Was torn whether just to add `argc`. Maybe start a new project to house Names, emeritus.
* Update man pages for scala and scalac.Antoine Gourlay2014-01-082-55/+136
| | | | | They had fallen quite a bit behind the output of "scalac -X" and "scalac -Xshow-phases".
* Fix a typo in the `scala` man pageTrent Ogren2013-11-181-1/+1
|
* Merge branch '2.10.x'Adriaan Moors2013-01-161-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/compiler/scala/tools/nsc/doc/Settings.scala src/compiler/scala/tools/nsc/interpreter/CompletionOutput.scala src/compiler/scala/tools/nsc/matching/Patterns.scala src/compiler/scala/tools/nsc/transform/UnCurry.scala src/compiler/scala/tools/nsc/typechecker/Infer.scala src/compiler/scala/tools/nsc/typechecker/PatternMatching.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala src/reflect/scala/reflect/internal/settings/MutableSettings.scala src/reflect/scala/reflect/runtime/Settings.scala src/swing/scala/swing/SwingActor.scala src/swing/scala/swing/SwingWorker.scala test/files/run/t6955.scala
| * SI-6803: do not use java.net.URI, even more so incorrectly.Eugene Vigdorchik2013-01-061-2/+2
| |
* | Expunged the .net backend.Paul Phillips2012-12-051-24/+0
|/ | | | | | | | It lives on in a branch born from this commit's parent. It's abrupt; no attempt is made to offer a "smooth transition" for the serious msil userbase, population zero. If anyone feels very strongly that such a transition is necessary, I will be happy to talk you into feeling differently.
* Merge branch '2.10.0-wip' into merge-2.10.0Josh Suereth2012-11-056-6/+6
|\
| * Brings all copyrights (in comments) up-to-date, from 2011/12 to 2013Heather Miller2012-11-026-6/+6
| |
* | Scaladoc knows the package structure of the libraries,Eugene Vigdorchik2012-10-111-1/+4
|/ | | | so don't include them in external documentation setting.
* update and normalize copyright noticeAdriaan Moors2012-08-076-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are the regexp replacements performed: Sxcala -> Scala Copyright (\d*) LAMP/EPFL -> Copyright $1-2012 LAMP/EPFL Copyright (\d*)-(\d*)(,?) LAMP/EPFL -> Copyright $1-2012 LAMP/EPFL Copyright (\d*)-(\d*) Scala Solutions and LAMP/EPFL -> Copyright $1-2012 Scala Solutions and LAMP/EPFL \(C\) (\d*)-(\d*) LAMP/EPFL -> (C) $1-2012 LAMP/EPFL Copyright \(c\) (\d*)-(\d*)(.*?)EPFL -> Copyright (c) $1-2012$3EPFL The last one was needed for two HTML-ified copyright notices. Here's the summarized diff: Created using ``` git diff -w | grep ^- | sort | uniq | mate git diff -w | grep ^+ | sort | uniq | mate ``` ``` - <div id="footer">Scala programming documentation. Copyright (c) 2003-2011 <a href="http://www.epfl.ch" target="_top">EPFL</a>, with contributions from <a href="http://typesafe.com" target="_top">Typesafe</a>.</div> - copyright.string=Copyright 2002-2011, LAMP/EPFL - <meta name="Copyright" content="(C) 2002-2011 LAMP/EPFL"/> - * Copyright 2002-2011 LAMP/EPFL - * Copyright 2004-2011 LAMP/EPFL - * Copyright 2005 LAMP/EPFL - * Copyright 2005-2011 LAMP/EPFL - * Copyright 2006-2011 LAMP/EPFL - * Copyright 2007 LAMP/EPFL - * Copyright 2007-2011 LAMP/EPFL - * Copyright 2009-2011 Scala Solutions and LAMP/EPFL - * Copyright 2009-2011 Scxala Solutions and LAMP/EPFL - * Copyright 2010-2011 LAMP/EPFL - * Copyright 2012 LAMP/EPFL -# Copyright 2002-2011, LAMP/EPFL -* Copyright 2005-2011 LAMP/EPFL -/* NSC -- new Scala compiler -- Copyright 2007-2011 LAMP/EPFL */ -rem # Copyright 2002-2011, LAMP/EPFL ``` ``` + <div id="footer">Scala programming documentation. Copyright (c) 2003-2012 <a href="http://www.epfl.ch" target="_top">EPFL</a>, with contributions from <a href="http://typesafe.com" target="_top">Typesafe</a>.</div> + copyright.string=Copyright 2002-2012 LAMP/EPFL + <meta name="Copyright" content="(C) 2002-2012 LAMP/EPFL"/> + * Copyright 2002-2012 LAMP/EPFL + * Copyright 2004-2012 LAMP/EPFL + * Copyright 2005-2012 LAMP/EPFL + * Copyright 2006-2012 LAMP/EPFL + * Copyright 2007-2012 LAMP/EPFL + * Copyright 2009-2012 Scala Solutions and LAMP/EPFL + * Copyright 2010-2012 LAMP/EPFL + * Copyright 2011-2012 LAMP/EPFL +# Copyright 2002-2012 LAMP/EPFL +* Copyright 2005-2012 LAMP/EPFL +/* NSC -- new Scala compiler -- Copyright 2007-2012 LAMP/EPFL */ +rem # Copyright 2002-2012 LAMP/EPFL ```
* Remove sbaz and references from master repository.Josh Suereth2012-03-276-217/+5
|
* updated man pages, fixed svn props, did some cl...michelou2011-09-257-100/+200
| | | | | updated man pages, fixed svn props, did some cleanup
* Minor fixes to Scaladoc man page.Kato Kazuyoshi2011-07-061-2/+2
|
* We migrated the Scala wiki from Trac to Conflue...Kato Kazuyoshi2011-06-121-1/+1
| | | | | We migrated the Scala wiki from Trac to Confluence. Review by rytz.
* We rename Trac and start using JIRA as the issu...Kato Kazuyoshi2011-06-122-2/+2
| | | | | We rename Trac and start using JIRA as the issue tracking system.
* Updated copyright notices to 2011Antonio Cunei2011-01-206-6/+6
|
* Unreverting r23174. No review.Paul Phillips2010-10-061-3/+0
|
* Reverts r23174, which I believe will bring the ...Paul Phillips2010-10-041-0/+3
| | | | | | Reverts r23174, which I believe will bring the build back to life. It only chokes under -optimise. No review.
* Work on the pattern matcher.Paul Phillips2010-10-031-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | patches for #3887 and #3888, but I determined that I could achieve the same effect by deleting a bunch of code, so I did. This left only a few lines in TransMatch, so I eliminated it, which led me to remember that many places still reference non-existent phase transmatch, so those were updated. Notes: * This swaps equality tests on stable identifier patterns. They have never conformed to the spec (as noted long ago in ticket #785) which says "The pattern matches any value v such that r == v" whereas until now the test being performed was v == r. * An issue was introduced with specialization in that the implementation of "isTupleType" in Definitions relied upon sym == TupleClass(elems.length). This test is untrue for specialized tuples, causing mysterious behavior because only some tuples are specialized. There is now "isTupleTypeOrSubtype" although it seems likely the former implementation is unnecessary. The issue is sidestepped if one uses "getProductArgs" to retrieve the element types because it sifts through the base types for the Product symbol. Closes #3887 and #3888, review by dmharrah.
* Little type in documentation; closes #3386.Antonio Cunei2010-09-161-1/+1
|
* [scaladoc] Fixed typo in Scaladoc man page (tha...Gilles Dubochet2010-06-031-9/+12
| | | | | | [scaladoc] Fixed typo in Scaladoc man page (thanks Stéphane). No review.
* [scaladoc] Updated man page for Scaladoc 2.Gilles Dubochet2010-06-021-61/+66
|
* Removed more than 3400 svn '$Id' keywords and r...Antonio Cunei2010-05-127-7/+0
| | | | | Removed more than 3400 svn '$Id' keywords and related junk.
* Updated copyright notices to 2010Antonio Cunei2009-12-077-7/+7
|
* Riffing off the removal of the cldc library, re...Paul Phillips2009-05-291-1/+1
| | | | | | Riffing off the removal of the cldc library, removed forCLDC and its special cases. Not as much fun as removing inIDE, but still fun.
* 1.4-related cleanup and reorganization.Antonio Cunei2009-05-151-1/+1
| | | | | | | Removed a bunch of now useless 1.4 code, merged back jvm5-specific partest tests into the general jvm tests, documentation updates.
* map page updatedilyas2009-02-101-3/+3
| | | | | scalap flags adjusted according to man page
* added build scripts for scalapLukas Rytz2009-02-096-5/+119
|
* Updated (all) copyright notices to 2009Antonio Cunei2009-01-135-5/+5
|
* Updated copyright notices to 2009Antonio Cunei2009-01-091-1/+1
|
* fix for #1603Lukas Rytz2009-01-051-1/+1
|
* applied fix for #1206Lukas Rytz2008-09-041-7/+7
|
* fixing urllorch2008-09-011-1/+1
|
* removed scalap man pageLukas Rytz2008-08-226-119/+5
|