summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2015-05-12 17:27:14 +0200
committerLukas Rytz <lukas.rytz@gmail.com>2015-05-12 17:27:14 +0200
commit630bcc3e917179ff9d415513106e5b4e5065d4fb (patch)
tree6e0a59354c15ebfd499b342b62e9e0e008e5fa4d /src
parent0bcd0a40dcfda091bbb665b5f0879d9ce3384ab5 (diff)
parent1b7e660f74223a847b307613a8ab200923433b13 (diff)
downloadscala-630bcc3e917179ff9d415513106e5b4e5065d4fb.tar.gz
scala-630bcc3e917179ff9d415513106e5b4e5065d4fb.tar.bz2
scala-630bcc3e917179ff9d415513106e5b4e5065d4fb.zip
Merge commit '1b7e660' into merge-2.11-may-12
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala39
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/BCodeIdiomatic.scala3
-rw-r--r--src/compiler/scala/tools/nsc/settings/ScalaSettings.scala3
-rw-r--r--src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala9
-rw-r--r--src/compiler/scala/tools/nsc/transform/Delambdafy.scala103
-rw-r--r--src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala17
-rw-r--r--src/compiler/scala/tools/nsc/transform/UnCurry.scala6
-rw-r--r--src/compiler/scala/tools/nsc/transform/patmat/Logic.scala3
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/RefChecks.scala2
-rw-r--r--src/intellij-14/README12
-rw-r--r--src/intellij-14/asm.iml.SAMPLE12
-rw-r--r--src/intellij-14/compiler.iml.SAMPLE16
-rwxr-xr-xsrc/intellij-14/diff.sh8
-rw-r--r--src/intellij-14/forkjoin.iml.SAMPLE11
-rw-r--r--src/intellij-14/interactive.iml.SAMPLE16
-rw-r--r--src/intellij-14/library.iml.SAMPLE13
-rw-r--r--src/intellij-14/manual.iml.SAMPLE15
-rw-r--r--src/intellij-14/partest-extras.iml.SAMPLE18
-rw-r--r--src/intellij-14/partest-javaagent.iml.SAMPLE13
-rw-r--r--src/intellij-14/reflect.iml.SAMPLE13
-rw-r--r--src/intellij-14/repl.iml.SAMPLE17
-rw-r--r--src/intellij-14/scala.iml.SAMPLE11
-rw-r--r--src/intellij-14/scala.ipr.SAMPLE260
-rw-r--r--src/intellij-14/scaladoc.iml.SAMPLE18
-rw-r--r--src/intellij-14/scalap.iml.SAMPLE15
-rwxr-xr-xsrc/intellij-14/setup.sh17
-rw-r--r--src/intellij-14/test-junit.iml.SAMPLE21
-rw-r--r--src/intellij-14/test.iml.SAMPLE21
-rwxr-xr-xsrc/intellij-14/update.sh22
-rw-r--r--src/intellij/README4
-rw-r--r--src/intellij/asm.iml.SAMPLE3
-rw-r--r--src/intellij/compiler.iml.SAMPLE18
-rw-r--r--src/intellij/forkjoin.iml.SAMPLE3
-rw-r--r--src/intellij/interactive.iml.SAMPLE18
-rw-r--r--src/intellij/library.iml.SAMPLE17
-rw-r--r--src/intellij/manual.iml.SAMPLE17
-rw-r--r--src/intellij/partest-extras.iml.SAMPLE17
-rw-r--r--src/intellij/partest-javaagent.iml.SAMPLE5
-rw-r--r--src/intellij/reflect.iml.SAMPLE16
-rw-r--r--src/intellij/repl.iml.SAMPLE18
-rw-r--r--src/intellij/scala-lang.ipr.SAMPLE286
-rw-r--r--src/intellij/scala.iml.SAMPLE3
-rw-r--r--src/intellij/scala.ipr.SAMPLE127
-rw-r--r--src/intellij/scaladoc.iml.SAMPLE20
-rw-r--r--src/intellij/scalap.iml.SAMPLE17
-rwxr-xr-xsrc/intellij/setup.sh3
-rw-r--r--src/intellij/test-junit.iml.SAMPLE21
-rw-r--r--src/intellij/test-osgi.iml.SAMPLE22
-rw-r--r--src/intellij/test.iml.SAMPLE23
-rw-r--r--src/intellij/test/files/neg/virtpatmat_exhaust_big.check7
-rw-r--r--src/intellij/test/files/neg/virtpatmat_exhaust_big.flags1
-rw-r--r--src/intellij/test/files/neg/virtpatmat_exhaust_big.scala32
-rw-r--r--src/intellij/test/files/pos/virtpatmat_exhaust_big.scala34
-rw-r--r--src/library/scala/Array.scala2
-rw-r--r--src/library/scala/Predef.scala6
-rw-r--r--src/library/scala/collection/GenSeqLike.scala1
-rw-r--r--src/library/scala/util/Try.scala4
-rw-r--r--src/reflect/scala/reflect/api/Constants.scala2
-rw-r--r--src/reflect/scala/reflect/internal/Definitions.scala4
-rw-r--r--src/reflect/scala/reflect/internal/Symbols.scala2
-rw-r--r--src/reflect/scala/reflect/internal/transform/Erasure.scala2
-rw-r--r--src/reflect/scala/reflect/runtime/JavaMirrors.scala1
-rw-r--r--src/scaladoc/scala/tools/nsc/doc/html/page/Source.scala127
-rw-r--r--src/scalap/scala/tools/scalap/Main.scala1
-rw-r--r--src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSig.scala22
65 files changed, 369 insertions, 1271 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala b/src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala
index 5b53ac7bc6..7d24347b4e 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala
@@ -10,6 +10,7 @@ package backend
package jvm
import scala.annotation.switch
+import scala.reflect.internal.Flags
import scala.tools.asm
import GenBCode._
@@ -632,6 +633,10 @@ abstract class BCodeBodyBuilder extends BCodeSkelBuilder {
case _ =>
abort(s"Cannot instantiate $tpt of kind: $generatedType")
}
+ case Apply(_, args) if app.hasAttachment[delambdafy.LambdaMetaFactoryCapable] =>
+ val attachment = app.attachments.get[delambdafy.LambdaMetaFactoryCapable].get
+ genLoadArguments(args, paramTKs(app))
+ genInvokeDynamicLambda(attachment.target, attachment.arity, attachment.functionalInterface)
case Apply(fun @ _, List(expr)) if currentRun.runDefinitions.isBox(fun.symbol) =>
val nativeKind = tpeTK(expr)
@@ -1280,6 +1285,40 @@ abstract class BCodeBodyBuilder extends BCodeSkelBuilder {
def genSynchronized(tree: Apply, expectedType: BType): BType
def genLoadTry(tree: Try): BType
+ def genInvokeDynamicLambda(lambdaTarget: Symbol, arity: Int, functionalInterface: Symbol) {
+ val isStaticMethod = lambdaTarget.hasFlag(Flags.STATIC)
+
+ val targetHandle =
+ new asm.Handle(if (lambdaTarget.hasFlag(Flags.STATIC)) asm.Opcodes.H_INVOKESTATIC else asm.Opcodes.H_INVOKEVIRTUAL,
+ classBTypeFromSymbol(lambdaTarget.owner).internalName,
+ lambdaTarget.name.toString,
+ asmMethodType(lambdaTarget).descriptor)
+ val receiver = if (isStaticMethod) None else Some(lambdaTarget.owner)
+ val (capturedParams, lambdaParams) = lambdaTarget.paramss.head.splitAt(lambdaTarget.paramss.head.length - arity)
+ // Requires https://github.com/scala/scala-java8-compat on the runtime classpath
+ val returnUnit = lambdaTarget.info.resultType.typeSymbol == UnitClass
+ val functionalInterfaceDesc: String = classBTypeFromSymbol(functionalInterface).descriptor
+ val desc = (receiver.toList ::: capturedParams).map(sym => toTypeKind(sym.info)).mkString(("("), "", ")") + functionalInterfaceDesc
+
+ // TODO specialization
+ val constrainedType = new MethodBType(lambdaParams.map(p => toTypeKind(p.tpe)), toTypeKind(lambdaTarget.tpe.resultType)).toASMType
+ val abstractMethod = functionalInterface.info.decls.find(_.isDeferred).getOrElse(functionalInterface.info.member(nme.apply))
+ val methodName = abstractMethod.name.toString
+ val applyN = {
+ val mt = asmMethodType(abstractMethod)
+ mt.toASMType
+ }
+
+ bc.jmethod.visitInvokeDynamicInsn(methodName, desc, lambdaMetaFactoryBootstrapHandle,
+ // boostrap args
+ applyN, targetHandle, constrainedType
+ )
+ }
}
+ val lambdaMetaFactoryBootstrapHandle =
+ new asm.Handle(asm.Opcodes.H_INVOKESTATIC,
+ "java/lang/invoke/LambdaMetafactory", "metafactory",
+ "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;")
+
}
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/BCodeIdiomatic.scala b/src/compiler/scala/tools/nsc/backend/jvm/BCodeIdiomatic.scala
index 9993357eee..8f2a17a2bf 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/BCodeIdiomatic.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/BCodeIdiomatic.scala
@@ -412,6 +412,9 @@ abstract class BCodeIdiomatic extends SubComponent {
jmethod.instructions.add(node)
if (settings.YoptInlinerEnabled) callsitePositions(node) = pos
}
+ final def invokedynamic(owner: String, name: String, desc: String) {
+ jmethod.visitMethodInsn(Opcodes.INVOKEDYNAMIC, owner, name, desc)
+ }
// can-multi-thread
final def goTo(label: asm.Label) { jmethod.visitJumpInsn(Opcodes.GOTO, label) }
diff --git a/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala b/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
index 630276e412..35ee889c58 100644
--- a/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
+++ b/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
@@ -101,7 +101,8 @@ trait ScalaSettings extends AbsScalaSettings
val Xhelp = BooleanSetting ("-X", "Print a synopsis of advanced options.")
val checkInit = BooleanSetting ("-Xcheckinit", "Wrap field accessors to throw an exception on uninitialized access.")
val developer = BooleanSetting ("-Xdev", "Indicates user is a developer - issue warnings about anything which seems amiss")
- val noassertions = BooleanSetting ("-Xdisable-assertions", "Generate no assertions or assumptions.")
+ val noassertions = BooleanSetting ("-Xdisable-assertions", "Generate no assertions or assumptions.") andThen (flag =>
+ if (flag) elidebelow.value = elidable.ASSERTION + 1)
val elidebelow = IntSetting ("-Xelide-below", "Calls to @elidable methods are omitted if method priority is lower than argument",
elidable.MINIMUM, None, elidable.byName get _)
val noForwarders = BooleanSetting ("-Xno-forwarders", "Do not generate static forwarders in mirror classes.")
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
index a59b9d3f48..518a402230 100644
--- a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
+++ b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
@@ -53,6 +53,7 @@ abstract class ClassfileParser {
protected type ThisConstantPool <: ConstantPool
protected def newConstantPool: ThisConstantPool
+ protected var file: AbstractFile = _ // the class file
protected var in: AbstractFileReader = _ // the class file reader
protected var clazz: Symbol = _ // the class symbol containing dynamic members
protected var staticModule: Symbol = _ // the module symbol containing static members
@@ -97,14 +98,14 @@ abstract class ClassfileParser {
private def handleMissing(e: MissingRequirementError) = {
if (settings.debug) e.printStackTrace
- throw new IOException(s"Missing dependency '${e.req}', required by ${in.file}")
+ throw new IOException(s"Missing dependency '${e.req}', required by $file")
}
private def handleError(e: Exception) = {
if (settings.debug) e.printStackTrace()
- throw new IOException(s"class file '${in.file}' is broken\n(${e.getClass}/${e.getMessage})")
+ throw new IOException(s"class file '$file' is broken\n(${e.getClass}/${e.getMessage})")
}
private def mismatchError(c: Symbol) = {
- throw new IOException(s"class file '${in.file}' has location not matching its contents: contains $c")
+ throw new IOException(s"class file '$file' has location not matching its contents: contains $c")
}
private def parseErrorHandler[T]: PartialFunction[Throwable, T] = {
@@ -131,6 +132,7 @@ abstract class ClassfileParser {
def parse(file: AbstractFile, root: Symbol): Unit = {
debuglog("[class] >> " + root.fullName)
+ this.file = file
pushBusy(root) {
this.in = new AbstractFileReader(file)
this.clazz = if (root.isModule) root.companionClass else root
@@ -923,6 +925,7 @@ abstract class ClassfileParser {
Some(ScalaSigBytes(pool.getBytes(entries.toList)))
}
+ // TODO SI-9296 duplicated code, refactor
/* Parse and return a single annotation. If it is malformed,
* return None.
*/
diff --git a/src/compiler/scala/tools/nsc/transform/Delambdafy.scala b/src/compiler/scala/tools/nsc/transform/Delambdafy.scala
index 45a89ac594..92db57c533 100644
--- a/src/compiler/scala/tools/nsc/transform/Delambdafy.scala
+++ b/src/compiler/scala/tools/nsc/transform/Delambdafy.scala
@@ -9,12 +9,17 @@ import scala.reflect.internal.Symbols
import scala.collection.mutable.LinkedHashMap
/**
- * This transformer is responsible for turning lambdas into anonymous classes.
+ * This transformer is responsible for preparing lambdas for runtime, by either translating to anonymous classes
+ * or to a tree that will be convereted to invokedynamic by the JVM 1.8+ backend.
+ *
* The main assumption it makes is that a lambda {args => body} has been turned into
* {args => liftedBody()} where lifted body is a top level method that implements the body of the lambda.
* Currently Uncurry is responsible for that transformation.
*
- * From a lambda, Delambdafy will create
+ * From a lambda, Delambdafy will create:
+ *
+ * Under -target:jvm-1.7 and below:
+ *
* 1) a new top level class that
a) has fields and a constructor taking the captured environment (including possibly the "this"
* reference)
@@ -22,9 +27,11 @@ import scala.collection.mutable.LinkedHashMap
* c) if needed a bridge method for the apply method
* 2) an instantiation of the newly created class which replaces the lambda
*
- * TODO the main work left to be done is to plug into specialization. Primarily that means choosing a
- * specialized FunctionN trait instead of the generic FunctionN trait as a parent and creating the
- * appropriately named applysp method
+ * Under -target:jvm-1.8 with GenBCode:
+ *
+ * 1) An application of the captured arguments to a fictional symbol representing the lambda factory.
+ * This will be translated by the backed into an invokedynamic using a bootstrap method in JDK8's `LambdaMetaFactory`.
+ * The captured arguments include `this` if `liftedBody` is unable to be made STATIC.
*/
abstract class Delambdafy extends Transform with TypingTransformers with ast.TreeDSL with TypeAdaptingTransformer {
import global._
@@ -79,6 +86,7 @@ abstract class Delambdafy extends Transform with TypingTransformers with ast.Tre
sealed abstract class TransformedFunction
// A class definition for the lambda, an expression instantiating the lambda class
case class DelambdafyAnonClass(lambdaClassDef: ClassDef, newExpr: Tree) extends TransformedFunction
+ case class InvokeDynamicLambda(tree: Apply) extends TransformedFunction
// here's the main entry point of the transform
override def transform(tree: Tree): Tree = tree match {
@@ -93,6 +101,9 @@ abstract class Delambdafy extends Transform with TypingTransformers with ast.Tre
lambdaClassDefs(pkg) = lambdaClassDef :: lambdaClassDefs(pkg)
super.transform(newExpr)
+ case InvokeDynamicLambda(apply) =>
+ // ... or an invokedynamic call
+ super.transform(apply)
}
case _ => super.transform(tree)
}
@@ -124,6 +135,7 @@ abstract class Delambdafy extends Transform with TypingTransformers with ast.Tre
if (!thisReferringMethods.contains(target))
target setFlag STATIC
+ val isStatic = target.hasFlag(STATIC)
/**
* Creates the apply method for the anonymous subclass of FunctionN
@@ -199,7 +211,7 @@ abstract class Delambdafy extends Transform with TypingTransformers with ast.Tre
val abstractFunctionErasedType = AbstractFunctionClass(formals.length).tpe
// anonymous subclass of FunctionN with an apply method
- def makeAnonymousClass = {
+ def makeAnonymousClass: ClassDef = {
val parents = addSerializable(abstractFunctionErasedType)
val funOwner = originalFunction.symbol.owner
@@ -232,7 +244,7 @@ abstract class Delambdafy extends Transform with TypingTransformers with ast.Tre
// the Optional proxy that will hold a reference to the 'this'
// object used by the lambda, if any. NoSymbol if there is no this proxy
val thisProxy = {
- if (target.hasFlag(STATIC))
+ if (isStatic)
NoSymbol
else {
val sym = lambdaClass.newVariable(nme.FAKE_LOCAL_THIS, originalFunction.pos, SYNTHETIC)
@@ -271,22 +283,39 @@ abstract class Delambdafy extends Transform with TypingTransformers with ast.Tre
val body = members ++ List(constr, applyMethodDef) ++ bridgeMethod
// TODO if member fields are private this complains that they're not accessible
- (localTyper.typedPos(decapturedFunction.pos)(ClassDef(lambdaClass, body)).asInstanceOf[ClassDef], thisProxy)
+ localTyper.typedPos(decapturedFunction.pos)(ClassDef(lambdaClass, body)).asInstanceOf[ClassDef]
}
- val (anonymousClassDef, thisProxy) = makeAnonymousClass
-
- pkg.info.decls enter anonymousClassDef.symbol
-
- val thisArg = optionSymbol(thisProxy) map (_ => gen.mkAttributedThis(oldClass) setPos originalFunction.pos)
- val captureArgs = captures map (capture => Ident(capture) setPos originalFunction.pos)
-
- val newStat =
- Typed(New(anonymousClassDef.symbol, (thisArg.toList ++ captureArgs): _*), TypeTree(abstractFunctionErasedType))
-
- val typedNewStat = localTyper.typedPos(originalFunction.pos)(newStat)
+ val allCaptureArgs: List[Tree] = {
+ val thisArg = if (isStatic) Nil else (gen.mkAttributedThis(oldClass) setPos originalFunction.pos) :: Nil
+ val captureArgs = captures.iterator.map(capture => gen.mkAttributedRef(capture) setPos originalFunction.pos).toList
+ thisArg ::: captureArgs
+ }
- DelambdafyAnonClass(anonymousClassDef, typedNewStat)
+ val functionalInterface = java8CompatFunctionalInterface(target, originalFunction.tpe)
+ if (functionalInterface.exists) {
+ // Create a symbol representing a fictional lambda factory method that accepts the captured
+ // arguments and returns a Function.
+ val msym = currentOwner.newMethod(nme.ANON_FUN_NAME, originalFunction.pos, ARTIFACT)
+ val argTypes: List[Type] = allCaptureArgs.map(_.tpe)
+ val params = msym.newSyntheticValueParams(argTypes)
+ msym.setInfo(MethodType(params, originalFunction.tpe))
+ val arity = originalFunction.vparams.length
+
+ // We then apply this symbol to the captures.
+ val apply = localTyper.typedPos(originalFunction.pos)(Apply(Ident(msym), allCaptureArgs)).asInstanceOf[Apply]
+
+ // The backend needs to know the target of the lambda and the functional interface in order
+ // to emit the invokedynamic instruction. We pass this information as tree attachment.
+ apply.updateAttachment(LambdaMetaFactoryCapable(target, arity, functionalInterface))
+ InvokeDynamicLambda(apply)
+ } else {
+ val anonymousClassDef = makeAnonymousClass
+ pkg.info.decls enter anonymousClassDef.symbol
+ val newStat = Typed(New(anonymousClassDef.symbol, allCaptureArgs: _*), TypeTree(abstractFunctionErasedType))
+ val typedNewStat = localTyper.typedPos(originalFunction.pos)(newStat)
+ DelambdafyAnonClass(anonymousClassDef, typedNewStat)
+ }
}
/**
@@ -436,4 +465,38 @@ abstract class Delambdafy extends Transform with TypingTransformers with ast.Tre
super.traverse(tree)
}
}
+
+ final case class LambdaMetaFactoryCapable(target: Symbol, arity: Int, functionalInterface: Symbol)
+
+ // The functional interface that can be used to adapt the lambda target method `target` to the
+ // given function type. Returns `NoSymbol` if the compiler settings are unsuitable, or `LambdaMetaFactory`
+ // would be unable to generate the correct implementation (e.g. functions referring to derived value classes)
+ private def java8CompatFunctionalInterface(target: Symbol, functionType: Type): Symbol = {
+ val canUseLambdaMetafactory: Boolean = {
+ val hasValueClass = exitingErasure {
+ val methodType: Type = target.info
+ methodType.exists(_.isInstanceOf[ErasedValueType])
+ }
+ val isTarget18 = settings.target.value.contains("jvm-1.8")
+ settings.isBCodeActive && isTarget18 && !hasValueClass
+ }
+
+ def functionalInterface: Symbol = {
+ val sym = functionType.typeSymbol
+ val pack = currentRun.runDefinitions.Scala_Java8_CompatPackage
+ val name1 = specializeTypes.specializedFunctionName(sym, functionType.typeArgs)
+ val paramTps :+ restpe = functionType.typeArgs
+ val arity = paramTps.length
+ if (name1.toTypeName == sym.name) {
+ val returnUnit = restpe.typeSymbol == UnitClass
+ val functionInterfaceArray =
+ if (returnUnit) currentRun.runDefinitions.Scala_Java8_CompatPackage_JProcedure
+ else currentRun.runDefinitions.Scala_Java8_CompatPackage_JFunction
+ functionInterfaceArray.apply(arity)
+ } else {
+ pack.info.decl(name1.toTypeName.prepend("J"))
+ }
+ }
+ if (canUseLambdaMetafactory) functionalInterface else NoSymbol
+ }
}
diff --git a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
index 1a24c668ba..53a1347a48 100644
--- a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
+++ b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
@@ -303,6 +303,17 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers {
}
}
+ def specializedFunctionName(sym: Symbol, args: List[Type]) = exitingSpecialize {
+ require(isFunctionSymbol(sym), sym)
+ val env: TypeEnv = TypeEnv.fromSpecialization(sym, args)
+ specializedClass.get((sym, env)) match {
+ case Some(x) =>
+ x.name
+ case None =>
+ sym.name
+ }
+ }
+
/** Return the specialized name of 'sym' in the given environment. It
* guarantees the same result regardless of the map order by sorting
* type variables alphabetically.
@@ -315,10 +326,14 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers {
if (sym.isClass) env.keySet
else specializedTypeVars(sym).intersect(env.keySet)
)
+ specializedName(sym.name, tvars, env)
+ }
+
+ private def specializedName(name: Name, tvars: immutable.Set[Symbol], env: TypeEnv): TermName = {
val (methparams, others) = tvars.toList sortBy ("" + _.name) partition (_.owner.isMethod)
// debuglog("specName(" + sym + ") env: " + env + " tvars: " + tvars)
- specializedName(sym.name, methparams map env, others map env)
+ specializedName(name, methparams map env, others map env)
}
/** Specialize name for the two list of types. The first one denotes
diff --git a/src/compiler/scala/tools/nsc/transform/UnCurry.scala b/src/compiler/scala/tools/nsc/transform/UnCurry.scala
index 6484d96a52..1020b98bb9 100644
--- a/src/compiler/scala/tools/nsc/transform/UnCurry.scala
+++ b/src/compiler/scala/tools/nsc/transform/UnCurry.scala
@@ -237,7 +237,7 @@ abstract class UnCurry extends InfoTransform
def canUseDelamdafyMethod = (
(inConstructorFlag == 0) // Avoiding synthesizing code prone to SI-6666, SI-8363 by using old-style lambda translation
- && !isSpecialized // DelambdafyTransformer currently only emits generic FunctionN-s, use the old style in the meantime
+ && (!isSpecialized || (settings.target.value == "jvm-1.8")) // DelambdafyTransformer currently only emits generic FunctionN-s, use the old style in the meantime
)
if (inlineFunctionExpansion || !canUseDelamdafyMethod) {
val parents = addSerializable(abstractFunctionForFunctionType(fun.tpe))
@@ -437,9 +437,7 @@ abstract class UnCurry extends InfoTransform
def isLiftedLambdaBody(target: Tree) = target.symbol.isLocalToBlock && target.symbol.isArtifact && target.symbol.name.containsName(nme.ANON_FUN_NAME)
val result = (
- // TODO - settings.noassertions.value temporarily retained to avoid
- // breakage until a reasonable interface is settled upon.
- if ((sym ne null) && (sym.elisionLevel.exists (_ < settings.elidebelow.value || settings.noassertions)))
+ if ((sym ne null) && sym.elisionLevel.exists(_ < settings.elidebelow.value))
replaceElidableTree(tree)
else translateSynchronized(tree) match {
case dd @ DefDef(mods, name, tparams, _, tpt, rhs) =>
diff --git a/src/compiler/scala/tools/nsc/transform/patmat/Logic.scala b/src/compiler/scala/tools/nsc/transform/patmat/Logic.scala
index cef22d7d6b..227c45b3a7 100644
--- a/src/compiler/scala/tools/nsc/transform/patmat/Logic.scala
+++ b/src/compiler/scala/tools/nsc/transform/patmat/Logic.scala
@@ -384,9 +384,8 @@ trait Logic extends Debugging {
// ... and what must not?
excluded foreach {
excludedSym =>
- val related = Set(sym, excludedSym)
val exclusive = v.groupedDomains.exists {
- domain => related subsetOf domain.toSet
+ domain => domain.contains(sym) && domain.contains(excludedSym)
}
// TODO: populate `v.exclusiveDomains` with `Set`s from the start, and optimize to:
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
index a3a4c70d1e..4b30b4e436 100644
--- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
@@ -1122,7 +1122,7 @@ abstract class RefChecks extends InfoTransform with scala.reflect.internal.trans
}
/** Sensibility check examines flavors of equals. */
def checkSensible(pos: Position, fn: Tree, args: List[Tree]) = fn match {
- case Select(qual, name @ (nme.EQ | nme.NE | nme.eq | nme.ne)) if args.length == 1 && isObjectOrAnyComparisonMethod(fn.symbol) =>
+ case Select(qual, name @ (nme.EQ | nme.NE | nme.eq | nme.ne)) if args.length == 1 && isObjectOrAnyComparisonMethod(fn.symbol) && !currentOwner.isSynthetic =>
checkSensibleEquals(pos, qual, name, fn.symbol, args.head)
case _ =>
}
diff --git a/src/intellij-14/README b/src/intellij-14/README
deleted file mode 100644
index 310a766a20..0000000000
--- a/src/intellij-14/README
+++ /dev/null
@@ -1,12 +0,0 @@
-Use the latest IntelliJ IDEA release and install the Scala plugin from within the IDE.
-
-Compilation withing IDEA is performed in "-Dlocker.skip=1" mode: the sources are built
-directly using the STARR compiler.
-
-The following steps are required to use IntelliJ IDEA on Scala trunk
- - Run "ant init". This will download some JARs from to ./build/deps, which are
- included in IntelliJ's classpath.
- - Run src/intellij-14/setup.sh
- - Open ./src/intellij-14/scala.ipr in IntelliJ
- - File, Project Settings, Project, SDK. Create an SDK entry named "1.6" containing the
- Java 1.6 SDK
diff --git a/src/intellij-14/asm.iml.SAMPLE b/src/intellij-14/asm.iml.SAMPLE
deleted file mode 100644
index 9b2fd58ce7..0000000000
--- a/src/intellij-14/asm.iml.SAMPLE
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$/../asm">
- <sourceFolder url="file://$MODULE_DIR$/../asm/src" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/../asm" isTestSource="false" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- </component>
-</module> \ No newline at end of file
diff --git a/src/intellij-14/compiler.iml.SAMPLE b/src/intellij-14/compiler.iml.SAMPLE
deleted file mode 100644
index 858ca2f2c2..0000000000
--- a/src/intellij-14/compiler.iml.SAMPLE
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$/../compiler">
- <sourceFolder url="file://$MODULE_DIR$/../compiler" isTestSource="false" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="asm" />
- <orderEntry type="module" module-name="library" />
- <orderEntry type="module" module-name="reflect" />
- <orderEntry type="library" name="ant" level="project" />
- <orderEntry type="library" name="starr-no-deps" level="project" />
- </component>
-</module> \ No newline at end of file
diff --git a/src/intellij-14/diff.sh b/src/intellij-14/diff.sh
deleted file mode 100755
index 54f9248608..0000000000
--- a/src/intellij-14/diff.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env bash
-#
-# Diffs the SAMPLE files against the working project config.
-#
-export SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
-for f in "$SCRIPT_DIR"/*.{iml,ipr}; do
- echo $f; diff -u $f.SAMPLE $f;
-done
diff --git a/src/intellij-14/forkjoin.iml.SAMPLE b/src/intellij-14/forkjoin.iml.SAMPLE
deleted file mode 100644
index 42507b2911..0000000000
--- a/src/intellij-14/forkjoin.iml.SAMPLE
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$/../forkjoin">
- <sourceFolder url="file://$MODULE_DIR$/../forkjoin" isTestSource="false" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- </component>
-</module> \ No newline at end of file
diff --git a/src/intellij-14/interactive.iml.SAMPLE b/src/intellij-14/interactive.iml.SAMPLE
deleted file mode 100644
index db12a7dc9b..0000000000
--- a/src/intellij-14/interactive.iml.SAMPLE
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$/../interactive">
- <sourceFolder url="file://$MODULE_DIR$/../interactive" isTestSource="false" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="compiler" />
- <orderEntry type="module" module-name="library" />
- <orderEntry type="module" module-name="reflect" />
- <orderEntry type="module" module-name="scaladoc" />
- <orderEntry type="library" name="starr-no-deps" level="project" />
- </component>
-</module> \ No newline at end of file
diff --git a/src/intellij-14/library.iml.SAMPLE b/src/intellij-14/library.iml.SAMPLE
deleted file mode 100644
index 08cccba4b9..0000000000
--- a/src/intellij-14/library.iml.SAMPLE
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$/../library">
- <sourceFolder url="file://$MODULE_DIR$/../library" isTestSource="false" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="forkjoin" />
- <orderEntry type="library" name="starr-no-deps" level="project" />
- </component>
-</module> \ No newline at end of file
diff --git a/src/intellij-14/manual.iml.SAMPLE b/src/intellij-14/manual.iml.SAMPLE
deleted file mode 100644
index 2e67076e28..0000000000
--- a/src/intellij-14/manual.iml.SAMPLE
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$/../manual">
- <sourceFolder url="file://$MODULE_DIR$/../manual" isTestSource="false" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="library" />
- <orderEntry type="library" name="ant" level="project" />
- <orderEntry type="library" name="scaladoc-deps" level="project" />
- <orderEntry type="library" name="starr-no-deps" level="project" />
- </component>
-</module> \ No newline at end of file
diff --git a/src/intellij-14/partest-extras.iml.SAMPLE b/src/intellij-14/partest-extras.iml.SAMPLE
deleted file mode 100644
index b3537a949a..0000000000
--- a/src/intellij-14/partest-extras.iml.SAMPLE
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$/../partest-extras">
- <sourceFolder url="file://$MODULE_DIR$/../partest-extras" isTestSource="false" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="asm" />
- <orderEntry type="module" module-name="compiler" />
- <orderEntry type="module" module-name="library" />
- <orderEntry type="module" module-name="reflect" />
- <orderEntry type="module" module-name="repl" />
- <orderEntry type="library" name="partest" level="project" />
- <orderEntry type="library" name="starr-no-deps" level="project" />
- </component>
-</module> \ No newline at end of file
diff --git a/src/intellij-14/partest-javaagent.iml.SAMPLE b/src/intellij-14/partest-javaagent.iml.SAMPLE
deleted file mode 100644
index 3a387aab0f..0000000000
--- a/src/intellij-14/partest-javaagent.iml.SAMPLE
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$/../partest-javaagent">
- <sourceFolder url="file://$MODULE_DIR$/../partest-javaagent" isTestSource="false" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="asm" />
- <orderEntry type="library" name="starr-no-deps" level="project" />
- </component>
-</module> \ No newline at end of file
diff --git a/src/intellij-14/reflect.iml.SAMPLE b/src/intellij-14/reflect.iml.SAMPLE
deleted file mode 100644
index 87da13777b..0000000000
--- a/src/intellij-14/reflect.iml.SAMPLE
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$/../reflect">
- <sourceFolder url="file://$MODULE_DIR$/../reflect" isTestSource="false" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="library" />
- <orderEntry type="library" name="starr-no-deps" level="project" />
- </component>
-</module> \ No newline at end of file
diff --git a/src/intellij-14/repl.iml.SAMPLE b/src/intellij-14/repl.iml.SAMPLE
deleted file mode 100644
index 5a7476b1ef..0000000000
--- a/src/intellij-14/repl.iml.SAMPLE
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$/../repl">
- <sourceFolder url="file://$MODULE_DIR$/../repl" isTestSource="false" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="library" />
- <orderEntry type="module" module-name="compiler" />
- <orderEntry type="module" module-name="asm" />
- <orderEntry type="module" module-name="reflect" />
- <orderEntry type="library" name="repl-deps" level="project" />
- <orderEntry type="library" name="starr-no-deps" level="project" />
- </component>
-</module> \ No newline at end of file
diff --git a/src/intellij-14/scala.iml.SAMPLE b/src/intellij-14/scala.iml.SAMPLE
deleted file mode 100644
index 9e8718dd45..0000000000
--- a/src/intellij-14/scala.iml.SAMPLE
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$/../..">
- <excludeFolder url="file://$MODULE_DIR$/../../build" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- </component>
-</module> \ No newline at end of file
diff --git a/src/intellij-14/scala.ipr.SAMPLE b/src/intellij-14/scala.ipr.SAMPLE
deleted file mode 100644
index af0502034e..0000000000
--- a/src/intellij-14/scala.ipr.SAMPLE
+++ /dev/null
@@ -1,260 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="CompilerConfiguration">
- <option name="DEFAULT_COMPILER" value="Javac" />
- <resourceExtensions />
- <wildcardResourcePatterns>
- <entry name="!?*.java" />
- <entry name="!?*.form" />
- <entry name="!?*.class" />
- <entry name="!?*.groovy" />
- <entry name="!?*.scala" />
- <entry name="!?*.flex" />
- <entry name="!?*.kt" />
- <entry name="!?*.clj" />
- </wildcardResourcePatterns>
- <annotationProcessing>
- <profile default="true" name="Default" enabled="false">
- <processorPath useClasspath="true" />
- </profile>
- </annotationProcessing>
- </component>
- <component name="CopyrightManager" default="" />
- <component name="DaemonCodeAnalyzer">
- <disable_hints />
- </component>
- <component name="DependencyValidationManager">
- <option name="SKIP_IMPORT_STATEMENTS" value="false" />
- </component>
- <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
- <component name="EntryPointsManager">
- <entry_points version="2.0" />
- </component>
- <component name="ProjectLevelVcsManager" settingsEditedManually="false">
- <OptionsSetting value="true" id="Add" />
- <OptionsSetting value="true" id="Remove" />
- <OptionsSetting value="true" id="Checkout" />
- <OptionsSetting value="true" id="Update" />
- <OptionsSetting value="true" id="Status" />
- <OptionsSetting value="true" id="Edit" />
- <ConfirmationsSetting value="0" id="Add" />
- <ConfirmationsSetting value="0" id="Remove" />
- </component>
- <component name="ProjectModuleManager">
- <modules>
- <module fileurl="file://$PROJECT_DIR$/asm.iml" filepath="$PROJECT_DIR$/asm.iml" />
- <module fileurl="file://$PROJECT_DIR$/compiler.iml" filepath="$PROJECT_DIR$/compiler.iml" />
- <module fileurl="file://$PROJECT_DIR$/forkjoin.iml" filepath="$PROJECT_DIR$/forkjoin.iml" />
- <module fileurl="file://$PROJECT_DIR$/interactive.iml" filepath="$PROJECT_DIR$/interactive.iml" />
- <module fileurl="file://$PROJECT_DIR$/library.iml" filepath="$PROJECT_DIR$/library.iml" />
- <module fileurl="file://$PROJECT_DIR$/manual.iml" filepath="$PROJECT_DIR$/manual.iml" />
- <module fileurl="file://$PROJECT_DIR$/partest-extras.iml" filepath="$PROJECT_DIR$/partest-extras.iml" />
- <module fileurl="file://$PROJECT_DIR$/partest-javaagent.iml" filepath="$PROJECT_DIR$/partest-javaagent.iml" />
- <module fileurl="file://$PROJECT_DIR$/reflect.iml" filepath="$PROJECT_DIR$/reflect.iml" />
- <module fileurl="file://$PROJECT_DIR$/repl.iml" filepath="$PROJECT_DIR$/repl.iml" />
- <module fileurl="file://$PROJECT_DIR$/scala.iml" filepath="$PROJECT_DIR$/scala.iml" />
- <module fileurl="file://$PROJECT_DIR$/scaladoc.iml" filepath="$PROJECT_DIR$/scaladoc.iml" />
- <module fileurl="file://$PROJECT_DIR$/scalap.iml" filepath="$PROJECT_DIR$/scalap.iml" />
- <module fileurl="file://$PROJECT_DIR$/test.iml" filepath="$PROJECT_DIR$/test.iml" />
- <module fileurl="file://$PROJECT_DIR$/test-junit.iml" filepath="$PROJECT_DIR$/test-junit.iml" />
- </modules>
- </component>
- <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK">
- <output url="file://$PROJECT_DIR$/../../out" />
- </component>
- <component name="PropertiesComponent">
- <property name="GoToClass.includeLibraries" value="false" />
- <property name="GoToClass.toSaveIncludeLibraries" value="false" />
- <property name="GoToFile.includeJavaFiles" value="false" />
- <property name="MemberChooser.sorted" value="false" />
- <property name="MemberChooser.showClasses" value="true" />
- <property name="MemberChooser.copyJavadoc" value="false" />
- <property name="options.lastSelected" value="configurable.group.appearance" />
- <property name="options.splitter.main.proportions" value="0.3" />
- <property name="options.splitter.details.proportions" value="0.2" />
- <property name="options.searchVisible" value="true" />
- </component>
- <component name="RunManager">
- <configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
- <module name="" />
- <option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
- <option name="PROGRAM_PARAMETERS" />
- <method />
- </configuration>
- <configuration default="true" type="Remote" factoryName="Remote">
- <option name="USE_SOCKET_TRANSPORT" value="true" />
- <option name="SERVER_MODE" value="false" />
- <option name="SHMEM_ADDRESS" value="javadebug" />
- <option name="HOST" value="localhost" />
- <option name="PORT" value="5005" />
- <method />
- </configuration>
- <configuration default="true" type="Applet" factoryName="Applet">
- <module name="" />
- <option name="MAIN_CLASS_NAME" />
- <option name="HTML_FILE_NAME" />
- <option name="HTML_USED" value="false" />
- <option name="WIDTH" value="400" />
- <option name="HEIGHT" value="300" />
- <option name="POLICY_FILE" value="$CARDEA_HOME$/bin/appletviewer.policy" />
- <option name="VM_PARAMETERS" />
- <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
- <option name="ALTERNATIVE_JRE_PATH" />
- <method />
- </configuration>
- <configuration default="true" type="TestNG" factoryName="TestNG">
- <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
- <module name="" />
- <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
- <option name="ALTERNATIVE_JRE_PATH" />
- <option name="SUITE_NAME" />
- <option name="PACKAGE_NAME" />
- <option name="MAIN_CLASS_NAME" />
- <option name="METHOD_NAME" />
- <option name="GROUP_NAME" />
- <option name="TEST_OBJECT" value="CLASS" />
- <option name="VM_PARAMETERS" value="-ea" />
- <option name="PARAMETERS" />
- <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
- <option name="OUTPUT_DIRECTORY" />
- <option name="ANNOTATION_TYPE" />
- <option name="ENV_VARIABLES" />
- <option name="PASS_PARENT_ENVS" value="true" />
- <option name="TEST_SEARCH_SCOPE">
- <value defaultName="moduleWithDependencies" />
- </option>
- <option name="USE_DEFAULT_REPORTERS" value="false" />
- <option name="PROPERTIES_FILE" />
- <envs />
- <properties />
- <listeners />
- <method />
- </configuration>
- <configuration default="true" type="Application" factoryName="Application">
- <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
- <option name="MAIN_CLASS_NAME" />
- <option name="VM_PARAMETERS" />
- <option name="PROGRAM_PARAMETERS" />
- <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
- <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
- <option name="ALTERNATIVE_JRE_PATH" />
- <option name="ENABLE_SWING_INSPECTOR" value="false" />
- <option name="ENV_VARIABLES" />
- <option name="PASS_PARENT_ENVS" value="true" />
- <module name="" />
- <envs />
- <method />
- </configuration>
- <configuration default="true" type="JUnit" factoryName="JUnit">
- <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
- <module name="" />
- <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
- <option name="ALTERNATIVE_JRE_PATH" />
- <option name="PACKAGE_NAME" />
- <option name="MAIN_CLASS_NAME" />
- <option name="METHOD_NAME" />
- <option name="TEST_OBJECT" value="class" />
- <option name="VM_PARAMETERS" value="-ea" />
- <option name="PARAMETERS" />
- <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
- <option name="ENV_VARIABLES" />
- <option name="PASS_PARENT_ENVS" value="true" />
- <option name="TEST_SEARCH_SCOPE">
- <value defaultName="moduleWithDependencies" />
- </option>
- <envs />
- <patterns />
- <method />
- </configuration>
- <list size="0" />
- <configuration name="&lt;template&gt;" type="WebApp" default="true" selected="false">
- <Host>localhost</Host>
- <Port>5050</Port>
- </configuration>
- </component>
- <component name="ScalaCompilerConfiguration">
- <parameters>
- <parameter value="-sourcepath" />
- <parameter value="$PROJECT_DIR$/../library" />
- </parameters>
- </component>
- <component name="VcsContentAnnotationSettings">
- <option name="myLimit" value="2678400000" />
- </component>
- <component name="VcsDirectoryMappings">
- <mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
- </component>
- <component name="VcsManagerConfiguration">
- <option name="myTodoPanelSettings">
- <TodoPanelSettings />
- </option>
- </component>
- <component name="libraryTable">
- <library name="ant">
- <CLASSES>
- <root url="jar://$PROJECT_DIR$/../../lib/ant/ant.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- <library name="junit">
- <CLASSES>
- <root url="file://$PROJECT_DIR$/../../build/deps/junit" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- <jarDirectory url="file://$PROJECT_DIR$/../../build/deps/junit" recursive="false" />
- </library>
- <library name="partest">
- <CLASSES>
- <root url="file://$PROJECT_DIR$/../../build/deps/partest" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- <jarDirectory url="file://$PROJECT_DIR$/../../build/deps/partest" recursive="false" />
- </library>
- <library name="repl-deps">
- <CLASSES>
- <root url="file://$PROJECT_DIR$/../../build/deps/repl" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- <jarDirectory url="file://$PROJECT_DIR$/../../build/deps/repl" recursive="false" />
- </library>
- <library name="scaladoc-deps">
- <CLASSES>
- <root url="file://$PROJECT_DIR$/../../build/deps/scaladoc" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- <jarDirectory url="file://$PROJECT_DIR$/../../build/deps/scaladoc" recursive="false" />
- </library>
- <library name="starr" type="Scala">
- <properties>
- <compiler-classpath>
- <root url="file://$PROJECT_DIR$/../../build/deps/starr/scala-compiler-#scala-version#.jar" />
- <root url="file://$PROJECT_DIR$/../../build/deps/starr/scala-library-#scala-version#.jar" />
- <root url="file://$PROJECT_DIR$/../../build/deps/starr/scala-reflect-#scala-version#.jar" />
- </compiler-classpath>
- </properties>
- <CLASSES>
- <root url="jar://$PROJECT_DIR$/../../build/deps/starr/scala-library-#scala-version#.jar!/" />
- <root url="jar://$PROJECT_DIR$/../../build/deps/starr/scala-reflect-#scala-version#.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- <library name="starr-no-deps" type="Scala">
- <properties>
- <compiler-classpath>
- <root url="file://$PROJECT_DIR$/../../build/deps/starr/scala-compiler-#scala-version#.jar" />
- <root url="file://$PROJECT_DIR$/../../build/deps/starr/scala-library-#scala-version#.jar" />
- <root url="file://$PROJECT_DIR$/../../build/deps/starr/scala-reflect-#scala-version#.jar" />
- </compiler-classpath>
- </properties>
- <CLASSES />
- <JAVADOC />
- <SOURCES />
- </library>
- </component>
-</project> \ No newline at end of file
diff --git a/src/intellij-14/scaladoc.iml.SAMPLE b/src/intellij-14/scaladoc.iml.SAMPLE
deleted file mode 100644
index 5c7015aa61..0000000000
--- a/src/intellij-14/scaladoc.iml.SAMPLE
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$/../scaladoc">
- <sourceFolder url="file://$MODULE_DIR$/../scaladoc" isTestSource="false" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="compiler" />
- <orderEntry type="module" module-name="library" />
- <orderEntry type="module" module-name="reflect" />
- <orderEntry type="library" name="scaladoc-deps" level="project" />
- <orderEntry type="library" name="partest" level="project" />
- <orderEntry type="library" name="starr-no-deps" level="project" />
- <orderEntry type="library" name="ant" level="project" />
- </component>
-</module> \ No newline at end of file
diff --git a/src/intellij-14/scalap.iml.SAMPLE b/src/intellij-14/scalap.iml.SAMPLE
deleted file mode 100644
index e09b8d11b6..0000000000
--- a/src/intellij-14/scalap.iml.SAMPLE
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$/../scalap">
- <sourceFolder url="file://$MODULE_DIR$/../scalap" isTestSource="false" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="compiler" />
- <orderEntry type="module" module-name="library" />
- <orderEntry type="module" module-name="reflect" />
- <orderEntry type="library" name="starr-no-deps" level="project" />
- </component>
-</module> \ No newline at end of file
diff --git a/src/intellij-14/setup.sh b/src/intellij-14/setup.sh
deleted file mode 100755
index cf08898f24..0000000000
--- a/src/intellij-14/setup.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/env bash
-#
-# Generates IntelliJ IDEA project files based on the checked-in samples.
-#
-
-set -e
-export SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
-echo "About to delete .ipr and .iml files and replace with the .SAMPLE files. Press enter to continue or CTRL-C to cancel."
-read
-
-for f in "$SCRIPT_DIR"/*.SAMPLE; do
- g=${f%.SAMPLE}
- cp $f $g
-done
-
-SCALA_VERSION="`cat $SCRIPT_DIR/../../versions.properties | grep 'starr.version' | awk '{split($0,a,"="); print a[2]}'`"
-sed "s/#scala-version#/$SCALA_VERSION/g" $SCRIPT_DIR/scala.ipr.SAMPLE > $SCRIPT_DIR/scala.ipr \ No newline at end of file
diff --git a/src/intellij-14/test-junit.iml.SAMPLE b/src/intellij-14/test-junit.iml.SAMPLE
deleted file mode 100644
index 0dd9044066..0000000000
--- a/src/intellij-14/test-junit.iml.SAMPLE
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$/../../test/junit">
- <sourceFolder url="file://$MODULE_DIR$/../../test/junit" isTestSource="true" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="library" name="junit" level="project" />
- <orderEntry type="library" name="scaladoc-deps" level="project" />
- <orderEntry type="module" module-name="asm" />
- <orderEntry type="module" module-name="compiler" />
- <orderEntry type="module" module-name="forkjoin" />
- <orderEntry type="module" module-name="library" />
- <orderEntry type="module" module-name="partest-extras" />
- <orderEntry type="module" module-name="reflect" />
- <orderEntry type="module" module-name="repl" />
- <orderEntry type="library" name="starr-no-deps" level="project" />
- </component>
-</module> \ No newline at end of file
diff --git a/src/intellij-14/test.iml.SAMPLE b/src/intellij-14/test.iml.SAMPLE
deleted file mode 100644
index 4492f66db6..0000000000
--- a/src/intellij-14/test.iml.SAMPLE
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$/../../test">
- <excludeFolder url="file://$MODULE_DIR$/../../test/junit" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="asm" />
- <orderEntry type="module" module-name="compiler" />
- <orderEntry type="module" module-name="forkjoin" />
- <orderEntry type="module" module-name="library" />
- <orderEntry type="module" module-name="partest-extras" />
- <orderEntry type="module" module-name="reflect" />
- <orderEntry type="module" module-name="repl" />
- <orderEntry type="library" name="partest" level="project" />
- <orderEntry type="library" name="scaladoc-deps" level="project" />
- <orderEntry type="library" name="starr-no-deps" level="project" />
- </component>
-</module> \ No newline at end of file
diff --git a/src/intellij-14/update.sh b/src/intellij-14/update.sh
deleted file mode 100755
index eb6fea782f..0000000000
--- a/src/intellij-14/update.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/env bash
-#
-# Updates the .SAMPLE files with the current project files.
-#
-
-set -e
-export SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
-
-echo "About to create overwrite the .ipr.SAMPLE and .iml.SAMPLE files with the current project files. Press enter to continue or CTRL-C to cancel."
-read
-
-for f in "$SCRIPT_DIR"/*.{iml,ipr}; do
- cp $f $f.SAMPLE
-done
-
-for f in "$SCRIPT_DIR"/*.SAMPLE; do
- g=${f%.SAMPLE}
- if [[ ! -f $g ]]; then
- echo "Stale sample file, deleting $f"
- rm $f
- fi
-done
diff --git a/src/intellij/README b/src/intellij/README
index a39691f4f0..4ecab5561f 100644
--- a/src/intellij/README
+++ b/src/intellij/README
@@ -7,6 +7,6 @@ The following steps are required to use IntelliJ IDEA on Scala trunk
- Run "ant init". This will download some JARs from to ./build/deps, which are
included in IntelliJ's classpath.
- Run src/intellij/setup.sh
- - Open ./src/intellij/scala-lang.ipr in IntelliJ
+ - Open ./src/intellij/scala.ipr in IntelliJ
- File, Project Settings, Project, SDK. Create an SDK entry named "1.6" containing the
- java 1.6 SDK
+ Java 1.6 SDK
diff --git a/src/intellij/asm.iml.SAMPLE b/src/intellij/asm.iml.SAMPLE
index ba9e7e899f..9886154bdf 100644
--- a/src/intellij/asm.iml.SAMPLE
+++ b/src/intellij/asm.iml.SAMPLE
@@ -8,5 +8,4 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
-</module>
-
+</module> \ No newline at end of file
diff --git a/src/intellij/compiler.iml.SAMPLE b/src/intellij/compiler.iml.SAMPLE
index 50253000ab..0e121925e6 100644
--- a/src/intellij/compiler.iml.SAMPLE
+++ b/src/intellij/compiler.iml.SAMPLE
@@ -1,27 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
- <component name="FacetManager">
- <facet type="scala" name="Scala">
- <configuration>
- <option name="compilerLibraryLevel" value="Project" />
- <option name="compilerLibraryName" value="starr" />
- <option name="languageLevel" value="Scala 2.11" />
- <option name="maximumHeapSize" value="1536" />
- <option name="vmOptions" value="-Xms1536m -Xss1m -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=256m -XX:+CMSClassUnloadingEnabled -XX:+UseCompressedOops -XX:+UseParallelGC" />
- </configuration>
- </facet>
- </component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$/../compiler">
+ <sourceFolder url="file://$MODULE_DIR$/../compiler/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../compiler" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="library" />
<orderEntry type="module" module-name="reflect" />
- <orderEntry type="module" module-name="asm" />
+ <orderEntry type="library" name="starr" level="project" />
<orderEntry type="library" name="ant" level="project" />
+ <orderEntry type="library" name="asm" level="project" />
</component>
-</module>
-
+</module> \ No newline at end of file
diff --git a/src/intellij/forkjoin.iml.SAMPLE b/src/intellij/forkjoin.iml.SAMPLE
index be807cc019..42507b2911 100644
--- a/src/intellij/forkjoin.iml.SAMPLE
+++ b/src/intellij/forkjoin.iml.SAMPLE
@@ -8,5 +8,4 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
-</module>
-
+</module> \ No newline at end of file
diff --git a/src/intellij/interactive.iml.SAMPLE b/src/intellij/interactive.iml.SAMPLE
index 83178021d3..047b5c9069 100644
--- a/src/intellij/interactive.iml.SAMPLE
+++ b/src/intellij/interactive.iml.SAMPLE
@@ -1,16 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
- <component name="FacetManager">
- <facet type="scala" name="Scala">
- <configuration>
- <option name="compilerLibraryLevel" value="Project" />
- <option name="compilerLibraryName" value="starr" />
- <option name="languageLevel" value="Scala 2.11" />
- <option name="maximumHeapSize" value="1536" />
- <option name="vmOptions" value="-Xms1536m -Xss1m -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=256m -XX:+CMSClassUnloadingEnabled -XX:+UseCompressedOops -XX:+UseParallelGC" />
- </configuration>
- </facet>
- </component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$/../interactive">
@@ -18,10 +7,9 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module" module-name="compiler" />
<orderEntry type="module" module-name="library" />
<orderEntry type="module" module-name="reflect" />
- <orderEntry type="module" module-name="compiler" />
- <orderEntry type="module" module-name="scaladoc" />
+ <orderEntry type="library" name="starr" level="project" />
</component>
-</module>
-
+</module> \ No newline at end of file
diff --git a/src/intellij/library.iml.SAMPLE b/src/intellij/library.iml.SAMPLE
index 137ce6eb9c..b03fef9414 100644
--- a/src/intellij/library.iml.SAMPLE
+++ b/src/intellij/library.iml.SAMPLE
@@ -1,25 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
- <component name="FacetManager">
- <facet type="scala" name="Scala">
- <configuration>
- <option name="compilerLibraryLevel" value="Project" />
- <option name="compilerLibraryName" value="starr" />
- <option name="compilerOptions" value="-sourcepath $MODULE_DIR$/../library" />
- <option name="languageLevel" value="Scala 2.11" />
- <option name="maximumHeapSize" value="1536" />
- <option name="vmOptions" value="-Xms1536m -Xss1m -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=256m -XX:+CMSClassUnloadingEnabled -XX:+UseCompressedOops -XX:+UseParallelGC" />
- </configuration>
- </facet>
- </component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$/../library">
+ <sourceFolder url="file://$MODULE_DIR$/../library/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../library" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="forkjoin" />
+ <orderEntry type="library" name="starr" level="project" />
</component>
-</module>
-
+</module> \ No newline at end of file
diff --git a/src/intellij/manual.iml.SAMPLE b/src/intellij/manual.iml.SAMPLE
index 8babde73ea..97bfb5940a 100644
--- a/src/intellij/manual.iml.SAMPLE
+++ b/src/intellij/manual.iml.SAMPLE
@@ -1,16 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
- <component name="FacetManager">
- <facet type="scala" name="Scala">
- <configuration>
- <option name="compilerLibraryLevel" value="Project" />
- <option name="compilerLibraryName" value="starr" />
- <option name="languageLevel" value="Scala 2.11" />
- <option name="maximumHeapSize" value="1536" />
- <option name="vmOptions" value="-Xms1536m -Xss1m -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=256m -XX:+CMSClassUnloadingEnabled -XX:+UseCompressedOops -XX:+UseParallelGC" />
- </configuration>
- </facet>
- </component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$/../manual">
@@ -19,8 +8,8 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="library" />
- <orderEntry type="library" name="ant" level="project" />
<orderEntry type="library" name="scaladoc-deps" level="project" />
+ <orderEntry type="library" name="ant" level="project" />
+ <orderEntry type="library" name="starr" level="project" />
</component>
-</module>
-
+</module> \ No newline at end of file
diff --git a/src/intellij/partest-extras.iml.SAMPLE b/src/intellij/partest-extras.iml.SAMPLE
index c2ada43493..1cd712184b 100644
--- a/src/intellij/partest-extras.iml.SAMPLE
+++ b/src/intellij/partest-extras.iml.SAMPLE
@@ -1,14 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
- <component name="FacetManager">
- <facet type="scala" name="Scala">
- <configuration>
- <option name="compilerLibraryLevel" value="Project" />
- <option name="compilerLibraryName" value="starr" />
- <option name="languageLevel" value="Scala 2.11" />
- </configuration>
- </facet>
- </component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$/../partest-extras">
@@ -16,12 +7,12 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="asm" />
+ <orderEntry type="module" module-name="compiler" />
<orderEntry type="module" module-name="library" />
<orderEntry type="module" module-name="reflect" />
- <orderEntry type="module" module-name="compiler" />
<orderEntry type="module" module-name="repl" />
<orderEntry type="library" name="partest" level="project" />
+ <orderEntry type="library" name="starr" level="project" />
+ <orderEntry type="library" name="asm" level="project" />
</component>
-</module>
-
+</module> \ No newline at end of file
diff --git a/src/intellij/partest-javaagent.iml.SAMPLE b/src/intellij/partest-javaagent.iml.SAMPLE
index e47e0f6349..ffc540cdb9 100644
--- a/src/intellij/partest-javaagent.iml.SAMPLE
+++ b/src/intellij/partest-javaagent.iml.SAMPLE
@@ -7,7 +7,6 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="asm" />
+ <orderEntry type="library" name="asm" level="project" />
</component>
-</module>
-
+</module> \ No newline at end of file
diff --git a/src/intellij/reflect.iml.SAMPLE b/src/intellij/reflect.iml.SAMPLE
index d206304896..c9b7130aef 100644
--- a/src/intellij/reflect.iml.SAMPLE
+++ b/src/intellij/reflect.iml.SAMPLE
@@ -1,17 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
- <component name="FacetManager">
- <facet type="scala" name="Scala">
- <configuration>
- <option name="compilerLibraryLevel" value="Project" />
- <option name="compilerLibraryName" value="starr" />
- <option name="compilerOptions" value="-sourcepath $MODULE_DIR$/../reflect" />
- <option name="languageLevel" value="Scala 2.11" />
- <option name="maximumHeapSize" value="1536" />
- <option name="vmOptions" value="-Xms1536m -Xss1m -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=256m -XX:+CMSClassUnloadingEnabled -XX:+UseCompressedOops -XX:+UseParallelGC" />
- </configuration>
- </facet>
- </component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$/../reflect">
@@ -20,6 +8,6 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="library" />
+ <orderEntry type="library" name="starr" level="project" />
</component>
-</module>
-
+</module> \ No newline at end of file
diff --git a/src/intellij/repl.iml.SAMPLE b/src/intellij/repl.iml.SAMPLE
index 83791f4f6e..7476f30131 100644
--- a/src/intellij/repl.iml.SAMPLE
+++ b/src/intellij/repl.iml.SAMPLE
@@ -1,16 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
- <component name="FacetManager">
- <facet type="scala" name="Scala">
- <configuration>
- <option name="compilerLibraryLevel" value="Project" />
- <option name="compilerLibraryName" value="starr" />
- <option name="languageLevel" value="Scala 2.11" />
- <option name="maximumHeapSize" value="1536" />
- <option name="vmOptions" value="-Xms1536m -Xss1m -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=256m -XX:+CMSClassUnloadingEnabled -XX:+UseCompressedOops -XX:+UseParallelGC" />
- </configuration>
- </facet>
- </component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$/../repl">
@@ -18,10 +7,11 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module" module-name="compiler" />
<orderEntry type="module" module-name="library" />
<orderEntry type="module" module-name="reflect" />
- <orderEntry type="module" module-name="compiler" />
+ <orderEntry type="library" name="starr" level="project" />
<orderEntry type="library" name="repl-deps" level="project" />
+ <orderEntry type="library" name="asm" level="project" />
</component>
-</module>
-
+</module> \ No newline at end of file
diff --git a/src/intellij/scala-lang.ipr.SAMPLE b/src/intellij/scala-lang.ipr.SAMPLE
deleted file mode 100644
index a22bbd11dd..0000000000
--- a/src/intellij/scala-lang.ipr.SAMPLE
+++ /dev/null
@@ -1,286 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="CompilerConfiguration">
- <option name="DEFAULT_COMPILER" value="Javac" />
- <resourceExtensions>
- <entry name=".+\.(properties|xml|html|dtd|tld)" />
- <entry name=".+\.(gif|png|jpeg|jpg)" />
- </resourceExtensions>
- <wildcardResourcePatterns>
- <entry name="?*.properties" />
- <entry name="?*.xml" />
- <entry name="?*.gif" />
- <entry name="?*.png" />
- <entry name="?*.jpeg" />
- <entry name="?*.jpg" />
- <entry name="?*.html" />
- <entry name="?*.dtd" />
- <entry name="?*.tld" />
- <entry name="?*.ftl" />
- </wildcardResourcePatterns>
- <annotationProcessing>
- <profile default="true" name="Default" enabled="false">
- <processorPath useClasspath="true" />
- </profile>
- </annotationProcessing>
- </component>
- <component name="CopyrightManager" default="" />
- <component name="DependencyValidationManager">
- <option name="SKIP_IMPORT_STATEMENTS" value="false" />
- </component>
- <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
- <component name="EntryPointsManager">
- <entry_points version="2.0" />
- </component>
- <component name="HighlightingAdvisor">
- <option name="SUGGEST_TYPE_AWARE_HIGHLIGHTING" value="false" />
- </component>
- <component name="InspectionProjectProfileManager">
- <profiles>
- <profile version="1.0" is_locked="false">
- <option name="myName" value="Project Default" />
- <option name="myLocal" value="false" />
- <inspection_tool class="LoggerInitializedWithForeignClass" enabled="false" level="WARNING" enabled_by_default="false">
- <option name="loggerClassName" value="org.apache.log4j.Logger,org.slf4j.LoggerFactory,org.apache.commons.logging.LogFactory,java.util.logging.Logger" />
- <option name="loggerFactoryMethodName" value="getLogger,getLogger,getLog,getLogger" />
- </inspection_tool>
- <inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
- <option name="processCode" value="true" />
- <option name="processLiterals" value="true" />
- <option name="processComments" value="true" />
- </inspection_tool>
- <inspection_tool class="UnitMethodIsParameterless" enabled="false" level="WARNING" enabled_by_default="false" />
- </profile>
- </profiles>
- <option name="PROJECT_PROFILE" value="Project Default" />
- <option name="USE_PROJECT_PROFILE" value="true" />
- <version value="1.0" />
- </component>
- <component name="JavacSettings">
- <option name="ADDITIONAL_OPTIONS_STRING" value="-source 1.6 -target 1.6" />
- </component>
- <component name="JavadocGenerationManager">
- <option name="OUTPUT_DIRECTORY" />
- <option name="OPTION_SCOPE" value="protected" />
- <option name="OPTION_HIERARCHY" value="true" />
- <option name="OPTION_NAVIGATOR" value="true" />
- <option name="OPTION_INDEX" value="true" />
- <option name="OPTION_SEPARATE_INDEX" value="true" />
- <option name="OPTION_DOCUMENT_TAG_USE" value="false" />
- <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" />
- <option name="OPTION_DOCUMENT_TAG_VERSION" value="false" />
- <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true" />
- <option name="OPTION_DEPRECATED_LIST" value="true" />
- <option name="OTHER_OPTIONS" value="" />
- <option name="HEAP_SIZE" />
- <option name="LOCALE" />
- <option name="OPEN_IN_BROWSER" value="true" />
- </component>
- <component name="Palette2">
- <group name="Swing">
- <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
- <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
- </item>
- <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
- <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
- </item>
- <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
- <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
- </item>
- <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
- <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
- </item>
- <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
- <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
- <initial-values>
- <property name="text" value="Button" />
- </initial-values>
- </item>
- <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
- <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
- <initial-values>
- <property name="text" value="RadioButton" />
- </initial-values>
- </item>
- <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
- <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
- <initial-values>
- <property name="text" value="CheckBox" />
- </initial-values>
- </item>
- <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
- <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
- <initial-values>
- <property name="text" value="Label" />
- </initial-values>
- </item>
- <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
- <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
- <preferred-size width="150" height="-1" />
- </default-constraints>
- </item>
- <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
- <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
- <preferred-size width="150" height="-1" />
- </default-constraints>
- </item>
- <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
- <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
- <preferred-size width="150" height="-1" />
- </default-constraints>
- </item>
- <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
- <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
- <preferred-size width="150" height="50" />
- </default-constraints>
- </item>
- <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
- <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
- <preferred-size width="150" height="50" />
- </default-constraints>
- </item>
- <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
- <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
- <preferred-size width="150" height="50" />
- </default-constraints>
- </item>
- <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
- <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
- </item>
- <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
- <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
- <preferred-size width="150" height="50" />
- </default-constraints>
- </item>
- <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
- <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
- <preferred-size width="150" height="50" />
- </default-constraints>
- </item>
- <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
- <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
- <preferred-size width="150" height="50" />
- </default-constraints>
- </item>
- <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
- <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
- <preferred-size width="200" height="200" />
- </default-constraints>
- </item>
- <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
- <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
- <preferred-size width="200" height="200" />
- </default-constraints>
- </item>
- <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
- <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
- </item>
- <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
- <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
- </item>
- <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
- <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
- </item>
- <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
- <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
- </item>
- <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
- <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
- <preferred-size width="-1" height="20" />
- </default-constraints>
- </item>
- <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
- <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
- </item>
- <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
- <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
- </item>
- </group>
- </component>
- <component name="ProjectDictionaryState">
- <dictionary name="luc" />
- </component>
- <component name="ProjectModuleManager">
- <modules>
- <module fileurl="file://$PROJECT_DIR$/asm.iml" filepath="$PROJECT_DIR$/asm.iml" />
- <module fileurl="file://$PROJECT_DIR$/compiler.iml" filepath="$PROJECT_DIR$/compiler.iml" />
- <module fileurl="file://$PROJECT_DIR$/forkjoin.iml" filepath="$PROJECT_DIR$/forkjoin.iml" />
- <module fileurl="file://$PROJECT_DIR$/interactive.iml" filepath="$PROJECT_DIR$/interactive.iml" />
- <module fileurl="file://$PROJECT_DIR$/library.iml" filepath="$PROJECT_DIR$/library.iml" />
- <module fileurl="file://$PROJECT_DIR$/manual.iml" filepath="$PROJECT_DIR$/manual.iml" />
- <module fileurl="file://$PROJECT_DIR$/partest-extras.iml" filepath="$PROJECT_DIR$/partest-extras.iml" />
- <module fileurl="file://$PROJECT_DIR$/partest-javaagent.iml" filepath="$PROJECT_DIR$/partest-javaagent.iml" />
- <module fileurl="file://$PROJECT_DIR$/reflect.iml" filepath="$PROJECT_DIR$/reflect.iml" />
- <module fileurl="file://$PROJECT_DIR$/repl.iml" filepath="$PROJECT_DIR$/repl.iml" />
- <module fileurl="file://$PROJECT_DIR$/scala.iml" filepath="$PROJECT_DIR$/scala.iml" />
- <module fileurl="file://$PROJECT_DIR$/scaladoc.iml" filepath="$PROJECT_DIR$/scaladoc.iml" />
- <module fileurl="file://$PROJECT_DIR$/scalap.iml" filepath="$PROJECT_DIR$/scalap.iml" />
- <module fileurl="file://$PROJECT_DIR$/test.iml" filepath="$PROJECT_DIR$/test.iml" />
- <module fileurl="file://$PROJECT_DIR$/test-junit.iml" filepath="$PROJECT_DIR$/test-junit.iml" />
- <module fileurl="file://$PROJECT_DIR$/test-osgi.iml" filepath="$PROJECT_DIR$/test-osgi.iml" />
- </modules>
- </component>
- <component name="ProjectResources">
- <default-html-doctype>http://www.w3.org/1999/xhtml</default-html-doctype>
- </component>
- <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK">
- <output url="file://$PROJECT_DIR$/../../out" />
- </component>
- <component name="ScalacSettings">
- <option name="COMPILER_LIBRARY_NAME" value="compiler-locker" />
- <option name="COMPILER_LIBRARY_LEVEL" value="Project" />
- </component>
- <component name="VcsDirectoryMappings">
- <mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
- </component>
- <component name="libraryTable">
- <library name="ant">
- <CLASSES>
- <root url="jar://$PROJECT_DIR$/../../lib/ant/ant.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- <library name="junit">
- <CLASSES>
- <root url="file://$PROJECT_DIR$/../../build/deps/junit" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- <jarDirectory url="file://$PROJECT_DIR$/../../build/deps/junit" recursive="false" />
- </library>
- <library name="partest">
- <CLASSES>
- <root url="file://$PROJECT_DIR$/../../build/deps/partest" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- <jarDirectory url="file://$PROJECT_DIR$/../../build/deps/partest" recursive="false" />
- </library>
- <library name="repl-deps">
- <CLASSES>
- <root url="file://$PROJECT_DIR$/../../build/deps/repl" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- <jarDirectory url="file://$PROJECT_DIR$/../../build/deps/repl" recursive="false" />
- </library>
- <library name="scaladoc-deps">
- <CLASSES>
- <root url="file://$PROJECT_DIR$/../../build/deps/scaladoc" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- <jarDirectory url="file://$PROJECT_DIR$/../../build/deps/scaladoc" recursive="false" />
- </library>
- <library name="starr">
- <CLASSES>
- <root url="file://$PROJECT_DIR$/../../build/deps/starr" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- <jarDirectory url="file://$PROJECT_DIR$/../../build/deps/starr" recursive="false" />
- </library>
- </component>
-</project>
-
diff --git a/src/intellij/scala.iml.SAMPLE b/src/intellij/scala.iml.SAMPLE
index a4d863800b..9e8718dd45 100644
--- a/src/intellij/scala.iml.SAMPLE
+++ b/src/intellij/scala.iml.SAMPLE
@@ -8,5 +8,4 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
-</module>
-
+</module> \ No newline at end of file
diff --git a/src/intellij/scala.ipr.SAMPLE b/src/intellij/scala.ipr.SAMPLE
new file mode 100644
index 0000000000..290d53aa5d
--- /dev/null
+++ b/src/intellij/scala.ipr.SAMPLE
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="CompilerConfiguration">
+ <option name="DEFAULT_COMPILER" value="Javac" />
+ <resourceExtensions />
+ <wildcardResourcePatterns>
+ <entry name="!?*.java" />
+ <entry name="!?*.form" />
+ <entry name="!?*.class" />
+ <entry name="!?*.groovy" />
+ <entry name="!?*.scala" />
+ <entry name="!?*.flex" />
+ <entry name="!?*.kt" />
+ <entry name="!?*.clj" />
+ </wildcardResourcePatterns>
+ <annotationProcessing>
+ <profile default="true" name="Default" enabled="false">
+ <processorPath useClasspath="true" />
+ </profile>
+ </annotationProcessing>
+ </component>
+ <component name="CopyrightManager" default="" />
+ <component name="EntryPointsManager">
+ <entry_points version="2.0" />
+ </component>
+ <component name="ProjectLevelVcsManager" settingsEditedManually="false">
+ <OptionsSetting value="true" id="Add" />
+ <OptionsSetting value="true" id="Remove" />
+ <OptionsSetting value="true" id="Checkout" />
+ <OptionsSetting value="true" id="Update" />
+ <OptionsSetting value="true" id="Status" />
+ <OptionsSetting value="true" id="Edit" />
+ <ConfirmationsSetting value="0" id="Add" />
+ <ConfirmationsSetting value="0" id="Remove" />
+ </component>
+ <component name="ProjectModuleManager">
+ <modules>
+ <module fileurl="file://$PROJECT_DIR$/compiler.iml" filepath="$PROJECT_DIR$/compiler.iml" />
+ <module fileurl="file://$PROJECT_DIR$/forkjoin.iml" filepath="$PROJECT_DIR$/forkjoin.iml" />
+ <module fileurl="file://$PROJECT_DIR$/interactive.iml" filepath="$PROJECT_DIR$/interactive.iml" />
+ <module fileurl="file://$PROJECT_DIR$/library.iml" filepath="$PROJECT_DIR$/library.iml" />
+ <module fileurl="file://$PROJECT_DIR$/manual.iml" filepath="$PROJECT_DIR$/manual.iml" />
+ <module fileurl="file://$PROJECT_DIR$/partest-extras.iml" filepath="$PROJECT_DIR$/partest-extras.iml" />
+ <module fileurl="file://$PROJECT_DIR$/partest-javaagent.iml" filepath="$PROJECT_DIR$/partest-javaagent.iml" />
+ <module fileurl="file://$PROJECT_DIR$/reflect.iml" filepath="$PROJECT_DIR$/reflect.iml" />
+ <module fileurl="file://$PROJECT_DIR$/repl.iml" filepath="$PROJECT_DIR$/repl.iml" />
+ <module fileurl="file://$PROJECT_DIR$/scala.iml" filepath="$PROJECT_DIR$/scala.iml" />
+ <module fileurl="file://$PROJECT_DIR$/scaladoc.iml" filepath="$PROJECT_DIR$/scaladoc.iml" />
+ <module fileurl="file://$PROJECT_DIR$/scalap.iml" filepath="$PROJECT_DIR$/scalap.iml" />
+ <module fileurl="file://$PROJECT_DIR$/test.iml" filepath="$PROJECT_DIR$/test.iml" />
+ <module fileurl="file://$PROJECT_DIR$/test-junit.iml" filepath="$PROJECT_DIR$/test-junit.iml" />
+ </modules>
+ </component>
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK">
+ <output url="file://$PROJECT_DIR$/../../out" />
+ </component>
+ <component name="ScalaCompilerConfiguration">
+ <parameters>
+ <parameter value="-sourcepath" />
+ <parameter value="$PROJECT_DIR$/../library" />
+ </parameters>
+ </component>
+ <component name="VcsDirectoryMappings">
+ <mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
+ </component>
+ <component name="libraryTable">
+ <library name="ant">
+ <CLASSES>
+ <root url="jar://$PROJECT_DIR$/../../lib/ant/ant.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ <library name="asm">
+ <CLASSES>
+ <root url="file://$PROJECT_DIR$/../../build/deps/asm" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ <jarDirectory url="file://$PROJECT_DIR$/../../build/deps/asm" recursive="false" />
+ </library>
+ <library name="junit">
+ <CLASSES>
+ <root url="file://$PROJECT_DIR$/../../build/deps/junit" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ <jarDirectory url="file://$PROJECT_DIR$/../../build/deps/junit" recursive="false" />
+ </library>
+ <library name="partest">
+ <CLASSES>
+ <root url="file://$PROJECT_DIR$/../../build/deps/partest" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ <jarDirectory url="file://$PROJECT_DIR$/../../build/deps/partest" recursive="false" />
+ </library>
+ <library name="repl-deps">
+ <CLASSES>
+ <root url="file://$PROJECT_DIR$/../../build/deps/repl" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ <jarDirectory url="file://$PROJECT_DIR$/../../build/deps/repl" recursive="false" />
+ </library>
+ <library name="scaladoc-deps">
+ <CLASSES>
+ <root url="file://$PROJECT_DIR$/../../build/deps/scaladoc" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ <jarDirectory url="file://$PROJECT_DIR$/../../build/deps/scaladoc" recursive="false" />
+ </library>
+ <library name="starr" type="Scala">
+ <properties>
+ <compiler-classpath>
+ <root url="file://$PROJECT_DIR$/../../build/deps/starr/scala-compiler-#starr-version#.jar" />
+ <root url="file://$PROJECT_DIR$/../../build/deps/starr/scala-library-#starr-version#.jar" />
+ <root url="file://$PROJECT_DIR$/../../build/deps/starr/scala-reflect-#starr-version#.jar" />
+ </compiler-classpath>
+ </properties>
+ <CLASSES />
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </component>
+</project> \ No newline at end of file
diff --git a/src/intellij/scaladoc.iml.SAMPLE b/src/intellij/scaladoc.iml.SAMPLE
index 8f9a0d8344..4ba0a848c6 100644
--- a/src/intellij/scaladoc.iml.SAMPLE
+++ b/src/intellij/scaladoc.iml.SAMPLE
@@ -1,16 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
- <component name="FacetManager">
- <facet type="scala" name="Scala">
- <configuration>
- <option name="compilerLibraryLevel" value="Project" />
- <option name="compilerLibraryName" value="starr" />
- <option name="languageLevel" value="Scala 2.11" />
- <option name="maximumHeapSize" value="1536" />
- <option name="vmOptions" value="-Xms1536m -Xss1m -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=256m -XX:+CMSClassUnloadingEnabled -XX:+UseCompressedOops -XX:+UseParallelGC" />
- </configuration>
- </facet>
- </component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$/../scaladoc">
@@ -18,11 +7,12 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module" module-name="compiler" />
<orderEntry type="module" module-name="library" />
<orderEntry type="module" module-name="reflect" />
- <orderEntry type="module" module-name="compiler" />
- <orderEntry type="library" name="partest" level="project" />
+ <orderEntry type="library" name="starr" level="project" />
<orderEntry type="library" name="scaladoc-deps" level="project" />
+ <orderEntry type="library" name="ant" level="project" />
+ <orderEntry type="library" name="partest" level="project" />
</component>
-</module>
-
+</module> \ No newline at end of file
diff --git a/src/intellij/scalap.iml.SAMPLE b/src/intellij/scalap.iml.SAMPLE
index 27ae451369..665aac07f8 100644
--- a/src/intellij/scalap.iml.SAMPLE
+++ b/src/intellij/scalap.iml.SAMPLE
@@ -1,16 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
- <component name="FacetManager">
- <facet type="scala" name="Scala">
- <configuration>
- <option name="compilerLibraryLevel" value="Project" />
- <option name="compilerLibraryName" value="starr" />
- <option name="languageLevel" value="Scala 2.11" />
- <option name="maximumHeapSize" value="1536" />
- <option name="vmOptions" value="-Xms1536m -Xss1m -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=256m -XX:+CMSClassUnloadingEnabled -XX:+UseCompressedOops -XX:+UseParallelGC" />
- </configuration>
- </facet>
- </component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$/../scalap">
@@ -19,8 +8,8 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="library" />
- <orderEntry type="module" module-name="reflect" />
<orderEntry type="module" module-name="compiler" />
+ <orderEntry type="module" module-name="reflect" />
+ <orderEntry type="library" name="starr" level="project" />
</component>
-</module>
-
+</module> \ No newline at end of file
diff --git a/src/intellij/setup.sh b/src/intellij/setup.sh
index ec303778ed..251f717829 100755
--- a/src/intellij/setup.sh
+++ b/src/intellij/setup.sh
@@ -12,3 +12,6 @@ for f in "$SCRIPT_DIR"/*.SAMPLE; do
g=${f%.SAMPLE}
cp $f $g
done
+
+STARR_VERSION="`cat $SCRIPT_DIR/../../versions.properties | grep 'starr.version' | awk '{split($0,a,"="); print a[2]}'`"
+sed "s/#starr-version#/$STARR_VERSION/g" $SCRIPT_DIR/scala.ipr.SAMPLE > $SCRIPT_DIR/scala.ipr
diff --git a/src/intellij/test-junit.iml.SAMPLE b/src/intellij/test-junit.iml.SAMPLE
index b633166f7a..8252ef6d98 100644
--- a/src/intellij/test-junit.iml.SAMPLE
+++ b/src/intellij/test-junit.iml.SAMPLE
@@ -1,13 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
- <component name="FacetManager">
- <facet type="scala" name="Scala">
- <configuration>
- <option name="compilerLibraryLevel" value="Project" />
- <option name="compilerLibraryName" value="starr" />
- </configuration>
- </facet>
- </component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$/../../test/junit">
@@ -15,15 +7,16 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="asm" />
<orderEntry type="module" module-name="compiler" />
+ <orderEntry type="module" module-name="forkjoin" />
<orderEntry type="module" module-name="library" />
+ <orderEntry type="module" module-name="partest-extras" />
<orderEntry type="module" module-name="reflect" />
<orderEntry type="module" module-name="repl" />
- <orderEntry type="module" module-name="partest-extras" />
- <orderEntry type="module" module-name="forkjoin" />
- <orderEntry type="library" name="junit" level="project" />
+ <orderEntry type="module" module-name="scaladoc" />
<orderEntry type="library" name="scaladoc-deps" level="project" />
+ <orderEntry type="library" name="junit" level="project" />
+ <orderEntry type="library" name="starr" level="project" />
+ <orderEntry type="library" name="asm" level="project" />
</component>
-</module>
-
+</module> \ No newline at end of file
diff --git a/src/intellij/test-osgi.iml.SAMPLE b/src/intellij/test-osgi.iml.SAMPLE
deleted file mode 100644
index d2ed5be974..0000000000
--- a/src/intellij/test-osgi.iml.SAMPLE
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$/../../test/osgi">
- <sourceFolder url="file://$MODULE_DIR$/../../test/osgi/src" isTestSource="false" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="asm" />
- <orderEntry type="module" module-name="compiler" />
- <orderEntry type="module" module-name="library" />
- <orderEntry type="module" module-name="reflect" />
- <orderEntry type="module" module-name="repl" />
- <orderEntry type="module" module-name="partest-extras" />
- <orderEntry type="module" module-name="forkjoin" />
- <orderEntry type="library" name="junit" level="project" />
- <orderEntry type="library" name="scaladoc-deps" level="project" />
- <orderEntry type="library" name="scala-sdk" level="project" />
- <orderEntry type="library" scope="PROVIDED" name="pax.exam-deps" level="project" />
- </component>
-</module> \ No newline at end of file
diff --git a/src/intellij/test.iml.SAMPLE b/src/intellij/test.iml.SAMPLE
index 7e19a83d34..e7eb7576c3 100644
--- a/src/intellij/test.iml.SAMPLE
+++ b/src/intellij/test.iml.SAMPLE
@@ -1,14 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
- <component name="FacetManager">
- <facet type="scala" name="Scala">
- <configuration>
- <option name="compilerLibraryLevel" value="Project" />
- <option name="compilerLibraryName" value="starr" />
- <option name="languageLevel" value="Scala 2.11" />
- </configuration>
- </facet>
- </component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$/../../test">
@@ -16,15 +7,15 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="library" />
- <orderEntry type="module" module-name="reflect" />
<orderEntry type="module" module-name="compiler" />
- <orderEntry type="module" module-name="repl" />
- <orderEntry type="module" module-name="asm" />
<orderEntry type="module" module-name="forkjoin" />
+ <orderEntry type="module" module-name="interactive" />
+ <orderEntry type="module" module-name="library" />
<orderEntry type="module" module-name="partest-extras" />
- <orderEntry type="library" name="scaladoc-deps" level="project" />
+ <orderEntry type="module" module-name="reflect" />
+ <orderEntry type="module" module-name="repl" />
<orderEntry type="library" name="partest" level="project" />
+ <orderEntry type="library" name="scaladoc-deps" level="project" />
+ <orderEntry type="library" name="asm" level="project" />
</component>
-</module>
-
+</module> \ No newline at end of file
diff --git a/src/intellij/test/files/neg/virtpatmat_exhaust_big.check b/src/intellij/test/files/neg/virtpatmat_exhaust_big.check
deleted file mode 100644
index fddc85a362..0000000000
--- a/src/intellij/test/files/neg/virtpatmat_exhaust_big.check
+++ /dev/null
@@ -1,7 +0,0 @@
-virtpatmat_exhaust_big.scala:27: warning: match may not be exhaustive.
-It would fail on the following input: Z11()
- def foo(z: Z) = z match {
- ^
-error: No warnings can be incurred under -Xfatal-warnings.
-one warning found
-one error found
diff --git a/src/intellij/test/files/neg/virtpatmat_exhaust_big.flags b/src/intellij/test/files/neg/virtpatmat_exhaust_big.flags
deleted file mode 100644
index b5a8748652..0000000000
--- a/src/intellij/test/files/neg/virtpatmat_exhaust_big.flags
+++ /dev/null
@@ -1 +0,0 @@
--Xfatal-warnings -unchecked
diff --git a/src/intellij/test/files/neg/virtpatmat_exhaust_big.scala b/src/intellij/test/files/neg/virtpatmat_exhaust_big.scala
deleted file mode 100644
index dd639eb56e..0000000000
--- a/src/intellij/test/files/neg/virtpatmat_exhaust_big.scala
+++ /dev/null
@@ -1,32 +0,0 @@
-sealed abstract class Z
-object Z {
- object Z0 extends Z
- case class Z1() extends Z
- object Z2 extends Z
- case class Z3() extends Z
- object Z4 extends Z
- case class Z5() extends Z
- object Z6 extends Z
- case class Z7() extends Z
- object Z8 extends Z
- case class Z9() extends Z
- object Z10 extends Z
- case class Z11() extends Z
- object Z12 extends Z
- case class Z13() extends Z
- object Z14 extends Z
- case class Z15() extends Z
- object Z16 extends Z
- case class Z17() extends Z
- object Z18 extends Z
- case class Z19() extends Z
-}
-
-object Test {
- import Z._
- def foo(z: Z) = z match {
- case Z0 | Z1() | Z2 | Z3() | Z4 | Z5() | Z6 | Z7() | Z8 | Z9() |
- Z10 | Z12 | Z13() | Z14 | Z15() | Z16 | Z17() | Z18 | Z19()
- =>
- }
-}
diff --git a/src/intellij/test/files/pos/virtpatmat_exhaust_big.scala b/src/intellij/test/files/pos/virtpatmat_exhaust_big.scala
deleted file mode 100644
index 41aef3226e..0000000000
--- a/src/intellij/test/files/pos/virtpatmat_exhaust_big.scala
+++ /dev/null
@@ -1,34 +0,0 @@
-sealed abstract class Z
-object Z {
- object Z0 extends Z
- case class Z1() extends Z
- object Z2 extends Z
- case class Z3() extends Z
- object Z4 extends Z
- case class Z5() extends Z
- object Z6 extends Z
- case class Z7() extends Z
- object Z8 extends Z
- case class Z9() extends Z
- object Z10 extends Z
- case class Z11() extends Z
- object Z12 extends Z
- case class Z13() extends Z
- object Z14 extends Z
- case class Z15() extends Z
- object Z16 extends Z
- case class Z17() extends Z
- object Z18 extends Z
- case class Z19() extends Z
-}
-
-// drop any case and it will report an error
-object Test {
- import Z._
- def foo(z: Z) = z match {
- case Z0 | Z1() | Z2 | Z3() | Z4 | Z5() | Z6 | Z7() | Z8 | Z9() |
- Z10 | Z11() | Z12 | Z13() | Z14 | Z15() | Z16 | Z17() | Z18 | Z19()
- =>
- }
-}
--
diff --git a/src/library/scala/Array.scala b/src/library/scala/Array.scala
index 6ab82d998e..d89e9d291d 100644
--- a/src/library/scala/Array.scala
+++ b/src/library/scala/Array.scala
@@ -483,7 +483,7 @@ object Array extends FallbackArrayBuilding {
*
* @author Martin Odersky
* @version 1.0
- * @see [[http://www.scala-lang.org/docu/files/ScalaReference.pdf Scala Language Specification]], for in-depth information on the transformations the Scala compiler makes on Arrays (Sections 6.6 and 6.15 respectively.)
+ * @see [[http://www.scala-lang.org/files/archive/spec/2.11/ Scala Language Specification]], for in-depth information on the transformations the Scala compiler makes on Arrays (Sections 6.6 and 6.15 respectively.)
* @see [[http://docs.scala-lang.org/sips/completed/scala-2-8-arrays.html "Scala 2.8 Arrays"]] the Scala Improvement Document detailing arrays since Scala 2.8.
* @see [[http://docs.scala-lang.org/overviews/collections/arrays.html "The Scala 2.8 Collections' API"]] section on `Array` by Martin Odersky for more information.
* @define coll array
diff --git a/src/library/scala/Predef.scala b/src/library/scala/Predef.scala
index 3cc83654b7..0914bcefa3 100644
--- a/src/library/scala/Predef.scala
+++ b/src/library/scala/Predef.scala
@@ -35,9 +35,9 @@ import scala.io.StdIn
* === Assertions ===
*
* A set of `assert` functions are provided for use as a way to document
- * and dynamically check invariants in code. `assert` statements can be elided
- * at runtime by providing the command line argument `-Xdisable-assertions` to
- * the `scala` command.
+ * and dynamically check invariants in code. Invocations of `assert` can be elided
+ * at compile time by providing the command line option `-Xdisable-assertions`,
+ * which raises `-Xelide-below` above `elidable.ASSERTION`, to the `scalac` command.
*
* Variants of `assert` intended for use with static analysis tools are also
* provided: `assume`, `require` and `ensuring`. `require` and `ensuring` are
diff --git a/src/library/scala/collection/GenSeqLike.scala b/src/library/scala/collection/GenSeqLike.scala
index cf1de0c8e6..f786293822 100644
--- a/src/library/scala/collection/GenSeqLike.scala
+++ b/src/library/scala/collection/GenSeqLike.scala
@@ -275,6 +275,7 @@ trait GenSeqLike[+A, +Repr] extends Any with GenIterableLike[A, Repr] with Equal
* @tparam That $thatinfo
* @param bf $bfinfo
* @return a new $coll` which is a copy of this $coll with the element at position `index` replaced by `elem`.
+ * @throws IndexOutOfBoundsException if `index` does not satisfy `0 <= index < length`.
*
* @usecase def updated(index: Int, elem: A): $Coll[A]
* @inheritdoc
diff --git a/src/library/scala/util/Try.scala b/src/library/scala/util/Try.scala
index c807677119..1a13ac2305 100644
--- a/src/library/scala/util/Try.scala
+++ b/src/library/scala/util/Try.scala
@@ -165,8 +165,8 @@ sealed abstract class Try[+T] extends Product with Serializable {
def flatten[U](implicit ev: T <:< Try[U]): Try[U]
/**
- * Completes this `Try` with an exception wrapped in a `Success`. The exception is either the exception that the
- * `Try` failed with (if a `Failure`) or an `UnsupportedOperationException`.
+ * Inverts this `Try`. If this is a `Failure`, returns its exception wrapped in a `Success`.
+ * If this is a `Success`, returns a `Failure` containing an `UnsupportedOperationException`.
*/
def failed: Try[Throwable]
diff --git a/src/reflect/scala/reflect/api/Constants.scala b/src/reflect/scala/reflect/api/Constants.scala
index fbcf7f3e4f..4cc2cb86b2 100644
--- a/src/reflect/scala/reflect/api/Constants.scala
+++ b/src/reflect/scala/reflect/api/Constants.scala
@@ -95,7 +95,7 @@ trait Constants {
* broken down or evaluated, such as "true", "0", "classOf[List]". Such values become parts of the Scala abstract
* syntax tree representing the program. The constants
* correspond to section 6.24 "Constant Expressions" of the
- * [[http://www.scala-lang.org/docu/files/ScalaReference.pdf Scala language specification]].
+ * [[http://www.scala-lang.org/files/archive/spec/2.11/ Scala Language Specification]].
*
* Such constants are used to represent literals in abstract syntax trees (the [[scala.reflect.api.Trees#Literal]] node)
* and literal arguments for Java class file annotations (the [[scala.reflect.api.Annotations#LiteralArgument]] class).
diff --git a/src/reflect/scala/reflect/internal/Definitions.scala b/src/reflect/scala/reflect/internal/Definitions.scala
index c86d08e925..5b20d9db8e 100644
--- a/src/reflect/scala/reflect/internal/Definitions.scala
+++ b/src/reflect/scala/reflect/internal/Definitions.scala
@@ -1513,6 +1513,10 @@ trait Definitions extends api.StandardDefinitions {
def isPolymorphicSignature(sym: Symbol) = PolySigMethods(sym)
private lazy val PolySigMethods: Set[Symbol] = Set[Symbol](MethodHandle.info.decl(sn.Invoke), MethodHandle.info.decl(sn.InvokeExact)).filter(_.exists)
+
+ lazy val Scala_Java8_CompatPackage = rootMirror.getPackageIfDefined("scala.compat.java8")
+ lazy val Scala_Java8_CompatPackage_JFunction = (0 to MaxTupleArity).toArray map (i => getMemberIfDefined(Scala_Java8_CompatPackage.moduleClass, TypeName("JFunction" + i)))
+ lazy val Scala_Java8_CompatPackage_JProcedure = (0 to MaxTupleArity).toArray map (i => getMemberIfDefined(Scala_Java8_CompatPackage.moduleClass, TypeName("JProcedure" + i)))
}
}
}
diff --git a/src/reflect/scala/reflect/internal/Symbols.scala b/src/reflect/scala/reflect/internal/Symbols.scala
index 2b6c73c8eb..f9ebae64d2 100644
--- a/src/reflect/scala/reflect/internal/Symbols.scala
+++ b/src/reflect/scala/reflect/internal/Symbols.scala
@@ -794,7 +794,7 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
final def isAnonymousFunction = isSynthetic && (name containsName tpnme.ANON_FUN_NAME)
final def isDelambdafyFunction = isSynthetic && (name containsName tpnme.DELAMBDAFY_LAMBDA_CLASS_NAME)
- final def isDelambdafyTarget = isSynthetic && isMethod && (name containsName tpnme.ANON_FUN_NAME)
+ final def isDelambdafyTarget = isArtifact && isMethod && (name containsName tpnme.ANON_FUN_NAME)
final def isDefinedInPackage = effectiveOwner.isPackageClass
final def needsFlatClasses = phase.flatClasses && rawowner != NoSymbol && !rawowner.isPackageClass
diff --git a/src/reflect/scala/reflect/internal/transform/Erasure.scala b/src/reflect/scala/reflect/internal/transform/Erasure.scala
index ac7839bcfd..5a03c1eeaa 100644
--- a/src/reflect/scala/reflect/internal/transform/Erasure.scala
+++ b/src/reflect/scala/reflect/internal/transform/Erasure.scala
@@ -254,6 +254,8 @@ trait Erasure {
def mergeParents(parents: List[Type]): Type =
if (parents.isEmpty) ObjectTpe
else parents.head
+
+ override protected def eraseDerivedValueClassRef(tref: TypeRef): Type = eraseNormalClassRef(tref)
}
object scalaErasure extends ScalaErasureMap
diff --git a/src/reflect/scala/reflect/runtime/JavaMirrors.scala b/src/reflect/scala/reflect/runtime/JavaMirrors.scala
index 237efd004f..ce60ade9f5 100644
--- a/src/reflect/scala/reflect/runtime/JavaMirrors.scala
+++ b/src/reflect/scala/reflect/runtime/JavaMirrors.scala
@@ -591,6 +591,7 @@ private[scala] trait JavaMirrors extends internal.SymbolTable with api.JavaUnive
// don't use classOf[scala.reflect.ScalaSignature] here, because it will use getClass.getClassLoader, not mirror's classLoader
// don't use asInstanceOf either because of the same reason (lol, I cannot believe I fell for it)
// don't use structural types to simplify reflective invocations because of the same reason
+ // TODO SI-9296 duplicated code, refactor
def loadAnnotation(name: String): Option[java.lang.annotation.Annotation] =
tryJavaClass(name) flatMap { annotClass =>
val anns = jclazz.getAnnotations
diff --git a/src/scaladoc/scala/tools/nsc/doc/html/page/Source.scala b/src/scaladoc/scala/tools/nsc/doc/html/page/Source.scala
deleted file mode 100644
index 37145756d9..0000000000
--- a/src/scaladoc/scala/tools/nsc/doc/html/page/Source.scala
+++ /dev/null
@@ -1,127 +0,0 @@
-/* NSC -- new Scala compiler
- * Copyright 2007-2013 LAMP/EPFL
- * @author David Bernard, Manohar Jonnalagedda
- */
-
-package scala.tools.nsc
-package doc
-package html
-package page
-
-import scala.xml.NodeSeq
-import java.io.File
-
-class Source(sourceFile: File) extends HtmlPage {
-
- val path = List("source.html")
-
- val title = "Scaladoc: page source"
-
- val headers =
- NodeSeq.Empty
-
- val body =
- <body>
- <h1>Page source is not implemented yet</h1>
- </body>
-
- /*
-
-
- def readTextFromSrcDir(subPath: String) :Option[String] = {
- readTextFromFile(new File(sourceDir, subPath))
- }
-
- def readTextFromFile(f : File) :Option[String] = {
- if (f.exists) {
- Some(Source.fromFile(f)(Codec.default).getLines().mkString(""))
- } else {
- None
- }
- }
-
-
- def writeTextToFile(f : File, txt : String, header: Option[String], footer: Option[String]) {
- val out = new FileOutputStream(f)
- try {
- val enc = "UTF-8"
- header.foreach(s => out.write(s.getBytes(enc)))
- out.write(txt.getBytes(enc))
- footer.foreach(s => out.write(s.getBytes(enc)))
- } finally {
- try {
- out.close()
- } catch {
- case _ => //ignore
- }
- }
- }
-
- trait SourceHtmlizer {
- def scalaToHtml(src :File) : Option[File]
- }
-
- lazy val sourceHtmlizer : SourceHtmlizer = {
- if (cfg.htmlizeSource) {
- new SourceHtmlizer {
-
- val inDir: File = cfg.sourcedir
- val outDir: File = cfg.outputdir
-
- private def relativize(uri: URI, from: URI) = linkHelper.relativize(uri, from).getOrElse("__notFound__" + uri.getPath)
-
- def header(dest: URI) = Some("""
- <html>
- <head>
- <link href='""" + relativize(new URI("site:/_highlighter/SyntaxHighlighter.css"), dest) + """' rel='stylesheet' type='text/css'/>
- <script language='javascript' src='""" + relativize(new URI("site:/_highlighter/shAll.js"), dest) + """'></script>
- </head>
- <body>
- <pre name="code" class="scala" style="width:100%">
- """)
-
- def footer(dest: URI) = Some("""</pre>
- <script language='javascript'>
- dp.SyntaxHighlighter.ClipboardSwf = '""" + relativize(new URI("site:/_highlighter/clipboard.swf"), dest) + """';
- dp.SyntaxHighlighter.HighlightAll('code');
- </script>
- </body>
- </html>
- """)
-
- //TODO: escape the source code
- def scalaToHtml(src :File) = {
- val dest = new File(outDir, fileHelper.relativePathUnderDir(src, inDir) + ".html")
- if (!dest.exists || dest.lastModified < src.lastModified) {
-
- //we need to verify whether the directory we are trying to write to has already been created or not
- if(!dest.getParentFile.exists) dest.getParentFile.mkdirs
-
- val uri = linkHelper.uriFor(dest).get
- var txt = fileHelper.readTextFromFile(src).getOrElse("")
- txt = txt.replace("<", "&lt;")
- fileHelper.writeTextToFile(dest, txt, header(uri), footer(uri))
- }
- Some(dest)
- }
-
- def copyResources() {
- val loader = this.getClass().getClassLoader()
- val buf = new Array[Byte](1024)
- def copyResource(name: String) = fileHelper.copyResource("/scala/tools/nsc/doc/html/resource/", name, outDir, loader, buf)
- copyResource("_highlighter/clipboard.swf")
- copyResource("_highlighter/shAll.js")
- copyResource("_highlighter/SyntaxHighlighter.css")
- }
-
- copyResources()
- }
- } else {
- new SourceHtmlizer {
- def scalaToHtml(src :File) = None
- }
- }
- }
- */
-
-}
diff --git a/src/scalap/scala/tools/scalap/Main.scala b/src/scalap/scala/tools/scalap/Main.scala
index 7c554d196c..3d2bfd7251 100644
--- a/src/scalap/scala/tools/scalap/Main.scala
+++ b/src/scalap/scala/tools/scalap/Main.scala
@@ -28,6 +28,7 @@ import scalax.rules.scalasig._
class Main {
val SCALA_SIG = "ScalaSig"
val SCALA_SIG_ANNOTATION = "Lscala/reflect/ScalaSignature;"
+ val SCALA_LONG_SIG_ANNOTATION = "Lscala/reflect/ScalaLongSignature;"
val BYTES_VALUE = "bytes"
val versionMsg = "Scala classfile decoder %s -- %s\n".format(Properties.versionString, Properties.copyrightString)
diff --git a/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSig.scala b/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSig.scala
index e3076322dd..c36fdd02cd 100644
--- a/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSig.scala
+++ b/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSig.scala
@@ -14,20 +14,32 @@ package scalasig
import scala.language.postfixOps
import scala.language.implicitConversions
-import ClassFileParser.{ ConstValueIndex, Annotation }
+import ClassFileParser._
import scala.reflect.internal.pickling.ByteCodecs
object ScalaSigParser {
- import Main.{ SCALA_SIG, SCALA_SIG_ANNOTATION, BYTES_VALUE }
+ import Main.{ BYTES_VALUE, SCALA_LONG_SIG_ANNOTATION, SCALA_SIG, SCALA_SIG_ANNOTATION }
+ // TODO SI-9296 duplicated code, refactor
def scalaSigFromAnnotation(classFile: ClassFile): Option[ScalaSig] = {
import classFile._
- classFile.annotation(SCALA_SIG_ANNOTATION) map {
+ def getBytes(bytesElem: AnnotationElement): Array[Byte] = bytesElem.elementValue match {
+ case ConstValueIndex(index) => bytesForIndex(index)
+ case ArrayValue(signatureParts) => mergedLongSignatureBytes(signatureParts)
+ }
+
+ def mergedLongSignatureBytes(signatureParts: Seq[ElementValue]): Array[Byte] = signatureParts.flatMap {
+ case ConstValueIndex(index) => bytesForIndex(index)
+ }(collection.breakOut)
+
+ def bytesForIndex(index: Int) = constantWrapped(index).asInstanceOf[StringBytesPair].bytes
+
+ classFile.annotation(SCALA_SIG_ANNOTATION)
+ .orElse(classFile.annotation(SCALA_LONG_SIG_ANNOTATION)).map {
case Annotation(_, elements) =>
val bytesElem = elements.find(elem => constant(elem.elementNameIndex) == BYTES_VALUE).get
- val bytes = ((bytesElem.elementValue match {case ConstValueIndex(index) => constantWrapped(index)})
- .asInstanceOf[StringBytesPair].bytes)
+ val bytes = getBytes(bytesElem)
val length = ByteCodecs.decode(bytes)
ScalaSigAttributeParsers.parse(ByteCode(bytes.take(length)))