diff options
author | Paul Phillips <paulp@improving.org> | 2011-09-26 23:49:18 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-09-26 23:49:18 +0000 |
commit | a90fbf59aee3ee36b23894fbf827f6d85ed6bdd2 (patch) | |
tree | 34e36e69ab6413b28963f50b3f87b9d63718e3e9 /src | |
parent | e412524fee20da975954c929893e88db17dbdd9a (diff) | |
download | scala-a90fbf59aee3ee36b23894fbf827f6d85ed6bdd2.tar.gz scala-a90fbf59aee3ee36b23894fbf827f6d85ed6bdd2.tar.bz2 scala-a90fbf59aee3ee36b23894fbf827f6d85ed6bdd2.zip |
Stripped a bunch of hostile code.
Closes SI-5026, no review.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/icode/GenICode.scala | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala index 75019f7624..8676d44f34 100644 --- a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala +++ b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala @@ -1506,20 +1506,8 @@ abstract class GenICode extends SubComponent { * @param elseCtx target context if the comparison yields false */ def genEqEqPrimitive(l: Tree, r: Tree, ctx: Context)(thenCtx: Context, elseCtx: Context): Unit = { - def getTempLocal: Local = ctx.method.lookupLocal(nme.EQEQ_LOCAL_VAR) match { - case Some(local) => local - case None => - val local = ctx.makeLocal(l.pos, AnyRefClass.typeConstructor, nme.EQEQ_LOCAL_VAR) - //assert(!l.pos.source.isEmpty, "bad position, unit = "+unit+", tree = "+l+", pos = "+l.pos.source) - // Note - I commented these out because they were crashing the test case in ticket #2426 - // (and I have also had to comment them out at various times while working on equality.) - // I don't know what purpose they are serving but it would be nice if they didn't have to - // crash the compiler. - // assert(l.pos.source == unit.source) - // assert(r.pos.source == unit.source) - local.start = (l.pos).line - local.end = (r.pos).line - local + def getTempLocal = ctx.method.lookupLocal(nme.EQEQ_LOCAL_VAR) getOrElse { + ctx.makeLocal(l.pos, AnyRefClass.typeConstructor, nme.EQEQ_LOCAL_VAR) } /** True if the equality comparison is between values that require the use of the rich equality @@ -1571,8 +1559,6 @@ abstract class GenICode extends SubComponent { } else { val eqEqTempLocal = getTempLocal var ctx1 = genLoad(l, ctx, ObjectReference) - - // dicey refactor section lazy val nonNullCtx = ctx1.newBlock // l == r -> if (l eq null) r eq null else l.equals(r) |