diff options
author | Miguel Garcia <miguelalfredo.garcia@epfl.ch> | 2013-06-06 19:21:38 +0200 |
---|---|---|
committer | Miguel Garcia <miguelalfredo.garcia@epfl.ch> | 2013-06-06 21:54:34 +0200 |
commit | 94297df0a8b63b2fa7d1d5bb8fa72d9dce5432e8 (patch) | |
tree | 4341758960d0f86e618fbbec1e9cfe5c045c41d4 | |
parent | 5213d23e4bba48b3dfaaf9fdd8b27700a4bb271a (diff) | |
download | scala-94297df0a8b63b2fa7d1d5bb8fa72d9dce5432e8.tar.gz scala-94297df0a8b63b2fa7d1d5bb8fa72d9dce5432e8.tar.bz2 scala-94297df0a8b63b2fa7d1d5bb8fa72d9dce5432e8.zip |
SI-5031 fixed in GenBCode
The GenASM-based fix for SI-5031 is 0527b2549bcada2fda2201daa630369b377d0877
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala | 4 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/jvm/BCodeTypes.scala | 3 | ||||
-rw-r--r-- | test/files/pos/t5031_3.flags | 1 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala b/src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala index 404d02b304..a7f43eefed 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala @@ -869,14 +869,14 @@ abstract class BCodeBodyBuilder extends BCodeSkelBuilder { ) lineNumber(tree) genLoadModule(module) - asmClassType(module) + symInfoTK(module) } def genLoadModule(module: Symbol) { if (claszSymbol == module.moduleClass && jMethodName != "readResolve") { mnode.visitVarInsn(asm.Opcodes.ALOAD, 0) } else { - val mbt = asmClassType(module) + val mbt = symInfoTK(module) mnode.visitFieldInsn( asm.Opcodes.GETSTATIC, mbt.getInternalName /* + "$" */ , diff --git a/src/compiler/scala/tools/nsc/backend/jvm/BCodeTypes.scala b/src/compiler/scala/tools/nsc/backend/jvm/BCodeTypes.scala index 723272a666..2e473f39c0 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/BCodeTypes.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/BCodeTypes.scala @@ -414,7 +414,8 @@ abstract class BCodeTypes extends BCodeIdiomatic { // TODO accomodate the fix for SI-5031 of https://github.com/scala/scala/commit/0527b2549bcada2fda2201daa630369b377d0877 // TODO Weaken this assertion? buildExemplar() needs to be updated, too. In the meantime, pos/t5031_3 has been moved to test/disabled/pos. - assert(!exemplars.containsKey(key), "Maps `symExemplars` and `exemplars` got out of synch.") + val whatWasInExemplars = exemplars.get(key) + assert(whatWasInExemplars == null, "Maps `symExemplars` and `exemplars` got out of synch.") val tr = buildExemplar(key, csym) symExemplars.put(csym, tr) if (csym != csym0) { symExemplars.put(csym0, tr) } diff --git a/test/files/pos/t5031_3.flags b/test/files/pos/t5031_3.flags deleted file mode 100644 index 80f054f494..0000000000 --- a/test/files/pos/t5031_3.flags +++ /dev/null @@ -1 +0,0 @@ --neo:GenASM |