diff options
Diffstat (limited to 'src/compiler/scala/tools/nsc/transform')
12 files changed, 41 insertions, 73 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala b/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala index 5fbc15f858..21fef02e6d 100644 --- a/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala +++ b/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala @@ -276,7 +276,7 @@ abstract class AddInterfaces extends InfoTransform { self: Erasure => */ private def addMixinConstructorDef(clazz: Symbol, stats: List[Tree]): List[Tree] = if (treeInfo.firstConstructor(stats) != EmptyTree) stats - else DefDef(clazz.primaryConstructor, Block(List(), Literal(Constant()))) :: stats + else DefDef(clazz.primaryConstructor, Block(List(), Literal(Constant(())))) :: stats private def implTemplate(clazz: Symbol, templ: Template): Template = atPos(templ.pos) { val templ1 = ( diff --git a/src/compiler/scala/tools/nsc/transform/Constructors.scala b/src/compiler/scala/tools/nsc/transform/Constructors.scala index a4a6c3ff31..395645161f 100644 --- a/src/compiler/scala/tools/nsc/transform/Constructors.scala +++ b/src/compiler/scala/tools/nsc/transform/Constructors.scala @@ -366,7 +366,7 @@ abstract class Constructors extends Transform with ast.TreeDSL { CODE.NOT ( Apply(gen.mkAttributedRef(specializedFlag), List())), List()), - Block(stats, Literal(Constant())), + Block(stats, Literal(Constant(()))), EmptyTree) List(localTyper.typed(tree)) diff --git a/src/compiler/scala/tools/nsc/transform/Erasure.scala b/src/compiler/scala/tools/nsc/transform/Erasure.scala index 55b9ce1be9..348a18de0e 100644 --- a/src/compiler/scala/tools/nsc/transform/Erasure.scala +++ b/src/compiler/scala/tools/nsc/transform/Erasure.scala @@ -21,7 +21,6 @@ abstract class Erasure extends AddInterfaces import global._ import definitions._ import CODE._ - import treeInfo._ val phaseName: String = "erasure" diff --git a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala index 0cd7f516ef..1998348a70 100644 --- a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala +++ b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala @@ -1527,7 +1527,7 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers { if (symbol.isConstructor) { val t = atOwner(symbol)(forwardCtorCall(tree.pos, gen.mkSuperInitCall, vparamss, symbol.owner)) if (symbol.isPrimaryConstructor) - localTyper.typedPos(symbol.pos)(deriveDefDef(tree)(_ => Block(List(t), Literal(Constant())))) + localTyper.typedPos(symbol.pos)(deriveDefDef(tree)(_ => Block(List(t), Literal(Constant(()))))) else // duplicate the original constructor reportError(duplicateBody(ddef, info(symbol).target))(_ => ddef) } diff --git a/src/compiler/scala/tools/nsc/transform/UnCurry.scala b/src/compiler/scala/tools/nsc/transform/UnCurry.scala index 94ca1206b9..e4205f0635 100644 --- a/src/compiler/scala/tools/nsc/transform/UnCurry.scala +++ b/src/compiler/scala/tools/nsc/transform/UnCurry.scala @@ -550,8 +550,6 @@ abstract class UnCurry extends InfoTransform false } - def isDefaultCatch(cdef: CaseDef) = isThrowable(cdef.pat) && cdef.guard.isEmpty - tree match { /* Some uncurry post transformations add members to templates. * @@ -701,7 +699,7 @@ abstract class UnCurry extends InfoTransform // update the type of the method after uncurry. dd.symbol updateInfo { val GenPolyType(tparams, tp) = dd.symbol.info - logResult("erased dependent param types for ${dd.symbol.info}") { + logResult(s"erased dependent param types for ${dd.symbol.info}") { GenPolyType(tparams, MethodType(allParams map (_.symbol), tp.finalResultType)) } } diff --git a/src/compiler/scala/tools/nsc/transform/patmat/Logic.scala b/src/compiler/scala/tools/nsc/transform/patmat/Logic.scala index 69d9987b05..93abfb5280 100644 --- a/src/compiler/scala/tools/nsc/transform/patmat/Logic.scala +++ b/src/compiler/scala/tools/nsc/transform/patmat/Logic.scala @@ -6,7 +6,6 @@ package scala.tools.nsc.transform.patmat -import scala.tools.nsc.symtab._ import scala.language.postfixOps import scala.collection.mutable import scala.reflect.internal.util.Statistics @@ -497,11 +496,11 @@ trait ScalaLogic extends Interface with Logic with TreeAndTypeAnalysis { uniques.get(tp).getOrElse( uniques.find {case (oldTp, oldC) => oldTp =:= tp} match { case Some((_, c)) => - debug.patmat("unique const: "+ (tp, c)) + debug.patmat("unique const: "+ ((tp, c))) c case _ => val fresh = mkFresh - debug.patmat("uniqued const: "+ (tp, fresh)) + debug.patmat("uniqued const: "+ ((tp, fresh))) uniques(tp) = fresh fresh }) @@ -517,12 +516,12 @@ trait ScalaLogic extends Interface with Logic with TreeAndTypeAnalysis { if (!t.symbol.isStable) t.tpe.narrow else trees find (a => a.correspondsStructure(t)(sameValue)) match { case Some(orig) => - debug.patmat("unique tp for tree: "+ (orig, orig.tpe)) + debug.patmat("unique tp for tree: "+ ((orig, orig.tpe))) orig.tpe case _ => // duplicate, don't mutate old tree (TODO: use a map tree -> type instead?) val treeWithNarrowedType = t.duplicate setType t.tpe.narrow - debug.patmat("uniqued: "+ (t, t.tpe, treeWithNarrowedType.tpe)) + debug.patmat("uniqued: "+ ((t, t.tpe, treeWithNarrowedType.tpe))) trees += treeWithNarrowedType treeWithNarrowedType.tpe } @@ -623,4 +622,4 @@ trait ScalaLogic extends Interface with Logic with TreeAndTypeAnalysis { override def toString = "null" } } -}
\ No newline at end of file +} diff --git a/src/compiler/scala/tools/nsc/transform/patmat/MatchAnalysis.scala b/src/compiler/scala/tools/nsc/transform/patmat/MatchAnalysis.scala index 3ee75df6c4..006c7bd85f 100644 --- a/src/compiler/scala/tools/nsc/transform/patmat/MatchAnalysis.scala +++ b/src/compiler/scala/tools/nsc/transform/patmat/MatchAnalysis.scala @@ -12,14 +12,10 @@ import scala.reflect.internal.util.Statistics import scala.reflect.internal.util.Position trait TreeAndTypeAnalysis extends Debugging { - import global.{Tree, Type, Symbol, definitions, analyzer, - ConstantType, Literal, Constant, appliedType, WildcardType, TypeRef, ModuleClassSymbol, - nestedMemberType, TypeMap, Ident} - + import global._ import definitions._ import analyzer.Typer - // we use subtyping as a model for implication between instanceof tests // i.e., when S <:< T we assume x.isInstanceOf[S] implies x.isInstanceOf[T] // unfortunately this is not true in general: @@ -60,7 +56,7 @@ trait TreeAndTypeAnalysis extends Debugging { Some(List(tp)) // make sure it's not a primitive, else (5: Byte) match { case 5 => ... } sees no Byte case sym if !sym.isSealed || isPrimitiveValueClass(sym) => - debug.patmat("enum unsealed "+ (tp, sym, sym.isSealed, isPrimitiveValueClass(sym))) + debug.patmat("enum unsealed "+ ((tp, sym, sym.isSealed, isPrimitiveValueClass(sym)))) None case sym => val subclasses = ( @@ -68,7 +64,7 @@ trait TreeAndTypeAnalysis extends Debugging { // symbols which are both sealed and abstract need not be covered themselves, because // all of their children must be and they cannot otherwise be created. filterNot (x => x.isSealed && x.isAbstractClass && !isPrimitiveValueClass(x))) - debug.patmat("enum sealed -- subclasses: "+ (sym, subclasses)) + debug.patmat("enum sealed -- subclasses: "+ ((sym, subclasses))) val tpApprox = typer.infer.approximateAbstracts(tp) val pre = tpApprox.prefix @@ -86,7 +82,7 @@ trait TreeAndTypeAnalysis extends Debugging { if (subTpApprox <:< tpApprox) Some(checkableType(subTp)) else None }) - debug.patmat("enum sealed "+ (tp, tpApprox) + " as "+ validSubTypes) + debug.patmat("enum sealed "+ ((tp, tpApprox)) + " as "+ validSubTypes) Some(validSubTypes) } @@ -108,7 +104,7 @@ trait TreeAndTypeAnalysis extends Debugging { } val res = typeArgsToWildcardsExceptArray(tp) - debug.patmat("checkable "+(tp, res)) + debug.patmat("checkable "+((tp, res))) res } @@ -126,8 +122,8 @@ trait TreeAndTypeAnalysis extends Debugging { } trait MatchApproximation extends TreeAndTypeAnalysis with ScalaLogic with MatchTreeMaking { - import global.{Tree, Type, NoType, Symbol, NoSymbol, ConstantType, Literal, Constant, Ident, UniqueType, RefinedType, EmptyScope} - import global.definitions.{ListClass, NilModule} + import global._ + import global.definitions._ /** * Represent a match as a formula in propositional logic that encodes whether the match matches (abstractly: we only consider types) @@ -344,8 +340,8 @@ trait MatchApproximation extends TreeAndTypeAnalysis with ScalaLogic with MatchT trait MatchAnalysis extends MatchApproximation { import PatternMatchingStats._ - import global.{Tree, Type, Symbol, NoSymbol, Ident, Select} - import global.definitions.{isPrimitiveValueClass, ConsClass, isTupleSymbol} + import global._ + import global.definitions._ trait MatchAnalyzer extends MatchApproximator { def uncheckedWarning(pos: Position, msg: String) = global.currentUnit.uncheckedWarning(pos, msg) @@ -636,7 +632,7 @@ trait MatchAnalysis extends MatchApproximation { def toCounterExample(beBrief: Boolean = false): CounterExample = if (!allFieldAssignmentsLegal) NoExample else { - debug.patmat("describing "+ (variable, equalTo, notEqualTo, fields, cls, allFieldAssignmentsLegal)) + debug.patmat("describing "+ ((variable, equalTo, notEqualTo, fields, cls, allFieldAssignmentsLegal))) val res = prunedEqualTo match { // a definite assignment to a value case List(eq: ValueConst) if fields.isEmpty => ValueExample(eq) diff --git a/src/compiler/scala/tools/nsc/transform/patmat/MatchCodeGen.scala b/src/compiler/scala/tools/nsc/transform/patmat/MatchCodeGen.scala index 416bdf50f0..889615a39f 100644 --- a/src/compiler/scala/tools/nsc/transform/patmat/MatchCodeGen.scala +++ b/src/compiler/scala/tools/nsc/transform/patmat/MatchCodeGen.scala @@ -10,7 +10,6 @@ import scala.tools.nsc.symtab.Flags.SYNTHETIC import scala.language.postfixOps import scala.reflect.internal.util.Statistics import scala.reflect.internal.util.Position -import scala.reflect.internal.util.NoPosition /** Factory methods used by TreeMakers to make the actual trees. * @@ -18,10 +17,7 @@ import scala.reflect.internal.util.NoPosition * and pure (aka "virtualized": match is parametric in its monad). */ trait MatchCodeGen extends Interface { - import PatternMatchingStats._ - import global.{nme, treeInfo, definitions, gen, Tree, Type, Symbol, NoSymbol, - appliedType, NoType, MethodType, newTermName, Name, - Block, Literal, Constant, EmptyTree, Function, Typed, ValDef, LabelDef} + import global._ import definitions._ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -79,7 +75,7 @@ trait MatchCodeGen extends Interface { // duplicated out of frustration with cast generation def mkZero(tp: Type): Tree = { tp.typeSymbol match { - case UnitClass => Literal(Constant()) + case UnitClass => Literal(Constant(())) case BooleanClass => Literal(Constant(false)) case FloatClass => Literal(Constant(0.0f)) case DoubleClass => Literal(Constant(0.0d)) @@ -255,4 +251,4 @@ trait MatchCodeGen extends Interface { } } -}
\ No newline at end of file +} diff --git a/src/compiler/scala/tools/nsc/transform/patmat/MatchOptimization.scala b/src/compiler/scala/tools/nsc/transform/patmat/MatchOptimization.scala index dcf2413b15..125e9a3b65 100644 --- a/src/compiler/scala/tools/nsc/transform/patmat/MatchOptimization.scala +++ b/src/compiler/scala/tools/nsc/transform/patmat/MatchOptimization.scala @@ -11,7 +11,6 @@ import scala.language.postfixOps import scala.collection.mutable import scala.reflect.internal.util.Statistics import scala.reflect.internal.util.Position -import scala.reflect.internal.util.NoPosition /** Optimize and analyze matches based on their TreeMaker-representation. * @@ -20,15 +19,9 @@ import scala.reflect.internal.util.NoPosition * TODO: split out match analysis */ trait MatchOptimization extends MatchTreeMaking with MatchAnalysis { - import PatternMatchingStats._ - import global.{Tree, Type, Symbol, NoSymbol, CaseDef, atPos, - ConstantType, Literal, Constant, gen, EmptyTree, - Typed, treeInfo, nme, Ident, - Apply, If, Bind, lub, Alternative, deriveCaseDef, Match, MethodType, LabelDef, TypeTree, Throw} - + import global._ import global.definitions._ - //// trait CommonSubconditionElimination extends OptimizedCodegen with MatchApproximator { /** a flow-sensitive, generalised, common sub-expression elimination @@ -160,7 +153,7 @@ trait MatchOptimization extends MatchTreeMaking with MatchAnalysis { def chainBefore(next: Tree)(casegen: Casegen): Tree = // assert(codegen eq optimizedCodegen) atPos(pos)(casegen.asInstanceOf[optimizedCodegen.OptimizedCasegen].flatMapCondStored(cond, storedCond, res, nextBinder, substitution(next).duplicate)) - override def toString = "Memo"+(nextBinder.name, storedCond.name, cond, res, substitution) + override def toString = "Memo"+((nextBinder.name, storedCond.name, cond, res, substitution)) } case class ReusingCondTreeMaker(sharedPrefix: List[Test], toReused: TreeMaker => TreeMaker) extends TreeMaker { import CODE._ @@ -199,7 +192,7 @@ trait MatchOptimization extends MatchTreeMaking with MatchAnalysis { // and in its confusion it emits illegal casts (diagnosed by Grzegorz: checkcast T ; invokevirtual S.m, where T not a subtype of S) casegen.ifThenElseZero(REF(lastReusedTreeMaker.storedCond), substitution(next).duplicate) } - override def toString = "R"+(lastReusedTreeMaker.storedCond.name, substitution) + override def toString = "R"+((lastReusedTreeMaker.storedCond.name, substitution)) } } diff --git a/src/compiler/scala/tools/nsc/transform/patmat/MatchTranslation.scala b/src/compiler/scala/tools/nsc/transform/patmat/MatchTranslation.scala index 23b33e9be6..b05c1cd65c 100644 --- a/src/compiler/scala/tools/nsc/transform/patmat/MatchTranslation.scala +++ b/src/compiler/scala/tools/nsc/transform/patmat/MatchTranslation.scala @@ -243,7 +243,7 @@ trait MatchTranslation { self: PatternMatching => if (!extractor.isTyped) ErrorUtils.issueNormalTypeError(patTree, "Could not typecheck extractor call: "+ extractor)(context) // if (extractor.resultInMonad == ErrorType) throw new TypeError(pos, "Unsupported extractor type: "+ extractor.tpe) - debug.patmat("translateExtractorPattern checking parameter type: "+ (patBinder, patBinder.info.widen, extractor.paramType, patBinder.info.widen <:< extractor.paramType)) + debug.patmat("translateExtractorPattern checking parameter type: "+ ((patBinder, patBinder.info.widen, extractor.paramType, patBinder.info.widen <:< extractor.paramType))) // must use type `tp`, which is provided by extractor's result, not the type expected by binder, // as b.info may be based on a Typed type ascription, which has not been taken into account yet by the translation diff --git a/src/compiler/scala/tools/nsc/transform/patmat/MatchTreeMaking.scala b/src/compiler/scala/tools/nsc/transform/patmat/MatchTreeMaking.scala index 202f3444f8..76268f3ecd 100644 --- a/src/compiler/scala/tools/nsc/transform/patmat/MatchTreeMaking.scala +++ b/src/compiler/scala/tools/nsc/transform/patmat/MatchTreeMaking.scala @@ -11,7 +11,6 @@ import scala.language.postfixOps import scala.collection.mutable import scala.reflect.internal.util.Statistics import scala.reflect.internal.util.Position -import scala.reflect.internal.util.NoPosition /** Translate our IR (TreeMakers) into actual Scala Trees using the factory methods in MatchCodeGen. * @@ -19,13 +18,8 @@ import scala.reflect.internal.util.NoPosition * mostly agnostic to whether we're in optimized/pure (virtualized) mode. */ trait MatchTreeMaking extends MatchCodeGen with Debugging { - import PatternMatchingStats._ - import global.{Tree, Type, Symbol, CaseDef, atPos, settings, - Select, Block, ThisType, SingleType, NoPrefix, NoType, needsOuterTest, - ConstantType, Literal, Constant, gen, This, EmptyTree, map2, NoSymbol, Traverser, - Function, Typed, treeInfo, TypeRef, DefTree, Ident, nme} - - import global.definitions.{SomeClass, AnyRefClass, UncheckedClass, BooleanClass} + import global._ + import definitions.{SomeClass, AnyRefClass, UncheckedClass, BooleanClass} final case class Suppression(exhaustive: Boolean, unreachable: Boolean) object Suppression { @@ -60,7 +54,7 @@ trait MatchTreeMaking extends MatchCodeGen with Debugging { private[TreeMakers] def incorporateOuterSubstitution(outerSubst: Substitution): Unit = { if (currSub ne null) { - debug.patmat("BUG: incorporateOuterSubstitution called more than once for "+ (this, currSub, outerSubst)) + debug.patmat("BUG: incorporateOuterSubstitution called more than once for "+ ((this, currSub, outerSubst))) Thread.dumpStack() } else currSub = outerSubst >> substitution @@ -100,7 +94,7 @@ trait MatchTreeMaking extends MatchCodeGen with Debugging { def chainBefore(next: Tree)(casegen: Casegen): Tree = // assert(next eq EmptyTree) atPos(body.pos)(casegen.one(substitution(body))) // since SubstOnly treemakers are dropped, need to do it here - override def toString = "B"+(body, matchPt) + override def toString = "B"+((body, matchPt)) } case class SubstOnlyTreeMaker(prevBinder: Symbol, nextBinder: Symbol) extends TreeMaker { @@ -220,7 +214,7 @@ trait MatchTreeMaking extends MatchCodeGen with Debugging { ) } - override def toString = "X"+(extractor, nextBinder.name) + override def toString = "X"+((extractor, nextBinder.name)) } /** @@ -274,7 +268,7 @@ trait MatchTreeMaking extends MatchCodeGen with Debugging { } } - override def toString = "P"+(prevBinder.name, extraCond getOrElse "", localSubstitution) + override def toString = "P"+((prevBinder.name, extraCond getOrElse "", localSubstitution)) } object IrrefutableExtractorTreeMaker { @@ -389,7 +383,7 @@ trait MatchTreeMaking extends MatchCodeGen with Debugging { **/ case class TypeTestTreeMaker(prevBinder: Symbol, testedBinder: Symbol, expectedTp: Type, nextBinderTp: Type)(override val pos: Position, extractorArgTypeTest: Boolean = false) extends CondTreeMaker { import TypeTestTreeMaker._ - debug.patmat("TTTM"+(prevBinder, extractorArgTypeTest, testedBinder, expectedTp, nextBinderTp)) + debug.patmat("TTTM"+((prevBinder, extractorArgTypeTest, testedBinder, expectedTp, nextBinderTp))) lazy val outerTestNeeded = ( !((expectedTp.prefix eq NoPrefix) || expectedTp.prefix.typeSymbol.isPackageClass) @@ -452,7 +446,7 @@ trait MatchTreeMaking extends MatchCodeGen with Debugging { def impliesBinderNonNull(binder: Symbol) = renderCondition(nonNullImpliedByTestChecker(binder)) - override def toString = "TT"+(expectedTp, testedBinder.name, nextBinderTp) + override def toString = "TT"+((expectedTp, testedBinder.name, nextBinderTp)) } // need to substitute to deal with existential types -- TODO: deal with existentials better, don't substitute (see RichClass during quick.comp) @@ -463,7 +457,7 @@ trait MatchTreeMaking extends MatchCodeGen with Debugging { // equals need not be well-behaved, so don't intersect with pattern's (stabilized) type (unlike MaybeBoundTyped's accumType, where it's required) val cond = codegen._equals(patTree, prevBinder) val res = CODE.REF(prevBinder) - override def toString = "ET"+(prevBinder.name, patTree) + override def toString = "ET"+((prevBinder.name, patTree)) } case class AlternativesTreeMaker(prevBinder: Symbol, var altss: List[List[TreeMaker]], pos: Position) extends TreeMaker with NoNewBinders { @@ -474,7 +468,7 @@ trait MatchTreeMaking extends MatchCodeGen with Debugging { altss = altss map (alts => propagateSubstitution(alts, substitution)) } - def chainBefore(next: Tree)(codegenAlt: Casegen): Tree = { import CODE._ + def chainBefore(next: Tree)(codegenAlt: Casegen): Tree = { atPos(pos){ // one alternative may still generate multiple trees (e.g., an extractor call + equality test) // (for now,) alternatives may not bind variables (except wildcards), so we don't care about the final substitution built internally by makeTreeMakers @@ -587,18 +581,18 @@ trait MatchTreeMaking extends MatchCodeGen with Debugging { t match { case Function(_, _) if t.symbol == NoSymbol => t.symbol = currentOwner.newAnonymousFunctionValue(t.pos) - debug.patmat("new symbol for "+ (t, t.symbol.ownerChain)) + debug.patmat("new symbol for "+ ((t, t.symbol.ownerChain))) case Function(_, _) if (t.symbol.owner == NoSymbol) || (t.symbol.owner == origOwner) => - debug.patmat("fundef: "+ (t, t.symbol.ownerChain, currentOwner.ownerChain)) + debug.patmat("fundef: "+ ((t, t.symbol.ownerChain, currentOwner.ownerChain))) t.symbol.owner = currentOwner case d : DefTree if (d.symbol != NoSymbol) && ((d.symbol.owner == NoSymbol) || (d.symbol.owner == origOwner)) => // don't indiscriminately change existing owners! (see e.g., pos/t3440, pos/t3534, pos/unapplyContexts2) - debug.patmat("def: "+ (d, d.symbol.ownerChain, currentOwner.ownerChain)) + debug.patmat("def: "+ ((d, d.symbol.ownerChain, currentOwner.ownerChain))) if(d.symbol.moduleClass ne NoSymbol) d.symbol.moduleClass.owner = currentOwner d.symbol.owner = currentOwner // case _ if (t.symbol != NoSymbol) && (t.symbol ne null) => - debug.patmat("untouched "+ (t, t.getClass, t.symbol.ownerChain, currentOwner.ownerChain)) + debug.patmat("untouched "+ ((t, t.getClass, t.symbol.ownerChain, currentOwner.ownerChain))) case _ => } super.traverse(t) @@ -611,4 +605,4 @@ trait MatchTreeMaking extends MatchCodeGen with Debugging { // currentRun.trackerFactory.snapshot() } } -}
\ No newline at end of file +} diff --git a/src/compiler/scala/tools/nsc/transform/patmat/Solving.scala b/src/compiler/scala/tools/nsc/transform/patmat/Solving.scala index 34cdbeba8e..a0fb6e82fc 100644 --- a/src/compiler/scala/tools/nsc/transform/patmat/Solving.scala +++ b/src/compiler/scala/tools/nsc/transform/patmat/Solving.scala @@ -13,13 +13,6 @@ import scala.reflect.internal.util.Statistics trait Solving extends Logic { import PatternMatchingStats._ trait CNF extends PropositionalLogic { - - /** Override Array creation for efficiency (to not go through reflection). */ - private implicit val clauseTag: scala.reflect.ClassTag[Clause] = new scala.reflect.ClassTag[Clause] { - def runtimeClass: java.lang.Class[Clause] = classOf[Clause] - final override def newArray(len: Int): Array[Clause] = new Array[Clause](len) - } - import scala.collection.mutable.ArrayBuffer type FormulaBuilder = ArrayBuffer[Clause] def formulaBuilder = ArrayBuffer[Clause]() |