| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
SI-7410 REPL uses improved tools.jar locator
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The logic in partest for snooping around for tools.jar
is moved to PathResolver, and ILoop uses it from there.
If JAVA_HOME is toolless, check out java.home.
The use case was that Ubuntu installs with `java` at
version 6 and `javac` at version 7; it's easy to wind
up with JAVA_HOME pointing at the version 6 JRE, as
I discovered. It's confusing when that happens.
In future, partest might run under 7 and fork tests
under 6, but those permutations are downstream.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have lots of core classes for which we need not go through
the symbol to get the type:
ObjectClass.tpe -> ObjectTpe
AnyClass.tpe -> AnyTpe
I updated everything to use the concise/direct version,
and eliminated a bunch of noise where places were calling
typeConstructor, erasedTypeRef, and other different-seeming methods
only to always wind up with the same type they would have received
from sym.tpe. There's only one Object type, before or after erasure,
with or without type arguments.
Calls to typeConstructor were especially damaging because (see
previous commit) it had a tendency to cache a different type than
the type one would find via other means. The two types would
compare =:=, but possibly not == and definitely not eq. (I still
don't understand what == is expected to do with types.)
|
|\
| |
| | |
ScriptEngine.eval() forwards Error instead of new ScriptException
|
| | |
|
|\ \
| | |
| | | |
Read-eval-print : the script engine does not need print so make it lazy
|
| |/
| |
| |
| |
| | |
This can have a dramatic effect on computing time in cases with big
intermediate results but simple final one.
|
|\ \
| |/
|/| |
Added a :kind command to the REPL
|
| |
| |
| |
| |
| |
| |
| |
| | |
:kind command diplays the kind of types and type constructors in Scala
syntax notation.
scala> :kind (Int, Int) => Int
scala.Function2's kind is F[-A1,-A2,+A3]
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Confusing, now-it-happens now-it-doesn't mysteries lurk
in the darkness. When scala packages are declared like this:
package scala.collection.mutable
Then paths relative to scala can easily be broken via the unlucky
presence of an empty (or nonempty) directory. Example:
// a.scala
package scala.foo
class Bar { new util.Random }
% scalac ./a.scala
% mkdir util
% scalac ./a.scala
./a.scala:4: error: type Random is not a member of package util
new util.Random
^
one error found
There are two ways to play defense against this:
- don't use relative paths; okay sometimes, less so others
- don't "opt out" of the scala package
This commit mostly pursues the latter, with occasional doses
of the former.
I created a scratch directory containing these empty directories:
actors annotation ant api asm beans cmd collection compat
concurrent control convert docutil dtd duration event factory
forkjoin generic hashing immutable impl include internal io
logging macros man1 matching math meta model mutable nsc parallel
parsing partest persistent process pull ref reflect reify remote
runtime scalap scheduler script swing sys text threadpool tools
transform unchecked util xml
I stopped when I could compile the main src directories
even with all those empties on my classpath.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
No, this isn't busywork, how dare you suggest
such a thing. I intend my tombstone to say
HERE LIES EXTEMPORE,
WHO ELIMINATED A LOT OF SIP-18 WARNINGS
REST IN PEACE
|
|/
|
|
|
|
| |
Some unused private code, unused imports, and points where
an extra pair of parentheses is necessary for scalac to have
confidence in our intentions.
|
|
|
|
|
|
|
| |
This commit shortens expressions of the form `if (settings.debug.value)` to
`if (settings.debug)` for various settings. Rarely, the setting is supplied
as a method argument. The conversion is not employed in simple definitions
where the Boolean type would have to be specified.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Better binding mecanism : formerly done through the default SimpleBindings
shipped with the API, it now goes through a custom IBindings class
which uses the bind method of the interpreter instead of simply
making the bindings available as a Map.
Reflexive access : the script engine is made available to itself
through a bound variable "engine" of type javax.script.ScriptEngine.
This will allow "variable injection" i.e. programmatic redefinition
of variables, among others.
|
|\
| |
| | |
Warnings removal and other cleanup.
|
| |
| |
| |
| |
| |
| | |
Mostly unused private code, unused imports, and points where
an extra pair of parentheses is necessary for scalac to have
confidence in our intentions.
|
|/ |
|
|
Following in the footsteps of scaladoc and interactive.
The interpreter sources move into src/repl, and are given
a separate build target. As with the others, at present
they are still packaged into scala-compiler.jar.
A summary of changes:
- repl requires use of ReplGlobal (this was already implied)
- macro code's repl-specific classloader hack pulled into overridable
method and overridden in ReplGlobal
- removed -Ygen-javap option to eliminate backend's dependency on javap
- removed -Yrepl-debug option (can still be enabled with -Dscala.repl.debug)
- pushed javap code into src/repl so javax.tools dependency can bee
weakened to the repl only
- removed some "show pickled" related code which hasn't worked right
in a while and isn't the right way to do it anymore anyway. Will
return to fix showPickled and provide it with some tests.
|