| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
A couple more minor tweaks to power mode, and more importantly, fix for
a jline NPE provoked if your classloaders loaded classes in a way other
than it expected. No review.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This addresses a few long standing irritations with jline, rewriting
chunks of it along the way. No longer does columnar output spill over
and double space everything if you're unlucky with the chosen widths.
Pagination works for a higher definition of work. Etc.
Also, for those who enjoy operating missile systems from their repls,
crash recovery now requests your permission before replaying the
session.
Closes #4194, no review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The AnyVal types become source files instead of polite compiler
fictions.
!! You'll need a serious "ant all.clean" now. !!
As of this commit the system is fully bootstrapped and the
synthetic code eliminated: only the source files remain. The
sort-of-AnyVal-companions in scala.runtime.* have all been eliminated
because the actual companions can do everything; deprecated vals in
the scala.runtime package object point to the companions. This left
AnyValCompanion as the only AnyVal related thing in the runtime package:
that made little sense, so I deprecated and moved it as well.
Starr is based on r24066 plus this commit. Closes #4121. Review by rytz,
odersky.
|
|
|
|
|
|
|
| |
Updated to new jline sources with it moved into scala.tools.jline. I
transitioned the jline build from maven to sbt, and this commit includes
the first sbt-built binary. Review by jsuereth.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The shutdown hook installed by jline has made life difficult for sbt
for a while. This changes jline not to install it, and alters the scala
startup script to trap exit and re-enable echo on recognizably unix
platforms. In addition it no longer installs a shutdown hook to flush
the repl history to disk, instead flushing after every line.
Any bash reviewers out there? Unless someone raises a hand, no review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
IMPORTANT NOTE
Modifying code of the FJBG library is a very sensitive task since its
write operations are eg. used by the Scala compiler. This SVN commit
affects (should affect) only the read operations (which did never
work) of the FJBG library.
Changes include:
- fixed several killer bugs in the bytecode reader (see below).
- added missing input stream constructors in several Attribute
classes (eg. JBootstrapInvokeDynamic, JEnclosingMethodAttribute,
JInnerClassesAttribute) together with the corresponding
class registrations in class JAttributeFactory. - added
classes JExceptionsTable, JLocalVariableTableAttribute and
JStackMapTableAttribute (including corresponding factory methods in
class FJBGContext). - overriden method toString in most classes to
support output format similar to javap (see below). - did some code
cleanup (tabs, etc..).
Bug fixes include:
- fixed incorrect stream.readInt() in JSourceFileAttribute
constructor. - fixed missing code.lineNumbers initialization in
JLineNumberTableAttribute constructor. - fixed incorrect code in class
util.ByteArray constructor (stream). - added method setCode in class
JMethod to link them together.
Output of decoded bytecode:
The added toString() methods return javap-like formatted strings for
the decoded data, eg. for the LocalVariableTable attribute you get
the following output: ... LocalVariableTable: Start Length Slot Name
Signature 0 6 0 this LTest$; 0 6 1 args [Ljava/lang/String;
Executing the following Java code will produce decoded bytecode in a
format similar to the command line "javap -p -v -classpath <cpath>
<classes>":
static void printClass(String filePath) throws Exception {
FJBGContext fjbgContext = new FJBGContext(49, 0);
DataInputStream in = new DataInputStream(new FileInputStream(filePath));
JClass jclass = fjbgContext.JClass(in);
System.out.println(jclass);
in.close();
}
Mainly for providing a demonstrator of the FJBG reader we added to
the FJBG library the main class ch.epfl.lamp.fjbg.Main which behaves
similarly to javap, the class file disassembler of the J2SE SDK.
For instance the following commands produce (more or less) the same
output:
~$ scala ch.epfl.lamp.fjbg.Main -classpath classes 'Test javap -p -v$'
~$ -classpath classes 'Test $'
In several cases fjbg.Main will provide more information for access
flags (eg. brigde methods) and class file attributes (eg. enclosing
methods).
TODO
- integration of FJBGContext.JLocalVariableTableAttribute into the JVM
backend of the Scala compiler (cleaner handling of local variables).
- The source code of the FJBG library is currently generated using
the compiler option "-source 1.4"; moving to source release 1.5 would
allow further code improvements like: List --> List<T> (cast removals)
StringBuffer --> StringBuilder (faster implementation) /*@Override*/ -->
@Override
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
|
|
|
|
|
| |
repo and includes jline binary. No review.
|
|
|
|
|
|
| |
More fixes to avoid the dreaded "NoSymbol does not have owner" problem
in names defaults.
|
| |
|
|
|
|
|
|
| |
More repl hardening, and a new jline jar which fixes a paste issue on
OSX. No review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New jline: BSD licensed, based on [ https://github.com/jdillon/jline2 ]
with additional code thanks to [ https://github.com/huynhjl/jline2 ].
Replaces lib/jline.jar with build of these sources, and modifies trunk
code to work with the new jar.
Hopeful improvements including baseline functionality on cygwin
and 64bit windows, as well as more accurate line wrapping / cursor
positioning on all platforms and ctrl-R history search.
For the time being the canonical source repository is this:
https://github.com/paulp/jline2
The enclosed sources are a mirror of that repository, and should be
treated as read-only in the scala svn repository.
No review, codewise, but people are very strongly encouraged to try it
out and report any regressions.
|
|
|
|
|
|
| |
again: relax access boundry check for overriding protected java members.
review by eugenevigdorchik.
|
|
|
|
|
|
|
| |
Moved ClassfileAnnotation/StaticAnnotation/Annotation/TypeConstraint
into scala.annotation and enabled the deprecated type aliases in scala.*
to point there. Also enclosed is a new starr to bootstrap. No review.
|
|
|
|
|
|
|
|
|
|
| |
(1) the Scala types in ch.epfl.lamp.compiler.msil.emit now use Scala
collections instead of Java's, (2) a few bug fixes regarding metadata
parsing, (3) GenMSIL emits output useful for IDE debugging, (4)
TypeParser now enters symbols for generics in case the assemblies being
linked sport them, (5) a few fixes for bytecode verif in GenMSIL.
review by rytz
|
|
|
|
|
|
|
|
| |
Fix InnerClasses attribute: anonymous classes don't have an outer
name. EnclosingMethod is correctly generated. Fixed isAnonymousClass
definition. Updated test that depends on anonymous inner class names.
Closes (again) #3249, references #2749. review by odersky,extempore.
|
|
|
|
|
|
|
|
| |
This should fix java signatures when they refer to
method type parameters. I unrolled Adriaans previous fix
for #3249, as this one is more general. Closes #3249,
review by moors.
|
| |
|
|
|
|
|
|
| |
Reverted previous commit as I think it is wedging under -optimise. No
review.
|
|
|
|
|
|
|
|
| |
Made some changes to fjbg so when people run into #1133 at least it will
tell them what method was the cause. The fact that ten files are touched
in this commit instead of one or two is a testament to the wonder of
checked exceptions. No review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ldc being used instead of bipush or sipush. The cheaper instructions
were only being used when the argument was typed as byte or short, but
an Int in the byte or short range can as easily use them. This also
saves an entry in the constant pool.
iconst_n not being used except on Ints. Same issue in reverse: pushing
short 3 on the stack is cheaper with iconst_3 than with sipush.
Example:
class A {
def f1: Int = 100 // was ldc #X, now bipush 100
def f2: Int = 5000 // was ldc #X, now sipush 5000
def f3: Byte = 2 // was bipush 2, now iconst_2
def f4: Short = 2 // was sipush 2, now iconst_2
}
Review by dragos.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Restoring negative literal parsing behavior to what should be the least
surprising option. Thanks much to Johannes Rudolph for identifying the
bug in the bytecode generator which needed addressing for us to arrive
at proper -0.0 behavior, and for writing the majority of this patch.
A '-' followed immediately by either a number or a period should now
always be treated as a single numeric literal, which means the minus
binds more tightly than anything else. A specific example of how this
differs from 2.8 final is:
-5.+(10) == 5.0 // and not -15.0
The full range of potentially ambiguous parses involving prefix
operators, numbers, and dots is quite large and still needs to be
completely and clearly specified.
Closes #2378 and #3657, review by odersky, jrudolph.
|
| |
|
|
|
|
|
| |
for MSIL: now based on the latest ch.epfl.lamp.compiler.msil sources.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(a) The bytecode that Scala.NET emitted had a tough time in
passing peverify due to valuetypes (aka structs) and their related
managed-pointer types. With these changes (details in [1] and [2])
external APIs exposing valuetypes can be used, yet the extra step of
supporting defining valuetypes in Scala programs has been left for
later. Supporting the unsigned integral valuetypes (used, among others,
by IKVM) is also pending.
(b) A very first step towards generics can be found in
TypeParser.parseClass, for the time being commented out (search for
the label "TODO CLR generics"). It's commented out because without
CLRManifests codegen won't work as expected. Details in [3].
review by rytz
Refs:
[1]
http://lamp.epfl.ch/~magarcia/ScalaCompilerCornerReloaded/2010Q3/Bootstr
apping3.pdf
[2]
http://lamp.epfl.ch/~magarcia/ScalaCompilerCornerReloaded/2010Q3/Bootstr
apping4.pdf
[3]
http://lamp.epfl.ch/~magarcia/ScalaCompilerCornerReloaded/2010Q2/SigToTy
pe.pdf
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
for MSIL: Previous changesets were applied more-or-less incrementally to
scala-msil, this changeset brings them all together to scala trunk. Next
stop will be supporting CLR valuetypes (another big one). Afterwards
(once emitted .NET bytecode passes peverify) changesets will become more
manageable in size. Well, no, there's generics coming. But believe me,
soon MSIL changesets will get smaller in size.
|
|
|
|
|
| |
First version of SBT build for Scala compiler/library (see README)
|
| |
|
|
|
|
|
|
| |
Fixed problem with static initializer in ForkJoinTask on Android.
Replaces forkjoin.jar. Addresses see #3359. Review by plocinic.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
changes necessary to plug it back in while preserving everything which
has happened since then in tests and such, but we should be the lookout
for overreversion. Review by phaller (but as a formality, I don't think
it requires direct review.)
|
|
|
|
|
|
| |
revert the revert of r21791 (fix constructor parameter annotations).
close #3390. together with a new starr it builds. no review.
|
|
|
|
|
|
| |
Closes #3310 (very large Scala class is compiled to invalid classfile
because Scala signature can't fit into constant pool). Review by dragos.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If I work on this patch any longer without checking in I will go
stark raving mad. It is broken up into a couple pieces. This one is
the changes to test/. It includes fixing a bunch of tests, removing
deprecated constructs, moving jars used by tests to the most specific
plausible location rather than having all jars on the classpath of all
tests, and some filesystem layout change (continuations get their whole
own srcpath.) This would be the world's most tedious review, so let's
say no review.
[Note: after this commit, I doubt things will build very smoothly until
the rest of the partest changes follow. Which should only be seconds,
but just in case.]
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Scala signature is generated as an annotation (that is accessible
through Java reflection).
- compiler generates all pickled Scala signatures as annotations to class files.
- compiler can read class files with signature as annotations or old-style signatures as attributes.
- Scalap has also been updated to new signatures (contributed by Ilya Sergey: thanks a lot).
- FJBG updated to allow entering constant pool strings as byte arrays.
- ByteCodecs decode method returns the length of the decoded array.
Review by ilyas. Already mostly reviewed by odersky.
|
|
|
|
|
|
| |
Removed the symlinks between scalacheck jars to satisfy windows. Tweaked
partest to accomodate. No review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added ## method to Any as our scala hashCode method which provides
consistent answers for primitive types. And I'm sure we're all tired of
new starrs, but it's hard to add a method to Any without one. This patch
only brings ## into existence, but nothing calls it yet.
// some true assertions
scala> assert(5.5f.## == 5.5f.hashCode)
scala> assert(5.0f.## != 5.0f.hashCode && 5.0f.## == 5L.##)
No review. (Already reviewed by odersky.)
|
|
|
|
|
|
|
|
|
| |
It turns out some of the weirdness lately is because changes to
classpath handling have a way of not taking effect until they're
installed via starr, and presently we have a starr with different logic
than trunk. No choice but to roll up one more starr based on r20984. No
review.
|