summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
diff options
context:
space:
mode:
authormihaylov <mihaylov@epfl.ch>2007-02-06 16:43:20 +0000
committermihaylov <mihaylov@epfl.ch>2007-02-06 16:43:20 +0000
commita27f9a3b43732372c5e48159d188036fe323e561 (patch)
tree06429264f0dd549ca00917ff287c07403f627e91 /src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
parent56f672fec177cd45175f1f71e0e21e6bca201c1b (diff)
downloadscala-a27f9a3b43732372c5e48159d188036fe323e561.tar.gz
scala-a27f9a3b43732372c5e48159d188036fe323e561.tar.bz2
scala-a27f9a3b43732372c5e48159d188036fe323e561.zip
Use tuple syntax instead of Pair/Triple in the ...
Use tuple syntax instead of Pair/Triple in the backend
Diffstat (limited to 'src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala')
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala62
1 files changed, 31 insertions, 31 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
index c719a939bb..34e52699da 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
@@ -135,7 +135,7 @@ abstract class GenJVM extends SubComponent {
log("Generating class " + c.symbol +
" flags: " + Flags.flagsToString(c.symbol.flags))
clasz = c
- innerClasses = ListSet.Empty
+ innerClasses = ListSet.empty
var parents = c.symbol.info.parents
var ifaces = JClass.NO_INTERFACES
@@ -202,7 +202,7 @@ abstract class GenJVM extends SubComponent {
}
def addExceptionsAttribute(sym: Symbol): Unit = {
- val Pair(excs, others) = sym.attributes.partition((a => a match {
+ val {excs, others} = sym.attributes.partition((a => a match {
case AttrInfo(ThrowsAttr, _, _) => true
case _ => false
}))
@@ -288,7 +288,7 @@ abstract class GenJVM extends SubComponent {
buf.putShort(cpool.addUtf8("value").toShort)
emitElement(consts.head)
}
- for (val Pair(name, value) <- nvPairs) {
+ for (val {name, value} <- nvPairs) {
buf.putShort(cpool.addUtf8(name.toString()).toShort)
emitElement(value)
}
@@ -592,7 +592,7 @@ abstract class GenJVM extends SubComponent {
if (! (covered contains b) ) {
if (start >= 0) { // we're inside a handler range
end = labels(b).getAnchor()
- ranges = Pair(start, end) :: ranges
+ ranges = {start, end} :: ranges
start = -1
}
} else {
@@ -611,7 +611,7 @@ abstract class GenJVM extends SubComponent {
* code!
*/
if (start >= 0) {
- ranges = Pair(start, jcode.getPC()) :: ranges;
+ ranges = {start, jcode.getPC()} :: ranges;
}
if (covered != Nil)
@@ -1074,67 +1074,67 @@ abstract class GenJVM extends SubComponent {
abort("Unknown arithmetic primitive " + primitive)
}
- case Logical(op, kind) => Pair(op, kind) match {
- case Pair(AND, LONG) =>
+ case Logical(op, kind) => {op, kind} match {
+ case {AND, LONG} =>
jcode.emitLAND()
- case Pair(AND, INT) =>
+ case {AND, INT} =>
jcode.emitIAND()
- case Pair(AND, _) =>
+ case {AND, _} =>
jcode.emitIAND()
if (kind != BOOL)
jcode.emitT2T(javaType(INT), javaType(kind));
- case Pair(OR, LONG) =>
+ case {OR, LONG} =>
jcode.emitLOR()
- case Pair(OR, INT) =>
+ case {OR, INT} =>
jcode.emitIOR()
- case Pair(OR, _) =>
+ case {OR, _} =>
jcode.emitIOR()
if (kind != BOOL)
jcode.emitT2T(javaType(INT), javaType(kind));
- case Pair(XOR, LONG) =>
+ case {XOR, LONG} =>
jcode.emitLXOR()
- case Pair(XOR, INT) =>
+ case {XOR, INT} =>
jcode.emitIXOR()
- case Pair(XOR, _) =>
+ case {XOR, _} =>
jcode.emitIXOR()
if (kind != BOOL)
jcode.emitT2T(javaType(INT), javaType(kind));
}
- case Shift(op, kind) => Pair(op, kind) match {
- case Pair(LSL, LONG) =>
+ case Shift(op, kind) => {op, kind} match {
+ case {LSL, LONG} =>
jcode.emitLSHL()
- case Pair(LSL, INT) =>
+ case {LSL, INT} =>
jcode.emitISHL()
- case Pair(LSL, _) =>
+ case {LSL, _} =>
jcode.emitISHL()
jcode.emitT2T(javaType(INT), javaType(kind))
- case Pair(ASR, LONG) =>
+ case {ASR, LONG} =>
jcode.emitLSHR()
- case Pair(ASR, INT) =>
+ case {ASR, INT} =>
jcode.emitISHR()
- case Pair(ASR, _) =>
+ case {ASR, _} =>
jcode.emitISHR()
jcode.emitT2T(javaType(INT), javaType(kind))
- case Pair(LSR, LONG) =>
+ case {LSR, LONG} =>
jcode.emitLUSHR()
- case Pair(LSR, INT) =>
+ case {LSR, INT} =>
jcode.emitIUSHR()
- case Pair(LSR, _) =>
+ case {LSR, _} =>
jcode.emitIUSHR()
jcode.emitT2T(javaType(INT), javaType(kind))
}
- case Comparison(op, kind) => Pair(op, kind) match {
- case Pair(CMP, LONG) => jcode.emitLCMP()
- case Pair(CMPL, FLOAT) => jcode.emitFCMPL()
- case Pair(CMPG, FLOAT) => jcode.emitFCMPG()
- case Pair(CMPL, DOUBLE) => jcode.emitDCMPL()
- case Pair(CMPG, DOUBLE) => jcode.emitDCMPL()
+ case Comparison(op, kind) => {op, kind} match {
+ case {CMP, LONG} => jcode.emitLCMP()
+ case {CMPL, FLOAT} => jcode.emitFCMPL()
+ case {CMPG, FLOAT} => jcode.emitFCMPG()
+ case {CMPL, DOUBLE} => jcode.emitDCMPL()
+ case {CMPG, DOUBLE} => jcode.emitDCMPL()
}
case Conversion(src, dst) =>