Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

GenBCode version of "not eliminate loadmodule on static methods."

f27f2d8 modifies GenASM, we follow suite here,
making test/files/run/static-module-method.scala pass under GenBCode.
  • Loading branch information...
commit 7ee1a8321e8f47d5a6721691ab09d4e2818b0c29 1 parent 7d1e8aa
@magarciaEPFL magarciaEPFL authored
View
3  src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala
@@ -871,7 +871,8 @@ abstract class BCodeBodyBuilder extends BCodeSkelBuilder {
}
def genLoadModule(module: Symbol) {
- if (claszSymbol == module.moduleClass && jMethodName != "readResolve") {
+ def inStaticMethod = methSymbol != null && methSymbol.isStaticMember
+ if (claszSymbol == module.moduleClass && jMethodName != "readResolve" && !inStaticMethod) {
mnode.visitVarInsn(asm.Opcodes.ALOAD, 0)
} else {
val mbt = symInfoTK(module)
Please sign in to comment.
Something went wrong with that request. Please try again.