Commit Graph

13350 Commits

Author SHA1 Message Date
extempore a6f16e6636 Who knew system was such a popular sentence ending choice.
Fixes some doc comments caught up in the s/// net, no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@24014 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-18 17:59:21 +00:00
extempore 35d290b964 A few bits of java code which use "" + x and can't be helped
out by scala compiler optimizations.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@24013 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-18 17:58:46 +00:00
odersky fdba993418 Reverted to curried invokeDynamic to fix a problem in typers.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@24012 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-18 17:40:52 +00:00
eugenevigdorchik 3cf00c4133 Completion related fix and cleanup. Review by odersky
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@24011 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-18 17:36:53 +00:00
odersky 62af9883d1 Cleaned up Dynamic. Premature optimization is the source of all evil!
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@24010 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-18 16:30:24 +00:00
dragos 8cd5fbe382 Allow box(unbox) elimination for the Null type, plus testing that specialization tests do not box too much. review by extempore.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@24009 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-18 16:27:38 +00:00
dragos 21776afc96 Updated project files to the new Scala nature ID (new meaning nearly 2-years old). no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@24008 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-18 16:27:35 +00:00
rytz 36adcbe161 second version of close #3649. no review
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@24007 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-18 15:57:47 +00:00
rytz 7994496539 test case close #3649. no review
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@24006 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-18 13:53:28 +00:00
plocinic ce5d6e95ac Removing code which I believe to be some debugging statements. Causes infinite loop anyway. Review by odersky
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@24005 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-18 10:44:53 +00:00
plocinic b0ab97a8ee fixed typo. no review
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@24004 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-18 10:44:46 +00:00
prokopec 86f24ec8f7 Disabled failing specialization test.
No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@24001 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-17 18:23:57 +00:00
prokopec df87a46874 Added jdk1.5 version of the instrumented library classes jar.
No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@24000 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-17 17:09:14 +00:00
prokopec 4725aaf6eb Added specialized test to ant build, and ported old specialized 'run' tests to check the number of boxings.
No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23999 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-17 15:18:08 +00:00
prokopec 2c98a10eea Adapted specialization tests to track number of boxings.
Review by dragos

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23998 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-17 15:18:06 +00:00
prokopec 28a06dbdb0 Added 'specialized' tests.
Added a new test group - specialized.
Modified partest to add a jar with instrumented classes to classpath when compiling and running tests.
Added a primary version of the instrumented BoxesRuntime, and a script to produce a jar for it.
Added the 'speclib' folder to partest files, which contains the jar with the instrumented classes.

Review by dragos.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23997 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-17 15:18:03 +00:00
odersky 2bf4c1f647 Dynamic type added. Array creation optimized.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23993 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-16 21:31:31 +00:00
odersky 75a2f18cd4 Added doc comment
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23992 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-16 21:22:36 +00:00
eugenevigdorchik 8da4e7ffce Rollback changes to canRedefine. Multiple versions of the symbol still occur in the IDE, need to investigate why implicit search fails on the tree parsed from source
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23991 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-16 20:07:31 +00:00
eugenevigdorchik d39e3b58b2 Do not redefine the symbol in a class file to prevent spurious errors in IDE. IDE creates a second copy in owner scope and unlinks it when finished. Review by odersky
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23990 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-16 19:10:44 +00:00
extempore 98bcd1ded7 This outlaws explicit isInstanceOf tests on value types, which
are nonsense in any case, as long threatened in ticket #1872.
Closes #1872, review by rytz.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23988 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-15 23:21:50 +00:00
extempore 9a7f1ae4f9 Optimization to string concatenation. Our hands are sufficiently dirty
with a primitive CONCAT and several opcodes, I'm assuming nobody will oppose
this on principle.  Given an expression of the exact form "" + x
(that is, the NPE-immune and much less ugly way to call .toString) we used
to get 4x the bytecode and create an unneeded StringBuilder.  Now this:

0:	aload_1
1:	invokestatic	#20; //Method java/lang/String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
4:	areturn

Closes #4160, review by dragos.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23987 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-15 23:21:25 +00:00
extempore ef0612eb00 There were some shenanigans in normalize trying to avoid cycles.
Adriaan had recorded an idea about how to avoid them and I tried
out my interpretation of it and it worked.  He says it's good
to go, so no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23986 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-15 23:20:59 +00:00
eugenevigdorchik 9e267ee25a Validate positions only in debug mode. No review
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23983 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-15 16:49:40 +00:00
extempore e476b0ac33 Fix for a jline paste bug. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23981 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-13 10:10:32 +00:00
extempore 633e26e8f0 Optimization for Manifest.equals. Hits are faster and misses are
significantly faster.  Closes #4006.

And, then I started trying to deal with some fundamental Manifest
issues and give it a little documentation.  I left a trail of bloody
comments, for which I solicit review by moors.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23980 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-13 09:58:43 +00:00
odersky 5fb51f8c3c Disabled browsing in the empty package, hopefully this will unbock Eclipse
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23979 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-13 09:46:24 +00:00
extempore 76cbcb6241 Have to use svn to delete empty directories. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23978 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-13 05:07:09 +00:00
extempore 4e4fae87ee Deleted duplicate test which must have been a real monkey
wrench.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23977 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-13 00:08:02 +00:00
extempore 00d1743296 Purely detabification of the process code. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23975 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-12 21:44:18 +00:00
extempore be39fbcabd Some modifications to @elidable: for reasons lost to me now it had
a default value such that annotated methods might be elided even if
the option wasn't given.  It now does nothing in that situation.
Closes #4051, #4151, no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23974 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-12 19:32:10 +00:00
extempore 81ae420efb Disabled the process test. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23972 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-12 09:57:26 +00:00
prokopec 5192d6932e Merge branch 'work'
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23970 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-12 08:33:52 +00:00
extempore ce268ee7e3 Some fixes for partest issues. Deletes StreamAppender with nonzero
prejudice and puts the new process code to work instead.  There are
still a couple bugs on my short term partest list.  If this commit causes
some weird issue which only arises on virtualized windows you can expect
to hear from me next by postcard from st. lucia.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23969 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-12 06:17:22 +00:00
extempore 9b604f3b44 More fiddling with the process code. All cosmetic, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23968 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-12 06:16:56 +00:00
extempore efeb1cf4bf Imported sbt.Process into trunk, in the guise of package
scala.sys.process.  It is largely indistinguishable from the
version in sbt, at least from the outside.

Also, I renamed package system to sys.  I wanted to do
that from the beginning and the desire has only grown since then.
Sometimes a short identifier is just critical to usability: with
a function like error("") called from hundreds of places, the
difference between system.error and sys.error is too big.  sys.error
and sys.exit have good vibes (at least as good as the vibes can be
for functions which error and exit.)

Note: this is just the first cut.  I need to check this in to finish
fixing partest.  I will be going over it with a comb and writing
documentation which will leave you enchanted, as well as removing
other bits which are now redundant or inferior.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23967 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-12 02:49:08 +00:00
extempore cbfe39e607 In r22807 an optimization was added to remove Box(Unbox(x))
combinations.  It turns out that without this in place, an
expression like "x".asInstanceOf[Int] will no longer throw an
exception.  Refined the optimization.  Closes #4148, review by dragos.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23965 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-11 20:08:47 +00:00
malayeri 3d5784f5c3 Make scala.collection.immutable.Set1, .Set2, Set3, Set4 constructors private to the collection package. Closes #2845. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23964 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-11 18:30:21 +00:00
eugenevigdorchik ddaf20f688 Allow reload to be issued inside ask non-interruptibly. Review by odersky
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23962 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-11 14:58:06 +00:00
malayeri b4b0dc6ca5 Modify scala.Array to extend java.io.Serializable. With this commit, Scala arrays will be consistent with Java, in that primitive Java arrays are assignable to Serializable. Fixes 2914. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23960 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-10 22:24:54 +00:00
extempore 696e2071fe Pulled some bit level operations into their own file. It's pretty
much impossible to abstract across Int and Long with no penalty, but
we can at least have duplicated code in the same place to minimize
the challenge.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23959 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-10 21:09:43 +00:00
extempore 8b02cd8ae7 A test case for recently fixed #4114. Plus!
I had closed #2441 as a duplicate of that, but unfortunately #4114 did
not bring #2441 along with it.  Then I realized I'm a programmer, not a
helpless trac watcher.  As is often the case with thes things, fixing that
revealed a bug in the library.  Closes #2441 for real, review by odersky.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23958 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-10 19:20:55 +00:00
extempore 537bfce894 Test case closes #2873, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23957 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-10 19:20:36 +00:00
extempore 7357aaeec5 Made <:< and =:= serializable. Closes #4140, review by moors.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23956 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-10 19:20:24 +00:00
extempore 5529320cc7 Renamed a file (I thought I already renamed this: oh that was util.Replayer,
not io.Replayer) so ant doesn't keep recompiling it.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23955 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-10 19:20:14 +00:00
dragos d2e5465a9a Moved the presentation compiler thread in its own top-level class. This allows to collect
the presentation compiler instance when the thread is not GCed, but the compiler should be
discarded (for example, after a shutdown request). Having the thread as an inner class 
keeps a reference to the outer class. review by odersky.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23954 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-10 15:43:55 +00:00
dragos 0ea81f323b Second try for "Changing the intersectionWitness map to use weak references for the value. A value may prevent parts of this map from collecting, since the value may hold a (strong) reference to one of the keys in the map. review by odersky." This time without higher order functions.
This updates commit 71bce88e543277bd9afeb23e3e6af2b517b56075.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23953 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-10 14:54:03 +00:00
odersky cc4023f83e Made presentation type checker idempotent and removed code in Global that was needed to work around non-idempotency.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23951 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-10 14:35:20 +00:00
odersky 640291c207 Added test file.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23950 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-10 14:33:50 +00:00
dragos 8f237e9097 Re-disabled constant folding for interactive compiler runs. no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23949 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-01-10 11:52:22 +00:00