summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/backend/ScalaPrimitives.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-09-24 23:06:30 +0000
committerPaul Phillips <paulp@improving.org>2009-09-24 23:06:30 +0000
commitd17b40768ccb498e36464dd800ed5b602a7de372 (patch)
treeab923a2709e91831cae4f41012c752bd6597d0d4 /src/compiler/scala/tools/nsc/backend/ScalaPrimitives.scala
parent67a8cdb404b54439abdce81790fdff147e073103 (diff)
downloadscala-d17b40768ccb498e36464dd800ed5b602a7de372.tar.gz
scala-d17b40768ccb498e36464dd800ed5b602a7de372.tar.bz2
scala-d17b40768ccb498e36464dd800ed5b602a7de372.zip
This patch represents breaking out bits of code...
This patch represents breaking out bits of code generation related to equality so that I can log what they're doing and easily alter them; to that end there is some code generation refactoring and a couple minor XML issues that came up.
Diffstat (limited to 'src/compiler/scala/tools/nsc/backend/ScalaPrimitives.scala')
-rw-r--r--src/compiler/scala/tools/nsc/backend/ScalaPrimitives.scala2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/ScalaPrimitives.scala b/src/compiler/scala/tools/nsc/backend/ScalaPrimitives.scala
index d205ab1098..290d90b3e9 100644
--- a/src/compiler/scala/tools/nsc/backend/ScalaPrimitives.scala
+++ b/src/compiler/scala/tools/nsc/backend/ScalaPrimitives.scala
@@ -508,6 +508,8 @@ abstract class ScalaPrimitives {
case _ => false
}
+ def isUniversalEqualityOp(code: Int): Boolean = (code == EQ) || (code == NE)
+ def isReferenceEqualityOp(code: Int): Boolean = (code == ID) || (code == NI)
def isArithmeticOp(code: Int): Boolean = code match {
case POS | NEG | NOT => true; // unary