diff options
author | Martin Odersky <odersky@gmail.com> | 2006-06-14 16:35:21 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2006-06-14 16:35:21 +0000 |
commit | 7b6693a2a29afdcd612742d36f359893a2944c82 (patch) | |
tree | 7c20f8657cb08a56ac5f7c130505ae629bbb8ec2 | |
parent | bae76d1be3393da5819d0adfe51afcaf95510998 (diff) | |
download | scala-7b6693a2a29afdcd612742d36f359893a2944c82.tar.gz scala-7b6693a2a29afdcd612742d36f359893a2944c82.tar.bz2 scala-7b6693a2a29afdcd612742d36f359893a2944c82.zip |
Fixed problems when compiling man1: too many cl...
Fixed problems when compiling man1: too many classes + crash when
compiled separately.
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/classfile/UnPickler.scala | 7 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/UnCurry.scala | 6 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/UnPickler.scala b/src/compiler/scala/tools/nsc/symtab/classfile/UnPickler.scala index 201e086176..f531ea9643 100644 --- a/src/compiler/scala/tools/nsc/symtab/classfile/UnPickler.scala +++ b/src/compiler/scala/tools/nsc/symtab/classfile/UnPickler.scala @@ -119,14 +119,15 @@ abstract class UnPickler { case EXTref | EXTMODCLASSref => val name = readNameRef() val owner = if (readIndex == end) definitions.RootClass else readSymbolRef() - sym = if (tag == EXTref) owner.info.decl(name) - else if (name.toTermName == nme.ROOT) definitions.RootClass + sym = if (name.toTermName == nme.ROOT) definitions.RootClass else if (name == nme.ROOTPKG) definitions.RootPackage + else if (tag == EXTref) owner.info.decl(name) else owner.info.decl(name).moduleClass - if (sym == NoSymbol) + if (sym == NoSymbol) { errorBadSignature( "reference " + (if (name.isTypeName) "type " else "value ") + name.decode + " of " + owner + " refers to nonexisting symbol.") + } case NONEsym => sym = NoSymbol case _ => diff --git a/src/compiler/scala/tools/nsc/transform/UnCurry.scala b/src/compiler/scala/tools/nsc/transform/UnCurry.scala index 3a87b7c25c..6e04ccfd11 100644 --- a/src/compiler/scala/tools/nsc/transform/UnCurry.scala +++ b/src/compiler/scala/tools/nsc/transform/UnCurry.scala @@ -345,6 +345,12 @@ abstract class UnCurry extends InfoTransform { mainTransform(new TreeSubstituter(vparams map (.symbol), args).transform(body)) } + case Apply(Select(Function(vparams, body), nme.apply), args) => + // perform beta-reduction; this helps keep view applications small + withNeedLift(true) { + mainTransform(new TreeSubstituter(vparams map (.symbol), args).transform(body)) + } + case Apply(fn, args) => if (settings.noassertions.value && fn.symbol != null && |