summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2011-04-13 19:12:57 +0000
committerIulian Dragos <jaguarul@gmail.com>2011-04-13 19:12:57 +0000
commit20d0a7dd224dfbcaa8e484628704b810a5ba7bdd (patch)
tree182d9488547612edadcc643ff2e560719bbc8bff /src
parentb38f7fe290b21fd96a72bd25ba10d3809d37fffd (diff)
downloadscala-20d0a7dd224dfbcaa8e484628704b810a5ba7bdd.tar.gz
scala-20d0a7dd224dfbcaa8e484628704b810a5ba7bdd.tar.bz2
scala-20d0a7dd224dfbcaa8e484628704b810a5ba7bdd.zip
Revert "Closes #4283.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/GenICode.scala5
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala5
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala4
3 files changed, 4 insertions, 10 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
index 7a906da007..249aefb10e 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
@@ -991,7 +991,6 @@ abstract class GenICode extends SubComponent {
case Select(qualifier, selector) =>
val sym = tree.symbol
generatedType = toTypeKind(sym.info)
- val hostClass = qualifier.tpe.typeSymbol
if (sym.isModule) {
if (settings.debug.value)
@@ -1000,11 +999,11 @@ abstract class GenICode extends SubComponent {
genLoadModule(ctx, sym, tree.pos)
ctx
} else if (sym.isStaticMember) {
- ctx.bb.emit(LOAD_FIELD(sym, true) setHostClass hostClass, tree.pos)
+ ctx.bb.emit(LOAD_FIELD(sym, true), tree.pos)
ctx
} else {
val ctx1 = genLoadQualifier(tree, ctx)
- ctx1.bb.emit(LOAD_FIELD(sym, false) setHostClass hostClass, tree.pos)
+ ctx1.bb.emit(LOAD_FIELD(sym, false), tree.pos)
ctx1
}
diff --git a/src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala b/src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala
index ba33c425f2..a46de06d6f 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala
@@ -171,11 +171,6 @@ trait Opcodes { self: ICodes =>
override def consumedTypes = if (isStatic) Nil else List(REFERENCE(field.owner));
override def producedTypes = List(toTypeKind(field.tpe));
-
- // more precise information about how to load this field
- // see #4283
- var hostClass: Symbol = field.owner
- def setHostClass(cls: Symbol): this.type = { hostClass = cls; this }
}
case class LOAD_MODULE(module: Symbol) extends Instruction {
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
index ac0cb97d45..2305e22ed2 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
@@ -1172,8 +1172,8 @@ abstract class GenJVM extends SubComponent with GenJVMUtil with GenAndroid {
case LOAD_LOCAL(local) =>
jcode.emitLOAD(indexOf(local), javaType(local.kind))
- case lf @ LOAD_FIELD(field, isStatic) =>
- var owner = javaName(lf.hostClass)
+ case LOAD_FIELD(field, isStatic) =>
+ var owner = javaName(field.owner)
if (settings.debug.value)
log("LOAD_FIELD with owner: " + owner +
" flags: " + Flags.flagsToString(field.owner.flags))