| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
That's a lot of unused code. Most of this is pure cruft; a small
amount is debugging code which somebody might want to keep around,
but we should not be using trunk as a repository of our personal
snippets of undocumented, unused, unintegrated debugging code. So
let's make the easy decision to err in the removing direction.
If it isn't built to last, it shouldn't be checked into master.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ASM ClassWriter uses a wimpy class loader when computing common
superclasses. This could cause a ClassNotFoundException in the
transform method (at reader.accept). This exception gets swallowed,
resulting in a class that should be instrumented to silently not
be. The fix is to override getCommonSuperClass to use the correct
class loader.
Trivia: This bug was discovered while 'stress-testing' this
instrumentation scheme on the Coursera students, to check that they
implement one method in terms of another in the assignment.
|
|\ |
|
| |
| |
| |
| |
| | |
And also explicitly specifies -d in a test where I forgot to do that.
Double checking never hurts.
|
| |
| |
| |
| |
| |
| |
| |
| | |
This is the most blatant leak in reflection. There are others, but their impact
is much smaller, therefore we'll fix them later, after 2.10.0-final.
For more information, see https://issues.scala-lang.org/browse/SI-6412 and
http://groups.google.com/group/scala-internals/browse_thread/thread/eabcf3d406dab8b2
|
| | |
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 2.10.x: (36 commits)
Normalized line endings.
New .gitattributes file.
Disabled failing build manager tests.
New test case for SI-6337
New test case for closing SI-6385
Value classes: eliminated half-boxing
Cleanup of OverridingPairs
Fixes SI-6260
Use faster download URL now that artifactory is fixed.
don't try to create tags w/o scala-reflect.jar
some small remaining fixes
SI-5943 toolboxes now autoimport Predef and scala
Fix for loud test.
SI-6363 deploys the updated starr
SI-6363 removes scala.reflect.base
SI-6392 wraps non-terms before typecheck/eval
SI-6394 fixes macros.Context.enclosingClass
Error message improvement for SI-6336.
Adjustments to scala.concurrent.duration.
prepping for the refactoring
...
Conflicts:
src/actors-migration/scala/actors/Pattern.scala
src/compiler/scala/tools/nsc/Global.scala
src/compiler/scala/tools/nsc/transform/Erasure.scala
src/compiler/scala/tools/nsc/typechecker/Typers.scala
src/library/scala/collection/immutable/Vector.scala
test/files/jvm/actmig-PinS_1.scala
test/files/jvm/actmig-PinS_2.scala
test/files/jvm/actmig-PinS_3.scala
test/files/jvm/actmig-public-methods_1.scala
|
| |
| |
| |
| |
| | |
As the experience has shown, there's no need for a separate layer of reflection
in scala-library.jar. Therefore I'm putting an end to it.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Reification (both tree-based and type-based) should be avoided
before we release 2.10.0-final, since it impairs reflection refactorings
like the upcoming one.
Also the upcoming refactoring moves tag materialization anchors, and we
have to add them to fast track in advance, so that they are treated as
macros later.
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 2.10.x: (51 commits)
improved/fixed reflection docs based on comments
Fixes SI-6354: improved error messages for Dynamic signature mismatches.
Add RedBlackTree tests for take/drop/slice.
Retain Ordering in drop/take/slice signatures.
test case closes SI-5770
clarify caveats of App trait
Remove `@static` annotation from the library.
New starr that does not depend on `@static`.
improved reflection documentation
pull request feedback
SI-5692 better error message
SI-5942 toolboxes now reset front ends
SI-6287 fixes synthetic symbol clashes in toolbox
Revert "Implement @static annotation on singleton object fields."
Revert "WIP add private/lazy checks and a few tests."
Revert "Fixes SI-6189."
Revert "Fixes SI-6236."
Revert "Fix SI-4581."
Revert "Fix SI-6294."
refactors java reflection tests
...
Conflicts:
src/compiler/scala/tools/nsc/typechecker/Typers.scala
src/partest/scala/tools/partest/package.scala
src/reflect/scala/reflect/internal/Trees.scala
|
| |\
| | |
| | | |
More relative path elimination.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Some names I missed in 55b609458fd .
How one might know when one is done:
mkdir scratch && cd scratch
mkdir annotation beans collection compat concurrent io \
math parallel ref reflect runtime scala sys testing \
text tools util xml
scalac $(find ../src/library -name '*.scala')
Until recently that would fail with about a billion errors. When it
compiles, that's when you're done. And that's where this commit
takes us, for src/library at least.
|
| |/
| |
| |
| |
| | |
Except for one thingie: java enums are currently not understood
by Scala reflection, hence they aren't yet supported in annotations.
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* origin/2.10.x: (68 commits)
Eliminate breaking relative names in source.
"Hot fix" for broken build.
Fix SI-4813 - Clone doesn't work on LinkedList.
Made 'def clone()' consistent with parens everywhere.
accommodates pull request feedback
SI-6310 redeploys the starr
SI-6310 AbsTypeTag => WeakTypeTag
SI-6323 outlaws free types from TypeTag
SI-6323 prohibits reflection against free types
improvements for reification of free symbols
removes build.newFreeExistential
SI-6359 Deep prohibition of templates in value class
Fixes SI-6259. Unable to use typeOf in super call of top-level object.
Fixes binary repo push for new typesafe repo layouts.
Better error message for pattern arity errors.
Rescued TreeBuilder from the parser.
Pending test for SI-3943
Test case for a bug fixed in M7.
Fix for SI-6367, exponential time in inference.
SI-6306 Remove incorrect eta-expansion optimization in Uncurry
...
Conflicts:
src/compiler/scala/tools/nsc/transform/AddInterfaces.scala
src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These things are killing me. Constructions like
package scala.foo.bar.baz
import foo.Other
DO NOT WORK in general. Such files are not really in the
"scala" package, because it is not declared
package scala
package foo.bar.baz
And there is a second problem: using a relative path name means
compilation will fail in the presence of a directory of the same
name, e.g.
% mkdir reflect
% scalac src/reflect/scala/reflect/internal/util/Position.scala
src/reflect/scala/reflect/internal/util/Position.scala:9: error:
object ClassTag is not a member of package reflect
import reflect.ClassTag
^
src/reflect/scala/reflect/internal/util/Position.scala:10: error:
object base is not a member of package reflect
import reflect.base.Attachments
^
As a rule, do not use relative package paths unless you have
explicitly imported the path to which you think you are relative.
Better yet, don't use them at all. Unfortunately they mostly work
because scala variously thinks everything scala.* is in the scala
package and/or because you usually aren't bootstrapping and it
falls through to an existing version of the class already on the
classpath.
Making the paths explicit is not a complete solution -
in particular, we remain enormously vulnerable to any directory
or package called "scala" which isn't ours - but it greatly
limts the severity of the problem.
|
| |
| |
| |
| | |
Two pull requests crossed in the night.
|
| |\
| | |
| | | |
SI-6331 deconst If type / refine equality of floating point Constant types.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The fast path in typedIf added in 8552740b avoided lubbing the if/else branch types
if they are identical, but this fails to deconst the type. This could lead to the entire
if expression being replaced by a constant.
Also introduces a new tool in partest for nicer checkfiles.
// in Test.scala
trace(if (t) -0d else 0d)
// in Test.check
trace> if (Test.this.t)
-0.0
else
0.0
res: Double = -0.0
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- scaladoc the exceptions thrown by Await.* and Awaitable.*
- move intercept[Exception] into partest’s TestUtil object
- improve Promise.tryAwait implementation following Viktor’s comments
and make use of Deadline to avoid calling System.nanoTime too often
|
| |/ |
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
# By Eugene Burmako (10) and others
# Via Josh Suereth (10) and Paul Phillips (9)
* origin/2.10.x: (32 commits)
Removing duplication from Duration.
Fixed positions in de-aliased special symbols and for automatically added `apply` methods.
Fixes SI-6285 - ParIterableLike no longer says sequential foreach.
SI-6274 Fix owners when eta-expanding function with byName param
Fixes typos in the ScalaDoc of StringContext
Allow nested calls to `askForResponse` in the presentation compiler.
Made Dynamic extend Any.
Fix for SI-6273, repl string interpolation.
Formatting cleanup in def typed.
Better errors for Any/AnyRef issues.
Fix for SI-6263, futile adaptation.
Suppressed 'possible cause' mis-warning.
Fix for SI-6034, covariant value classes.
Fixes SI-6290 by creating real instnaces of language features.
SBT build now works with SBT 0.12.
Removed previosuly uncommented code, added more diagnosis output to REPL.
Made instrumenter more robust by looking at tokens
Removed dead code.
Two fixes for the worksheet instrumenter
Fix SI-6294.
...
|
| |
| |
| |
| | |
Also fixed partest explosion that happened after partest redesign.
|
| |
| |
| |
| |
| |
| |
| |
| | |
In addition, always use UTF-8 when reading test files (and not default),
since some tests exercise UTF-8.
Also, quote "$JAVACMD" and convert it (and $JAVA_HOME) for cygwin, where
$JAVACMD is likely to include a space.
|
|\|
| |
| |
| |
| |
| |
| | |
Conflicts:
src/compiler/scala/tools/nsc/Global.scala
src/compiler/scala/tools/nsc/typechecker/Typers.scala
test/files/neg/t6048.check
|
| |
| |
| |
| | |
In a directory-based test with file A_1.scala, scalac flags that should apply only to A_1.scala can be put in the file A_1.flags. Local flags are appended to global flags.
|
|\|
| |
| |
| |
| |
| | |
Conflicts:
src/compiler/scala/tools/nsc/ast/TreeGen.scala
src/compiler/scala/tools/nsc/settings/AestheticSettings.scala
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
```
|
|\ \
| |/
|/| |
Want a 25% partest speedup?*
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
... well then, don't compile twice!
Explanation:
The compilation process in partest happens in 3 stages:
- scala + java files, all fed to scalac (so the java signatures are
loaded and the scala bytecode is generated)
- java files, fed to javac (so the java bytecode is generated)
- scala files, fed to scalac (so the scala bytecode correctly links
to the javac-generated bytecode)
While this mechanism is great to have, for simple 1-file scala tests
it's overkill by compiling scala files twice. So I adjusted the compile
procedure to only run the first step if java files are empty, leading
to a 25% partest speedup.*
Also included Seth Tisue's comment about the tests that require the
three-step compilation.
* as measured on test.scaladoc
|
|\ \
| | |
| | | |
Partest instrumentation fixes
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The previous implementation was wrong because it
would always enable profiling after call to
`Instrumenation.getStatistics` method. Now we are
checking the profiling status and enable it again
only when it was enabled before.
Review by @phaller.
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Extend instrumenting infrastructure to instrument
classes in `instrumented` package. This is useful
because very often you need to put your classes
into non-empty package. E.g. inliner doesn't work
properly with empty package at the moment so in
order to test any behaviour we need to put classes
in some other package that is instrumented.
Added testing code for that to instrumentation
test-case.
Review by @phaller.
|
| | |
|
| |
| |
| |
| | |
This pretty much takes us down to deprecation and inliner warnings.
|
|/
|
|
|
|
|
|
| |
And also non-exhaustive matches.
And added -nowarn to the build options for scalacheck,
we don't need to hear the warnings for code we aren't
able to fix.
|
|\
| |
| | |
Fix for SI-5385.
|
| |
| |
| |
| |
| | |
Nodes which hit EOF with no whitespace afterward had
wrong position.
|
|\ \
| | |
| | | |
Fix a bunch of scaladoc issues: SI-3314 SI-4888 SI-5235 SI-5558 SI-4324 SI-5780 SI-4887 SI-3695 SI-4224 SI-4497 SI-5079 SI-6073 SI-5533 SI-5784
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Group class members based on their semantic relationship. To do this:
- @group on members, only need to do it for the non-overridden members
- -groups flag passes to scaladoc, groups="on" in ant
- @groupdesc Group Group Description to add descriptions
- @groupname Group New name for group
- @groupprio Group <int> (lower is better)
See test/scaladoc/run/groups.scala for a top-to-bottom example
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Normally scaladoc won't generate template pages for anything other than
packages, classes, traits and objects. But using the @template
annotation on {abstract,alias} types, they get their own page and take
part as full members in the diagrams. Furthermore, when looking for the
companion object, if a value of type T is in scope, T will be taken as
the companion object (even though it might be a class)
All templates, including types are listed on the left navigation pane,
so now adding @template to String can get scaladoc to generate (a
no-comments) page for java.lang.String.
The {abstract, alias} type icons need to be updated -- I just took the
class icons and added a small x to them -- but they shoud be something
else (maybe an underscore?)i
TO USE THIS PATCH:
<pre>
/** @contentDiagram */ // tells scaladoc to create a diagram of the
// templates contained in trait Base
trait Base {
/** @template */ // tells scaladoc to create a page for Foo
type T < Foo
trait Foo { def foo: Int }
}
/** @contentDiagram */
trait Api extends Base {
/** @template */
override type T <: FooApi
trait FooApi extends Foo { def bar: String }
}
</pre>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
for SI-5784. This commit has been checked with tools/scaladoc-compare
and the only difference is that the containing entities in the index
are not duplicate anymore, which solves yet another bug we did not
know about. :)
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Adds the ability to link to members, classes and objects in scaladoc.
The links can now be either qualified names or relative names, they
both work. See the test/scaladoc/resources/links.scala for a usage
example. Also introduced -no-link-warnings scaladoc flag, in case the
build output gets swamped with link warnings.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
And adds support for linking to class members, only usable from the
model factory now, so no links to members from the doc comment yet,
sorry. But it fixes the Enumeration problem once and for all!
Also corrected the inTpl for members obtained by implicit conversions,
so they're in the correct template and the comment variable expansion
is done from the correct (but different) template.
Review by @kzys.
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The bug is related to a couple of other annoyances, also fixed:
- usecases without type params were crashing scaladoc due to a change
in the PolyTypes class (not allowing empty tparams list)
- properly getting rid of backticks (even if the link is not valid)
- correct linking for usecases with $Coll = `immutable.Seq`
(the symbol searching algorithm was too of restrictive, now we search
the entire ownerchain - and the empty package at the end)
- give a warning if the type lookup fails
- finally, added a $Coll variable to List, for some reason it wasn't
there and we were getting immutable.Seq as the result of use cases.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
After a discussion on a reflection meeting on Jul 17
we concluded that we should split staticModule into
staticModule and staticPackage to remove the ambiguity
between packageless objects and packageless packages
(more in the comments in the body of the commit).
The motivation is verbosely outlined in the comments,
but the bottom line is that Scala allows packages and
packageless objects to have the same name within the same program.
Therefore at times we need to disambiguate, hence the introduction
of the staticPackage method.
As of such staticModule no longer works for packages.
In the same fashion staticPackage doesn't work for modules.
This is done to ensure robustness of reification.
I would like to do the same for getModule in Definitions,
but we have to maintain backward compatibility. That's why I retained
the old behavior, but replaced getModule invocations with getPackage
where appropriate to be in line with staticModule and staticPackage.
Another important thing that follows from the discussion is that
both staticClass and staticModule prefer parent packages over parent objects
in cases of ambiguity. Say, if we have the following snippet of code:
object B { class C } next to package B { class C }
then staticClass("B.C") will never even consider a C inside the object B.
This is how scalac operates, so we decided to be consistent here.
Finally reification logic got changed to distinguish between
staticModule and staticPackage, and to allow for the fact that
staticClass and staticModule prefer parent packages to parent objects.
|
| |
| |
| |
| | |
We're not completely blind in there, are we.
|
| |
| |
| |
| | |
Sorry, I'm not in practice with java.util.concurrent.
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
---
(taken from README)
Tests in `instrumented/` directory are executed the same way as in `run/` but
they have additional byte-code instrumentation performed for profiling. You
should put your tests in `instrumented/` directory if you are interested in
method call counts. Examples include tests for specialization (you want to
count boxing and unboxing method calls) or high-level tests for optimizer
where you are interested if methods are successfuly inlined (so they should
not be called at runtime) or closures are eliminated (so no constructors
of closures are called).
Check `scala.tools.partest.instrumented.Instrumentation` to learn how to
use the instrumentation infrastructure.
The instrumentation itself is achieved by attaching a Java agent to the
forked VM process that injects calls to profiler. Check
`scala.tools.partest.javaagent.ProfilingAgent` for details.
---
A few notes on low-level details of this change:
* Partest now depends on asm library for byte-code instrumentation
(`build.xml`)
* Build additional jar called `scala-partest-javaagent.jar` that is
used with `-javaagent:` option. (`build.xml`)
* Set `-javaagent:` option for all tests in `instrumented/` directory.
(`RunnerManger.scala`)
* Introduce a new category of tests called `instrumented`.
* Add one instrumented test to demonstrate usage and test new
infrastructure itself. (`InstrumentationTest.scala`)
Review by @phaller.
|